@fitlab-ai/agent-infra 0.7.0 → 0.7.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 (156) hide show
  1. package/bin/cli.ts +12 -1
  2. package/dist/bin/cli.js +13 -1
  3. package/dist/lib/builtin-tuis.js +45 -0
  4. package/dist/lib/defaults.json +3 -0
  5. package/dist/lib/init.js +62 -23
  6. package/dist/lib/prompt.js +49 -1
  7. package/dist/lib/sandbox/commands/create.js +10 -2
  8. package/dist/lib/sandbox/commands/enter.js +8 -7
  9. package/dist/lib/sandbox/commands/list-running.js +62 -28
  10. package/dist/lib/sandbox/commands/ls.js +20 -22
  11. package/dist/lib/sandbox/commands/rebuild.js +3 -11
  12. package/dist/lib/sandbox/commands/rm.js +2 -0
  13. package/dist/lib/sandbox/image-prune.js +18 -0
  14. package/dist/lib/sandbox/index.js +7 -3
  15. package/dist/lib/sandbox/task-resolver.js +18 -0
  16. package/dist/lib/sandbox/tools.js +1 -1
  17. package/dist/lib/table.js +29 -0
  18. package/dist/lib/task/commands/ls.js +122 -0
  19. package/dist/lib/task/commands/show.js +135 -0
  20. package/dist/lib/task/frontmatter.js +32 -0
  21. package/dist/lib/task/index.js +41 -0
  22. package/dist/lib/task/short-id.js +80 -0
  23. package/dist/lib/update.js +59 -18
  24. package/lib/builtin-tuis.ts +55 -0
  25. package/lib/defaults.json +3 -0
  26. package/lib/init.ts +87 -35
  27. package/lib/prompt.ts +54 -1
  28. package/lib/sandbox/commands/create.ts +11 -2
  29. package/lib/sandbox/commands/enter.ts +8 -7
  30. package/lib/sandbox/commands/list-running.ts +70 -31
  31. package/lib/sandbox/commands/ls.ts +25 -25
  32. package/lib/sandbox/commands/rebuild.ts +3 -12
  33. package/lib/sandbox/commands/rm.ts +3 -0
  34. package/lib/sandbox/image-prune.ts +23 -0
  35. package/lib/sandbox/index.ts +7 -3
  36. package/lib/sandbox/task-resolver.ts +23 -1
  37. package/lib/sandbox/tools.ts +1 -1
  38. package/lib/table.ts +32 -0
  39. package/lib/task/commands/ls.ts +138 -0
  40. package/lib/task/commands/show.ts +139 -0
  41. package/lib/task/frontmatter.ts +30 -0
  42. package/lib/task/index.ts +44 -0
  43. package/lib/task/short-id.ts +97 -0
  44. package/lib/update.ts +71 -30
  45. package/package.json +1 -1
  46. package/templates/.agents/README.en.md +32 -0
  47. package/templates/.agents/README.zh-CN.md +32 -0
  48. package/templates/.agents/hooks/auto-resume.sh +87 -0
  49. package/templates/.agents/rules/create-issue.github.en.md +1 -1
  50. package/templates/.agents/rules/create-issue.github.zh-CN.md +1 -1
  51. package/templates/.agents/rules/milestone-inference.github.en.md +4 -1
  52. package/templates/.agents/rules/milestone-inference.github.zh-CN.md +4 -1
  53. package/templates/.agents/rules/next-step-output.en.md +59 -0
  54. package/templates/.agents/rules/next-step-output.zh-CN.md +59 -0
  55. package/templates/.agents/rules/task-short-id.en.md +133 -0
  56. package/templates/.agents/rules/task-short-id.zh-CN.md +105 -0
  57. package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +17 -0
  58. package/templates/.agents/scripts/task-short-id.js +556 -0
  59. package/templates/.agents/skills/analyze-task/SKILL.en.md +13 -11
  60. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +13 -12
  61. package/templates/.agents/skills/analyze-task/config/verify.en.json +1 -1
  62. package/templates/.agents/skills/analyze-task/config/verify.zh-CN.json +1 -1
  63. package/templates/.agents/skills/block-task/SKILL.en.md +17 -5
  64. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +17 -6
  65. package/templates/.agents/skills/block-task/config/verify.json +1 -1
  66. package/templates/.agents/skills/cancel-task/SKILL.en.md +17 -5
  67. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +17 -6
  68. package/templates/.agents/skills/cancel-task/config/verify.json +1 -1
  69. package/templates/.agents/skills/check-task/SKILL.en.md +15 -9
  70. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +15 -10
  71. package/templates/.agents/skills/close-codescan/SKILL.en.md +16 -5
  72. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +16 -5
  73. package/templates/.agents/skills/close-dependabot/SKILL.en.md +16 -5
  74. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +16 -5
  75. package/templates/.agents/skills/code-task/SKILL.en.md +13 -5
  76. package/templates/.agents/skills/code-task/SKILL.zh-CN.md +14 -6
  77. package/templates/.agents/skills/code-task/config/verify.en.json +2 -1
  78. package/templates/.agents/skills/code-task/config/verify.zh-CN.json +2 -1
  79. package/templates/.agents/skills/code-task/reference/fix-mode.en.md +10 -5
  80. package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +10 -5
  81. package/templates/.agents/skills/code-task/reference/output-template.en.md +3 -3
  82. package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +3 -3
  83. package/templates/.agents/skills/code-task/reference/report-template.en.md +8 -0
  84. package/templates/.agents/skills/code-task/reference/report-template.zh-CN.md +8 -0
  85. package/templates/.agents/skills/commit/SKILL.en.md +5 -1
  86. package/templates/.agents/skills/commit/SKILL.zh-CN.md +5 -1
  87. package/templates/.agents/skills/commit/reference/task-status-update.en.md +9 -9
  88. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +9 -9
  89. package/templates/.agents/skills/complete-task/SKILL.en.md +17 -1
  90. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +17 -2
  91. package/templates/.agents/skills/complete-task/config/verify.en.json +1 -1
  92. package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +1 -1
  93. package/templates/.agents/skills/create-pr/SKILL.en.md +9 -5
  94. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +9 -5
  95. package/templates/.agents/skills/create-pr/config/verify.json +2 -1
  96. package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +1 -1
  97. package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +1 -1
  98. package/templates/.agents/skills/create-pr/reference/pr-body-template.en.md +3 -3
  99. package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +3 -3
  100. package/templates/.agents/skills/create-task/SKILL.en.md +29 -15
  101. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +29 -16
  102. package/templates/.agents/skills/create-task/config/verify.json +1 -1
  103. package/templates/.agents/skills/import-codescan/SKILL.en.md +20 -6
  104. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +20 -6
  105. package/templates/.agents/skills/import-codescan/config/verify.json +1 -1
  106. package/templates/.agents/skills/import-dependabot/SKILL.en.md +20 -6
  107. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +20 -6
  108. package/templates/.agents/skills/import-dependabot/config/verify.json +1 -1
  109. package/templates/.agents/skills/import-issue/SKILL.en.md +19 -5
  110. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +19 -5
  111. package/templates/.agents/skills/plan-task/SKILL.en.md +13 -11
  112. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +13 -12
  113. package/templates/.agents/skills/plan-task/config/verify.en.json +1 -1
  114. package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +1 -1
  115. package/templates/.agents/skills/restore-task/SKILL.en.md +12 -0
  116. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +12 -1
  117. package/templates/.agents/skills/review-analysis/SKILL.en.md +7 -1
  118. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +7 -2
  119. package/templates/.agents/skills/review-analysis/config/verify.en.json +3 -2
  120. package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +3 -2
  121. package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +15 -15
  122. package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +15 -15
  123. package/templates/.agents/skills/review-analysis/reference/report-template.en.md +7 -1
  124. package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +7 -1
  125. package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +2 -0
  126. package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +2 -0
  127. package/templates/.agents/skills/review-code/SKILL.en.md +8 -1
  128. package/templates/.agents/skills/review-code/SKILL.zh-CN.md +8 -2
  129. package/templates/.agents/skills/review-code/config/verify.en.json +3 -2
  130. package/templates/.agents/skills/review-code/config/verify.zh-CN.json +3 -2
  131. package/templates/.agents/skills/review-code/reference/output-templates.en.md +9 -9
  132. package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +9 -9
  133. package/templates/.agents/skills/review-code/reference/report-template.en.md +7 -1
  134. package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +7 -1
  135. package/templates/.agents/skills/review-code/reference/review-criteria.en.md +2 -0
  136. package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +2 -0
  137. package/templates/.agents/skills/review-plan/SKILL.en.md +7 -1
  138. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +7 -2
  139. package/templates/.agents/skills/review-plan/config/verify.en.json +3 -2
  140. package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +3 -2
  141. package/templates/.agents/skills/review-plan/reference/output-templates.en.md +15 -15
  142. package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +15 -15
  143. package/templates/.agents/skills/review-plan/reference/report-template.en.md +7 -1
  144. package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +7 -1
  145. package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +2 -0
  146. package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +2 -0
  147. package/templates/.agents/skills/update-agent-infra/SKILL.en.md +1 -0
  148. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +1 -0
  149. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +112 -21
  150. package/templates/.agents/workflows/bug-fix.en.yaml +1 -1
  151. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +1 -1
  152. package/templates/.agents/workflows/feature-development.en.yaml +1 -1
  153. package/templates/.agents/workflows/feature-development.zh-CN.yaml +1 -1
  154. package/templates/.agents/workflows/refactoring.en.yaml +1 -1
  155. package/templates/.agents/workflows/refactoring.zh-CN.yaml +1 -1
  156. package/templates/.claude/settings.json +11 -0
