@fitlab-ai/agent-infra 0.3.0 → 0.3.2

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 (51) hide show
  1. package/README.md +368 -51
  2. package/README.zh-CN.md +369 -52
  3. package/bin/cli.js +1 -1
  4. package/lib/version.js +2 -1
  5. package/package.json +1 -1
  6. package/templates/.agents/README.md +12 -0
  7. package/templates/.agents/README.zh-CN.md +12 -0
  8. package/templates/.agents/skills/analyze-task/SKILL.md +106 -105
  9. package/templates/.agents/skills/check-task/SKILL.md +108 -94
  10. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +12 -0
  11. package/templates/.agents/skills/close-codescan/SKILL.md +64 -63
  12. package/templates/.agents/skills/close-dependabot/SKILL.md +71 -70
  13. package/templates/.agents/skills/commit/SKILL.md +19 -4
  14. package/templates/.agents/skills/commit/SKILL.zh-CN.md +19 -4
  15. package/templates/.agents/skills/complete-task/SKILL.md +11 -1
  16. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +11 -1
  17. package/templates/.agents/skills/create-issue/SKILL.md +302 -0
  18. package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +302 -0
  19. package/templates/.agents/skills/create-pr/SKILL.md +140 -5
  20. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +140 -5
  21. package/templates/.agents/skills/create-release-note/SKILL.md +18 -11
  22. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +18 -11
  23. package/templates/.agents/skills/create-task/SKILL.md +80 -78
  24. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +7 -6
  25. package/templates/.agents/skills/implement-task/SKILL.md +7 -2
  26. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +7 -2
  27. package/templates/.agents/skills/import-codescan/SKILL.md +54 -53
  28. package/templates/.agents/skills/import-dependabot/SKILL.md +57 -56
  29. package/templates/.agents/skills/import-issue/SKILL.md +58 -58
  30. package/templates/.agents/skills/init-labels/SKILL.md +8 -0
  31. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +8 -0
  32. package/templates/.agents/skills/plan-task/SKILL.md +151 -149
  33. package/templates/.agents/skills/refine-task/SKILL.md +147 -137
  34. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +10 -2
  35. package/templates/.agents/skills/review-task/SKILL.md +196 -186
  36. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +13 -4
  37. package/templates/.agents/skills/sync-issue/SKILL.md +252 -272
  38. package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +26 -47
  39. package/templates/.agents/skills/sync-pr/SKILL.md +274 -82
  40. package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +251 -59
  41. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +1 -1
  42. package/templates/.claude/CLAUDE.md +13 -0
  43. package/templates/.claude/CLAUDE.zh-CN.md +13 -0
  44. package/templates/.claude/commands/create-issue.md +8 -0
  45. package/templates/.claude/commands/create-issue.zh-CN.md +8 -0
  46. package/templates/.gemini/commands/_project_/create-issue.toml +8 -0
  47. package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +8 -0
  48. package/templates/.opencode/commands/create-issue.md +11 -0
  49. package/templates/.opencode/commands/create-issue.zh-CN.md +11 -0
  50. package/templates/AGENTS.md +13 -0
  51. package/templates/AGENTS.zh-CN.md +13 -0
@@ -1,169 +1,170 @@
1
1
  ---
2
2
  name: analyze-task
3
3
  description: >
4
- 分析已有任务并输出需求分析文档,支持多轮分析产物(analysis.md / analysis-r{N}.md)。
5
- 当用户要求分析某个任务时触发。参数:task-id。
4
+ Analyze an existing task and output a requirements analysis document,
5
+ supporting multi-round artifacts (`analysis.md` / `analysis-r{N}.md`).
6
+ Triggered when the user asks to analyze a task. Argument: task-id.
6
7
  ---
7
8
 
8
- # 分析任务
9
+ # Analyze Task
9
10
 
10
- ## 行为边界 / 关键规则
11
+ ## Boundary / Critical Rules
11
12
 
