@fitlab-ai/agent-infra 0.6.4 → 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.
Files changed (193) hide show
  1. package/README.md +63 -27
  2. package/README.zh-CN.md +61 -25
  3. package/bin/cli.ts +18 -6
  4. package/dist/bin/cli.js +20 -6
  5. package/dist/lib/cp.js +127 -0
  6. package/dist/lib/defaults.json +1 -0
  7. package/dist/lib/init.js +3 -0
  8. package/dist/lib/sandbox/clipboard/bridge.js +23 -4
  9. package/dist/lib/sandbox/clipboard/index.js +12 -3
  10. package/dist/lib/sandbox/commands/create.js +11 -2
  11. package/dist/lib/sandbox/commands/enter.js +29 -6
  12. package/dist/lib/sandbox/commands/list-running.js +108 -0
  13. package/dist/lib/sandbox/commands/ls.js +24 -45
  14. package/dist/lib/sandbox/commands/rebuild.js +15 -7
  15. package/dist/lib/sandbox/config.js +3 -0
  16. package/dist/lib/sandbox/index.js +6 -4
  17. package/dist/lib/sandbox/readme-scaffold.js +148 -0
  18. package/dist/lib/sandbox/runtimes/ai-tools.dockerfile +12 -6
  19. package/dist/lib/sandbox/runtimes/base.dockerfile +3 -3
  20. package/dist/lib/sandbox/tools.js +213 -8
  21. package/dist/lib/update.js +12 -1
  22. package/lib/cp.ts +177 -0
  23. package/lib/defaults.json +1 -0
  24. package/lib/init.ts +10 -0
  25. package/lib/sandbox/clipboard/bridge.ts +23 -4
  26. package/lib/sandbox/clipboard/index.ts +12 -3
  27. package/lib/sandbox/commands/create.ts +18 -2
  28. package/lib/sandbox/commands/enter.ts +48 -6
  29. package/lib/sandbox/commands/list-running.ts +135 -0
  30. package/lib/sandbox/commands/ls.ts +28 -49
  31. package/lib/sandbox/commands/rebuild.ts +24 -7
  32. package/lib/sandbox/config.ts +7 -0
  33. package/lib/sandbox/index.ts +6 -4
  34. package/lib/sandbox/readme-scaffold.ts +177 -0
  35. package/lib/sandbox/runtimes/ai-tools.dockerfile +12 -6
  36. package/lib/sandbox/runtimes/base.dockerfile +3 -3
  37. package/lib/sandbox/tools.ts +248 -9
  38. package/lib/update.ts +15 -1
  39. package/package.json +1 -1
  40. package/templates/.agents/QUICKSTART.en.md +1 -1
  41. package/templates/.agents/QUICKSTART.zh-CN.md +1 -1
  42. package/templates/.agents/README.en.md +79 -2
  43. package/templates/.agents/README.zh-CN.md +79 -2
  44. package/templates/.agents/rules/create-issue.en.md +1 -1
  45. package/templates/.agents/rules/create-issue.github.en.md +1 -1
  46. package/templates/.agents/rules/create-issue.github.zh-CN.md +1 -1
  47. package/templates/.agents/rules/create-issue.zh-CN.md +1 -1
  48. package/templates/.agents/rules/issue-sync.github.en.md +6 -5
  49. package/templates/.agents/rules/issue-sync.github.zh-CN.md +6 -5
  50. package/templates/.agents/rules/milestone-inference.github.en.md +2 -2
  51. package/templates/.agents/rules/milestone-inference.github.zh-CN.md +2 -2
  52. package/templates/.agents/rules/no-mid-flow-questions.en.md +57 -0
  53. package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +57 -0
  54. package/templates/.agents/rules/pr-sync.github.en.md +4 -5
  55. package/templates/.agents/rules/pr-sync.github.zh-CN.md +4 -5
  56. package/templates/.agents/rules/task-management.en.md +9 -6
  57. package/templates/.agents/rules/task-management.zh-CN.md +9 -6
  58. package/templates/.agents/rules/testing-discipline.en.md +2 -2
  59. package/templates/.agents/rules/testing-discipline.zh-CN.md +2 -2
  60. package/templates/.agents/scripts/validate-artifact.js +1 -1
  61. package/templates/.agents/skills/analyze-task/SKILL.en.md +16 -4
  62. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +16 -4
  63. package/templates/.agents/skills/check-task/SKILL.en.md +43 -32
  64. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +42 -31
  65. package/templates/.agents/skills/code-task/SKILL.en.md +117 -0
  66. package/templates/.agents/skills/{implement-task → code-task}/SKILL.zh-CN.md +51 -24
  67. package/templates/.agents/skills/{implement-task → code-task}/config/verify.en.json +4 -4
  68. package/templates/.agents/skills/{implement-task → code-task}/config/verify.zh-CN.json +4 -4
  69. package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.zh-CN.md +2 -2
  70. package/templates/.agents/skills/{implement-task/reference/implementation-rules.en.md → code-task/reference/code-rules.en.md} +6 -6
  71. package/templates/.agents/skills/{implement-task/reference/implementation-rules.zh-CN.md → code-task/reference/code-rules.zh-CN.md} +3 -3
  72. package/templates/.agents/skills/code-task/reference/dual-mode.en.md +69 -0
  73. package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +69 -0
  74. package/templates/.agents/skills/{refine-task/reference/fix-workflow.en.md → code-task/reference/fix-mode.en.md} +12 -12
  75. package/templates/.agents/skills/{refine-task/reference/fix-workflow.zh-CN.md → code-task/reference/fix-mode.zh-CN.md} +8 -8
  76. package/templates/.agents/skills/code-task/reference/output-template.en.md +20 -0
  77. package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +20 -0
  78. package/templates/.agents/skills/{implement-task → code-task}/reference/report-template.en.md +4 -4
  79. package/templates/.agents/skills/{implement-task → code-task}/reference/report-template.zh-CN.md +3 -3
  80. package/templates/.agents/skills/code-task/scripts/detect-mode.js +370 -0
  81. package/templates/.agents/skills/commit/SKILL.en.md +2 -2
  82. package/templates/.agents/skills/commit/SKILL.zh-CN.md +2 -2
  83. package/templates/.agents/skills/commit/reference/task-status-update.en.md +10 -6
  84. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +10 -6
  85. package/templates/.agents/skills/complete-task/SKILL.en.md +5 -3
  86. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +5 -3
  87. package/templates/.agents/skills/create-pr/SKILL.en.md +17 -1
  88. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +17 -1
  89. package/templates/.agents/skills/import-codescan/SKILL.en.md +1 -1
  90. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
  91. package/templates/.agents/skills/import-dependabot/SKILL.en.md +2 -2
  92. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +2 -2
  93. package/templates/.agents/skills/import-issue/SKILL.en.md +3 -3
  94. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +3 -3
  95. package/templates/.agents/skills/plan-task/SKILL.en.md +4 -4
  96. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +4 -4
  97. package/templates/.agents/skills/restore-task/SKILL.en.md +4 -3
  98. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +4 -3
  99. package/templates/.agents/skills/review-analysis/SKILL.en.md +76 -0
  100. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +102 -0
  101. package/templates/.agents/skills/review-analysis/config/verify.en.json +51 -0
  102. package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +51 -0
  103. package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +87 -0
  104. package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +87 -0
  105. package/templates/.agents/skills/review-analysis/reference/report-template.en.md +90 -0
  106. package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +91 -0
  107. package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +47 -0
  108. package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +47 -0
  109. package/templates/.agents/skills/{review-task → review-code}/SKILL.en.md +11 -9
  110. package/templates/.agents/skills/{review-task → review-code}/SKILL.zh-CN.md +15 -9
  111. package/templates/.agents/skills/{review-task → review-code}/config/verify.en.json +7 -5
  112. package/templates/.agents/skills/{review-task → review-code}/config/verify.zh-CN.json +6 -4
  113. package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.en.md +21 -17
  114. package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.zh-CN.md +19 -15
  115. package/templates/.agents/skills/{review-task → review-code}/reference/report-template.en.md +5 -6
  116. package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +91 -0
  117. package/templates/.agents/skills/review-code/reference/review-criteria.en.md +48 -0
  118. package/templates/.agents/skills/{review-task → review-code}/reference/review-criteria.zh-CN.md +10 -4
  119. package/templates/.agents/skills/review-plan/SKILL.en.md +76 -0
  120. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +102 -0
  121. package/templates/.agents/skills/{refine-task → review-plan}/config/verify.en.json +14 -10
  122. package/templates/.agents/skills/{refine-task → review-plan}/config/verify.zh-CN.json +14 -10
  123. package/templates/.agents/skills/review-plan/reference/output-templates.en.md +87 -0
  124. package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +87 -0
  125. package/templates/.agents/skills/review-plan/reference/report-template.en.md +90 -0
  126. package/templates/.agents/skills/{review-task → review-plan}/reference/report-template.zh-CN.md +3 -3
  127. package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +47 -0
  128. package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +47 -0
  129. package/templates/.agents/skills/test/SKILL.en.md +2 -2
  130. package/templates/.agents/skills/test/SKILL.zh-CN.md +13 -31
  131. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +1 -0
  132. package/templates/.agents/templates/task.en.md +3 -3
  133. package/templates/.agents/templates/task.zh-CN.md +2 -2
  134. package/templates/.agents/workflows/bug-fix.en.yaml +126 -80
  135. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +90 -44
  136. package/templates/.agents/workflows/feature-development.en.yaml +115 -70
  137. package/templates/.agents/workflows/feature-development.zh-CN.yaml +92 -47
  138. package/templates/.agents/workflows/refactoring.en.yaml +123 -78
  139. package/templates/.agents/workflows/refactoring.zh-CN.yaml +89 -44
  140. package/templates/.claude/commands/code-task.en.md +8 -0
  141. package/templates/.claude/commands/code-task.zh-CN.md +8 -0
  142. package/templates/.claude/commands/review-analysis.en.md +8 -0
  143. package/templates/.claude/commands/review-analysis.zh-CN.md +8 -0
  144. package/templates/.claude/commands/review-code.en.md +8 -0
  145. package/templates/.claude/commands/review-code.zh-CN.md +8 -0
  146. package/templates/.claude/commands/review-plan.en.md +8 -0
  147. package/templates/.claude/commands/review-plan.zh-CN.md +8 -0
  148. package/templates/.gemini/commands/_project_/archive-tasks.zh-CN.toml +1 -1
  149. package/templates/.gemini/commands/_project_/code-task.en.toml +8 -0
  150. package/templates/.gemini/commands/_project_/code-task.zh-CN.toml +8 -0
  151. package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +1 -1
  152. package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +1 -1
  153. package/templates/.gemini/commands/_project_/review-analysis.en.toml +8 -0
  154. package/templates/.gemini/commands/_project_/review-analysis.zh-CN.toml +8 -0
  155. package/templates/.gemini/commands/_project_/review-code.en.toml +8 -0
  156. package/templates/.gemini/commands/_project_/review-code.zh-CN.toml +8 -0
  157. package/templates/.gemini/commands/_project_/review-plan.en.toml +8 -0
  158. package/templates/.gemini/commands/_project_/review-plan.zh-CN.toml +8 -0
  159. package/templates/.opencode/commands/code-task.en.md +11 -0
  160. package/templates/.opencode/commands/code-task.zh-CN.md +11 -0
  161. package/templates/.opencode/commands/review-analysis.en.md +11 -0
  162. package/templates/.opencode/commands/review-analysis.zh-CN.md +11 -0
  163. package/templates/.opencode/commands/review-code.en.md +11 -0
  164. package/templates/.opencode/commands/review-code.zh-CN.md +11 -0
  165. package/templates/.opencode/commands/review-plan.en.md +11 -0
  166. package/templates/.opencode/commands/review-plan.zh-CN.md +11 -0
  167. package/templates/.agents/skills/implement-task/SKILL.en.md +0 -173
  168. package/templates/.agents/skills/implement-task/reference/output-template.en.md +0 -20
  169. package/templates/.agents/skills/implement-task/reference/output-template.zh-CN.md +0 -20
  170. package/templates/.agents/skills/refine-task/SKILL.en.md +0 -153
  171. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +0 -153
  172. package/templates/.agents/skills/refine-task/reference/report-template.en.md +0 -64
  173. package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +0 -64
  174. package/templates/.agents/skills/review-task/reference/review-criteria.en.md +0 -42
  175. package/templates/.claude/commands/implement-task.en.md +0 -8
  176. package/templates/.claude/commands/implement-task.zh-CN.md +0 -8
  177. package/templates/.claude/commands/refine-task.en.md +0 -8
  178. package/templates/.claude/commands/refine-task.zh-CN.md +0 -8
  179. package/templates/.claude/commands/review-task.en.md +0 -8
  180. package/templates/.claude/commands/review-task.zh-CN.md +0 -8
  181. package/templates/.gemini/commands/_project_/implement-task.en.toml +0 -8
  182. package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +0 -8
  183. package/templates/.gemini/commands/_project_/refine-task.en.toml +0 -8
  184. package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +0 -8
  185. package/templates/.gemini/commands/_project_/review-task.en.toml +0 -8
  186. package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +0 -8
  187. package/templates/.opencode/commands/implement-task.en.md +0 -11
  188. package/templates/.opencode/commands/implement-task.zh-CN.md +0 -11
  189. package/templates/.opencode/commands/refine-task.en.md +0 -11
  190. package/templates/.opencode/commands/refine-task.zh-CN.md +0 -11
  191. package/templates/.opencode/commands/review-task.en.md +0 -11
  192. package/templates/.opencode/commands/review-task.zh-CN.md +0 -11
  193. /package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.en.md +0 -0