@@ -32,7 +32,7 @@
32
32
  ]
33
33
  },
34
34
  "activity-log": {
35
- "expected_action_pattern": "Requirement Analysis \\(Round \\d+\\)",
35
+ "expected_action_pattern": "(Analyze Task|Requirement Analysis) \\(Round \\d+\\)",
36
36
  "freshness_minutes": 30
37
37
  },
38
38
  "platform-sync": {
@@ -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}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), 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
@@ -52,7 +56,7 @@ Update `.agents/workspace/active/{task-id}/task.md`:
52
56
  - `agent_infra_version`: value from `.agents/rules/version-stamp.md`
53
57
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
54
58
  ```
55
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Blocked** by {agent} — {one-line reason}
59
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Block Task** by {agent} — {one-line reason}
56
60
  ```
57
61
 
58
62
  Add a blocking information section to task.md.
@@ -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
@@ -96,7 +106,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
96
106
 
97
107
  > Execute this step only after the verification gate passes.
98
108
 
99
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
109
+ > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). Before rendering the "Next steps" commands, read `.agents/rules/next-step-output.md` and use its short-id snippet to render `{task-ref}` in the commands as the short id `#NN` (falling back to the full TASK-id when unallocated or released).
100
110
 
101
111
  Output format:
102
112
  ```
@@ -111,11 +121,13 @@ To unblock when the issue is resolved:
111
121
  # Then update task.md: status -> active, remove blocked_at
112
122
 
113
123
  Next step - check task status after unblocking:
114
- - Claude Code / OpenCode: /check-task {task-id}
115
- - Gemini CLI: /{{project}}:check-task {task-id}
116
- - Codex CLI: $check-task {task-id}
124
+ - Claude Code / OpenCode: /check-task {task-ref}
125
+ - Gemini CLI: /{{project}}:check-task {task-ref}
126
+ - Codex CLI: $check-task {task-ref}
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}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.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}/`。
@@ -52,7 +55,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
52
55
  - `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
53
56
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
54
57
  ```