12
- - 本技能仅产出需求分析文档(`analysis.md` `analysis-r{N}.md`)—— 不修改任何业务代码
13
- - 严格基于 `task.md` 中已有的需求、上下文和来源信息展开分析
14
- - 执行本技能后,你**必须**立即更新 task.md 中的任务状态
13
+ - This skill only outputs a requirements analysis document (`analysis.md` or `analysis-r{N}.md`) and does not modify any business code
14
+ - Base the analysis strictly on the existing requirements, context, and source information in `task.md`
15
+ - After executing this skill, you **must** immediately update task status in task.md
15
16
 
16
- ## 执行步骤
17
+ ## Steps
17
18
 
18
- ### 1. 验证前置条件
19
+ ### 1. Verify Prerequisites
19
20
 
20
- 检查必要文件:
21
- - `.agent-workspace/active/{task-id}/task.md` - 任务文件
21
+ Check required files:
22
+ - `.agent-workspace/active/{task-id}/task.md` - Task file
22
23
 
23
- 注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
24
+ Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
24
25
 
25
- 如果缺少 `task.md`,提示用户先创建或导入任务。
26
+ If `task.md` is missing, tell the user to create or import the task first.
26
27
 
27
- ### 2. 确定分析轮次
28
+ ### 2. Determine the Analysis Round
28
29
 
29
- 扫描 `.agent-workspace/active/{task-id}/` 目录中的分析产物文件:
30
- - 如果不存在 `analysis.md` 且不存在 `analysis-r*.md` 本轮为第 1 轮,产出 `analysis.md`
31
- - 如果存在 `analysis.md` 且不存在 `analysis-r*.md` 本轮为第 2 轮,产出 `analysis-r2.md`
32
- - 如果存在 `analysis-r{N}.md` 本轮为第 N+1 轮,产出 `analysis-r{N+1}.md`
30
+ Scan `.agent-workspace/active/{task-id}/` for analysis artifact files:
31
+ - If neither `analysis.md` nor `analysis-r*.md` exists -> this is Round 1 and must create `analysis.md`
32
+ - If `analysis.md` exists and no `analysis-r*.md` exists -> this is Round 2 and must create `analysis-r2.md`
33
+ - If `analysis-r{N}.md` exists -> this is Round N+1 and must create `analysis-r{N+1}.md`
33
34
 
34
- 记录:
35
- - `{analysis-round}`:本轮分析轮次
36
- - `{analysis-artifact}`:本轮分析产物文件名
35
+ Record:
36
+ - `{analysis-round}`: the current analysis round
37
+ - `{analysis-artifact}`: the artifact filename for this round
37
38
 
38
- ### 3. 阅读任务上下文
39
+ ### 3. Read Task Context
39
40
 
40
- 仔细阅读 `task.md` 以理解:
41
- - 任务标题、描述和需求列表
42
- - 上下文信息(IssuePR、分支、告警编号等)
43
- - 当前已知的受影响文件和约束
41
+ Read `task.md` carefully to understand:
42
+ - task title, description, and requirement list
43
+ - context information (Issue, PR, branch, alert numbers, etc.)
44
+ - currently known affected files and constraints
44
45
 
45
- `task.md` 包含以下来源字段,补充读取对应来源信息:
46
+ If `task.md` contains these source fields, also read the corresponding source information:
46
47
  - `issue_number` - GitHub Issue
47
- - `codescan_alert_number` - Code Scanning 告警
48
- - `security_alert_number` - Dependabot 告警
48
+ - `codescan_alert_number` - Code Scanning alert
49
+ - `security_alert_number` - Dependabot alert
49
50
 
50
- ### 4. 执行需求分析
51
+ ### 4. Perform Requirements Analysis
51
52
 
52
- 遵循 `.agents/workflows/feature-development.yaml` 中的 `analysis` 步骤:
53
+ Follow the `analysis` step in `.agents/workflows/feature-development.yaml`:
53
54
 
