Files
foka-ci/docs/ai.md
2026-01-11 12:24:46 +08:00

22 lines
933 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AI 助手作业指南 (ai.md)
你好Agent在处理 MiniCI 项目时,请遵循以下原则:
## 1. 增加新 API 的步骤
1.`controllers/` 对应模块下创建/修改 `dto.ts` 定义输入。
2.`index.ts` 中编写类,使用 `@Controller``@Post/Get` 等装饰器。
3. 如果涉及数据库,修改 `schema.prisma` 并运行 `npx prisma db push`
## 2. 核心逻辑位置
- 如果要修改 **流水线如何运行**,请看 `apps/server/runners/pipeline-runner.ts`
- 如果要修改 **任务调度**,请看 `apps/server/libs/execution-queue.ts`
- 如果要修改 **路由扫描**,请看 `apps/server/libs/route-scanner.ts`
## 3. 交互规范
- 前端 `import` 代码优先使用路径别名,例如:`import {net} from '@utils'`
- 始终保持代码简洁,优先使用现有的 `libs` 工具类。
- 修改代码后,务必确认 `pnpm dev` 是否能正常编译通过。