55
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Blocked** by {agent} — {一行原因}
58
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Block Task** by {agent} — {一行原因}
56
59
  ```
57
60
 
58
61
  在 task.md 中添加阻塞信息部分。
@@ -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
@@ -96,7 +105,7 @@ node .agents/scripts/validate-artifact.js gate block-task .agents/workspace/bloc
96
105
 
97
106
  > 仅在校验通过后执行本步骤。
98
107
 
99
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
108
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
100
109
 
101
110
  输出格式:
102
111
  ```
@@ -111,11 +120,13 @@ node .agents/scripts/validate-artifact.js gate block-task .agents/workspace/bloc
111
120
  # 然后更新 task.md:status -> active,移除 blocked_at
112
121
 
113
122
  下一步 - 检查任务状态(解除阻塞后):
114
- - Claude Code / OpenCode:/check-task {task-id}
115
- - Gemini CLI:/agent-infra:check-task {task-id}
116
- - Codex CLI:$check-task {task-id}
123
+ - Claude Code / OpenCode:/check-task {task-ref}
124
+ - Gemini CLI:/agent-infra:check-task {task-ref}
125
+ - Codex CLI:$check-task {task-ref}
117
126
  ```
118
127
 
128
+
129
+
119
130
  ## 完成检查清单
120
131
 
121
132
  - [ ] 分析并记录了阻塞原因
@@ -18,7 +18,7 @@
18
18
  "require_blocked_at": true
19
19
  },
20
20
  "activity-log": {
21
- "expected_action_pattern": "Blocked",
21
+ "expected_action_pattern": "(Block Task|Blocked)",
22
22
  "freshness_minutes": 30
23
23
  },
24
24
  "platform-sync": {
@@ -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}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), 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
@@ -53,7 +57,7 @@ Update `task.md` in the task directory:
53
57
  - `agent_infra_version`: value from `.agents/rules/version-stamp.md`
54
58
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
55
59
  ```