54
- **必要任务**(仅分析,不编写业务代码):
55
- - [ ] 理解任务需求和目标
56
- - [ ] 搜索相关代码文件(**只读**)
57
- - [ ] 分析代码结构和影响范围
58
- - [ ] 识别潜在技术风险和依赖
59
- - [ ] 评估工作量和复杂度
55
+ **Required tasks** (analysis only, no business code changes):
56
+ - [ ] Understand the task requirements and goals
57
+ - [ ] Search related code files (**read-only**)
58
+ - [ ] Analyze code structure and impact scope
59
+ - [ ] Identify potential technical risks and dependencies
60
+ - [ ] Assess effort and complexity
60
61
 
61
- ### 5. 输出分析文档
62
+ ### 5. Output Analysis Document
62
63
 
63
- 创建 `.agent-workspace/active/{task-id}/{analysis-artifact}`。
64
+ Create `.agent-workspace/active/{task-id}/{analysis-artifact}`.
64
65
 
65
- ## 输出模板
66
+ ## Output Template
66
67
 
67
68
  ```markdown
68
- # 需求分析报告
69
+ # Requirements Analysis Report
69
70
 
70
- - **分析轮次**:Round {analysis-round}
71
- - **产物文件**:`{analysis-artifact}`
71
+ - **Analysis round**: Round {analysis-round}
72
+ - **Artifact file**: `{analysis-artifact}`
72
73
 
73
- ## 需求来源
74
+ ## Requirement Source
74
75
 
75
- **来源类型**:{用户描述 / GitHub Issue / Code Scanning / Dependabot / 其他}
76
- **来源摘要**:
77
- > {任务来源或关键上下文}
76
+ **Source type**: {User description / GitHub Issue / Code Scanning / Dependabot / Other}
77
+ **Source summary**:
78
+ > {Task source or key context}
78
79
 
79
- ## 需求理解
80
- {用自己的话重述需求以确认理解}
80
+ ## Requirement Understanding
81
+ {Restate the requirement in your own words to confirm understanding}
81
82
 
82
- ## 相关文件
83
- - `{file-path}:{line-number}` - {描述}
83
+ ## Related Files
84
+ - `{file-path}:{line-number}` - {Description}
84
85
 
85
- ## 影响评估
86
- **直接影响**:
87
- - {受影响的模块和文件}
86
+ ## Impact Assessment
87
+ **Direct impact**:
88
+ - {Affected modules and files}
88
89
 
89
- **间接影响**:
90
- - {可能受影响的其他部分}
90
+ **Indirect impact**:
91
+ - {Other parts that may be affected}
91
92
 
92
- ## 技术风险
93
- - {风险描述和缓解思路}
93
+ ## Technical Risks
94
+ - {Risk description and mitigation idea}
94
95
 
95
- ## 依赖关系
96
- - {需要的依赖和与其他模块的协调}
96
+ ## Dependencies
97
+ - {Required dependencies and coordination with other modules}
97
98
 
98
- ## 工作量和复杂度评估
99
- - 复杂度:{高/中/低}
100
- - 风险等级:{高/中/低}
99
+ ## Effort and Complexity Assessment
100
+ - Complexity: {High/Medium/Low}
101
+ - Risk level: {High/Medium/Low}
101
102
  ```
102
103
 
103
- ### 6. 更新任务状态
104
+ ### 6. Update Task Status
104
105
 
105
- 获取当前时间:
106
+ Get the current time:
106
107
 
107
108
  ```bash
108
109
  date "+%Y-%m-%d %H:%M:%S"
109
110
  ```
110
111
 