@@ -1,33 +1,62 @@
1
- # Feature Development Workflow
1
+ # Feature development workflow
2
2
  # Use this workflow when implementing a new feature.
3
+ #
4
+ # Note: a step's `pr_tasks` list is counted toward workflow progress only when
5
+ # `.agents/.airc.json:requiresPullRequest !== false` (see .agents/skills/complete-task/SKILL.md).
3
6
 
4
7
  name: feature-development
5
8
  description: End-to-end workflow for developing a new feature.
6
9
 
7
10
  steps:
8
11
  - name: analysis
9
- description: Analyze feature requirements, explore the codebase, and identify impacted areas.
12
+ description: Analyze feature requirements, explore the codebase, and identify affected areas.
10
13
  recommended_agents:
11
14
  - claude
12
15
  - gemini
13
16
  tasks:
14
17
  - Read and understand the feature requirements
15
18
  - Explore the codebase to identify relevant files and modules
16
- - Identify dependencies and potentially impacted areas
17
- - Record findings in the task file
19
+ - Identify dependencies and potential impact areas
20
+ - Record findings in the task workspace
18
21
  inputs:
19
- - Feature requirements or issue description
22
+ - Feature request or Issue description
20
23
  - Project codebase
21
24
  artifact_versioning:
22
25
  outputs:
23
26
  - name: analysis
24
27
  pattern: "analysis.md | analysis-r{N}.md"
25
- rule: "Scan existing analysis artifacts; create analysis.md for the first round, then analysis-r{N}.md for later revisions (N = current highest round + 1)"
28
+ rule: "Scan existing analysis artifacts; create analysis.md for round 1 and analysis-r{N}.md for later revisions (N = current highest round + 1)"
26
29
  outputs:
27
- - Updated task file (analysis section)
28
- - List of impacted files
30
+ - Requirement analysis report
31
+ - Affected files list
29
32
  - Identified risks or constraints
30
33
 
34
+ - name: analysis-review
35
+ description: Review whether the requirement analysis is complete, verifiable, and clearly scoped.
36
+ recommended_agents:
37
+ - claude
38
+ - gemini
39
+ tasks:
40
+ - Check requirement scope, constraints, and acceptance criteria
41
+ - Verify affected areas and risk identification
42
+ - Confirm the analysis is ready for design
43
+ - Create the requirement analysis review report
44
+ inputs:
45
+ - Latest requirement analysis report
46
+ - Original request or Issue description
47
+ artifact_versioning:
48
+ inputs:
49
+ - name: analysis
50
+ pattern: "analysis.md | analysis-r{N}.md"
51
+ rule: "Read the highest-round analysis artifact as review input"
52
+ outputs:
53
+ - name: review-analysis
54
+ pattern: "review-analysis.md | review-analysis-r{N}.md"
55
+ rule: "Scan existing requirement-analysis review artifacts; create review-analysis.md for round 1 and review-analysis-r{N}.md for later rounds (N = current highest round + 1)"
56
+ outputs:
57
+ - Requirement analysis review report
58
+ - Findings to fix, if any
59
+
31
60
  - name: design