56
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancelled** by {agent} — {one-line cancellation reason}
60
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancel Task** by {agent} — {one-line cancellation reason}
57
61
  ```
58
62
 
59
63
  ### 4. Move the Task
@@ -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
@@ -109,7 +119,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
109
119
 
110
120
  > Execute this step only after the verification gate passes.
111
121
 
112
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
122
+ > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). Before rendering the "Next steps" commands, read `.agents/rules/next-step-output.md` and use its short-id snippet to render `{task-ref}` in the commands as the short id `#NN` (falling back to the full TASK-id when unallocated or released).
113
123
 
114
124
  Output format:
115
125
  ```
@@ -120,11 +130,13 @@ Status label: {status-label or skipped}
120
130
  Target path: .agents/workspace/completed/{task-id}/
121
131
 
122
132
  Next step - inspect the moved task:
123
- - Claude Code / OpenCode: /check-task {task-id}
124
- - Gemini CLI: /{{project}}:check-task {task-id}
125
- - Codex CLI: $check-task {task-id}
133
+ - Claude Code / OpenCode: /check-task {task-ref}
134
+ - Gemini CLI: /{{project}}:check-task {task-ref}
135
+ - Codex CLI: $check-task {task-ref}
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}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
17
19
 
20
+ ## 执行步骤
18
21
  ### 1. 验证任务存在
19
22
 
20
23
  依次检查以下目录:
@@ -53,7 +56,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
53
56
  - `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
54
57
  - **追加**到 `## Activity Log`(不要覆盖之前记录):
55
58
  ```
56
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancelled** by {agent} — {一行取消原因}
59
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancel Task** by {agent} — {一行取消原因}
57
60
  ```
58
61
 
59
62
  ### 4. 转移任务
@@ -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
@@ -109,7 +118,7 @@ node .agents/scripts/validate-artifact.js gate cancel-task .agents/workspace/com
109
118
 
110
119
  > 仅在校验通过后执行本步骤。
111
120
 
112
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
121
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
113
122
 
114
123
  输出格式:
115
124
  ```
@@ -120,11 +129,13 @@ node .agents/scripts/validate-artifact.js gate cancel-task .agents/workspace/com
120
129
  目标路径:.agents/workspace/completed/{task-id}/
121
130
 
122
131
  下一步 - 查看已转移任务:
123
- - Claude Code / OpenCode:/check-task {task-id}
124
- - Gemini CLI:/{{project}}:check-task {task-id}
125
- - Codex CLI:$check-task {task-id}
132
+ - Claude Code / OpenCode:/check-task {task-ref}
133
+ - Gemini CLI:/{{project}}:check-task {task-ref}
134
+ - Codex CLI:$check-task {task-ref}
126
135
  ```
127
136
 
137
+
138
+
128
139
  ## 完成检查清单
129
140
 
130
141
  - [ ] 已记录取消原因并更新 task.md
@@ -19,7 +19,7 @@
19
19
  "require_cancelled_at": true
20
20
  },