111
- 更新 `.agent-workspace/active/{task-id}/task.md`:
112
- - `current_step`:requirement-analysis
113
- - `assigned_to`:{当前 AI 代理}
114
- - `updated_at`:{当前时间}
115
- - 记录本轮分析产物:`{analysis-artifact}`(Round `{analysis-round}`)
116
- - 如任务模板包含 `## 分析` 段落,更新为指向 `{analysis-artifact}` 的链接
117
- - 在工作流进度中标记 requirement-analysis 为已完成,并注明实际轮次(如果任务模板支持)
118
- - **追加**到 `## Activity Log`(不要覆盖之前的记录):
112
+ Update `.agent-workspace/active/{task-id}/task.md`:
113
+ - `current_step`: requirement-analysis
114
+ - `assigned_to`: {current AI agent}
115
+ - `updated_at`: {current time}
116
+ - Record the analysis artifact for this round: `{analysis-artifact}` (Round `{analysis-round}`)
117
+ - If the task template contains a `## Analysis` section, update it to link to `{analysis-artifact}`
118
+ - Mark requirement-analysis as complete in workflow progress and include the actual round when the task template supports it
119
+ - **Append** to `## Activity Log` (do NOT overwrite previous entries):
119
120
  ```
120
121
  - {yyyy-MM-dd HH:mm:ss} — **Requirement Analysis (Round {N})** by {agent} — Analysis completed → {analysis-artifact}
121
122
  ```
122
123
 
123
- ### 7. 告知用户
124
+ ### 7. Inform User
124
125
 
125
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
126
+ > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
126
127
 
127
- 输出格式:
128
+ Output format:
128
129
  ```
129
- 任务 {task-id} 分析完成。
130
+ Analysis complete for task {task-id}.
130
131
 
131
- 摘要:
132
- - 分析轮次:Round {analysis-round}
133
- - 相关文件:{数量}
134
- - 风险等级:{评估}
132
+ Summary:
133
+ - Analysis round: Round {analysis-round}
134
+ - Related files: {count}
135
+ - Risk level: {assessment}
135
136
 
136
- 产出文件:
137
- - 分析报告:.agent-workspace/active/{task-id}/{analysis-artifact}
137
+ Output file:
138
+ - Analysis report: .agent-workspace/active/{task-id}/{analysis-artifact}
138
139
 
139
- 下一步 - 设计技术方案:
140
- - Claude Code / OpenCode:/plan-task {task-id}
141
- - Gemini CLI:/agent-infra:plan-task {task-id}
142
- - Codex CLI:$plan-task {task-id}
140
+ Next step - create technical plan:
141
+ - Claude Code / OpenCode: /plan-task {task-id}
142
+ - Gemini CLI: /{{project}}:plan-task {task-id}
143
+ - Codex CLI: $plan-task {task-id}
143
144
  ```
144
145
 
145
- ## 完成检查清单
146
+ ## Completion Checklist
146
147
 
147
- - [ ] 阅读并理解了任务文件和来源信息
148
- - [ ] 创建了分析文档 `.agent-workspace/active/{task-id}/{analysis-artifact}`
149
- - [ ] 更新了 task.md 中的 `current_step` requirement-analysis
150
- - [ ] 更新了 task.md 中的 `updated_at` 为当前时间
151
- - [ ] 更新了 task.md 中的 `assigned_to`
152
- - [ ] 追加了 Activity Log 条目到 task.md
153
- - [ ] 在工作流进度中标记了 requirement-analysis 为已完成
154
- - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,不要筛选)
155
- - [ ] **没有修改任何业务代码**
148
+ - [ ] Read and understood the task file and source information
149
+ - [ ] Created analysis document `.agent-workspace/active/{task-id}/{analysis-artifact}`
150
+ - [ ] Updated `current_step` to requirement-analysis in task.md
151
+ - [ ] Updated `updated_at` to the current time in task.md
152
+ - [ ] Updated `assigned_to` in task.md
153
+ - [ ] Appended an Activity Log entry to task.md
154
+ - [ ] Marked requirement-analysis as complete in workflow progress
155
+ - [ ] Informed the user of the next step (must include all TUI command formats; do not filter)
156
+ - [ ] **Did not modify any business code**
156
157
 