32
61
  description: Create the technical design for the feature implementation.
33
62
  recommended_agents:
@@ -36,115 +65,131 @@ steps:
36
65
  tasks:
37
66
  - Define interfaces and data structures
38
67
  - Outline the implementation approach
39
- - Identify edge cases and error-handling strategies
40
- - Record the design in the task file
68
+ - Identify edge cases and error-handling strategy
69
+ - Record the design in the task workspace
41
70
  inputs:
42
- - Analysis results from the previous step
71
+ - Approved requirement analysis
43
72
  - Project architecture and conventions
44
73
  artifact_versioning:
45
74
  inputs:
46
75
  - name: analysis
47
76
  pattern: "analysis.md | analysis-r{N}.md"
48
77
  rule: "Read the highest-round analysis artifact as design input"
78
+ - name: review-analysis
79
+ pattern: "review-analysis.md | review-analysis-r{N}.md"
80
+ rule: "Read the highest-round analysis review artifact and confirm feedback is approved or handled"
49
81
  outputs:
50
82
  - name: plan
51
83
  pattern: "plan.md | plan-r{N}.md"
52
- rule: "Scan existing plan artifacts; create plan.md for the first round, then plan-r{N}.md for later revisions (N = current highest round + 1)"
84
+ rule: "Scan existing plan artifacts; create plan.md for round 1 and plan-r{N}.md for later revisions (N = current highest round + 1)"
53
85
  outputs:
54
- - Updated task file (design section)
86
+ - Technical plan
55
87
  - Interface definitions
56
88
  - Implementation plan
57
89
 
58
- - name: implementation
59
- description: Implement the feature according to the design plan.
90
+ - name: design-review
91
+ description: Review whether the technical design is implementable, low-risk, and requirement-complete.
92
+ recommended_agents:
93
+ - claude
94
+ - gemini
95
+ tasks:
96
+ - Verify the plan covers the approved analysis
97
+ - Check architecture fit, risks, and test strategy
98
+ - Confirm the plan is ready for coding
99
+ - Create the plan review report
100
+ inputs:
101
+ - Latest technical plan
102
+ - Latest requirement analysis and review report
103
+ artifact_versioning:
104
+ inputs:
105
+ - name: plan
106
+ pattern: "plan.md | plan-r{N}.md"
107
+ rule: "Read the highest-round plan artifact as review input"
108
+ outputs:
109
+ - name: review-plan
110
+ pattern: "review-plan.md | review-plan-r{N}.md"
111
+ rule: "Scan existing plan review artifacts; create review-plan.md for round 1 and review-plan-r{N}.md for later rounds (N = current highest round + 1)"
112
+ outputs:
113
+ - Plan review report
114
+ - Findings to fix, if any
115
+
116
+ - name: code
117
+ description: Implement the approved plan; run the same stage again after code review to handle fixes.
60
118
  recommended_agents:
61
119
  - codex
62
120
  - cursor
63
121
  tasks:
64
122
  - Create a feature branch
65
- - Implement the feature code
123
+ - Implement feature code
66
124
  - Write unit tests
67
125
  - Write integration tests when applicable
68
- - Ensure the code follows project conventions
126
+ - Fix findings from the latest code-review artifact when in fix mode
127
+ - Ensure code follows project conventions
69
128
  inputs:
70
- - Technical design from the previous step
129
+ - Approved technical design
71
130
  - Project coding standards
131
+ - Latest code review report when in fix mode
72
132
  artifact_versioning:
133
+ inputs:
134
+ - name: plan
135
+ pattern: "plan.md | plan-r{N}.md"
136
+ rule: "Read the highest-round plan artifact as implementation input"
137
+ - name: review-plan
138
+ pattern: "review-plan.md | review-plan-r{N}.md"
139
+ rule: "Read the highest-round plan review artifact and confirm feedback is approved or handled"
140
+ - name: review-code
141
+ pattern: "review-code.md | review-code-r{N}.md"
142
+ rule: "In fix mode, read the highest-round code review artifact and verify it matches the latest Code Review entry in task.md Activity Log"
73
143
  outputs:
74
- - name: implementation
75
- pattern: "implementation.md | implementation-r{N}.md"
76
- rule: "Scan existing implementation artifacts; create implementation.md for the first round, then implementation-r{N}.md for later re-implementations (N = current highest round + 1)"
144
+ - name: code
145
+ pattern: "code.md | code-r{N}.md"
146
+ rule: "Scan existing code artifacts; create code.md for round 1 and code-r{N}.md for later fixes or reimplementation (N = current highest round + 1)"
77
147
  outputs:
78
- - Feature branch with the implementation
148
+ - Feature branch with implementation or fixes
79
149
  - Test files
80
- - Updated task file (implementation notes)
150
+ - Updated task notes
81
151
 
82
- - name: review
83
- description: Review correctness, code style, and best practices in the implementation.
152
+ - name: code-review
153
+ description: Review implementation correctness, style, and best practices.
84
154
  recommended_agents:
85
155
  - claude
86
156
  tasks:
87
- - Review the correctness of the code changes
88
- - Check adherence to project conventions
157
+ - Review code changes for correctness
158
+ - Check project convention compliance
89
159
  - Verify test coverage and quality