21
21
  "activity-log": {
22
- "expected_action_pattern": "Cancelled",
22
+ "expected_action_pattern": "(Cancel Task|Cancelled)",
23
23
  "freshness_minutes": 30
24
24
  },
25
25
  "platform-sync": {
@@ -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}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), 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
@@ -51,7 +55,7 @@ For versioned artifacts (`analysis`, `review-analysis`, `plan`, `review-plan`, `
51
55
  Format the status report with a clear structure and status indicators:
52
56
 
53
57
  ```
54
- Task status: {task-id}
58
+ Task status: {task-id} (short id {task-ref})
55
59
  =======================
56
60
 
57
61
  Basic info:
@@ -120,18 +124,20 @@ Recommend the appropriate next skill based on the current workflow state. You mu
120
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"
121
125
  >
122
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
+ > Before rendering the commands in the table below, read `.agents/rules/next-step-output.md` and render `{task-ref}` in the commands as the short id `#NN` (falling back to the full TASK-id when unallocated or released).
123
129
 
124
130
  | Current State | Claude Code / OpenCode | Gemini CLI | Codex CLI |
125
131
  |----------------------------|-----------------------------------------------------|------------------------------------------|-----------------------------------------------------|
126
- | Analysis Complete | `/review-analysis {task-id}` | `/{{project}}:review-analysis {task-id}` | `$review-analysis {task-id}` |
127
- | Analysis Review Passed | `/plan-task {task-id}` | `/{{project}}:plan-task {task-id}` | `$plan-task {task-id}` |
128
- | Analysis Review Has Issues | `/analyze-task {task-id}` | `/{{project}}:analyze-task {task-id}` | `$analyze-task {task-id}` |
129
- | Plan Complete | `/review-plan {task-id}` | `/{{project}}:review-plan {task-id}` | `$review-plan {task-id}` |
130
- | Plan Review Passed | `/code-task {task-id}` | `/{{project}}:code-task {task-id}` | `$code-task {task-id}` |
131
- | Plan Review Has Issues | `/plan-task {task-id}` | `/{{project}}:plan-task {task-id}` | `$plan-task {task-id}` |
132
- | Code Complete | `/review-code {task-id}` | `/{{project}}:review-code {task-id}` | `$review-code {task-id}` |
132
+ | Analysis Complete | `/review-analysis {task-ref}` | `/{{project}}:review-analysis {task-ref}` | `$review-analysis {task-ref}` |
133
+ | Analysis Review Passed | `/plan-task {task-ref}` | `/{{project}}:plan-task {task-ref}` | `$plan-task {task-ref}` |
134
+ | Analysis Review Has Issues | `/analyze-task {task-ref}` | `/{{project}}:analyze-task {task-ref}` | `$analyze-task {task-ref}` |
135
+ | Plan Complete | `/review-plan {task-ref}` | `/{{project}}:review-plan {task-ref}` | `$review-plan {task-ref}` |
136
+ | Plan Review Passed | `/code-task {task-ref}` | `/{{project}}:code-task {task-ref}` | `$code-task {task-ref}` |
137
+ | Plan Review Has Issues | `/plan-task {task-ref}` | `/{{project}}:plan-task {task-ref}` | `$plan-task {task-ref}` |
138
+ | Code Complete | `/review-code {task-ref}` | `/{{project}}:review-code {task-ref}` | `$review-code {task-ref}` |
133
139
  | Code Review Passed | `/commit` | `/{{project}}:commit` | `$commit` |
134
- | Code Review Has Issues | `/code-task {task-id}` | `/{{project}}:code-task {task-id}` | `$code-task {task-id}` |
140
+ | Code Review Has Issues | `/code-task {task-ref}` | `/{{project}}:code-task {task-ref}` | `$code-task {task-ref}` |
135
141
  | Task Blocked | Unblock the task or provide the missing information | — | Unblock the task or provide the missing information |
136
142
  | Task Completed | No action needed | — | No action needed |
137
143
 
@@ -10,8 +10,11 @@ description: "查看任务的当前状态和进度"
10
10
  - 本技能是**只读**操作 —— 不修改任何文件
11
11
  - 始终检查 active、blocked 和 completed 目录
12
12
 
13
- ## 执行步骤
13
+ ## 任务入参短号别名
14
+
15
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
14
16
 
17
+ ## 执行步骤
15
18
  ### 1. 查找任务
16
19
 
17
20
  按以下优先顺序搜索任务:
@@ -51,7 +54,7 @@ description: "查看任务的当前状态和进度"
51
54
  以清晰的结构和状态指示器格式化输出:
52
55
 
53
56
  ```
54
- 任务状态:{task-id}
57
+ 任务状态:{task-id}(短号 {task-ref})
55
58
  =======================
56
59
 
57
60
  基本信息:
@@ -120,18 +123,20 @@ description: "查看任务的当前状态和进度"
120
123
  > - `current_step = code-review` 且最新代码审查产物存在,但仍有任何 `Blocker`、`Major` 或 `Minor` 问题,或结论不是无问题通过 → 选择「代码审查有问题」
121
124
  >
122
125
  > **特别注意:只要最新审查报告中存在任何问题,就不能使用对应「审查通过」行。必须改用对应「审查有问题」行。**
126
+ >
127
+ > 渲染下方表格中的命令前,先读取 `.agents/rules/next-step-output.md`,把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
123
128
 
124
129
  | 当前状态 | Claude Code / OpenCode | Gemini CLI | Codex CLI |
125
130
  |--------------------|------------------------------|------------------------------------------|------------------------------|
126
- | 分析完成 | `/review-analysis {task-id}` | `/agent-infra:review-analysis {task-id}` | `$review-analysis {task-id}` |
127
- | 需求分析审查通过 | `/plan-task {task-id}` | `/agent-infra:plan-task {task-id}` | `$plan-task {task-id}` |
128
- | 需求分析审查有问题 | `/analyze-task {task-id}` | `/agent-infra:analyze-task {task-id}` | `$analyze-task {task-id}` |
129
- | 计划完成 | `/review-plan {task-id}` | `/agent-infra:review-plan {task-id}` | `$review-plan {task-id}` |
130
- | 技术方案审查通过 | `/code-task {task-id}` | `/agent-infra:code-task {task-id}` | `$code-task {task-id}` |
131
- | 技术方案审查有问题 | `/plan-task {task-id}` | `/agent-infra:plan-task {task-id}` | `$plan-task {task-id}` |
132
- | 实现完成 | `/review-code {task-id}` | `/agent-infra:review-code {task-id}` | `$review-code {task-id}` |
131
+ | 分析完成 | `/review-analysis {task-ref}` | `/agent-infra:review-analysis {task-ref}` | `$review-analysis {task-ref}` |
132
+ | 需求分析审查通过 | `/plan-task {task-ref}` | `/agent-infra:plan-task {task-ref}` | `$plan-task {task-ref}` |
133
+ | 需求分析审查有问题 | `/analyze-task {task-ref}` | `/agent-infra:analyze-task {task-ref}` | `$analyze-task {task-ref}` |
134
+ | 计划完成 | `/review-plan {task-ref}` | `/agent-infra:review-plan {task-ref}` | `$review-plan {task-ref}` |
135
+ | 技术方案审查通过 | `/code-task {task-ref}` | `/agent-infra:code-task {task-ref}` | `$code-task {task-ref}` |
136
+ | 技术方案审查有问题 | `/plan-task {task-ref}` | `/agent-infra:plan-task {task-ref}` | `$plan-task {task-ref}` |
137
+ | 实现完成 | `/review-code {task-ref}` | `/agent-infra:review-code {task-ref}` | `$review-code {task-ref}` |
133
138
  | 代码审查通过 | `/commit` | `/agent-infra:commit` | `$commit` |
134
- | 代码审查有问题 | `/code-task {task-id}` | `/agent-infra:code-task {task-id}` | `$code-task {task-id}` |
139
+ | 代码审查有问题 | `/code-task {task-ref}` | `/agent-infra:code-task {task-ref}` | `$code-task {task-ref}` |
135
140
  | 任务被阻塞 | 解除阻塞或提供所需信息 | — | 解除阻塞或提供所需信息 |
136
141
  | 任务已完成 | 无需操作 | — | 无需操作 |
137
142
 
@@ -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}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), 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
@@ -78,13 +82,18 @@ date "+%Y-%m-%d %H:%M:%S%:z"
78
82
  - Add the dismissal record to task.md
79
83
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
80
84
  ```
81
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Alert Closed** by {agent} — Code Scanning alert #{alert-number} dismissed: {reason}
85
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Codescan** 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
 
87
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
96
+ > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). Before rendering the "Next steps" commands, read `.agents/rules/next-step-output.md` and use its short-id snippet to render `{task-ref}` in the commands as the short id `#NN` (falling back to the full TASK-id when unallocated or released).
88
97
 