157
- ## 停止
158
+ ## STOP
158
159
 
159
- 完成检查清单后,**立即停止**。等待用户审查分析结果并手动调用 `plan-task` 技能。
160
+ After completing the checklist, **stop immediately**. Wait for the user to review the analysis result and manually invoke the `plan-task` skill.
160
161
 
161
- ## 注意事项
162
+ ## Notes
162
163
 
163
- 1. **前置条件**:必须已存在任务文件 `task.md`
164
- 2. **多轮分析**:需求变化或已有分析需要修订时,使用 `analysis-r{N}.md`
165
- 3. **职责单一**:本技能只负责分析,不设计方案、不实现代码
164
+ 1. **Prerequisite**: the task file `task.md` must already exist
165
+ 2. **Multi-round analysis**: use `analysis-r{N}.md` when requirements change or an existing analysis needs revision
166
+ 3. **Single responsibility**: this skill only handles analysis, not planning or implementation
166
167
 
167
- ## 错误处理
168
+ ## Error Handling
168
169
 
169
- - 任务未找到:提示 "Task {task-id} not found, please check the task ID"
170
+ - Task not found: output "Task {task-id} not found, please check the task ID"
@@ -1,122 +1,136 @@
1
1
  ---
2
2
  name: check-task
3
3
  description: >
4
- 查看任务的当前状态、工作流进度和上下文文件。这是只读操作,报告任务状态并建议
5
- 适当的下一步操作。当用户要求查看任务状态时触发。参数:task-id。
4
+ Check a task's current status, workflow progress, and context files. This is a
5
+ read-only operation that reports the task status and recommends appropriate
6
+ next steps. Triggered when the user asks to inspect task status. Argument:
7
+ task-id.
6
8
  ---
7
9
 
8
- # 查看任务状态
10
+ # Check Task Status
9
11
 
10
- ## 行为边界 / 关键规则
12
+ ## Boundary / Critical Rules
11
13
 
12
- - 本技能是**只读**操作 —— 不修改任何文件
13
- - 始终检查 activeblocked completed 目录
14
+ - This skill is **read-only** -- do not modify any files
15
+ - Always check the active, blocked, and completed directories
14
16
 
15
- ## 执行步骤
17
+ ## Steps
16
18
 
17
- ### 1. 查找任务
19
+ ### 1. Locate Task
18
20
 
19
- 按以下优先顺序搜索任务:
21
+ Search for the task in this priority order:
20
22
  1. `.agent-workspace/active/{task-id}/task.md`
21
23
  2. `.agent-workspace/blocked/{task-id}/task.md`
22
24
  3. `.agent-workspace/completed/{task-id}/task.md`
23
25
 
24
- 注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
26
+ Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
25
27
 
26
- 如果在任何目录中都未找到,提示 "Task {task-id} not found"
28
+ If the task is not found in any directory, prompt "Task {task-id} not found".
27
29
 
28
- ### 2. 读取任务元数据
30
+ ### 2. Read Task Metadata
29
31
 
30
- `task.md` 中提取:
31
- - `id`、`title`、`type`、`status`、`workflow`
32
- - `current_step`、`assigned_to`
33
- - `created_at`、`updated_at`
34
- - `issue_number`、`pr_number`(如适用)
32
+ Extract from `task.md`:
33
+ - `id`, `title`, `type`, `status`, `workflow`
34
+ - `current_step`, `assigned_to`
35
+ - `created_at`, `updated_at`
36
+ - `issue_number`, `pr_number` (if applicable)
35
37
 
36
- ### 3. 检查上下文文件
38
+ ### 3. Inspect Context Files
37
39
 
