@fitlab-ai/agent-infra 0.6.5 → 0.7.1

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 (208) hide show
  1. package/README.md +51 -25
  2. package/README.zh-CN.md +49 -23
  3. package/bin/cli.ts +1 -1
  4. package/dist/bin/cli.js +1 -1
  5. package/dist/lib/builtin-tuis.js +45 -0
  6. package/dist/lib/defaults.json +4 -0
  7. package/dist/lib/init.js +65 -23
  8. package/dist/lib/prompt.js +49 -1
  9. package/dist/lib/sandbox/commands/create.js +4 -2
  10. package/dist/lib/sandbox/commands/enter.js +15 -4
  11. package/dist/lib/sandbox/commands/list-running.js +153 -0
  12. package/dist/lib/sandbox/commands/ls.js +24 -45
  13. package/dist/lib/sandbox/commands/rebuild.js +7 -13
  14. package/dist/lib/sandbox/commands/rm.js +2 -0
  15. package/dist/lib/sandbox/config.js +3 -0
  16. package/dist/lib/sandbox/image-prune.js +18 -0
  17. package/dist/lib/sandbox/index.js +2 -1
  18. package/dist/lib/sandbox/runtimes/ai-tools.dockerfile +10 -6
  19. package/dist/lib/sandbox/task-resolver.js +18 -0
  20. package/dist/lib/sandbox/tools.js +213 -8
  21. package/dist/lib/update.js +70 -18
  22. package/lib/builtin-tuis.ts +55 -0
  23. package/lib/defaults.json +4 -0
  24. package/lib/init.ts +97 -35
  25. package/lib/prompt.ts +54 -1
  26. package/lib/sandbox/commands/create.ts +10 -2
  27. package/lib/sandbox/commands/enter.ts +14 -4
  28. package/lib/sandbox/commands/list-running.ts +188 -0
  29. package/lib/sandbox/commands/ls.ts +28 -49
  30. package/lib/sandbox/commands/rebuild.ts +12 -14
  31. package/lib/sandbox/commands/rm.ts +3 -0
  32. package/lib/sandbox/config.ts +7 -0
  33. package/lib/sandbox/image-prune.ts +23 -0
  34. package/lib/sandbox/index.ts +2 -1
  35. package/lib/sandbox/runtimes/ai-tools.dockerfile +10 -6
  36. package/lib/sandbox/task-resolver.ts +23 -1
  37. package/lib/sandbox/tools.ts +248 -9
  38. package/lib/update.ts +85 -30
  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 +111 -2
  43. package/templates/.agents/README.zh-CN.md +111 -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/task-short-id.en.md +141 -0
  59. package/templates/.agents/rules/task-short-id.zh-CN.md +124 -0
  60. package/templates/.agents/rules/testing-discipline.en.md +2 -2
  61. package/templates/.agents/rules/testing-discipline.zh-CN.md +2 -2
  62. package/templates/.agents/scripts/task-short-id.js +713 -0
  63. package/templates/.agents/scripts/validate-artifact.js +1 -1
  64. package/templates/.agents/skills/analyze-task/SKILL.en.md +20 -4
  65. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +20 -5
  66. package/templates/.agents/skills/block-task/SKILL.en.md +12 -0
  67. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +12 -1
  68. package/templates/.agents/skills/cancel-task/SKILL.en.md +12 -0
  69. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +12 -1
  70. package/templates/.agents/skills/check-task/SKILL.en.md +47 -32
  71. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +46 -32
  72. package/templates/.agents/skills/close-codescan/SKILL.en.md +11 -0
  73. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +11 -0
  74. package/templates/.agents/skills/close-dependabot/SKILL.en.md +11 -0
  75. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +11 -0
  76. package/templates/.agents/skills/code-task/SKILL.en.md +121 -0
  77. package/templates/.agents/skills/{implement-task → code-task}/SKILL.zh-CN.md +55 -25
  78. package/templates/.agents/skills/{implement-task → code-task}/config/verify.en.json +4 -4
  79. package/templates/.agents/skills/{implement-task → code-task}/config/verify.zh-CN.json +4 -4
  80. package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.zh-CN.md +2 -2
  81. package/templates/.agents/skills/{implement-task/reference/implementation-rules.en.md → code-task/reference/code-rules.en.md} +6 -6
  82. package/templates/.agents/skills/{implement-task/reference/implementation-rules.zh-CN.md → code-task/reference/code-rules.zh-CN.md} +3 -3
  83. package/templates/.agents/skills/code-task/reference/dual-mode.en.md +69 -0
  84. package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +69 -0
  85. package/templates/.agents/skills/{refine-task/reference/fix-workflow.en.md → code-task/reference/fix-mode.en.md} +12 -12
  86. package/templates/.agents/skills/{refine-task/reference/fix-workflow.zh-CN.md → code-task/reference/fix-mode.zh-CN.md} +8 -8
  87. package/templates/.agents/skills/code-task/reference/output-template.en.md +20 -0
  88. package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +20 -0
  89. package/templates/.agents/skills/{implement-task → code-task}/reference/report-template.en.md +4 -4
  90. package/templates/.agents/skills/{implement-task → code-task}/reference/report-template.zh-CN.md +3 -3
  91. package/templates/.agents/skills/code-task/scripts/detect-mode.js +370 -0
  92. package/templates/.agents/skills/commit/SKILL.en.md +6 -2
  93. package/templates/.agents/skills/commit/SKILL.zh-CN.md +6 -2
  94. package/templates/.agents/skills/commit/reference/task-status-update.en.md +10 -6
  95. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +10 -6
  96. package/templates/.agents/skills/complete-task/SKILL.en.md +17 -3
  97. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +17 -4
  98. package/templates/.agents/skills/create-pr/SKILL.en.md +21 -1
  99. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +21 -1
  100. package/templates/.agents/skills/create-task/SKILL.en.md +14 -0
  101. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +14 -1
  102. package/templates/.agents/skills/import-codescan/SKILL.en.md +15 -1
  103. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +15 -1
  104. package/templates/.agents/skills/import-dependabot/SKILL.en.md +16 -2
  105. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +16 -2
  106. package/templates/.agents/skills/import-issue/SKILL.en.md +17 -3
  107. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +17 -3
  108. package/templates/.agents/skills/plan-task/SKILL.en.md +8 -4
  109. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +8 -5
  110. package/templates/.agents/skills/restore-task/SKILL.en.md +16 -3
  111. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +16 -4
  112. package/templates/.agents/skills/review-analysis/SKILL.en.md +80 -0
  113. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +105 -0
  114. package/templates/.agents/skills/review-analysis/config/verify.en.json +51 -0
  115. package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +51 -0
  116. package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +87 -0
  117. package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +87 -0
  118. package/templates/.agents/skills/review-analysis/reference/report-template.en.md +90 -0
  119. package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +91 -0
  120. package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +47 -0
  121. package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +47 -0
  122. package/templates/.agents/skills/{review-task → review-code}/SKILL.en.md +15 -9
  123. package/templates/.agents/skills/{review-task → review-code}/SKILL.zh-CN.md +19 -10
  124. package/templates/.agents/skills/{review-task → review-code}/config/verify.en.json +7 -5
  125. package/templates/.agents/skills/{review-task → review-code}/config/verify.zh-CN.json +6 -4
  126. package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.en.md +21 -17
  127. package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.zh-CN.md +19 -15
  128. package/templates/.agents/skills/{review-task → review-code}/reference/report-template.en.md +5 -6
  129. package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +91 -0
  130. package/templates/.agents/skills/review-code/reference/review-criteria.en.md +48 -0
  131. package/templates/.agents/skills/{review-task → review-code}/reference/review-criteria.zh-CN.md +10 -4
  132. package/templates/.agents/skills/review-plan/SKILL.en.md +80 -0
  133. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +105 -0
  134. package/templates/.agents/skills/{refine-task → review-plan}/config/verify.en.json +14 -10
  135. package/templates/.agents/skills/{refine-task → review-plan}/config/verify.zh-CN.json +14 -10
  136. package/templates/.agents/skills/review-plan/reference/output-templates.en.md +87 -0
  137. package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +87 -0
  138. package/templates/.agents/skills/review-plan/reference/report-template.en.md +90 -0
  139. package/templates/.agents/skills/{review-task → review-plan}/reference/report-template.zh-CN.md +3 -3
  140. package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +47 -0
  141. package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +47 -0
  142. package/templates/.agents/skills/test/SKILL.en.md +2 -2
  143. package/templates/.agents/skills/test/SKILL.zh-CN.md +13 -31
  144. package/templates/.agents/skills/update-agent-infra/SKILL.en.md +1 -0
  145. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +1 -0
  146. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +113 -21
  147. package/templates/.agents/templates/task.en.md +4 -3
  148. package/templates/.agents/templates/task.zh-CN.md +3 -2
  149. package/templates/.agents/workflows/bug-fix.en.yaml +126 -80
  150. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +90 -44
  151. package/templates/.agents/workflows/feature-development.en.yaml +115 -70
  152. package/templates/.agents/workflows/feature-development.zh-CN.yaml +92 -47
  153. package/templates/.agents/workflows/refactoring.en.yaml +123 -78
  154. package/templates/.agents/workflows/refactoring.zh-CN.yaml +89 -44
  155. package/templates/.claude/commands/code-task.en.md +8 -0
  156. package/templates/.claude/commands/code-task.zh-CN.md +8 -0
  157. package/templates/.claude/commands/review-analysis.en.md +8 -0
  158. package/templates/.claude/commands/review-analysis.zh-CN.md +8 -0
  159. package/templates/.claude/commands/review-code.en.md +8 -0
  160. package/templates/.claude/commands/review-code.zh-CN.md +8 -0
  161. package/templates/.claude/commands/review-plan.en.md +8 -0
  162. package/templates/.claude/commands/review-plan.zh-CN.md +8 -0
  163. package/templates/.gemini/commands/_project_/archive-tasks.zh-CN.toml +1 -1
  164. package/templates/.gemini/commands/_project_/code-task.en.toml +8 -0
  165. package/templates/.gemini/commands/_project_/code-task.zh-CN.toml +8 -0
  166. package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +1 -1
  167. package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +1 -1
  168. package/templates/.gemini/commands/_project_/review-analysis.en.toml +8 -0
  169. package/templates/.gemini/commands/_project_/review-analysis.zh-CN.toml +8 -0
  170. package/templates/.gemini/commands/_project_/review-code.en.toml +8 -0
  171. package/templates/.gemini/commands/_project_/review-code.zh-CN.toml +8 -0
  172. package/templates/.gemini/commands/_project_/review-plan.en.toml +8 -0
  173. package/templates/.gemini/commands/_project_/review-plan.zh-CN.toml +8 -0
  174. package/templates/.opencode/commands/code-task.en.md +11 -0
  175. package/templates/.opencode/commands/code-task.zh-CN.md +11 -0
  176. package/templates/.opencode/commands/review-analysis.en.md +11 -0
  177. package/templates/.opencode/commands/review-analysis.zh-CN.md +11 -0
  178. package/templates/.opencode/commands/review-code.en.md +11 -0
  179. package/templates/.opencode/commands/review-code.zh-CN.md +11 -0
  180. package/templates/.opencode/commands/review-plan.en.md +11 -0
  181. package/templates/.opencode/commands/review-plan.zh-CN.md +11 -0
  182. package/templates/.agents/skills/implement-task/SKILL.en.md +0 -173
  183. package/templates/.agents/skills/implement-task/reference/output-template.en.md +0 -20
  184. package/templates/.agents/skills/implement-task/reference/output-template.zh-CN.md +0 -20
  185. package/templates/.agents/skills/refine-task/SKILL.en.md +0 -153
  186. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +0 -153
  187. package/templates/.agents/skills/refine-task/reference/report-template.en.md +0 -64
  188. package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +0 -64
  189. package/templates/.agents/skills/review-task/reference/review-criteria.en.md +0 -42
  190. package/templates/.claude/commands/implement-task.en.md +0 -8
  191. package/templates/.claude/commands/implement-task.zh-CN.md +0 -8
  192. package/templates/.claude/commands/refine-task.en.md +0 -8
  193. package/templates/.claude/commands/refine-task.zh-CN.md +0 -8
  194. package/templates/.claude/commands/review-task.en.md +0 -8
  195. package/templates/.claude/commands/review-task.zh-CN.md +0 -8
  196. package/templates/.gemini/commands/_project_/implement-task.en.toml +0 -8
  197. package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +0 -8
  198. package/templates/.gemini/commands/_project_/refine-task.en.toml +0 -8
  199. package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +0 -8
  200. package/templates/.gemini/commands/_project_/review-task.en.toml +0 -8
  201. package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +0 -8
  202. package/templates/.opencode/commands/implement-task.en.md +0 -11
  203. package/templates/.opencode/commands/implement-task.zh-CN.md +0 -11
  204. package/templates/.opencode/commands/refine-task.en.md +0 -11
  205. package/templates/.opencode/commands/refine-task.zh-CN.md +0 -11
  206. package/templates/.opencode/commands/review-task.en.md +0 -11
  207. package/templates/.opencode/commands/review-task.zh-CN.md +0 -11
  208. /package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.en.md +0 -0