89
98
  ```
90
99
  Code Scanning alert #{alert-number} dismissed.
@@ -99,9 +108,9 @@ View: {html_url}
99
108
  Note: it can be reopened on the platform if necessary.
100
109
 
101
110
  Next step - complete and archive the task if a related task exists:
102
- - Claude Code / OpenCode: /complete-task {task-id}
103
- - Gemini CLI: /{{project}}:complete-task {task-id}
104
- - Codex CLI: $complete-task {task-id}
111
+ - Claude Code / OpenCode: /complete-task {task-ref}
112
+ - Gemini CLI: /{{project}}:complete-task {task-ref}
113
+ - Codex CLI: $complete-task {task-ref}
105
114
  ```
106
115
 
107
116
  ## Notes
@@ -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}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
13
+
10
14
  ## 执行流程
11
15
 
12
16
  ### 1. 获取告警信息
@@ -78,13 +82,18 @@ date "+%Y-%m-%d %H:%M:%S%:z"
78
82
  - 添加关闭记录到 task.md
79
83
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
80
84
  ```
81
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Alert Closed** by {agent} — Code Scanning alert #{alert-number} dismissed: {reason}
85
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Codescan** 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
 
87
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
96
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
88
97
 
89
98
  ```
90
99
  Code Scanning 告警 #{alert-number} 已关闭。