38
- 按产物类型扫描并记录以下文件的存在、轮次和状态:
39
- - `analysis.md`、`analysis-r{N}.md` - 需求分析
40
- - `plan.md`、`plan-r{N}.md` - 技术方案
41
- - `implementation.md`、`implementation-r2.md`、... - 实现报告
42
- - `refinement.md`、`refinement-r2.md`、... - 修复报告
43
- - `review.md`、`review-r2.md`、... - 审查报告
40
+ Scan and record the existence, round, and status of these artifact types:
41
+ - `analysis.md`, `analysis-r{N}.md` - Requirement analysis
42
+ - `plan.md`, `plan-r{N}.md` - Technical plan
43
+ - `implementation.md`, `implementation-r2.md`, ... - Implementation reports
44
+ - `refinement.md`, `refinement-r2.md`, ... - Refinement reports
45
+ - `review.md`, `review-r2.md`, ... - Review reports
44
46
 
45
- 对于版本化产物(`analysis`、`plan`、`implementation`、`refinement`、`review`):
46
- - 扫描任务目录中的所有同类版本化文件
47
- - 记录每类产物的最新轮次、最新文件路径和总轮次数
48
- - 如果 `task.md` Activity Log 记录了最新轮次,优先核对其与实际文件是否一致
47
+ For versioned artifacts (`analysis`, `plan`, `implementation`, `refinement`, `review`):
48
+ - Scan all versioned files of the same artifact type in the task directory
49
+ - Record the latest round, latest file path, and total number of rounds for each artifact type
50
+ - If the latest round is recorded in `task.md` Activity Log, cross-check it against the actual file when possible
49
51
 
50
- ### 4. 输出状态报告
52
+ ### 4. Output Status Report
51
53
 
52
- 以清晰的结构和状态指示器格式化输出:
54
+ Format the status report with a clear structure and status indicators:
53
55
 
54
56
  ```
55
- 任务状态:{task-id}
57
+ Task status: {task-id}
56
58
  =======================
57
59
 
58
- 基本信息:
59
- - 标题:{title}
60
- - 类型:{type}
61
- - 状态:{status}
62
- - 工作流:{workflow}
63
- - 分配给:{assigned_to}
64
- - 创建时间:{created_at}
65
- - 更新时间:{updated_at}
66
-
67
- 工作流进度:
68
- [已完成] 需求分析 analysis-r2.md (Round 2, latest)
69
- [已完成] 技术设计 plan.md (Round 1)
70
- [进行中] 实现 implementation.md (Round 1)
71
- [待处理] 修复 refinement.md (Round 1 will be created next)
72
- [待处理] 代码审查 review.md (Round 1 will be created next)
73
- [待处理] 最终提交
74
-
75
- 上下文文件:
76
- - analysis.md 已存在 (Round 1)
77
- - analysis-r2.md 已存在 (Round 2, latest)
78
- - plan.md 已存在 (Round 1, latest)
79
- - implementation.md 已存在 (Round 1, latest)
80
- - refinement.md 未开始
81
- - review.md 未开始
82
-
83
- 如果存在多轮产物,显示所有轮次,并标记最新版本,例如:
84
- - plan.md:已存在 (Round 1)
85
- - plan-r2.md:已存在 (Round 2, latest)
86
- - implementation.md:已存在 (Round 1)
87
- - implementation-r2.md:已存在 (Round 2, latest)
88
- - refinement.md:已存在 (Round 1)
89
- - review.md:已存在 (Round 1)
90
- - review-r2.md:已存在 (Round 2, latest)
91
-
92
- 下一步:
93
- 完成实现,然后执行代码审查
60
+ Basic info:
61
+ - Title: {title}
62
+ - Type: {type}
63
+ - Status: {status}
64
+ - Workflow: {workflow}
65
+ - Assigned to: {assigned_to}
66
+ - Created at: {created_at}
67
+ - Updated at: {updated_at}
68
+
69
+ Workflow progress:
70
+ [done] Requirement Analysis analysis-r2.md (Round 2, latest)
71
+ [done] Technical Design plan.md (Round 1)
72
+ [current] Implementation implementation.md (Round 1)
73
+ [pending] Refinement refinement.md (Round 1 will be created next)
74
+ [pending] Code Review review.md (Round 1 will be created next)
75
+ [pending] Final Commit
76
+
77
+ Context files:
78
+ - analysis.md: Exists (Round 1)
79
+ - analysis-r2.md: Exists (Round 2, latest)
80
+ - plan.md: Exists (Round 1, latest)
81
+ - implementation.md: Exists (Round 1, latest)
82
+ - refinement.md: Not started
83
+ - review.md: Not started
84
+
85
+ If multiple rounds exist, show all rounds and mark the latest, for example:
86
+ - plan.md: Exists (Round 1)
87
+ - plan-r2.md: Exists (Round 2, latest)
88
+ - implementation.md: Exists (Round 1)
89
+ - implementation-r2.md: Exists (Round 2, latest)
90
+ - refinement.md: Exists (Round 1)
91
+ - review.md: Exists (Round 1)
92
+ - review-r2.md: Exists (Round 2, latest)
93
+
94
+ Next step:
95
+ Complete implementation, then run code review
94
96
  ```
