@fitlab-ai/agent-infra 0.6.5 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -25
- package/README.zh-CN.md +49 -23
- package/dist/lib/defaults.json +1 -0
- package/dist/lib/init.js +3 -0
- package/dist/lib/sandbox/commands/create.js +4 -2
- package/dist/lib/sandbox/commands/enter.js +15 -4
- package/dist/lib/sandbox/commands/list-running.js +108 -0
- package/dist/lib/sandbox/commands/ls.js +24 -45
- package/dist/lib/sandbox/commands/rebuild.js +4 -2
- package/dist/lib/sandbox/config.js +3 -0
- package/dist/lib/sandbox/index.js +2 -1
- package/dist/lib/sandbox/runtimes/ai-tools.dockerfile +10 -6
- package/dist/lib/sandbox/tools.js +213 -8
- package/dist/lib/update.js +12 -1
- package/lib/defaults.json +1 -0
- package/lib/init.ts +10 -0
- package/lib/sandbox/commands/create.ts +10 -2
- package/lib/sandbox/commands/enter.ts +14 -4
- package/lib/sandbox/commands/list-running.ts +135 -0
- package/lib/sandbox/commands/ls.ts +28 -49
- package/lib/sandbox/commands/rebuild.ts +9 -2
- package/lib/sandbox/config.ts +7 -0
- package/lib/sandbox/index.ts +2 -1
- package/lib/sandbox/runtimes/ai-tools.dockerfile +10 -6
- package/lib/sandbox/tools.ts +248 -9
- package/lib/update.ts +15 -1
- package/package.json +1 -1
- package/templates/.agents/QUICKSTART.en.md +1 -1
- package/templates/.agents/QUICKSTART.zh-CN.md +1 -1
- package/templates/.agents/README.en.md +79 -2
- package/templates/.agents/README.zh-CN.md +79 -2
- package/templates/.agents/rules/create-issue.en.md +1 -1
- package/templates/.agents/rules/create-issue.github.en.md +1 -1
- package/templates/.agents/rules/create-issue.github.zh-CN.md +1 -1
- package/templates/.agents/rules/create-issue.zh-CN.md +1 -1
- package/templates/.agents/rules/issue-sync.github.en.md +6 -5
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +6 -5
- package/templates/.agents/rules/milestone-inference.github.en.md +2 -2
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +2 -2
- package/templates/.agents/rules/no-mid-flow-questions.en.md +57 -0
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +57 -0
- package/templates/.agents/rules/pr-sync.github.en.md +4 -5
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +4 -5
- package/templates/.agents/rules/task-management.en.md +9 -6
- package/templates/.agents/rules/task-management.zh-CN.md +9 -6
- package/templates/.agents/rules/testing-discipline.en.md +2 -2
- package/templates/.agents/rules/testing-discipline.zh-CN.md +2 -2
- package/templates/.agents/scripts/validate-artifact.js +1 -1
- package/templates/.agents/skills/analyze-task/SKILL.en.md +16 -4
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +16 -4
- package/templates/.agents/skills/check-task/SKILL.en.md +43 -32
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +42 -31
- package/templates/.agents/skills/code-task/SKILL.en.md +117 -0
- package/templates/.agents/skills/{implement-task → code-task}/SKILL.zh-CN.md +51 -24
- package/templates/.agents/skills/{implement-task → code-task}/config/verify.en.json +4 -4
- package/templates/.agents/skills/{implement-task → code-task}/config/verify.zh-CN.json +4 -4
- package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.zh-CN.md +2 -2
- package/templates/.agents/skills/{implement-task/reference/implementation-rules.en.md → code-task/reference/code-rules.en.md} +6 -6
- package/templates/.agents/skills/{implement-task/reference/implementation-rules.zh-CN.md → code-task/reference/code-rules.zh-CN.md} +3 -3
- package/templates/.agents/skills/code-task/reference/dual-mode.en.md +69 -0
- package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +69 -0
- package/templates/.agents/skills/{refine-task/reference/fix-workflow.en.md → code-task/reference/fix-mode.en.md} +12 -12
- package/templates/.agents/skills/{refine-task/reference/fix-workflow.zh-CN.md → code-task/reference/fix-mode.zh-CN.md} +8 -8
- package/templates/.agents/skills/code-task/reference/output-template.en.md +20 -0
- package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +20 -0
- package/templates/.agents/skills/{implement-task → code-task}/reference/report-template.en.md +4 -4
- package/templates/.agents/skills/{implement-task → code-task}/reference/report-template.zh-CN.md +3 -3
- package/templates/.agents/skills/code-task/scripts/detect-mode.js +370 -0
- package/templates/.agents/skills/commit/SKILL.en.md +2 -2
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +10 -6
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +10 -6
- package/templates/.agents/skills/complete-task/SKILL.en.md +5 -3
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +5 -3
- package/templates/.agents/skills/create-pr/SKILL.en.md +17 -1
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +17 -1
- package/templates/.agents/skills/import-codescan/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +2 -2
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/import-issue/SKILL.en.md +3 -3
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/plan-task/SKILL.en.md +4 -4
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/restore-task/SKILL.en.md +4 -3
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +4 -3
- package/templates/.agents/skills/review-analysis/SKILL.en.md +76 -0
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +102 -0
- package/templates/.agents/skills/review-analysis/config/verify.en.json +51 -0
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +51 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +87 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +87 -0
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +90 -0
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +91 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +47 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +47 -0
- package/templates/.agents/skills/{review-task → review-code}/SKILL.en.md +11 -9
- package/templates/.agents/skills/{review-task → review-code}/SKILL.zh-CN.md +15 -9
- package/templates/.agents/skills/{review-task → review-code}/config/verify.en.json +7 -5
- package/templates/.agents/skills/{review-task → review-code}/config/verify.zh-CN.json +6 -4
- package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.en.md +21 -17
- package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.zh-CN.md +19 -15
- package/templates/.agents/skills/{review-task → review-code}/reference/report-template.en.md +5 -6
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +91 -0
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +48 -0
- package/templates/.agents/skills/{review-task → review-code}/reference/review-criteria.zh-CN.md +10 -4
- package/templates/.agents/skills/review-plan/SKILL.en.md +76 -0
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +102 -0
- package/templates/.agents/skills/{refine-task → review-plan}/config/verify.en.json +14 -10
- package/templates/.agents/skills/{refine-task → review-plan}/config/verify.zh-CN.json +14 -10
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +87 -0
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +87 -0
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +90 -0
- package/templates/.agents/skills/{review-task → review-plan}/reference/report-template.zh-CN.md +3 -3
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +47 -0
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +47 -0
- package/templates/.agents/skills/test/SKILL.en.md +2 -2
- package/templates/.agents/skills/test/SKILL.zh-CN.md +13 -31
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +1 -0
- package/templates/.agents/templates/task.en.md +3 -3
- package/templates/.agents/templates/task.zh-CN.md +2 -2
- package/templates/.agents/workflows/bug-fix.en.yaml +126 -80
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +90 -44
- package/templates/.agents/workflows/feature-development.en.yaml +115 -70
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +92 -47
- package/templates/.agents/workflows/refactoring.en.yaml +123 -78
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +89 -44
- package/templates/.claude/commands/code-task.en.md +8 -0
- package/templates/.claude/commands/code-task.zh-CN.md +8 -0
- package/templates/.claude/commands/review-analysis.en.md +8 -0
- package/templates/.claude/commands/review-analysis.zh-CN.md +8 -0
- package/templates/.claude/commands/review-code.en.md +8 -0
- package/templates/.claude/commands/review-code.zh-CN.md +8 -0
- package/templates/.claude/commands/review-plan.en.md +8 -0
- package/templates/.claude/commands/review-plan.zh-CN.md +8 -0
- package/templates/.gemini/commands/_project_/archive-tasks.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/code-task.en.toml +8 -0
- package/templates/.gemini/commands/_project_/code-task.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/review-analysis.en.toml +8 -0
- package/templates/.gemini/commands/_project_/review-analysis.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/review-code.en.toml +8 -0
- package/templates/.gemini/commands/_project_/review-code.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/review-plan.en.toml +8 -0
- package/templates/.gemini/commands/_project_/review-plan.zh-CN.toml +8 -0
- package/templates/.opencode/commands/code-task.en.md +11 -0
- package/templates/.opencode/commands/code-task.zh-CN.md +11 -0
- package/templates/.opencode/commands/review-analysis.en.md +11 -0
- package/templates/.opencode/commands/review-analysis.zh-CN.md +11 -0
- package/templates/.opencode/commands/review-code.en.md +11 -0
- package/templates/.opencode/commands/review-code.zh-CN.md +11 -0
- package/templates/.opencode/commands/review-plan.en.md +11 -0
- package/templates/.opencode/commands/review-plan.zh-CN.md +11 -0
- package/templates/.agents/skills/implement-task/SKILL.en.md +0 -173
- package/templates/.agents/skills/implement-task/reference/output-template.en.md +0 -20
- package/templates/.agents/skills/implement-task/reference/output-template.zh-CN.md +0 -20
- package/templates/.agents/skills/refine-task/SKILL.en.md +0 -153
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +0 -153
- package/templates/.agents/skills/refine-task/reference/report-template.en.md +0 -64
- package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +0 -64
- package/templates/.agents/skills/review-task/reference/review-criteria.en.md +0 -42
- package/templates/.claude/commands/implement-task.en.md +0 -8
- package/templates/.claude/commands/implement-task.zh-CN.md +0 -8
- package/templates/.claude/commands/refine-task.en.md +0 -8
- package/templates/.claude/commands/refine-task.zh-CN.md +0 -8
- package/templates/.claude/commands/review-task.en.md +0 -8
- package/templates/.claude/commands/review-task.zh-CN.md +0 -8
- package/templates/.gemini/commands/_project_/implement-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/refine-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/review-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +0 -8
- package/templates/.opencode/commands/implement-task.en.md +0 -11
- package/templates/.opencode/commands/implement-task.zh-CN.md +0 -11
- package/templates/.opencode/commands/refine-task.en.md +0 -11
- package/templates/.opencode/commands/refine-task.zh-CN.md +0 -11
- package/templates/.opencode/commands/review-task.en.md +0 -11
- package/templates/.opencode/commands/review-task.zh-CN.md +0 -11
- /package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.en.md +0 -0
|
@@ -115,6 +115,18 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
115
115
|
## 依赖关系
|
|
116
116
|
- {需要的依赖和与其他模块的协调}
|
|
117
117
|
|
|
118
|
+
## 假设
|
|
119
|
+
|
|
120
|
+
> 如本次分析依赖某些假设,列在此处;没有则可省略本段。
|
|
121
|
+
|
|
122
|
+
- {本轮分析所依赖的假设}
|
|
123
|
+
|
|
124
|
+
## 未决问题
|
|
125
|
+
|
|
126
|
+
> 如有需要人工裁定的未决问题,列在此处;没有则可省略本段。
|
|
127
|
+
|
|
128
|
+
- {未决问题}
|
|
129
|
+
|
|
118
130
|
## 工作量和复杂度评估
|
|
119
131
|
- 复杂度:{高/中/低}
|
|
120
132
|
- 风险等级:{高/中/低}
|
|
@@ -189,10 +201,10 @@ node .agents/scripts/validate-artifact.js gate analyze-task .agents/workspace/ac
|
|
|
189
201
|
产出文件:
|
|
190
202
|
- 分析报告:.agents/workspace/active/{task-id}/{analysis-artifact}
|
|
191
203
|
|
|
192
|
-
下一步 -
|
|
193
|
-
- Claude Code / OpenCode:/
|
|
194
|
-
- Gemini CLI:/agent-infra:
|
|
195
|
-
- Codex CLI:$
|
|
204
|
+
下一步 - 审查需求分析:
|
|
205
|
+
- Claude Code / OpenCode:/review-analysis {task-id}
|
|
206
|
+
- Gemini CLI:/agent-infra:review-analysis {task-id}
|
|
207
|
+
- Codex CLI:$review-analysis {task-id}
|
|
196
208
|
```
|
|
197
209
|
|
|
198
210
|
## 完成检查清单
|
|
@@ -36,11 +36,12 @@ Extract from `task.md`:
|
|
|
36
36
|
Scan and record the existence, round, and status of these artifact types:
|
|
37
37
|
- `analysis.md`, `analysis-r{N}.md` - Requirement analysis
|
|
38
38
|
- `plan.md`, `plan-r{N}.md` - Technical plan
|
|
39
|
-
- `
|
|
40
|
-
- `
|
|
41
|
-
- `review.md`, `review-
|
|
39
|
+
- `code.md`, `code-r2.md`, ... - Code reports
|
|
40
|
+
- `review-analysis.md`, `review-analysis-r{N}.md` - Requirement analysis review reports
|
|
41
|
+
- `review-plan.md`, `review-plan-r{N}.md` - Technical plan review reports
|
|
42
|
+
- `review-code.md`, `review-code-r{N}.md` - Code review reports
|
|
42
43
|
|
|
43
|
-
For versioned artifacts (`analysis`, `plan`, `
|
|
44
|
+
For versioned artifacts (`analysis`, `review-analysis`, `plan`, `review-plan`, `code`, `review-code`):
|
|
44
45
|
- Scan all versioned files of the same artifact type in the task directory
|
|
45
46
|
- Record the latest round, latest file path, and total number of rounds for each artifact type
|
|
46
47
|
- If the latest round is recorded in `task.md` Activity Log, cross-check it against the actual file when possible
|
|
@@ -64,28 +65,30 @@ Basic info:
|
|
|
64
65
|
|
|
65
66
|
Workflow progress:
|
|
66
67
|
[done] Requirement Analysis analysis-r2.md (Round 2, latest)
|
|
68
|
+
[done] Analysis Review review-analysis.md (Round 1, latest)
|
|
67
69
|
[done] Technical Design plan.md (Round 1)
|
|
68
|
-
[
|
|
69
|
-
[
|
|
70
|
-
[pending] Code Review review.md (Round 1 will be created next)
|
|
70
|
+
[done] Plan Review review-plan.md (Round 1, latest)
|
|
71
|
+
[current] Code code.md (Round 1)
|
|
72
|
+
[pending] Code Review review-code.md (Round 1 will be created next)
|
|
71
73
|
[pending] Final Commit
|
|
72
74
|
|
|
73
75
|
Context files:
|
|
74
76
|
- analysis.md: Exists (Round 1)
|
|
75
77
|
- analysis-r2.md: Exists (Round 2, latest)
|
|
78
|
+
- review-analysis.md: Exists (Round 1, latest)
|
|
76
79
|
- plan.md: Exists (Round 1, latest)
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
- review.md:
|
|
80
|
+
- review-plan.md: Exists (Round 1, latest)
|
|
81
|
+
- code.md: Exists (Round 1, latest)
|
|
82
|
+
- review-code.md: Not started
|
|
80
83
|
|
|
81
84
|
If multiple rounds exist, show all rounds and mark the latest, for example:
|
|
82
|
-
- plan.md:
|
|
83
|
-
- plan-r2.md:
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
- review.md:
|
|
88
|
-
- review-r2.md:
|
|
85
|
+
- plan.md: Exists (Round 1)
|
|
86
|
+
- plan-r2.md: Exists (Round 2, latest)
|
|
87
|
+
- review-plan.md: Exists (Round 1)
|
|
88
|
+
- code.md: Exists (Round 1)
|
|
89
|
+
- code-r2.md: Exists (Round 2, latest)
|
|
90
|
+
- review-code.md: Exists (Round 1)
|
|
91
|
+
- review-code-r2.md: Exists (Round 2, latest)
|
|
89
92
|
|
|
90
93
|
Next step:
|
|
91
94
|
Complete implementation, then run code review
|
|
@@ -107,26 +110,34 @@ Recommend the appropriate next skill based on the current workflow state. You mu
|
|
|
107
110
|
> - `status = blocked` -> choose "Task Blocked"
|
|
108
111
|
> - `status = completed` -> choose "Task Completed"
|
|
109
112
|
> - `current_step = requirement-analysis` and the latest analysis artifact is complete -> choose "Analysis Complete"
|
|
113
|
+
> - `current_step = requirement-analysis-review` and the latest analysis review artifact is approved -> choose "Analysis Review Passed"
|
|
114
|
+
> - `current_step = requirement-analysis-review` and the latest analysis review artifact exists but is not approved or has findings -> choose "Analysis Review Has Issues"
|
|
110
115
|
> - `current_step = technical-design` and the latest plan artifact is complete -> choose "Plan Complete"
|
|
111
|
-
> -
|
|
112
|
-
> -
|
|
113
|
-
> - The latest
|
|
116
|
+
> - `current_step = technical-design-review` and the latest plan review artifact is approved -> choose "Plan Review Passed"
|
|
117
|
+
> - `current_step = technical-design-review` and the latest plan review artifact exists but is not approved or has findings -> choose "Plan Review Has Issues"
|
|
118
|
+
> - The latest code artifact exists and there is still no latest code review artifact -> choose "Code Complete"
|
|
119
|
+
> - `current_step = code-review` and the latest code review artifact exists, the verdict is `Approved`, and `Blocker = 0`, `Major = 0`, `Minor = 0` -> choose "Code Review Passed"
|
|
120
|
+
> - `current_step = code-review` and the latest code review artifact exists, but any `Blocker`, `Major`, or `Minor` issue remains, or the verdict is not a clean approval -> choose "Code Review Has Issues"
|
|
114
121
|
>
|
|
115
|
-
> **Important: if the latest review report contains any issue at all, do not use the
|
|
116
|
-
|
|
117
|
-
| Current State
|
|
118
|
-
|
|
119
|
-
| Analysis Complete
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
| Review
|
|
124
|
-
|
|
|
125
|
-
|
|
|
122
|
+
> **Important: if the latest review report contains any issue at all, do not use the corresponding review-passed row. Use the corresponding has-issues row instead.**
|
|
123
|
+
|
|
124
|
+
| Current State | Claude Code / OpenCode | Gemini CLI | Codex CLI |
|
|
125
|
+
|----------------------------|-----------------------------------------------------|------------------------------------------|-----------------------------------------------------|
|
|
126
|
+
| Analysis Complete | `/review-analysis {task-id}` | `/{{project}}:review-analysis {task-id}` | `$review-analysis {task-id}` |
|
|
127
|
+
| Analysis Review Passed | `/plan-task {task-id}` | `/{{project}}:plan-task {task-id}` | `$plan-task {task-id}` |
|
|
128
|
+
| Analysis Review Has Issues | `/analyze-task {task-id}` | `/{{project}}:analyze-task {task-id}` | `$analyze-task {task-id}` |
|
|
129
|
+
| Plan Complete | `/review-plan {task-id}` | `/{{project}}:review-plan {task-id}` | `$review-plan {task-id}` |
|
|
130
|
+
| Plan Review Passed | `/code-task {task-id}` | `/{{project}}:code-task {task-id}` | `$code-task {task-id}` |
|
|
131
|
+
| Plan Review Has Issues | `/plan-task {task-id}` | `/{{project}}:plan-task {task-id}` | `$plan-task {task-id}` |
|
|
132
|
+
| Code Complete | `/review-code {task-id}` | `/{{project}}:review-code {task-id}` | `$review-code {task-id}` |
|
|
133
|
+
| Code Review Passed | `/commit` | `/{{project}}:commit` | `$commit` |
|
|
134
|
+
| Code Review Has Issues | `/code-task {task-id}` | `/{{project}}:code-task {task-id}` | `$code-task {task-id}` |
|
|
135
|
+
| Task Blocked | Unblock the task or provide the missing information | — | Unblock the task or provide the missing information |
|
|
136
|
+
| Task Completed | No action needed | — | No action needed |
|
|
126
137
|
|
|
127
138
|
## Notes
|
|
128
139
|
|
|
129
140
|
1. **Read-only**: This skill only reads and reports -- it does not modify files
|
|
130
141
|
2. **Multi-directory search**: Always check active, blocked, and completed
|
|
131
142
|
3. **Quick reference**: Use this skill any time you need to see where a task is in the workflow
|
|
132
|
-
4. **Versioned artifacts**: `analysis`, `plan`, `
|
|
143
|
+
4. **Versioned artifacts**: `analysis`, `review-analysis`, `plan`, `review-plan`, `code`, and `review-code` must all report the actual round, not only the base filename
|
|
@@ -36,11 +36,12 @@ description: "查看任务的当前状态和进度"
|
|
|
36
36
|
按产物类型扫描并记录以下文件的存在、轮次和状态:
|
|
37
37
|
- `analysis.md`、`analysis-r{N}.md` - 需求分析
|
|
38
38
|
- `plan.md`、`plan-r{N}.md` - 技术方案
|
|
39
|
-
- `
|
|
40
|
-
- `
|
|
41
|
-
- `review.md`、`review-
|
|
39
|
+
- `code.md`、`code-r2.md`、... - 实现报告
|
|
40
|
+
- `review-analysis.md`、`review-analysis-r{N}.md` - 需求分析审查报告
|
|
41
|
+
- `review-plan.md`、`review-plan-r{N}.md` - 技术方案审查报告
|
|
42
|
+
- `review-code.md`、`review-code-r{N}.md` - 代码审查报告
|
|
42
43
|
|
|
43
|
-
对于版本化产物(`analysis`、`plan`、`
|
|
44
|
+
对于版本化产物(`analysis`、`review-analysis`、`plan`、`review-plan`、`code`、`review-code`):
|
|
44
45
|
- 扫描任务目录中的所有同类版本化文件
|
|
45
46
|
- 记录每类产物的最新轮次、最新文件路径和总轮次数
|
|
46
47
|
- 如果 `task.md` 的 Activity Log 记录了最新轮次,优先核对其与实际文件是否一致
|
|
@@ -64,28 +65,30 @@ description: "查看任务的当前状态和进度"
|
|
|
64
65
|
|
|
65
66
|
工作流进度:
|
|
66
67
|
[已完成] 需求分析 analysis-r2.md (Round 2, latest)
|
|
68
|
+
[已完成] 需求分析审查 review-analysis.md (Round 1, latest)
|
|
67
69
|
[已完成] 技术设计 plan.md (Round 1)
|
|
68
|
-
[
|
|
69
|
-
[
|
|
70
|
-
[待处理] 代码审查 review.md (Round 1 will be created next)
|
|
70
|
+
[已完成] 技术方案审查 review-plan.md (Round 1, latest)
|
|
71
|
+
[进行中] 实现 code.md (Round 1)
|
|
72
|
+
[待处理] 代码审查 review-code.md (Round 1 will be created next)
|
|
71
73
|
[待处理] 最终提交
|
|
72
74
|
|
|
73
75
|
上下文文件:
|
|
74
76
|
- analysis.md: 已存在 (Round 1)
|
|
75
77
|
- analysis-r2.md: 已存在 (Round 2, latest)
|
|
78
|
+
- review-analysis.md: 已存在 (Round 1, latest)
|
|
76
79
|
- plan.md: 已存在 (Round 1, latest)
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
- review.md:
|
|
80
|
+
- review-plan.md: 已存在 (Round 1, latest)
|
|
81
|
+
- code.md: 已存在 (Round 1, latest)
|
|
82
|
+
- review-code.md: 未开始
|
|
80
83
|
|
|
81
84
|
如果存在多轮产物,显示所有轮次,并标记最新版本,例如:
|
|
82
|
-
- plan.md
|
|
83
|
-
- plan-r2.md
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
- review.md
|
|
88
|
-
- review-r2.md
|
|
85
|
+
- plan.md: 已存在 (Round 1)
|
|
86
|
+
- plan-r2.md: 已存在 (Round 2, latest)
|
|
87
|
+
- review-plan.md: 已存在 (Round 1)
|
|
88
|
+
- code.md: 已存在 (Round 1)
|
|
89
|
+
- code-r2.md: 已存在 (Round 2, latest)
|
|
90
|
+
- review-code.md: 已存在 (Round 1)
|
|
91
|
+
- review-code-r2.md: 已存在 (Round 2, latest)
|
|
89
92
|
|
|
90
93
|
下一步:
|
|
91
94
|
完成实现,然后执行代码审查
|
|
@@ -107,26 +110,34 @@ description: "查看任务的当前状态和进度"
|
|
|
107
110
|
> - `status = blocked` → 选择「任务被阻塞」
|
|
108
111
|
> - `status = completed` → 选择「任务已完成」
|
|
109
112
|
> - `current_step = requirement-analysis` 且最新分析产物已完成 → 选择「分析完成」
|
|
113
|
+
> - `current_step = requirement-analysis-review` 且最新需求分析审查产物通过 → 选择「需求分析审查通过」
|
|
114
|
+
> - `current_step = requirement-analysis-review` 且最新需求分析审查产物存在但未通过或有问题 → 选择「需求分析审查有问题」
|
|
110
115
|
> - `current_step = technical-design` 且最新计划产物已完成 → 选择「计划完成」
|
|
116
|
+
> - `current_step = technical-design-review` 且最新技术方案审查产物通过 → 选择「技术方案审查通过」
|
|
117
|
+
> - `current_step = technical-design-review` 且最新技术方案审查产物存在但未通过或有问题 → 选择「技术方案审查有问题」
|
|
111
118
|
> - 最新实现产物已存在,且尚无最新审查产物 → 选择「实现完成」
|
|
112
|
-
> -
|
|
113
|
-
> -
|
|
119
|
+
> - `current_step = code-review` 且最新代码审查产物存在,且结论为 `Approved`,同时 `Blocker = 0`、`Major = 0`、`Minor = 0` → 选择「代码审查通过」
|
|
120
|
+
> - `current_step = code-review` 且最新代码审查产物存在,但仍有任何 `Blocker`、`Major` 或 `Minor` 问题,或结论不是无问题通过 → 选择「代码审查有问题」
|
|
114
121
|
>
|
|
115
|
-
>
|
|
116
|
-
|
|
117
|
-
| 当前状态
|
|
118
|
-
|
|
119
|
-
| 分析完成
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
122
|
+
> **特别注意:只要最新审查报告中存在任何问题,就不能使用对应「审查通过」行。必须改用对应「审查有问题」行。**
|
|
123
|
+
|
|
124
|
+
| 当前状态 | Claude Code / OpenCode | Gemini CLI | Codex CLI |
|
|
125
|
+
|--------------------|------------------------------|------------------------------------------|------------------------------|
|
|
126
|
+
| 分析完成 | `/review-analysis {task-id}` | `/agent-infra:review-analysis {task-id}` | `$review-analysis {task-id}` |
|
|
127
|
+
| 需求分析审查通过 | `/plan-task {task-id}` | `/agent-infra:plan-task {task-id}` | `$plan-task {task-id}` |
|
|
128
|
+
| 需求分析审查有问题 | `/analyze-task {task-id}` | `/agent-infra:analyze-task {task-id}` | `$analyze-task {task-id}` |
|
|
129
|
+
| 计划完成 | `/review-plan {task-id}` | `/agent-infra:review-plan {task-id}` | `$review-plan {task-id}` |
|
|
130
|
+
| 技术方案审查通过 | `/code-task {task-id}` | `/agent-infra:code-task {task-id}` | `$code-task {task-id}` |
|
|
131
|
+
| 技术方案审查有问题 | `/plan-task {task-id}` | `/agent-infra:plan-task {task-id}` | `$plan-task {task-id}` |
|
|
132
|
+
| 实现完成 | `/review-code {task-id}` | `/agent-infra:review-code {task-id}` | `$review-code {task-id}` |
|
|
133
|
+
| 代码审查通过 | `/commit` | `/agent-infra:commit` | `$commit` |
|
|
134
|
+
| 代码审查有问题 | `/code-task {task-id}` | `/agent-infra:code-task {task-id}` | `$code-task {task-id}` |
|
|
135
|
+
| 任务被阻塞 | 解除阻塞或提供所需信息 | — | 解除阻塞或提供所需信息 |
|
|
136
|
+
| 任务已完成 | 无需操作 | — | 无需操作 |
|
|
126
137
|
|
|
127
138
|
## 注意事项
|
|
128
139
|
|
|
129
140
|
1. **只读**:本技能仅读取和报告 —— 不修改任何文件
|
|
130
141
|
2. **多目录搜索**:始终检查 active、blocked 和 completed 目录
|
|
131
142
|
3. **快速参考**:随时可以使用本技能检查任务在工作流中的位置
|
|
132
|
-
4. **版本化产物**:`analysis`、`plan`、`
|
|
143
|
+
4. **版本化产物**:`analysis`、`review-analysis`、`plan`、`review-plan`、`code`、`review-code` 都需要报告实际轮次,而不是只报告固定文件名
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-task
|
|
3
|
+
description: "Implement code from the technical plan and output a report"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Task
|
|
7
|
+
|
|
8
|
+
Implement the approved plan and produce `code.md` or `code-r{N}.md`. This skill supports initial implementation and fix mode based on `review-code` feedback.
|
|
9
|
+
|
|
10
|
+
## Boundary / Critical Rules
|
|
11
|
+
|
|
12
|
+
- Follow the latest plan artifact: `plan.md` or `plan-r{N}.md`
|
|
13
|
+
- Fix mode only addresses findings from the latest `review-code`; env-blocked items are out of scope
|
|
14
|
+
- Never auto-run `git add` or `git commit`
|
|
15
|
+
- Create a new code artifact for each round and never overwrite an older one
|
|
16
|
+
- After executing this skill, you **must** immediately update task.md
|
|
17
|
+
|
|
18
|
+
Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
|
|
19
|
+
|
|
20
|
+
## Step 0: State Check (pre-execution hard gate)
|
|
21
|
+
|
|
22
|
+
After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first.
|
|
23
|
+
|
|
24
|
+
Run these commands and paste the raw output into both the user-facing reply and this round's `## State Check` section:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
git status -s
|
|
28
|
+
ls -la .agents/workspace/active/{task-id}/
|
|
29
|
+
tail .agents/workspace/active/{task-id}/task.md
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Steps
|
|
33
|
+
|
|
34
|
+
### 1. Verify Prerequisites
|
|
35
|
+
|
|
36
|
+
Require `task.md` and at least one plan artifact: `plan.md` or `plan-r{N}.md`.
|
|
37
|
+
|
|
38
|
+
### 2. Ensure the Task Branch
|
|
39
|
+
|
|
40
|
+
Read `reference/branch-management.md`, ensure the current branch matches the task branch, and write the final branch back to task.md when needed.
|
|
41
|
+
|
|
42
|
+
### 3. Narrow the Milestone
|
|
43
|
+
|
|
44
|
+
If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md` and `.agents/rules/milestone-inference.md`; follow Phase 2 for `code-task`.
|
|
45
|
+
|
|
46
|
+
### 4. Determine Mode and Round
|
|
47
|
+
|
|
48
|
+
Run mode detection and preserve its exit code:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
result=$(node .agents/skills/code-task/scripts/detect-mode.js .agents/workspace/active/{task-id})
|
|
52
|
+
status=$?
|
|
53
|
+
echo "$result"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Dispatch by `$status` and `result.mode`:
|
|
57
|
+
|
|
58
|
+
- `0` + `"init"`: initial implementation; record `{code-artifact}` and `{code-round}`
|
|
59
|
+
- `0` + `"fix"`: fix mode; record `{code-artifact}`, `{code-round}`, and `{review-artifact}`
|
|
60
|
+
- `1` + `"refused"`: print `result.message`, stop, and do not write an artifact or Activity Log entry
|
|
61
|
+
- `2` + `"error"`: print `result.message`, stop, and do not write an artifact or Activity Log entry
|
|
62
|
+
|
|
63
|
+
> Read `reference/dual-mode.md` before this step.
|
|
64
|
+
|
|
65
|
+
### 5. Determine the Input Plan
|
|
66
|
+
|
|
67
|
+
Read the highest-round plan artifact and use the `{code-artifact}` selected in step 4. In fix mode, also read `{review-artifact}`.
|
|
68
|
+
|
|
69
|
+
### 6. Read the Technical Plan
|
|
70
|
+
|
|
71
|
+
Extract implementation steps, files, test strategy, constraints, risks, and approved tradeoffs.
|
|
72
|
+
|
|
73
|
+
### 7. Implement the Code
|
|
74
|
+
|
|
75
|
+
Follow the plan in order.
|
|
76
|
+
|
|
77
|
+
> Read `reference/code-rules.md` before implementation.
|
|
78
|
+
> In fix mode, read `reference/fix-mode.md` before editing.
|
|
79
|
+
> Read `.agents/rules/testing-discipline.md` before adding or changing tests.
|
|
80
|
+
|
|
81
|
+
### 8. Run Test Verification
|
|
82
|
+
|
|
83
|
+
Use the project test commands from the `test` skill and iterate until all required tests pass.
|
|
84
|
+
|
|
85
|
+
### 9. Write the Code Report
|
|
86
|
+
|
|
87
|
+
Create `.agents/workspace/active/{task-id}/{code-artifact}`.
|
|
88
|
+
|
|
89
|
+
> Read `reference/report-template.md` before writing the report.
|
|
90
|
+
|
|
91
|
+
### 10. Update Task Status
|
|
92
|
+
|
|
93
|
+
Get the current time:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
date "+%Y-%m-%d %H:%M:%S%:z"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Set `current_step` to `code`, refresh task metadata, and append one Activity Log entry:
|
|
100
|
+
|
|
101
|
+
- initial implementation: `Code (Round {N})`
|
|
102
|
+
- fix mode: `Code (Round {N}, fix for {review-artifact})`
|
|
103
|
+
|
|
104
|
+
If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md`, then:
|
|
105
|
+
- Set `status: in-progress` according to issue-sync.md
|
|
106
|
+
- Create or update the task comment marker defined in `.agents/rules/issue-sync.md`
|
|
107
|
+
- Publish the `{code-artifact}` comment
|
|
108
|
+
|
|
109
|
+
### 11. Run Completion Gate
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
node .agents/scripts/validate-artifact.js gate code-task .agents/workspace/active/{task-id} {code-artifact} --format text
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 12. Tell the User
|
|
116
|
+
|
|
117
|
+
Use `reference/output-template.md` and show all TUI command formats.
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: "
|
|
2
|
+
name: code-task
|
|
3
|
+
description: "根据技术方案编码任务并输出报告"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# 编码任务
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
根据已批准的技术方案编码任务,并产出 `code.md` 或 `code-r{N}.md`。本技能支持初次实现和基于 `review-code` 反馈的修复双模式。
|
|
9
9
|
|
|
10
10
|
## 行为边界 / 关键规则
|
|
11
11
|
|
|
12
12
|
- 严格遵循最新方案产物:`plan.md` 或 `plan-r{N}.md`
|
|
13
|
+
- 修复模式只处理最新 `review-code` 标记的问题;env-blocked 项不在修复范围
|
|
13
14
|
- 绝不自动执行 `git add` 或 `git commit`
|
|
14
15
|
- 每轮实现都创建新的实现产物,不覆盖旧文件
|
|
15
16
|
- 执行本技能后,你**必须**立即更新 task.md
|
|
@@ -66,18 +67,40 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
66
67
|
|
|
67
68
|
### 3. 收窄里程碑
|
|
68
69
|
|
|
69
|
-
如果 task.md 中存在有效的 `issue_number`,执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测;再读取 `.agents/rules/milestone-inference.md`,按其中的「阶段 2:`
|
|
70
|
+
如果 task.md 中存在有效的 `issue_number`,执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测;再读取 `.agents/rules/milestone-inference.md`,按其中的「阶段 2:`code-task`」收窄 Issue milestone;如果 `has_triage=false`,则保持原 milestone 不变。
|
|
70
71
|
|
|
71
|
-
### 4.
|
|
72
|
+
### 4. 确定模式与轮次
|
|
73
|
+
|
|
74
|
+
执行 mode detection 脚本,先保存 exit code 再处理输出:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
result=$(node .agents/skills/code-task/scripts/detect-mode.js .agents/workspace/active/{task-id})
|
|
78
|
+
status=$?
|
|
79
|
+
echo "$result"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
按 `$status` 与 `result.mode` 分流;二者不一致时按 `$status` 为准并报告异常:
|
|
83
|
+
|
|
84
|
+
| `$status` | `result.mode` | 行动 |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
| 0 | `"init"` | 进入初次实现模式。记录 `{code-artifact}` = `result.next_artifact`、`{code-round}` = `result.next_round` |
|
|
87
|
+
| 0 | `"fix"` | 进入修复模式。记录 `{code-artifact}` = `result.next_artifact`、`{code-round}` = `result.next_round`、`{review-artifact}` = `result.review_artifact` |
|
|
88
|
+
| 1 | `"refused"` | 输出 `result.message` 给用户;立即停止;不写 Activity Log、不创建产物 |
|
|
89
|
+
| 2 | `"error"` | 输出 `result.message` 给用户;立即停止;不写 Activity Log、不创建产物 |
|
|
90
|
+
| 其他 | 任意 | 视为脚本异常,输出 `Mode detection failed: status={status}, output={result}` 并停止 |
|
|
91
|
+
|
|
92
|
+
> 双模式判定规则见 `reference/dual-mode.md`。执行此步骤前先读取 `reference/dual-mode.md`。
|
|
93
|
+
|
|
94
|
+
### 5. 确定输入方案
|
|
72
95
|
|
|
73
96
|
扫描 `.agents/workspace/active/{task-id}/` 并记录:
|
|
74
97
|
- 最高轮次的方案文件为 `{plan-artifact}`
|
|
75
|
-
-
|
|
76
|
-
-
|
|
98
|
+
- 使用步骤 4 记录的 `{code-round}` 与 `{code-artifact}`
|
|
99
|
+
- 若为修复模式,同时记录 `{review-artifact}`
|
|
77
100
|
|
|
78
101
|
如果存在 `plan-r{N}.md`,读取最高轮次的方案文件;否则读取 `plan.md`。
|
|
79
102
|
|
|
80
|
-
###
|
|
103
|
+
### 6. 阅读技术方案
|
|
81
104
|
|
|
82
105
|
仔细阅读 `{plan-artifact}`,提取:
|
|
83
106
|
- 实施步骤
|
|
@@ -85,26 +108,29 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
85
108
|
- 测试策略
|
|
86
109
|
- 约束、风险与已批准的取舍
|
|
87
110
|
|
|
88
|
-
|
|
111
|
+
修复模式还必须读取 `{review-artifact}`,并只处理其中标记的问题。
|
|
112
|
+
|
|
113
|
+
### 7. 执行代码实现
|
|
89
114
|
|
|
90
115
|
按照 `.agents/workflows/feature-development.yaml` 和方案顺序实施。
|
|
91
116
|
|
|
92
|
-
> 详细实现规则、测试执行循环和偏离处理见 `reference/
|
|
117
|
+
> 详细实现规则、测试执行循环和偏离处理见 `reference/code-rules.md`。执行此步骤前,先读取 `reference/code-rules.md`。
|
|
118
|
+
> 修复模式的范围纪律见 `reference/fix-mode.md`。进入修复模式前先读取 `reference/fix-mode.md`。
|
|
93
119
|
> 测试编写纪律(RED-GREEN-REFACTOR 与反模式)见 `.agents/rules/testing-discipline.md`;新增或调整测试前先读取该文件。
|
|
94
120
|
|
|
95
|
-
###
|
|
121
|
+
### 8. 运行测试验证
|
|
96
122
|
|
|
97
123
|
使用 `test` 技能中的项目测试命令,直到所有必需测试通过。
|
|
98
124
|
|
|
99
125
|
如果测试失败,先尝试修复并重新运行测试。只有在确认存在外部阻塞、环境缺失或需求不明确且超出任务范围时,才可以停止。
|
|
100
126
|
|
|
101
|
-
###
|
|
127
|
+
### 9. 编写实现报告
|
|
102
128
|
|
|
103
|
-
创建 `.agents/workspace/active/{task-id}/{
|
|
129
|
+
创建 `.agents/workspace/active/{task-id}/{code-artifact}`。
|
|
104
130
|
|
|
105
131
|
> 报告结构、必填章节和完整模板见 `reference/report-template.md`。写报告前先读取 `reference/report-template.md`。
|
|
106
132
|
|
|
107
|
-
###
|
|
133
|
+
### 10. 更新任务状态
|
|
108
134
|
|
|
109
135
|
获取当前时间:
|
|
110
136
|
|
|
@@ -113,26 +139,27 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
113
139
|
```
|
|
114
140
|
|
|
115
141
|
更新 `.agents/workspace/active/{task-id}/task.md`:
|
|
116
|
-
- `current_step`:
|
|
142
|
+
- `current_step`:code
|
|
117
143
|
- `assigned_to`:{当前代理}
|
|
118
144
|
- `updated_at`:{当前时间}
|
|
119
145
|
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
120
146
|
- 审查 `## 需求` 段落,仅把本轮已由代码实现且有测试通过支撑的条目从 `- [ ]` 勾为 `- [x]`
|
|
121
|
-
- 记录 Round `{
|
|
147
|
+
- 记录 Round `{code-round}` 的 `{code-artifact}`
|
|
122
148
|
- 追加:
|
|
123
|
-
|
|
149
|
+
- 初次实现:`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code (Round {N})** by {agent} — Code implemented, {n} files modified, {n} tests passed → {code-artifact}`
|
|
150
|
+
- 修复模式:`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code (Round {N}, fix for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues[, skipped {n} env-blocked] → {code-artifact}`
|
|
124
151
|
|
|
125
152
|
如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续;执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测):
|
|
126
153
|
- 按 issue-sync.md 设置 `status: in-progress`
|
|
127
154
|
- 创建或更新 `.agents/rules/issue-sync.md` 中定义的 task 评论标记(按 issue-sync.md 的 task.md 评论同步规则)
|
|
128
|
-
- 发布 `{
|
|
155
|
+
- 发布 `{code-artifact}` 评论
|
|
129
156
|
|
|
130
|
-
###
|
|
157
|
+
### 11. 完成校验
|
|
131
158
|
|
|
132
159
|
运行完成校验,确认任务产物和同步状态符合规范:
|
|
133
160
|
|
|
134
161
|
```bash
|
|
135
|
-
node .agents/scripts/validate-artifact.js gate
|
|
162
|
+
node .agents/scripts/validate-artifact.js gate code-task .agents/workspace/active/{task-id} {code-artifact} --format text
|
|
136
163
|
```
|
|
137
164
|
|
|
138
165
|
处理结果:
|
|
@@ -142,7 +169,7 @@ node .agents/scripts/validate-artifact.js gate implement-task .agents/workspace/
|
|
|
142
169
|
|
|
143
170
|
将校验输出保留在回复中作为当次验证输出。没有当次校验输出,不得声明完成。
|
|
144
171
|
|
|
145
|
-
###
|
|
172
|
+
### 12. 告知用户
|
|
146
173
|
|
|
147
174
|
> 仅在校验通过后执行本步骤。
|
|
148
175
|
|
|
@@ -151,7 +178,7 @@ node .agents/scripts/validate-artifact.js gate implement-task .agents/workspace/
|
|
|
151
178
|
## 完成检查清单
|
|
152
179
|
|
|
153
180
|
- [ ] 已完成批准范围内的代码实现
|
|
154
|
-
- [ ] 已创建 `{
|
|
181
|
+
- [ ] 已创建 `{code-artifact}`
|
|
155
182
|
- [ ] 所有必需测试通过
|
|
156
183
|
- [ ] 已更新 task.md 并追加 Activity Log
|
|
157
184
|
- [ ] 已向用户展示所有 TUI 格式的下一步命令(含自定义 TUI)
|
|
@@ -162,7 +189,7 @@ node .agents/scripts/validate-artifact.js gate implement-task .agents/workspace/
|
|
|
162
189
|
|
|
163
190
|
## 注意事项
|
|
164
191
|
|
|
165
|
-
- 首轮实现使用 `
|
|
192
|
+
- 首轮实现使用 `code.md`,后续轮次使用 `code-r{N}.md`
|
|
166
193
|
- 如偏离 `{plan-artifact}`,必须在报告中记录原因
|
|
167
194
|
- 新测试必须验证有意义的业务行为,而不是机械透传
|
|
168
195
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"skill": "
|
|
2
|
+
"skill": "code-task",
|
|
3
3
|
"checks": {
|
|
4
4
|
"task-meta": {
|
|
5
5
|
"required_fields": [
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"current_step",
|
|
14
14
|
"assigned_to"
|
|
15
15
|
],
|
|
16
|
-
"expected_step": "
|
|
16
|
+
"expected_step": "code"
|
|
17
17
|
},
|
|
18
18
|
"artifact": {
|
|
19
|
-
"file_pattern": "
|
|
19
|
+
"file_pattern": "code.md|code-r{N}.md",
|
|
20
20
|
"required_sections": [
|
|
21
21
|
"Modified Files",
|
|
22
22
|
"Key Code Explanation",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"activity-log": {
|
|
35
|
-
"expected_action_pattern": "
|
|
35
|
+
"expected_action_pattern": "Code \\(Round \\d+(?:, fix for review-code(?:-r\\d+)?\\.md)?\\)",
|
|
36
36
|
"freshness_minutes": 30
|
|
37
37
|
},
|
|
38
38
|
"platform-sync": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"skill": "
|
|
2
|
+
"skill": "code-task",
|
|
3
3
|
"checks": {
|
|
4
4
|
"task-meta": {
|
|
5
5
|
"required_fields": [
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"current_step",
|
|
14
14
|
"assigned_to"
|
|
15
15
|
],
|
|
16
|
-
"expected_step": "
|
|
16
|
+
"expected_step": "code"
|
|
17
17
|
},
|
|
18
18
|
"artifact": {
|
|
19
|
-
"file_pattern": "
|
|
19
|
+
"file_pattern": "code.md|code-r{N}.md",
|
|
20
20
|
"required_sections": [
|
|
21
21
|
"变更文件",
|
|
22
22
|
"关键代码说明",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"activity-log": {
|
|
35
|
-
"expected_action_pattern": "
|
|
35
|
+
"expected_action_pattern": "Code \\(Round \\d+(?:, fix for review-code(?:-r\\d+)?\\.md)?\\)",
|
|
36
36
|
"freshness_minutes": 30
|
|
37
37
|
},
|
|
38
38
|
"platform-sync": {
|
package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.zh-CN.md
RENAMED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## 分支名规则
|
|
6
6
|
|
|
7
|
-
- 格式:`
|
|
7
|
+
- 格式:`agent-infra-{type}-{slug}`
|
|
8
8
|
- 项目前缀:读取 `.agents/.airc.json` 中的 `project`
|
|
9
9
|
- `{type}`:读取 `task.md` frontmatter 中的 `type`
|
|
10
10
|
- `{slug}`:根据任务标题提取 3-6 个英文关键词,转为 kebab-case
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
- 当前分支不一致:按下方”创建与切换命令”章节切换到已记录分支
|
|
24
24
|
|
|
25
25
|
场景 B:`task.md` 未记录任务分支
|
|
26
|
-
- 判断当前分支是否符合项目分支命名规范(`
|
|
26
|
+
- 判断当前分支是否符合项目分支命名规范(`agent-infra-{type}-{slug}`)且语义上属于当前任务
|
|
27
27
|
- 符合:将当前分支名回写到 `task.md`,继续
|
|
28
28
|
- 不符合:生成新的任务分支名,按下方”创建与切换命令”章节创建并切换,回写到 `task.md`
|
|
29
29
|
|