90
- - Check for security and performance issues
91
- - Create a review report
160
+ - Check security and performance risks
161
+ - Create the code review report
92
162
  inputs:
93
163
  - Implementation branch
94
164
  - Project conventions
95
165
  artifact_versioning:
96
166
  inputs:
97
- - name: implementation
98
- pattern: "implementation.md | implementation-r{N}.md"
99
- rule: "Read the highest-round implementation artifact as review input"
100
- outputs:
101
- - name: review
102
- pattern: "review.md | review-r{N}.md"
103
- rule: "Scan existing review artifacts; create review.md for the first round, then review-r{N}.md for later rounds (N = current highest round + 1)"
104
- outputs:
105
- - Review report
106
- - List of issues to fix
107
-
108
- - name: fix
109
- description: Address issues found during the review step.
110
- recommended_agents:
111
- - codex
112
- - cursor
113
- tasks:
114
- - Fix all critical and major review findings
115
- - Address minor issues and suggestions when appropriate
116
- - Update tests as needed
117
- - Verify that all tests pass
118
- inputs:
119
- - Review report
120
- - Implementation branch
121
- artifact_versioning:
122
- inputs:
123
- - name: review
124
- pattern: "review.md | review-r{N}.md"
125
- rule: "Read the highest-round review artifact and verify that it matches the latest Code Review entry in the task.md Activity Log"
167
+ - name: code
168
+ pattern: "code.md | code-r{N}.md"
169
+ rule: "Read the highest-round code artifact as review input"
126
170
  outputs:
127
- - name: refinement
128
- pattern: "refinement.md | refinement-r{N}.md"
129
- rule: "Scan existing refinement artifacts; create refinement.md for the first round, then refinement-r{N}.md for later rounds (N = current highest round + 1)"
171
+ - name: review-code
172
+ pattern: "review-code.md | review-code-r{N}.md"
173
+ rule: "Scan existing code review artifacts; create review-code.md for round 1 and review-code-r{N}.md for later rounds (N = current highest round + 1)"
130
174
  outputs:
131
- - Updated branch with fixes
132
- - Updated task file
175
+ - Code review report
176
+ - Findings to fix
133
177
 
134
178
  - name: commit
135
- description: Finalize the changes and create a pull request.
179
+ description: Finalize changes and create a pull request (the PR portion runs only when the project enables the PR flow).
136
180
  recommended_agents:
137
181
  - claude
138
182
  - human
139
183
  tasks:
140
184
  - Ensure all tests pass
141
- - Write a clear commit message that follows project conventions
142
- - Create a pull request with an appropriate description
143
- - Link the PR to the relevant issue
185
+ - Write a clear commit message following conventions
144
186
  - Move the task to completed
187
+ pr_tasks:
188
+ - Create a pull request with an appropriate description
189
+ - Link the PR to the related Issue
145
190
  inputs:
146
191
  - Final implementation branch
147
- - Task file
192
+ - Task workspace
148
193
  outputs:
149
- - Pull request
150
- - Completed task file (stored in .agents/workspace/completed/)
194
+ - Completed task workspace under .agents/workspace/completed/
195
+ - Pull request (only when the project enables the PR flow)
@@ -1,5 +1,8 @@
1
1
  # 功能开发工作流
2
2
  # 实现新功能时使用此工作流。
3
+ #
4
+ # 注:步骤中的 `pr_tasks` 列表仅在 `.agents/.airc.json:requiresPullRequest !== false` 时
5
+ # 被计入工作流进度判定(详见 .agents/skills/complete-task/SKILL.md)。
3
6
 
4
7
  name: feature-development
5
8
  description: 开发新功能的端到端工作流。
@@ -24,10 +27,36 @@ steps:
24
27
  pattern: "analysis.md | analysis-r{N}.md"
25
28
  rule: "扫描现有分析产物;首轮创建 analysis.md,后续修订创建 analysis-r{N}.md(N = 当前最高轮次 + 1)"
26
29
  outputs:
27
- - 更新后的任务文件(分析部分)
30
+ - 需求分析报告
28
31
  - 受影响文件列表
29
32
  - 识别的风险或约束
30
33
 