95
97
 
96
- **状态指示器**:
97
- - `[done]` - 步骤已完成
98
- - `[current]` - 当前进行中
99
- - `[pending]` - 尚未开始
100
- - `[blocked]` - 被阻塞
101
- - `[skipped]` - 已跳过
102
-
103
- ### 5. 建议下一步操作
104
-
105
- 根据当前工作流状态,建议合适的下一个技能。必须展示下表中所有 TUI 列的命令格式,不要只展示当前 AI 代理对应的列:
106
-
107
- | 当前状态 | Claude Code / OpenCode | Gemini CLI | Codex CLI |
108
- |---------|----------------------|------------|-----------|
109
- | 分析完成 | `/plan-task {task-id}` | `/agent-infra:plan-task {task-id}` | `$plan-task {task-id}` |
110
- | 计划完成 | `/implement-task {task-id}` | `/agent-infra:implement-task {task-id}` | `$implement-task {task-id}` |
111
- | 实现完成 | `/review-task {task-id}` | `/agent-infra:review-task {task-id}` | `$review-task {task-id}` |
112
- | 审查通过 | `/commit` | `/agent-infra:commit` | `$commit` |
113
- | 审查有问题 | `/refine-task {task-id}` | `/agent-infra:refine-task {task-id}` | `$refine-task {task-id}` |
114
- | 任务被阻塞 | 解除阻塞或提供所需信息 | | 解除阻塞或提供所需信息 |
115
- | 任务已完成 | 无需操作 | | 无需操作 |
116
-
117
- ## 注意事项
118
-
119
- 1. **只读**:本技能仅读取和报告 —— 不修改任何文件
120
- 2. **多目录搜索**:始终检查 active、blocked 和 completed 目录
121
- 3. **快速参考**:随时可以使用本技能检查任务在工作流中的位置
122
- 4. **版本化产物**:`analysis`、`plan`、`implementation`、`refinement`、`review` 都需要报告实际轮次,而不是只报告固定文件名
98
+ **Status indicators**:
99
+ - `[done]` - Step completed
100
+ - `[current]` - Currently in progress
101
+ - `[pending]` - Not started yet
102
+ - `[blocked]` - Blocked
103
+ - `[skipped]` - Skipped
104
+
105
+ ### 5. Recommend Next Action
106
+
107
+ Recommend the appropriate next skill based on the current workflow state. You must show command formats for all TUI columns in the table below, not just the current AI agent.
108
+
109
+ > **⚠️ CONDITION CHECK you must choose the single matching row in the table below based on `status`, `current_step`, the latest artifacts, and the latest review result:**
110
+ >
111
+ > - `status = blocked` -> choose "Task Blocked"
112
+ > - `status = completed` -> choose "Task Completed"
113
+ > - `current_step = requirement-analysis` and the latest analysis artifact is complete -> choose "Analysis Complete"
114
+ > - `current_step = technical-design` and the latest plan artifact is complete -> choose "Plan Complete"
115
+ > - The latest implementation artifact exists and there is still no latest review artifact -> choose "Implementation Complete"
116
+ > - The latest review artifact exists, the verdict is `Approved`, and `Blocker = 0`, `Major = 0`, `Minor = 0` -> choose "Review Passed"
117
+ > - The latest review artifact exists, but any `Blocker`, `Major`, or `Minor` issue remains, or the verdict is not a clean approval -> choose "Review Has Issues"
118
+ >
119
+ > **Important: if the latest review report contains any issue at all, do not use the "Review Passed" row. You must use "Review Has Issues" instead.**
120
+
121
+ | Current State | Claude Code / OpenCode | Gemini CLI | Codex CLI |
122
+ |--------------|------------------------|------------|-----------|
123
+ | Analysis Complete | `/plan-task {task-id}` | `/{{project}}:plan-task {task-id}` | `$plan-task {task-id}` |
124
+ | Plan Complete | `/implement-task {task-id}` | `/{{project}}:implement-task {task-id}` | `$implement-task {task-id}` |
125
+ | Implementation Complete | `/review-task {task-id}` | `/{{project}}:review-task {task-id}` | `$review-task {task-id}` |
126
+ | Review Passed | `/commit` | `/{{project}}:commit` | `$commit` |
127
+ | Review Has Issues | `/refine-task {task-id}` | `/{{project}}:refine-task {task-id}` | `$refine-task {task-id}` |
128
+ | Task Blocked | Unblock the task or provide the missing information | — | Unblock the task or provide the missing information |
129
+ | Task Completed | No action needed | — | No action needed |
130
+
131
+ ## Notes
132
+
133
+ 1. **Read-only**: This skill only reads and reports -- it does not modify files
134
+ 2. **Multi-directory search**: Always check active, blocked, and completed
135
+ 3. **Quick reference**: Use this skill any time you need to see where a task is in the workflow
136
+ 4. **Versioned artifacts**: `analysis`, `plan`, `implementation`, `refinement`, and `review` must all report the actual round, not only the base filename
@@ -104,6 +104,18 @@ description: >
104
104
 