@@ -203,7 +203,7 @@ function runCheck(type, context) {
203
203
  }
204
204
  }
205
205
 
206
- // === Check Implementations ===
206
+ // === Check Functions ===
207
207
 
208
208
  function checkTaskMeta({ taskDir, config }) {
209
209
  const task = loadTask(taskDir);
@@ -27,6 +27,10 @@ tail .agents/workspace/active/{task-id}/task.md
27
27
 
28
28
  Before the state check is complete, do not make external-state assertions such as "the code is unchanged", "tests passed", or "there are no other references", including in reasoning. This gate is only a structural floor; evidence pairing and authenticity still require the report template and review discipline.
29
29
 
30
+ ## Task id short ref
31
+
32
+ > If `{task-id}` begins with `#`, follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
33
+
30
34
  ## Steps
31
35
 
32
36
  ### 1. Verify Prerequisites
@@ -115,6 +119,18 @@ Create `.agents/workspace/active/{task-id}/{analysis-artifact}`.
115
119
  ## Dependencies
116
120
  - {Required dependencies and coordination with other modules}
117
121
 
122
+ ## Assumptions
123
+
124
+ > If this analysis depends on assumptions, list them here; omit this section if there are none.
125
+
126
+ - {assumption}
127
+
128
+ ## Open Questions
129
+
130
+ > If there are unresolved questions for human review, list them here; omit this section if there are none.
131
+
132
+ - {open question}
133
+
118
134
  ## Effort and Complexity Assessment
119
135
  - Complexity: {High/Medium/Low}
120
136
  - Risk level: {High/Medium/Low}
@@ -189,10 +205,10 @@ Summary:
189
205
  Output file:
190
206
  - Analysis report: .agents/workspace/active/{task-id}/{analysis-artifact}
191
207
 
192
- Next step - create technical plan:
193
- - Claude Code / OpenCode: /plan-task {task-id}
194
- - Gemini CLI: /{{project}}:plan-task {task-id}
195
- - Codex CLI: $plan-task {task-id}
208
+ Next step - review the analysis:
209
+ - Claude Code / OpenCode: /review-analysis {task-id}
210
+ - Gemini CLI: /{{project}}:review-analysis {task-id}
211
+ - Codex CLI: $review-analysis {task-id}
196
212
  ```
197
213
 
198
214
  ## Completion Checklist
@@ -27,8 +27,11 @@ tail .agents/workspace/active/{task-id}/task.md
27
27
 
28
28
  状态核对完成前,禁止任何关于外部状态的断言(例如“代码没变”“测试已通过”“没有其他引用”),包括思考阶段。本门禁只提供结构下限;逐条证据配对和真实性仍需按报告模板与审查要求核对。
29
29
 
30
- ## 执行步骤
30
+ ## 任务入参短号别名
31
+
32
+ > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
31
33
 
34
+ ## 执行步骤
32
35
  ### 1. 验证前置条件
33
36
 
34
37
  检查必要文件:
@@ -115,6 +118,18 @@ tail .agents/workspace/active/{task-id}/task.md
115
118
  ## 依赖关系
116
119
  - {需要的依赖和与其他模块的协调}
117
120
 
121
+ ## 假设
122
+
123
+ > 如本次分析依赖某些假设,列在此处;没有则可省略本段。
124
+
125
+ - {本轮分析所依赖的假设}
126
+
127
+ ## 未决问题
128
+
129
+ > 如有需要人工裁定的未决问题,列在此处;没有则可省略本段。
130
+
131
+ - {未决问题}
132
+
118
133
  ## 工作量和复杂度评估
119
134
  - 复杂度:{高/中/低}
120
135
  - 风险等级:{高/中/低}
@@ -189,10 +204,10 @@ node .agents/scripts/validate-artifact.js gate analyze-task .agents/workspace/ac
189
204
  产出文件:
190
205
  - 分析报告:.agents/workspace/active/{task-id}/{analysis-artifact}
191
206
 
192
- 下一步 - 设计技术方案:
193
- - Claude Code / OpenCode:/plan-task {task-id}
194
- - Gemini CLI:/agent-infra:plan-task {task-id}
195
- - Codex CLI:$plan-task {task-id}
207
+ 下一步 - 审查需求分析:
208
+ - Claude Code / OpenCode:/review-analysis {task-id}
209
+ - Gemini CLI:/agent-infra:review-analysis {task-id}
210
+ - Codex CLI:$review-analysis {task-id}
196
211
  ```
197
212
 
198
213
  ## 完成检查清单
@@ -19,6 +19,10 @@ description: "Mark a task as blocked and record the reason"
19
19
 
20
20
  Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
21
21
 
22
+ ## Task id short ref
23
+
24
+ > If `{task-id}` begins with `#`, follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
25
+
22
26
  ## Steps
23
27
 
24
28
  ### 1. Verify Task Exists
@@ -79,6 +83,12 @@ If a valid `issue_number` exists, set `status: blocked` by following issue-sync.
79
83
 
80
84
  ### 7. Verification Gate
81
85
 
86
+ **Release short id** (after the directory has already been moved; the script is idempotent and returns 0 even if the task isn't registered):
87
+
88
+ ```bash
89
+ node .agents/scripts/task-short-id.js release "$task_id" || true
90
+ ```
91
+
82
92
  Run the verification gate to confirm the task artifact and sync state are valid:
83
93
 
84
94
  ```bash
@@ -116,6 +126,8 @@ Next step - check task status after unblocking:
116
126
  - Codex CLI: $check-task {task-id}
117
127
  ```
118
128
 
129
+
130
+
119
131
  ## Completion Checklist
120
132
 
121
133
  - [ ] Analyzed and documented the blocking reason
@@ -19,8 +19,11 @@ description: "标记任务为阻塞状态并记录原因"
19
19
 
20
20
  版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
21
21
 
22
- ## 执行步骤
22
+ ## 任务入参短号别名
23
+
24
+ > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
23
25
 
26
+ ## 执行步骤
24
27
  ### 1. 验证任务存在
25
28
 
26
29
  检查任务是否存在于 `.agents/workspace/active/{task-id}/`。
@@ -79,6 +82,12 @@ ls .agents/workspace/blocked/{task-id}/task.md
79
82
 
80
83
  ### 7. 完成校验
81
84
 
85
+ **释放短号**(先 `mv` 目录已成功,再 release;脚本幂等,未在注册表也返回 0):
86
+
87
+ ```bash
88
+ node .agents/scripts/task-short-id.js release "$task_id" || true
89
+ ```
90
+
82
91
  运行完成校验,确认任务产物和同步状态符合规范:
83
92
 
84
93
  ```bash
@@ -116,6 +125,8 @@ node .agents/scripts/validate-artifact.js gate block-task .agents/workspace/bloc
116
125
  - Codex CLI:$check-task {task-id}
117
126
  ```
118
127
 
128
+
129
+
119
130
  ## 完成检查清单
120
131
 
121
132
  - [ ] 分析并记录了阻塞原因
@@ -13,6 +13,10 @@ description: "Cancel an unneeded task and move it"
13
13
 
14
14
  Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
15
15
 
16
+ ## Task id short ref
17
+
18
+ > If `{task-id}` begins with `#`, follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
19
+
16
20
  ## Steps
17
21
 
18
22
  ### 1. Verify Task Exists
@@ -92,6 +96,12 @@ The cancellation comment must include at least:
92
96
 
93
97
  ### 7. Verification Gate
94
98
 
99
+ **Release short id** (after the directory has already been moved; the script is idempotent and returns 0 even if the task isn't registered):
100
+
101
+ ```bash
102
+ node .agents/scripts/task-short-id.js release "$task_id" || true
103
+ ```
104
+
95
105
  Run the verification gate to confirm the moved task and sync state are valid:
96
106
 
97
107
  ```bash
@@ -125,6 +135,8 @@ Next step - inspect the moved task:
125
135
  - Codex CLI: $check-task {task-id}
126
136
  ```
127
137
 
138
+
139
+
128
140
  ## Completion Checklist
129
141
 
130
142
  - [ ] Recorded the cancellation reason and updated task.md
@@ -13,8 +13,11 @@ description: "取消不再需要的任务并转移"
13
13
 
14
14
  版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
15
15
 
16
- ## 执行步骤
16
+ ## 任务入参短号别名
17
+
18
+ > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
17
19
 
20
+ ## 执行步骤
18
21
  ### 1. 验证任务存在
19
22
 
20
23
  依次检查以下目录:
@@ -92,6 +95,12 @@ ls .agents/workspace/completed/{task-id}/task.md
92
95
 
93
96
  ### 7. 完成校验
94
97
 
98
+ **释放短号**(先 `mv` 目录已成功,再 release;脚本幂等,未在注册表也返回 0):
99
+
100
+ ```bash
101
+ node .agents/scripts/task-short-id.js release "$task_id" || true
102
+ ```
103
+
95
104
  运行完成校验,确认任务转移和同步状态符合规范:
96
105
 
97
106
  ```bash
@@ -125,6 +134,8 @@ node .agents/scripts/validate-artifact.js gate cancel-task .agents/workspace/com
125
134
  - Codex CLI:$check-task {task-id}
126
135
  ```
127
136
 
137
+
138
+
128
139
  ## 完成检查清单
129
140
 
130
141
  - [ ] 已记录取消原因并更新 task.md
@@ -10,6 +10,10 @@ description: "Check a task's current status and progress"
10
10
  - This skill is **read-only** -- do not modify any files
11
11
  - Always check the active, blocked, and completed directories
12
12
 
13
+ ## Task id short ref
14
+
15
+ > If `{task-id}` begins with `#`, follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
16
+
13
17
  ## Steps
14
18
 
15
19
  ### 1. Locate Task
@@ -36,11 +40,12 @@ Extract from `task.md`:
36
40
  Scan and record the existence, round, and status of these artifact types:
37
41
  - `analysis.md`, `analysis-r{N}.md` - Requirement analysis
38
42
  - `plan.md`, `plan-r{N}.md` - Technical plan
39
- - `implementation.md`, `implementation-r2.md`, ... - Implementation reports
40
- - `refinement.md`, `refinement-r2.md`, ... - Refinement reports
41
- - `review.md`, `review-r2.md`, ... - Review reports
43
+ - `code.md`, `code-r2.md`, ... - Code reports
44
+ - `review-analysis.md`, `review-analysis-r{N}.md` - Requirement analysis review reports
45
+ - `review-plan.md`, `review-plan-r{N}.md` - Technical plan review reports
46
+ - `review-code.md`, `review-code-r{N}.md` - Code review reports
42
47
 
43
- For versioned artifacts (`analysis`, `plan`, `implementation`, `refinement`, `review`):
48
+ For versioned artifacts (`analysis`, `review-analysis`, `plan`, `review-plan`, `code`, `review-code`):
44
49
  - Scan all versioned files of the same artifact type in the task directory
45
50
  - Record the latest round, latest file path, and total number of rounds for each artifact type
46
51
  - If the latest round is recorded in `task.md` Activity Log, cross-check it against the actual file when possible
@@ -64,28 +69,30 @@ Basic info:
64
69
 
65
70
  Workflow progress:
66
71
  [done] Requirement Analysis analysis-r2.md (Round 2, latest)
72
+ [done] Analysis Review review-analysis.md (Round 1, latest)
67
73
  [done] Technical Design plan.md (Round 1)
68
- [current] Implementation implementation.md (Round 1)
69
- [pending] Refinement refinement.md (Round 1 will be created next)
70
- [pending] Code Review review.md (Round 1 will be created next)
74
+ [done] Plan Review review-plan.md (Round 1, latest)
75
+ [current] Code code.md (Round 1)
76
+ [pending] Code Review review-code.md (Round 1 will be created next)
71
77
  [pending] Final Commit
72
78
 
73
79
  Context files:
74
80
  - analysis.md: Exists (Round 1)
75
81
  - analysis-r2.md: Exists (Round 2, latest)
82
+ - review-analysis.md: Exists (Round 1, latest)
76
83
  - plan.md: Exists (Round 1, latest)
77
- - implementation.md: Exists (Round 1, latest)
78
- - refinement.md: Not started
79
- - review.md: Not started
84
+ - review-plan.md: Exists (Round 1, latest)
85
+ - code.md: Exists (Round 1, latest)
86
+ - review-code.md: Not started
80
87
 
81
88
  If multiple rounds exist, show all rounds and mark the latest, for example:
82
- - plan.md: Exists (Round 1)
83
- - plan-r2.md: Exists (Round 2, latest)
84
- - implementation.md: Exists (Round 1)
85
- - implementation-r2.md: Exists (Round 2, latest)
86
- - refinement.md: Exists (Round 1)
87
- - review.md: Exists (Round 1)
88
- - review-r2.md: Exists (Round 2, latest)
89
+ - plan.md: Exists (Round 1)
90
+ - plan-r2.md: Exists (Round 2, latest)
91
+ - review-plan.md: Exists (Round 1)
92
+ - code.md: Exists (Round 1)
93
+ - code-r2.md: Exists (Round 2, latest)
94
+ - review-code.md: Exists (Round 1)
95
+ - review-code-r2.md: Exists (Round 2, latest)
89
96
 
90
97
  Next step:
91
98
  Complete implementation, then run code review
@@ -107,26 +114,34 @@ Recommend the appropriate next skill based on the current workflow state. You mu
107
114
  > - `status = blocked` -> choose "Task Blocked"
108
115
  > - `status = completed` -> choose "Task Completed"
109
116
  > - `current_step = requirement-analysis` and the latest analysis artifact is complete -> choose "Analysis Complete"
117
+ > - `current_step = requirement-analysis-review` and the latest analysis review artifact is approved -> choose "Analysis Review Passed"
118
+ > - `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
119
  > - `current_step = technical-design` and the latest plan artifact is complete -> choose "Plan Complete"
111
- > - The latest implementation artifact exists and there is still no latest review artifact -> choose "Implementation Complete"
112
- > - The latest review artifact exists, the verdict is `Approved`, and `Blocker = 0`, `Major = 0`, `Minor = 0` -> choose "Review Passed"
113
- > - 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"
120
+ > - `current_step = technical-design-review` and the latest plan review artifact is approved -> choose "Plan Review Passed"
121
+ > - `current_step = technical-design-review` and the latest plan review artifact exists but is not approved or has findings -> choose "Plan Review Has Issues"
122
+ > - The latest code artifact exists and there is still no latest code review artifact -> choose "Code Complete"
123
+ > - `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"
124
+ > - `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
125
  >
115
- > **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.**
116
-
117
- | Current State | Claude Code / OpenCode | Gemini CLI | Codex CLI |
118
- |--------------|------------------------|------------|-----------|
119
- | Analysis Complete | `/plan-task {task-id}` | `/{{project}}:plan-task {task-id}` | `$plan-task {task-id}` |
120
- | Plan Complete | `/implement-task {task-id}` | `/{{project}}:implement-task {task-id}` | `$implement-task {task-id}` |
121
- | Implementation Complete | `/review-task {task-id}` | `/{{project}}:review-task {task-id}` | `$review-task {task-id}` |
122
- | Review Passed | `/commit` | `/{{project}}:commit` | `$commit` |
123
- | Review Has Issues | `/refine-task {task-id}` | `/{{project}}:refine-task {task-id}` | `$refine-task {task-id}` |
124
- | Task Blocked | Unblock the task or provide the missing information | | Unblock the task or provide the missing information |
125
- | Task Completed | No action needed | | No action needed |
126
+ > **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.**
127
+
128
+ | Current State | Claude Code / OpenCode | Gemini CLI | Codex CLI |
129
+ |----------------------------|-----------------------------------------------------|------------------------------------------|-----------------------------------------------------|
130
+ | Analysis Complete | `/review-analysis {task-id}` | `/{{project}}:review-analysis {task-id}` | `$review-analysis {task-id}` |
131
+ | Analysis Review Passed | `/plan-task {task-id}` | `/{{project}}:plan-task {task-id}` | `$plan-task {task-id}` |
132
+ | Analysis Review Has Issues | `/analyze-task {task-id}` | `/{{project}}:analyze-task {task-id}` | `$analyze-task {task-id}` |
133
+ | Plan Complete | `/review-plan {task-id}` | `/{{project}}:review-plan {task-id}` | `$review-plan {task-id}` |
134
+ | Plan Review Passed | `/code-task {task-id}` | `/{{project}}:code-task {task-id}` | `$code-task {task-id}` |
135
+ | Plan Review Has Issues | `/plan-task {task-id}` | `/{{project}}:plan-task {task-id}` | `$plan-task {task-id}` |
136
+ | Code Complete | `/review-code {task-id}` | `/{{project}}:review-code {task-id}` | `$review-code {task-id}` |
137
+ | Code Review Passed | `/commit` | `/{{project}}:commit` | `$commit` |
138
+ | Code Review Has Issues | `/code-task {task-id}` | `/{{project}}:code-task {task-id}` | `$code-task {task-id}` |
139
+ | Task Blocked | Unblock the task or provide the missing information | — | Unblock the task or provide the missing information |
140
+ | Task Completed | No action needed | — | No action needed |
126
141
 
127
142
  ## Notes
128
143
 
129
144
  1. **Read-only**: This skill only reads and reports -- it does not modify files
130
145
  2. **Multi-directory search**: Always check active, blocked, and completed
131
146
  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`, `implementation`, `refinement`, and `review` must all report the actual round, not only the base filename
147
+ 4. **Versioned artifacts**: `analysis`, `review-analysis`, `plan`, `review-plan`, `code`, and `review-code` must all report the actual round, not only the base filename
@@ -10,8 +10,11 @@ description: "查看任务的当前状态和进度"
10
10
  - 本技能是**只读**操作 —— 不修改任何文件
11
11
  - 始终检查 active、blocked 和 completed 目录
12
12
 
13
- ## 执行步骤
13
+ ## 任务入参短号别名
14
+
15
+ > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
14
16
 
17
+ ## 执行步骤
15
18
  ### 1. 查找任务
16
19
 
17
20
  按以下优先顺序搜索任务:
@@ -36,11 +39,12 @@ description: "查看任务的当前状态和进度"
36
39
  按产物类型扫描并记录以下文件的存在、轮次和状态:
37
40
  - `analysis.md`、`analysis-r{N}.md` - 需求分析
38
41
  - `plan.md`、`plan-r{N}.md` - 技术方案
39
- - `implementation.md`、`implementation-r2.md`、... - 实现报告
40
- - `refinement.md`、`refinement-r2.md`、... - 修复报告
41
- - `review.md`、`review-r2.md`、... - 审查报告
42
+ - `code.md`、`code-r2.md`、... - 实现报告
43
+ - `review-analysis.md`、`review-analysis-r{N}.md` - 需求分析审查报告
44
+ - `review-plan.md`、`review-plan-r{N}.md` - 技术方案审查报告
45
+ - `review-code.md`、`review-code-r{N}.md` - 代码审查报告
42
46
 
43
- 对于版本化产物(`analysis`、`plan`、`implementation`、`refinement`、`review`):
47
+ 对于版本化产物(`analysis`、`review-analysis`、`plan`、`review-plan`、`code`、`review-code`):
44
48
  - 扫描任务目录中的所有同类版本化文件
45
49
  - 记录每类产物的最新轮次、最新文件路径和总轮次数
46
50
  - 如果 `task.md` 的 Activity Log 记录了最新轮次,优先核对其与实际文件是否一致
@@ -64,28 +68,30 @@ description: "查看任务的当前状态和进度"
64
68
 
65
69
  工作流进度:
66
70
  [已完成] 需求分析 analysis-r2.md (Round 2, latest)
71
+ [已完成] 需求分析审查 review-analysis.md (Round 1, latest)
67
72
  [已完成] 技术设计 plan.md (Round 1)
68
- [进行中] 实现 implementation.md (Round 1)
69
- [待处理] 修复 refinement.md (Round 1 will be created next)
70
- [待处理] 代码审查 review.md (Round 1 will be created next)
73
+ [已完成] 技术方案审查 review-plan.md (Round 1, latest)
74
+ [进行中] 实现 code.md (Round 1)
75
+ [待处理] 代码审查 review-code.md (Round 1 will be created next)
71
76
  [待处理] 最终提交
72
77
 
73
78
  上下文文件:
74
79
  - analysis.md: 已存在 (Round 1)
75
80
  - analysis-r2.md: 已存在 (Round 2, latest)
81
+ - review-analysis.md: 已存在 (Round 1, latest)
76
82
  - plan.md: 已存在 (Round 1, latest)
77
- - implementation.md: 已存在 (Round 1, latest)
78
- - refinement.md: 未开始
79
- - review.md: 未开始
83
+ - review-plan.md: 已存在 (Round 1, latest)
84
+ - code.md: 已存在 (Round 1, latest)
85
+ - review-code.md: 未开始
80
86
 
81
87
  如果存在多轮产物,显示所有轮次,并标记最新版本,例如:
82
- - plan.md:已存在 (Round 1)
83
- - plan-r2.md:已存在 (Round 2, latest)
84
- - implementation.md:已存在 (Round 1)
85
- - implementation-r2.md:已存在 (Round 2, latest)
86
- - refinement.md:已存在 (Round 1)
87
- - review.md:已存在 (Round 1)
88
- - review-r2.md:已存在 (Round 2, latest)
88
+ - plan.md: 已存在 (Round 1)
89
+ - plan-r2.md: 已存在 (Round 2, latest)
90
+ - review-plan.md: 已存在 (Round 1)
91
+ - code.md: 已存在 (Round 1)
92
+ - code-r2.md: 已存在 (Round 2, latest)
93
+ - review-code.md: 已存在 (Round 1)
94
+ - review-code-r2.md: 已存在 (Round 2, latest)
89
95
 
90
96
  下一步:
91
97
  完成实现,然后执行代码审查
@@ -107,26 +113,34 @@ description: "查看任务的当前状态和进度"
107
113
  > - `status = blocked` → 选择「任务被阻塞」
108
114
  > - `status = completed` → 选择「任务已完成」
109
115
  > - `current_step = requirement-analysis` 且最新分析产物已完成 → 选择「分析完成」
116
+ > - `current_step = requirement-analysis-review` 且最新需求分析审查产物通过 → 选择「需求分析审查通过」
117
+ > - `current_step = requirement-analysis-review` 且最新需求分析审查产物存在但未通过或有问题 → 选择「需求分析审查有问题」
110
118
  > - `current_step = technical-design` 且最新计划产物已完成 → 选择「计划完成」
119
+ > - `current_step = technical-design-review` 且最新技术方案审查产物通过 → 选择「技术方案审查通过」
120
+ > - `current_step = technical-design-review` 且最新技术方案审查产物存在但未通过或有问题 → 选择「技术方案审查有问题」
111
121
  > - 最新实现产物已存在,且尚无最新审查产物 → 选择「实现完成」
112
- > - 最新审查产物存在,且结论为 `Approved`,同时 `Blocker = 0`、`Major = 0`、`Minor = 0` → 选择「审查通过」
113
- > - 最新审查产物存在,但仍有任何 `Blocker`、`Major` 或 `Minor` 问题,或结论不是无问题通过 → 选择「审查有问题」
122
+ > - `current_step = code-review` 且最新代码审查产物存在,且结论为 `Approved`,同时 `Blocker = 0`、`Major = 0`、`Minor = 0` → 选择「代码审查通过」
123
+ > - `current_step = code-review` 且最新代码审查产物存在,但仍有任何 `Blocker`、`Major` 或 `Minor` 问题,或结论不是无问题通过 → 选择「代码审查有问题」
114
124
  >
115
- > **特别注意:只要最新审查报告中存在任何问题,就不能使用「审查通过」行。必须改用「审查有问题」行。**
116
-
117
- | 当前状态 | Claude Code / OpenCode | Gemini CLI | Codex CLI |
118
- |---------|----------------------|------------|-----------|
119
- | 分析完成 | `/plan-task {task-id}` | `/agent-infra:plan-task {task-id}` | `$plan-task {task-id}` |
120
- | 计划完成 | `/implement-task {task-id}` | `/agent-infra:implement-task {task-id}` | `$implement-task {task-id}` |
121
- | 实现完成 | `/review-task {task-id}` | `/agent-infra:review-task {task-id}` | `$review-task {task-id}` |
122
- | 审查通过 | `/commit` | `/agent-infra:commit` | `$commit` |
123
- | 审查有问题 | `/refine-task {task-id}` | `/agent-infra:refine-task {task-id}` | `$refine-task {task-id}` |
124
- | 任务被阻塞 | 解除阻塞或提供所需信息 | | 解除阻塞或提供所需信息 |
125
- | 任务已完成 | 无需操作 | | 无需操作 |
125
+ > **特别注意:只要最新审查报告中存在任何问题,就不能使用对应「审查通过」行。必须改用对应「审查有问题」行。**
126
+
127
+ | 当前状态 | Claude Code / OpenCode | Gemini CLI | Codex CLI |
128
+ |--------------------|------------------------------|------------------------------------------|------------------------------|
129
+ | 分析完成 | `/review-analysis {task-id}` | `/agent-infra:review-analysis {task-id}` | `$review-analysis {task-id}` |
130
+ | 需求分析审查通过 | `/plan-task {task-id}` | `/agent-infra:plan-task {task-id}` | `$plan-task {task-id}` |
131
+ | 需求分析审查有问题 | `/analyze-task {task-id}` | `/agent-infra:analyze-task {task-id}` | `$analyze-task {task-id}` |
132
+ | 计划完成 | `/review-plan {task-id}` | `/agent-infra:review-plan {task-id}` | `$review-plan {task-id}` |
133
+ | 技术方案审查通过 | `/code-task {task-id}` | `/agent-infra:code-task {task-id}` | `$code-task {task-id}` |
134
+ | 技术方案审查有问题 | `/plan-task {task-id}` | `/agent-infra:plan-task {task-id}` | `$plan-task {task-id}` |
135
+ | 实现完成 | `/review-code {task-id}` | `/agent-infra:review-code {task-id}` | `$review-code {task-id}` |
136
+ | 代码审查通过 | `/commit` | `/agent-infra:commit` | `$commit` |
137
+ | 代码审查有问题 | `/code-task {task-id}` | `/agent-infra:code-task {task-id}` | `$code-task {task-id}` |
138
+ | 任务被阻塞 | 解除阻塞或提供所需信息 | — | 解除阻塞或提供所需信息 |
139
+ | 任务已完成 | 无需操作 | — | 无需操作 |
126
140
 
127
141
  ## 注意事项
128
142
 
129
143
  1. **只读**:本技能仅读取和报告 —— 不修改任何文件
130
144
  2. **多目录搜索**:始终检查 active、blocked 和 completed 目录
131
145
  3. **快速参考**:随时可以使用本技能检查任务在工作流中的位置
132
- 4. **版本化产物**:`analysis`、`plan`、`implementation`、`refinement`、`review` 都需要报告实际轮次,而不是只报告固定文件名
146
+ 4. **版本化产物**:`analysis`、`review-analysis`、`plan`、`review-plan`、`code`、`review-code` 都需要报告实际轮次,而不是只报告固定文件名
@@ -7,6 +7,10 @@ description: "Close a Code Scanning alert with a documented reason"
7
7
 
8
8
  Dismiss the specified Code Scanning (CodeQL) alert and record a justified reason.
9
9
 
10
+ ## Task id short ref
11
+
12
+ > If `{task-id}` begins with `#`, follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
13
+
10
14
  ## Execution Flow
11
15
 
12
16
  ### 1. Retrieve Alert Information
@@ -81,6 +85,11 @@ date "+%Y-%m-%d %H:%M:%S%:z"
81
85
  - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Alert Closed** by {agent} — Code Scanning alert #{alert-number} dismissed: {reason}
82
86
  ```
83
87
  - Archive the task
88
+ - **Release short id** (after the archive `mv` succeeded; the script is idempotent):
89
+
90
+ ```bash
91
+ node .agents/scripts/task-short-id.js release "$task_id" || true
92
+ ```
84
93
 
85
94
  ### 8. Inform User
86
95
 
@@ -117,3 +126,5 @@ Next step - complete and archive the task if a related task exists:
117
126
  - Already closed: output "Alert #{number} is already {state}"
118
127
  - Permission error: output "No permission to modify alerts"
119
128
  - User canceled: output "Cancellation acknowledged"
129
+
130
+
@@ -7,6 +7,10 @@ description: "关闭 Code Scanning 告警并记录理由"
7
7
 
8
8
  关闭指定的 Code Scanning(CodeQL)告警并记录合理的关闭理由。
9
9
 
10
+ ## 任务入参短号别名
11
+
12
+ > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
13
+
10
14
  ## 执行流程
11
15
 
12
16
  ### 1. 获取告警信息
@@ -81,6 +85,11 @@ date "+%Y-%m-%d %H:%M:%S%:z"
81
85
  - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Alert Closed** by {agent} — Code Scanning alert #{alert-number} dismissed: {reason}
82
86
  ```
83
87
  - 归档任务
88
+ - **释放短号**(归档目录已 mv 成功,再 release;脚本幂等):
89
+
90
+ ```bash
91
+ node .agents/scripts/task-short-id.js release "$task_id" || true
92
+ ```
84
93
 
85
94
  ### 8. 告知用户
86
95
 
@@ -117,3 +126,5 @@ Code Scanning 告警 #{alert-number} 已关闭。
117
126
  - 已关闭:提示 "Alert #{number} is already {state}"
118
127
  - 权限错误:提示 "No permission to modify alerts"
119
128
  - 用户取消:提示 "Cancellation acknowledged"
129
+
130
+
@@ -7,6 +7,10 @@ description: "Close a Dependabot alert with a documented reason"
7
7
 
8
8
  Dismiss the specified Dependabot security alert and record a justified reason.
9
9
 
10
+ ## Task id short ref
11
+
12
+ > If `{task-id}` begins with `#`, follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
13
+
10
14
  ## Execution Flow
11
15
 
12
16
  ### 1. Retrieve Alert Information
@@ -89,6 +93,11 @@ date "+%Y-%m-%d %H:%M:%S%:z"
89
93
  - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Alert Closed** by {agent} — Dependabot alert #{alert-number} dismissed: {reason}
90
94
  ```
91
95
  - Archive the task
96
+ - **Release short id** (after the archive `mv` succeeded; the script is idempotent):
97
+
98
+ ```bash
99
+ node .agents/scripts/task-short-id.js release "$task_id" || true
100
+ ```
92
101
 
93
102
  ### 8. Inform User
94
103
 
@@ -125,3 +134,5 @@ Next step - complete and archive the task if a related task exists:
125
134
  - Already closed: output "Alert #{number} is already {state}"
126
135
  - Permission error: output "No permission to modify alerts"
127
136
  - User canceled: output "Cancellation acknowledged"
137
+
138
+
@@ -7,6 +7,10 @@ description: "关闭 Dependabot 安全告警并记录理由"
7
7
 
8
8
  关闭指定的 Dependabot 安全告警并记录合理的关闭理由。
9
9
 
10
+ ## 任务入参短号别名
11
+
12
+ > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
13
+
10
14
  ## 执行流程
11
15
 
12
16
  ### 1. 获取告警信息
@@ -89,6 +93,11 @@ date "+%Y-%m-%d %H:%M:%S%:z"
89
93
  - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Alert Closed** by {agent} — Dependabot alert #{alert-number} dismissed: {reason}
90
94
  ```
91
95
  - 归档任务
96
+ - **释放短号**(归档目录已 mv 成功,再 release;脚本幂等):
97
+
98
+ ```bash
99
+ node .agents/scripts/task-short-id.js release "$task_id" || true
100
+ ```
92
101
 
93
102
  ### 8. 告知用户
94
103
 
@@ -125,3 +134,5 @@ date "+%Y-%m-%d %H:%M:%S%:z"
125
134
  - 已关闭:提示 "Alert #{number} is already {state}"
126
135
  - 权限错误:提示 "No permission to modify alerts"
127
136
  - 用户取消:提示 "Cancellation acknowledged"
137
+
138
+