@@ -99,9 +108,9 @@ Code Scanning 告警 #{alert-number} 已关闭。
99
108
  注意:如有需要,可在 平台上重新打开。
100
109
 
101
110
  下一步 - 完成并归档任务(如有关联任务):
102
- - Claude Code / OpenCode:/complete-task {task-id}
103
- - Gemini CLI:/agent-infra:complete-task {task-id}
104
- - Codex CLI:$complete-task {task-id}
111
+ - Claude Code / OpenCode:/complete-task {task-ref}
112
+ - Gemini CLI:/agent-infra:complete-task {task-ref}
113
+ - Codex CLI:$complete-task {task-ref}
105
114
  ```
106
115
 
107
116
  ## 注意事项
@@ -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}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), 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
@@ -86,13 +90,18 @@ date "+%Y-%m-%d %H:%M:%S%:z"
86
90
  - Add the dismissal record to task.md
87
91
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
88
92
  ```
89
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Alert Closed** by {agent} — Dependabot alert #{alert-number} dismissed: {reason}
93
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Dependabot** 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
 
95
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
104
+ > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). Before rendering the "Next steps" commands, read `.agents/rules/next-step-output.md` and use its short-id snippet to render `{task-ref}` in the commands as the short id `#NN` (falling back to the full TASK-id when unallocated or released).
96
105
 
97
106
  ```
98
107
  Security alert #{alert-number} dismissed.
@@ -107,9 +116,9 @@ View: {alert-url}
107
116
  Note: it can be reopened on the platform if necessary.
108
117
 
109
118
  Next step - complete and archive the task if a related task exists:
110
- - Claude Code / OpenCode: /complete-task {task-id}
111
- - Gemini CLI: /{{project}}:complete-task {task-id}
112
- - Codex CLI: $complete-task {task-id}
119
+ - Claude Code / OpenCode: /complete-task {task-ref}
120
+ - Gemini CLI: /{{project}}:complete-task {task-ref}
121
+ - Codex CLI: $complete-task {task-ref}
113
122
  ```
114
123
 
115
124
  ## Notes
@@ -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}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
13
+
10
14
  ## 执行流程
11
15
 
12
16
  ### 1. 获取告警信息
@@ -86,13 +90,18 @@ date "+%Y-%m-%d %H:%M:%S%:z"
86
90
  - 添加关闭记录到 task.md