105
105
  根据当前工作流状态,建议合适的下一个技能。必须展示下表中所有 TUI 列的命令格式,不要只展示当前 AI 代理对应的列:
106
106
 
107
+ > **⚠️ 条件判断 — 你必须先根据 `status`、`current_step`、最新产物和最新审查结果,选择下表中唯一匹配的一行:**
108
+ >
109
+ > - `status = blocked` → 选择「任务被阻塞」
110
+ > - `status = completed` → 选择「任务已完成」
111
+ > - `current_step = requirement-analysis` 且最新分析产物已完成 → 选择「分析完成」
112
+ > - `current_step = technical-design` 且最新计划产物已完成 → 选择「计划完成」
113
+ > - 最新实现产物已存在,且尚无最新审查产物 → 选择「实现完成」
114
+ > - 最新审查产物存在,且结论为 `Approved`,同时 `Blocker = 0`、`Major = 0`、`Minor = 0` → 选择「审查通过」
115
+ > - 最新审查产物存在,但仍有任何 `Blocker`、`Major` 或 `Minor` 问题,或结论不是无问题通过 → 选择「审查有问题」
116
+ >
117
+ > **特别注意:只要最新审查报告中存在任何问题,就不能使用「审查通过」行。必须改用「审查有问题」行。**
118
+
107
119
  | 当前状态 | Claude Code / OpenCode | Gemini CLI | Codex CLI |
108
120
  |---------|----------------------|------------|-----------|
109
121
  | 分析完成 | `/plan-task {task-id}` | `/agent-infra:plan-task {task-id}` | `$plan-task {task-id}` |