34
+ - name: analysis-review
35
+ description: 审查需求分析是否完整、可验证且边界清晰。
36
+ recommended_agents:
37
+ - claude
38
+ - gemini
39
+ tasks:
40
+ - 检查需求范围、约束和验收标准
41
+ - 验证受影响区域和风险识别是否充分
42
+ - 确认分析结论足以进入设计阶段
43
+ - 创建需求分析审查报告
44
+ inputs:
45
+ - 最新需求分析报告
46
+ - 原始需求或 Issue 描述
47
+ artifact_versioning:
48
+ inputs:
49
+ - name: analysis
50
+ pattern: "analysis.md | analysis-r{N}.md"
51
+ rule: "读取最高轮次的分析产物作为审查输入"
52
+ outputs:
53
+ - name: review-analysis
54
+ pattern: "review-analysis.md | review-analysis-r{N}.md"
55
+ rule: "扫描现有需求分析审查产物;首轮创建 review-analysis.md,后续轮次创建 review-analysis-r{N}.md(N = 当前最高轮次 + 1)"
56
+ outputs:
57
+ - 需求分析审查报告
58
+ - 待修正问题列表(如有)
59
+
31
60
  - name: design
32
61
  description: 为功能实现创建技术设计方案。
33
62
  recommended_agents:
@@ -39,24 +68,53 @@ steps:
39
68
  - 识别边界情况和错误处理策略
40
69
  - 在任务文件中记录设计方案
41
70
  inputs:
42
- - 上一步的分析结果
71
+ - 已通过审查的需求分析
43
72
  - 项目架构和规范
44
73
  artifact_versioning:
45
74
  inputs:
46
75
  - name: analysis
47
76
  pattern: "analysis.md | analysis-r{N}.md"
48
77
  rule: "读取最高轮次的分析产物作为设计输入"
78
+ - name: review-analysis
79
+ pattern: "review-analysis.md | review-analysis-r{N}.md"
80
+ rule: "读取最高轮次的需求分析审查产物,确认分析已获通过或已处理反馈"
49
81
  outputs:
50
82
  - name: plan
51
83
  pattern: "plan.md | plan-r{N}.md"
52
84
  rule: "扫描现有方案产物;首轮创建 plan.md,后续修订创建 plan-r{N}.md(N = 当前最高轮次 + 1)"
53
85
  outputs:
54
- - 更新后的任务文件(设计部分)
86
+ - 技术方案
55
87
  - 接口定义
56
88
  - 实现计划
57
89
 
58
- - name: implementation
59
- description: 按照设计方案实现功能。
90
+ - name: design-review
91
+ description: 审查技术方案是否可实施、低风险且覆盖需求。
92
+ recommended_agents:
93
+ - claude
94
+ - gemini
95
+ tasks:
96
+ - 验证方案覆盖已批准的需求分析
97
+ - 检查架构一致性、风险和测试策略
98
+ - 确认方案足以进入编码阶段
99
+ - 创建技术方案审查报告
100
+ inputs:
101
+ - 最新技术方案
102
+ - 最新需求分析和审查报告
103
+ artifact_versioning:
104
+ inputs:
105
+ - name: plan
106
+ pattern: "plan.md | plan-r{N}.md"
107
+ rule: "读取最高轮次的方案产物作为审查输入"
108
+ outputs:
109
+ - name: review-plan
110
+ pattern: "review-plan.md | review-plan-r{N}.md"
111
+ rule: "扫描现有方案审查产物;首轮创建 review-plan.md,后续轮次创建 review-plan-r{N}.md(N = 当前最高轮次 + 1)"
112
+ outputs:
113
+ - 技术方案审查报告
114
+ - 待修正问题列表(如有)
115
+
116
+ - name: code
117
+ description: 按照已批准方案实现功能;在审查后再次执行同一阶段处理修复。
60
118
  recommended_agents:
61
119
  - codex
62
120
  - cursor
@@ -65,21 +123,33 @@ steps:
65
123
  - 实现功能代码
66
124
  - 编写单元测试
67
125
  - 编写集成测试(如适用)
126
+ - 修复最新 code-review 产物中要求处理的问题(如处于修复模式)
68
127
  - 确保代码遵循项目规范
69
128
  inputs:
70
- - 上一步的技术设计
129
+ - 已通过审查的技术设计
71
130
  - 项目编码标准
131
+ - 最新代码审查报告(修复模式适用)
72
132
  artifact_versioning:
133
+ inputs:
134
+ - name: plan
135
+ pattern: "plan.md | plan-r{N}.md"
136
+ rule: "读取最高轮次的方案产物作为实现输入"
137
+ - name: review-plan
138
+ pattern: "review-plan.md | review-plan-r{N}.md"
139
+ rule: "读取最高轮次的方案审查产物,确认方案已获通过或已处理反馈"
140
+ - name: review-code
141
+ pattern: "review-code.md | review-code-r{N}.md"
142
+ rule: "修复模式读取最高轮次的代码审查产物,并校验其与 task.md Activity Log 中最近一条 Code Review 记录一致"
73
143
  outputs:
74
- - name: implementation
75
- pattern: "implementation.md | implementation-r{N}.md"
76
- rule: "扫描现有实现产物;首轮创建 implementation.md,后续重实现创建 implementation-r{N}.md(N = 当前最高轮次 + 1)"
144
+ - name: code
145
+ pattern: "code.md | code-r{N}.md"
146
+ rule: "扫描现有实现产物;首轮创建 code.md,后续修复或重实现创建 code-r{N}.md(N = 当前最高轮次 + 1)"
77
147
  outputs:
78
- - 包含实现的功能分支
148
+ - 包含实现或修复的功能分支
79
149
  - 测试文件
80
150
  - 更新后的任务文件(实现备注)
81
151
 
82
- - name: review
152
+ - name: code-review
83
153
  description: 审查实现的正确性、代码风格和最佳实践。
84
154
  recommended_agents:
85
155
  - claude
@@ -88,63 +158,38 @@ steps:
88
158
  - 检查是否遵循项目规范
89
159
  - 验证测试覆盖率和质量
90
160
  - 检查安全和性能问题
91
- - 创建审查报告
161
+ - 创建代码审查报告
92
162
  inputs:
93
163
  - 实现分支
94
164
  - 项目规范
95
165
  artifact_versioning:
96
166
  inputs:
97
- - name: implementation
98
- pattern: "implementation.md | implementation-r{N}.md"
167
+ - name: code
168
+ pattern: "code.md | code-r{N}.md"
99
169
  rule: "读取最高轮次的实现产物作为审查输入"
100
170
  outputs:
101
- - name: review
102
- pattern: "review.md | review-r{N}.md"
103
- rule: "扫描现有审查产物;首轮创建 review.md,后续轮次创建 review-r{N}.md(N = 当前最高轮次 + 1)"
171
+ - name: review-code
172
+ pattern: "review-code.md | review-code-r{N}.md"
173
+ rule: "扫描现有代码审查产物;首轮创建 review-code.md,后续轮次创建 review-code-r{N}.md(N = 当前最高轮次 + 1)"
104
174
  outputs:
105
- - 审查报告
175
+ - 代码审查报告
106
176
  - 待修复问题列表
107
177
 
108
- - name: fix
109
- description: 处理审查阶段发现的问题。
110
- recommended_agents:
111
- - codex
112
- - cursor
113
- tasks:
114
- - 修复审查中的所有严重和重要问题
115
- - 酌情处理次要问题和建议
116
- - 根据需要更新测试
117
- - 验证所有测试通过
118
- inputs:
119
- - 审查报告
120
- - 实现分支
121
- artifact_versioning:
122
- inputs:
123
- - name: review
124
- pattern: "review.md | review-r{N}.md"
125
- rule: "读取最高轮次的审查产物,并校验其与 task.md Activity Log 中最近一条 Code Review 记录一致"
126
- outputs:
127
- - name: refinement
128
- pattern: "refinement.md | refinement-r{N}.md"
129
- rule: "扫描现有修复产物;首轮创建 refinement.md,后续轮次创建 refinement-r{N}.md(N = 当前最高轮次 + 1)"
130
- outputs:
131
- - 包含修复的更新分支
132
- - 更新后的任务文件
133
-
134
178
  - name: commit
135
- description: 最终确认变更并创建拉取请求。
179
+ description: 最终确认变更并创建拉取请求(PR 部分仅在项目启用 PR 流程时执行)。
136
180
  recommended_agents:
137
181
  - claude
138
182
  - human
139
183
  tasks:
140
184
  - 确保所有测试通过
141
185
  - 按规范编写清晰的提交信息
186
+ - 将任务移至已完成
187
+ pr_tasks:
142
188
  - 创建包含适当描述的拉取请求
143
189
  - 将 PR 关联到相关 Issue
144
- - 将任务移至已完成
145
190
  inputs:
146
191
  - 最终实现分支
147
192
  - 任务文件
148
193
  outputs:
149
- - 拉取请求
150
194
  - 已完成的任务文件(位于 .agents/workspace/completed/)
195
+ - 拉取请求(仅项目启用 PR 流程时)