87
91
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
88
92
  ```
89
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Alert Closed** by {agent} — Dependabot alert #{alert-number} dismissed: {reason}
93
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Dependabot** 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
 
95
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
104
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
96
105
 
97
106
  ```
98
107
  安全告警 #{alert-number} 已关闭。
@@ -107,9 +116,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
107
116
  注意:如有需要,可在平台侧重新打开。
108
117
 
109
118
  下一步 - 完成并归档任务(如有关联任务):
110
- - Claude Code / OpenCode:/complete-task {task-id}
111
- - Gemini CLI:/agent-infra:complete-task {task-id}
112
- - Codex CLI:$complete-task {task-id}
119
+ - Claude Code / OpenCode:/complete-task {task-ref}
120
+ - Gemini CLI:/agent-infra:complete-task {task-ref}
121
+ - Codex CLI:$complete-task {task-ref}
113
122
  ```
114
123
 
115
124
  ## 注意事项
@@ -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
+
@@ -10,7 +10,7 @@ Implement the approved plan and produce `code.md` or `code-r{N}.md`. This skill
10
10
  ## Boundary / Critical Rules
11
11
 
12
12
  - Follow the latest plan artifact: `plan.md` or `plan-r{N}.md`
13
- - Fix mode only addresses findings from the latest `review-code`; env-blocked items are out of scope
13
+ - Fix mode verifies each finding of the latest `review-code` one by one: fix it if it holds, or rebut it and record it under unresolved if it is unfounded/hallucinated; do not expand to issues the review did not list; env-blocked items are out of scope
14
14
  - Never auto-run `git add` or `git commit`
15
15
  - Create a new code artifact for each round and never overwrite an older one
16
16
  - After executing this skill, you **must** immediately update task.md
@@ -29,6 +29,10 @@ ls -la .agents/workspace/active/{task-id}/
29
29
  tail .agents/workspace/active/{task-id}/task.md
30
30
  ```
31
31
 
32
+ ## Task id short ref
33
+
34
+ > If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), 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.
35
+
32
36
  ## Steps
33
37
 
34
38
  ### 1. Verify Prerequisites
@@ -41,7 +45,9 @@ Read `reference/branch-management.md`, ensure the current branch matches the tas
41
45
 
42
46
  ### 3. Narrow the Milestone
43
47
 
44
- If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md` and `.agents/rules/milestone-inference.md`; follow Phase 2 for `code-task`.
48
+ **Mandatory; do not skip.** If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md` first (upstream + permission detection), then `.agents/rules/milestone-inference.md` Phase 2 for `code-task` to narrow the Issue milestone. If `has_triage=false`, keep the existing milestone.
49
+
50
+ > If this step is skipped or the Issue milestone is still a release line `X.Y.x` afterward, the step-11 `validate-artifact` gate will block the `code-task` round via `verify_milestone_specific` and require narrowing to a specific version (e.g. `0.7.1`) before proceeding.
45
51
 
46
52
  ### 4. Determine Mode and Round
47
53
 
@@ -98,8 +104,8 @@ date "+%Y-%m-%d %H:%M:%S%:z"
98
104
 
99
105
  Set `current_step` to `code`, refresh task metadata, and append one Activity Log entry:
100
106
 
101
- - initial implementation: `Code (Round {N})`
102
- - fix mode: `Code (Round {N}, fix for {review-artifact})`
107
+ - initial implementation: `Code Task (Round {N})`
108
+ - fix mode: `Code Task (Round {N}, fix for {review-artifact})`
103
109
 
104
110
  If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md`, then:
105
111
  - Set `status: in-progress` according to issue-sync.md
@@ -114,4 +120,6 @@ node .agents/scripts/validate-artifact.js gate code-task .agents/workspace/activ
114
120
 
115
121
  ### 12. Tell the User
116
122
 
117
- Use `reference/output-template.md` and show all TUI command formats.
123
+ Use `reference/output-template.md` (or `reference/fix-mode.md` in fix mode) and show all TUI command formats.
124
+
125
+ > When rendering "Next steps" commands, `{task-ref}` is the current task's short id `#NN` (see `.agents/rules/next-step-output.md` for lookup and fallback; read it before rendering). Other `{task-id}` placeholders (report titles, paths) keep the full TASK-id form.