@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
@@ -22,6 +22,10 @@ After executing this skill, you **must** immediately update task status in task.
22
22
 
23
23
  Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
24
24
 
25
+ ## Task id short ref
26
+
27
+ > 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.
28
+
25
29
  ## Steps
26
30
 
27
31
  ### 1. Parse the User Description
@@ -105,12 +109,12 @@ Update `.agents/workspace/active/{task-id}/task.md`:
105
109
  - `## Context` -> `- **Branch**:`: update it to the generated branch name
106
110
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
107
111
  ```
108
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Task Created** by {agent} — Task created from description
112
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Create Task** by {agent} — Task created from description
109
113
  ```
110
114
 
111
115
  ### 4. Cascade Issue Creation via `.agents/rules/create-issue.md`
112
116
 
113
- After task.md is written and `Task Created` is recorded, read `.agents/rules/create-issue.md` first and follow the steps it describes to create an Issue.
117
+ After task.md is written and `Create Task` is recorded, read `.agents/rules/create-issue.md` first and follow the steps it describes to create an Issue.
114
118
 
115
119
  The rule's content is determined by the configured code platform:
116
120
  - A platform that supports Issue creation: contains the full flow for auth detection, template detection, label/type/milestone inference, the create-Issue call, and writing back to `task.md`
@@ -126,6 +130,14 @@ Handle the result:
126
130
 
127
131
  ### 5. Verification Gate
128
132
 
133
+ **Allocate short id first** (ensures the registry entry is allocated; the validation gate will read it):
134
+
135
+ ```bash
136
+ node .agents/scripts/task-short-id.js alloc "$task_id"
137
+ ```
138
+
139
+ If this fails (non-zero exit), follow the message — archive some active tasks or raise `task.shortIdLength` — and do NOT continue.
140
+
129
141
  Run the verification gate to confirm the task artifact and sync state are valid:
130
142
 
131
143
  ```bash
@@ -143,14 +155,14 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
143
155
 
144
156
  > Execute this step only after the verification gate passes.
145
157
 
146
- > **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).
158
+ > **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).
147
159
 
148
160
  Scenario A: when an Issue was created, output:
149
161
  ```
150
162
  Task created and Issue creation cascaded successfully.
151
163
 
152
164
  Task information:
153
- - Task ID: {task-id}
165
+ - Task ID: {task-id} (short id {task-ref})
154
166
  - Title: {title}
155
167
  - Type: {type}
156
168
  - Workflow: {workflow}
@@ -160,9 +172,9 @@ Output file:
160
172
  - Task file: .agents/workspace/active/{task-id}/task.md
161
173
 
162
174
  Next step - run requirements analysis:
163
- - Claude Code / OpenCode: /analyze-task {task-id}
164
- - Gemini CLI: /{{project}}:analyze-task {task-id}
165
- - Codex CLI: $analyze-task {task-id}
175
+ - Claude Code / OpenCode: /analyze-task {task-ref}
176
+ - Gemini CLI: /{{project}}:analyze-task {task-ref}
177
+ - Codex CLI: $analyze-task {task-ref}
166
178
  ```
167
179
 
168
180
  Scenario B: when no Issue was created, output:
@@ -170,7 +182,7 @@ Scenario B: when no Issue was created, output:
170
182
  Task created.
171
183
 
172
184
  Task information:
173
- - Task ID: {task-id}
185
+ - Task ID: {task-id} (short id {task-ref})
174
186
  - Title: {title}
175
187
  - Type: {type}
176
188
  - Workflow: {workflow}
@@ -179,9 +191,9 @@ Output file:
179
191
  - Task file: .agents/workspace/active/{task-id}/task.md
180
192
 
181
193
  Next step - run requirements analysis:
182
- - Claude Code / OpenCode: /analyze-task {task-id}
183
- - Gemini CLI: /{{project}}:analyze-task {task-id}
184
- - Codex CLI: $analyze-task {task-id}
194
+ - Claude Code / OpenCode: /analyze-task {task-ref}
195
+ - Gemini CLI: /{{project}}:analyze-task {task-ref}
196
+ - Codex CLI: $analyze-task {task-ref}
185
197
  ```
186
198
 
187
199
  Scenario C: when Issue creation failed, output:
@@ -189,7 +201,7 @@ Scenario C: when Issue creation failed, output:
189
201
  Task created, but cascade Issue creation failed.
190
202
 
191
203
  Task information:
192
- - Task ID: {task-id}
204
+ - Task ID: {task-id} (short id {task-ref})
193
205
  - Title: {title}
194
206
  - Type: {type}
195
207
  - Workflow: {workflow}
@@ -203,13 +215,15 @@ Output file:
203
215
  - Task file: .agents/workspace/active/{task-id}/task.md
204
216
 
205
217
  Next step - run requirements analysis:
206
- - Claude Code / OpenCode: /analyze-task {task-id}
207
- - Gemini CLI: /{{project}}:analyze-task {task-id}
208
- - Codex CLI: $analyze-task {task-id}
218
+ - Claude Code / OpenCode: /analyze-task {task-ref}
219
+ - Gemini CLI: /{{project}}:analyze-task {task-ref}
220
+ - Codex CLI: $analyze-task {task-ref}
209
221
 
210
222
  For later platform sync: after fixing auth / network / template issues, manually run the Issue creation flow in `.agents/rules/create-issue.md` for this task; or manually create/find an Issue and write `issue_number` into task.md so later skills can take over cascade sync.
211
223
  ```
212
224
 
225
+
226
+
213
227
  ## Completion Checklist
214
228
 
215
229
  - [ ] Created the task file `.agents/workspace/active/{task-id}/task.md`
@@ -22,8 +22,11 @@ description: "根据自然语言描述创建任务"
22
22
 
23
23
  版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
24
24
 
25
- ## 执行步骤
25
+ ## 任务入参短号别名
26
+
27
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
26
28
 
29
+ ## 执行步骤
27
30
  ### 1. 解析用户描述
28
31
 
29
32
  从自然语言描述中提取:
@@ -105,12 +108,12 @@ date "+%Y-%m-%d %H:%M:%S%:z"
105
108
  - `## 上下文` 中的 `- **分支**:`:更新为生成的分支名
106
109
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
107
110
  ```
108
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Task Created** by {agent} — Task created from description
111
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Create Task** by {agent} — Task created from description
109
112
  ```
110
113
 
111
114
  ### 4. 按 `.agents/rules/create-issue.md` 级联创建 Issue
112
115
 
113
- 在 task.md 落盘并记录 `Task Created` 后,先读取 `.agents/rules/create-issue.md` 并按其中描述的步骤执行 Issue 创建。
116
+ 在 task.md 落盘并记录 `Create Task` 后,先读取 `.agents/rules/create-issue.md` 并按其中描述的步骤执行 Issue 创建。
114
117
 
115
118
  规则文件由当前配置的代码平台决定其内容:
116
119
  - 支持 Issue 创建的平台:包含完整的认证检测、模板检测、label/Issue Type/milestone 推断、Issue 创建调用、`task.md` 回写流程
@@ -126,6 +129,14 @@ date "+%Y-%m-%d %H:%M:%S%:z"
126
129
 
127
130
  ### 5. 完成校验
128
131
 
132
+ **先调用短号分配**(保证注册表 entry 已分配;完成校验阶段会读取):
133
+
134
+ ```bash
135
+ node .agents/scripts/task-short-id.js alloc "$task_id"
136
+ ```
137
+
138
+ 如失败(退出码非 0),按提示「归档若干任务」或「调高 task.shortIdLength」处理;不要继续执行后续步骤。
139
+
129
140
  运行完成校验,确认任务产物和同步状态符合规范:
130
141
 
131
142
  ```bash
@@ -143,14 +154,14 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
143
154
 
144
155
  > 仅在校验通过后执行本步骤。
145
156
 
146
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
157
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
147
158
 
148
159
  场景 A:已创建 Issue 时输出:
149
160
  ```
150
161
  任务已创建,并已级联创建 Issue。
151
162
 
152
163
  任务信息:
153
- - 任务 ID:{task-id}
164
+ - 任务 ID:{task-id}(短号 {task-ref})
154
165
  - 标题:{title}
155
166
  - 类型:{type}
156
167
  - 工作流:{workflow}
@@ -160,9 +171,9 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
160
171
  - 任务文件:.agents/workspace/active/{task-id}/task.md
161
172
 
162
173
  下一步 - 执行需求分析:
163
- - Claude Code / OpenCode:/analyze-task {task-id}
164
- - Gemini CLI:/{{project}}:analyze-task {task-id}
165
- - Codex CLI:$analyze-task {task-id}
174
+ - Claude Code / OpenCode:/analyze-task {task-ref}
175
+ - Gemini CLI:/{{project}}:analyze-task {task-ref}
176
+ - Codex CLI:$analyze-task {task-ref}
166
177
  ```
167
178
 
168
179
  场景 B:未创建 Issue 时输出:
@@ -170,7 +181,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
170
181
  任务已创建。
171
182
 
172
183
  任务信息:
173
- - 任务 ID:{task-id}
184
+ - 任务 ID:{task-id}(短号 {task-ref})
174
185
  - 标题:{title}
175
186
  - 类型:{type}
176
187
  - 工作流:{workflow}
@@ -179,9 +190,9 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
179
190
  - 任务文件:.agents/workspace/active/{task-id}/task.md
180
191
 
181
192
  下一步 - 执行需求分析:
182
- - Claude Code / OpenCode:/analyze-task {task-id}
183
- - Gemini CLI:/{{project}}:analyze-task {task-id}
184
- - Codex CLI:$analyze-task {task-id}
193
+ - Claude Code / OpenCode:/analyze-task {task-ref}
194
+ - Gemini CLI:/{{project}}:analyze-task {task-ref}
195
+ - Codex CLI:$analyze-task {task-ref}
185
196
  ```
186
197
 
187
198
  场景 C:Issue 创建失败时输出:
@@ -189,7 +200,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
189
200
  任务已创建,但 Issue 级联创建失败。
190
201
 
191
202
  任务信息:
192
- - 任务 ID:{task-id}
203
+ - 任务 ID:{task-id}(短号 {task-ref})
193
204
  - 标题:{title}
194
205
  - 类型:{type}
195
206
  - 工作流:{workflow}
@@ -203,13 +214,15 @@ Issue 创建失败:
203
214
  - 任务文件:.agents/workspace/active/{task-id}/task.md
204
215
 
205
216
  下一步 - 执行需求分析:
206
- - Claude Code / OpenCode:/analyze-task {task-id}
207
- - Gemini CLI:/{{project}}:analyze-task {task-id}
208
- - Codex CLI:$analyze-task {task-id}
217
+ - Claude Code / OpenCode:/analyze-task {task-ref}
218
+ - Gemini CLI:/{{project}}:analyze-task {task-ref}
219
+ - Codex CLI:$analyze-task {task-ref}
209
220
 
210
221
  后续如需平台同步:修复认证/网络/模板问题后,可按 `.agents/rules/create-issue.md` 对当前任务手动执行一次 Issue 创建;或手动创建/查找 Issue,并把 `issue_number` 写入 task.md,后续技能会接管级联同步。
211
222
  ```
212
223
 
224
+
225
+
213
226
  ## 完成检查清单
214
227
 
215
228
  - [ ] 创建了任务文件 `.agents/workspace/active/{task-id}/task.md`
@@ -18,7 +18,7 @@
18
18
  "expected_status": "active"
19
19
  },
20
20
  "activity-log": {
21
- "expected_action_pattern": "Task Created",
21
+ "expected_action_pattern": "(Create Task|Task Created)",
22
22
  "freshness_minutes": 30
23
23
  },
24
24
  "platform-sync": {
@@ -13,6 +13,10 @@ Import the specified Code Scanning (CodeQL) alert and create a remediation task.
13
13
  - Do NOT auto-commit. Never execute `git commit` or `git add` automatically
14
14
  - After executing this skill, you **must** immediately update task status in task.md
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
  ## Execution Flow
17
21
 
18
22
  ### 1. Retrieve Alert Information
@@ -53,11 +57,19 @@ date "+%Y-%m-%d %H:%M:%S%:z"
53
57
  Update task.md: `current_step` -> `requirement-analysis`.
54
58
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
55
59
  ```
56
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Code Scanning Alert** by {agent} — Code Scanning alert #{alert-number} imported
60
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Codescan** by {agent} — Code Scanning alert #{alert-number} imported
57
61
  ```
58
62
 
59
63
  ### 4. Verification Gate
60
64
 
65
+ **Allocate short id first** (ensures the registry entry is allocated; the validation gate will read it):
66
+
67
+ ```bash
68
+ node .agents/scripts/task-short-id.js alloc "$task_id"
69
+ ```
70
+
71
+ If this fails (non-zero exit), follow the message — archive some active tasks or raise `task.shortIdLength` — and do NOT continue.
72
+
61
73
  Run the verification gate to confirm the task artifact and sync state are valid:
62
74
 
63
75
  ```bash
@@ -75,7 +87,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
75
87
 
76
88
  > Execute this step only after the verification gate passes.
77
89
 
78
- > **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).
90
+ > **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).
79
91
 
80
92
  ```
81
93
  Code Scanning alert #{alert-number} imported.
@@ -86,14 +98,16 @@ Alert information:
86
98
  - Location: {file-path}:{line-number}
87
99
 
88
100
  Task information:
89
- - Task ID: {task-id}
101
+ - Task ID: {task-id} (short id {task-ref})
90
102
 
91
103
  Next step:
92
- - Claude Code / OpenCode: /analyze-task {task-id}
93
- - Gemini CLI: /{{project}}:analyze-task {task-id}
94
- - Codex CLI: $analyze-task {task-id}
104
+ - Claude Code / OpenCode: /analyze-task {task-ref}
105
+ - Gemini CLI: /{{project}}:analyze-task {task-ref}
106
+ - Codex CLI: $analyze-task {task-ref}
95
107
  ```
96
108
 
109
+
110
+
97
111
  ## Completion Checklist
98
112
 
99
113
  - [ ] Retrieved and recorded the key alert information
@@ -13,6 +13,10 @@ description: "导入 Code Scanning 告警并创建修复任务"
13
13
  - 不要自动提交。绝不自动执行 `git commit` 或 `git add`
14
14
  - 执行本技能后,你**必须**立即更新 task.md 中的任务状态
15
15
 
16
+ ## 任务入参短号别名
17
+
18
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
19
+
16
20
  ## 执行流程
17
21
 
18
22
  ### 1. 获取告警信息
@@ -53,11 +57,19 @@ date "+%Y-%m-%d %H:%M:%S%:z"
53
57
  更新 task.md:`current_step` -> `requirement-analysis`。
54
58
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
55
59
  ```
56
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Code Scanning Alert** by {agent} — Code Scanning alert #{alert-number} imported
60
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Codescan** by {agent} — Code Scanning alert #{alert-number} imported
57
61
  ```
58
62
 
59
63
  ### 4. 完成校验
60
64
 
65
+ **先调用短号分配**(保证注册表 entry 已分配;完成校验阶段会读取):
66
+
67
+ ```bash
68
+ node .agents/scripts/task-short-id.js alloc "$task_id"
69
+ ```
70
+
71
+ 如失败(退出码非 0),按提示「归档若干任务」或「调高 task.shortIdLength」处理;不要继续执行后续步骤。
72
+
61
73
  运行完成校验,确认任务产物和同步状态符合规范:
62
74
 
63
75
  ```bash
@@ -75,7 +87,7 @@ node .agents/scripts/validate-artifact.js gate import-codescan .agents/workspace
75
87
 
76
88
  > 仅在校验通过后执行本步骤。
77
89
 
78
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
90
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
79
91
 
80
92
  ```
81
93
  Code Scanning 告警 #{alert-number} 已导入。
@@ -86,14 +98,16 @@ Code Scanning 告警 #{alert-number} 已导入。
86
98
  - 位置:{file-path}:{line-number}
87
99
 
88
100
  任务信息:
89
- - 任务 ID:{task-id}
101
+ - 任务 ID:{task-id}(短号 {task-ref})
90
102
 
91
103
  下一步:
92
- - Claude Code / OpenCode:/analyze-task {task-id}
93
- - Gemini CLI:/agent-infra:analyze-task {task-id}
94
- - Codex CLI:$analyze-task {task-id}
104
+ - Claude Code / OpenCode:/analyze-task {task-ref}
105
+ - Gemini CLI:/agent-infra:analyze-task {task-ref}
106
+ - Codex CLI:$analyze-task {task-ref}
95
107
  ```
96
108
 
109
+
110
+
97
111
  ## 完成检查清单
98
112
 
99
113
  - [ ] 获取并记录了告警关键信息
@@ -17,7 +17,7 @@
17
17
  "expected_status": "active"
18
18
  },
19
19
  "activity-log": {
20
- "expected_action_pattern": "Import Code Scanning Alert",
20
+ "expected_action_pattern": "(Import Codescan|Import Code Scanning Alert)",
21
21
  "freshness_minutes": 30
22
22
  },
23
23
  "platform-sync": null
@@ -13,6 +13,10 @@ Import the specified Dependabot security alert and create a remediation task.
13
13
  - Do NOT auto-commit. Never execute `git commit` or `git add` automatically
14
14
  - After executing this skill, you **must** immediately update task status in task.md
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
  ## Execution Flow
17
21
 
18
22
  ### 1. Retrieve Alert Information
@@ -54,11 +58,19 @@ date "+%Y-%m-%d %H:%M:%S%:z"
54
58
  Update task.md: `current_step` -> `requirement-analysis`.
55
59
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
56
60
  ```
57
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Dependabot Alert** by {agent} — Dependabot alert #{alert-number} imported
61
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Dependabot** by {agent} — Dependabot alert #{alert-number} imported
58
62
  ```
59
63
 
60
64
  ### 4. Verification Gate
61
65
 
66
+ **Allocate short id first** (ensures the registry entry is allocated; the validation gate will read it):
67
+
68
+ ```bash
69
+ node .agents/scripts/task-short-id.js alloc "$task_id"
70
+ ```
71
+
72
+ If this fails (non-zero exit), follow the message — archive some active tasks or raise `task.shortIdLength` — and do NOT continue.
73
+
62
74
  Run the verification gate to confirm the task artifact and sync state are valid:
63
75
 
64
76
  ```bash
@@ -76,7 +88,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
76
88
 
77
89
  > Execute this step only after the verification gate passes.
78
90
 
79
- > **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).
91
+ > **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).
80
92
 
81
93
  ```
82
94
  Security alert #{alert-number} imported.
@@ -87,17 +99,19 @@ Vulnerability information:
87
99
  - Affected package: {package-name}
88
100
 
89
101
  Task information:
90
- - Task ID: {task-id}
102
+ - Task ID: {task-id} (short id {task-ref})
91
103
 
92
104
  Output file:
93
105
  - Task file: .agents/workspace/active/{task-id}/task.md
94
106
 
95
107
  Next step:
96
- - Claude Code / OpenCode: /analyze-task {task-id}
97
- - Gemini CLI: /{{project}}:analyze-task {task-id}
98
- - Codex CLI: $analyze-task {task-id}
108
+ - Claude Code / OpenCode: /analyze-task {task-ref}
109
+ - Gemini CLI: /{{project}}:analyze-task {task-ref}
110
+ - Codex CLI: $analyze-task {task-ref}
99
111
  ```
100
112
 
113
+
114
+
101
115
  ## Completion Checklist
102
116
 
103
117
  - [ ] Retrieved and recorded the key alert information
@@ -13,6 +13,10 @@ description: "导入 Dependabot 安全告警并创建修复任务"
13
13
  - 不要自动提交。绝不自动执行 `git commit` 或 `git add`
14
14
  - 执行本技能后,你**必须**立即更新 task.md 中的任务状态
15
15
 
16
+ ## 任务入参短号别名
17
+
18
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
19
+
16
20
  ## 执行流程
17
21
 
18
22
  ### 1. 获取告警信息
@@ -54,11 +58,19 @@ date "+%Y-%m-%d %H:%M:%S%:z"
54
58
  更新 task.md:`current_step` -> `requirement-analysis`。
55
59
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
56
60
  ```
57
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Dependabot Alert** by {agent} — Dependabot alert #{alert-number} imported
61
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Dependabot** by {agent} — Dependabot alert #{alert-number} imported
58
62
  ```
59
63
 
60
64
  ### 4. 完成校验
61
65
 
66
+ **先调用短号分配**(保证注册表 entry 已分配;完成校验阶段会读取):
67
+
68
+ ```bash
69
+ node .agents/scripts/task-short-id.js alloc "$task_id"
70
+ ```
71
+
72
+ 如失败(退出码非 0),按提示「归档若干任务」或「调高 task.shortIdLength」处理;不要继续执行后续步骤。
73
+
62
74
  运行完成校验,确认任务产物和同步状态符合规范:
63
75
 
64
76
  ```bash
@@ -76,7 +88,7 @@ node .agents/scripts/validate-artifact.js gate import-dependabot .agents/workspa
76
88
 
77
89
  > 仅在校验通过后执行本步骤。
78
90
 
79
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
91
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
80
92
 
81
93
  ```
82
94
  安全告警 #{alert-number} 已导入。
@@ -87,17 +99,19 @@ node .agents/scripts/validate-artifact.js gate import-dependabot .agents/workspa
87
99
  - 受影响包:{package-name}
88
100
 
89
101
  任务信息:
90
- - 任务 ID:{task-id}
102
+ - 任务 ID:{task-id}(短号 {task-ref})
91
103
 
92
104
  产出文件:
93
105
  - 任务文件:.agents/workspace/active/{task-id}/task.md
94
106
 
95
107
  下一步:
96
- - Claude Code / OpenCode:/analyze-task {task-id}
97
- - Gemini CLI:/agent-infra:analyze-task {task-id}
98
- - Codex CLI:$analyze-task {task-id}
108
+ - Claude Code / OpenCode:/analyze-task {task-ref}
109
+ - Gemini CLI:/agent-infra:analyze-task {task-ref}
110
+ - Codex CLI:$analyze-task {task-ref}
99
111
  ```
100
112
 
113
+
114
+
101
115
  ## 完成检查清单
102
116
 
103
117
  - [ ] 获取并记录了告警关键信息
@@ -17,7 +17,7 @@
17
17
  "expected_status": "active"
18
18
  },
19
19
  "activity-log": {
20
- "expected_action_pattern": "Import Dependabot Alert",
20
+ "expected_action_pattern": "(Import Dependabot|Import Dependabot Alert)",
21
21
  "freshness_minutes": 30
22
22
  },
23
23
  "platform-sync": null
@@ -13,6 +13,10 @@ Import the specified Issue and create a task. Argument: issue number.
13
13
  - Do not write or modify business code; import only
14
14
  - After executing this skill, you **must** immediately update task status
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
  ## Execution Flow
17
21
 
18
22
  ### 1. Retrieve Issue Information
@@ -119,6 +123,14 @@ If task.md contains a valid `issue_number`, perform these sync actions (skip and
119
123
 
120
124
  ### 7. Verification Gate
121
125
 
126
+ **Allocate short id first** (ensures the registry entry is allocated; the validation gate will read it):
127
+
128
+ ```bash
129
+ node .agents/scripts/task-short-id.js alloc "$task_id"
130
+ ```
131
+
132
+ If this fails (non-zero exit), follow the message — archive some active tasks or raise `task.shortIdLength` — and do NOT continue.
133
+
122
134
  Run the verification gate to confirm the task artifact and sync state are valid:
123
135
 
124
136
  ```bash
@@ -136,13 +148,13 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
136
148
 
137
149
  > Execute this step only after the verification gate passes.
138
150
 
139
- > **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).
151
+ > **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).
140
152
 
141
153
  ```
142
154
  Issue #{number} imported.
143
155
 
144
156
  Task information:
145
- - Task ID: {task-id}
157
+ - Task ID: {task-id} (short id {task-ref})
146
158
  - Title: {title}
147
159
  - Workflow: {workflow}
148
160
 
@@ -150,11 +162,13 @@ Output file:
150
162
  - Task file: .agents/workspace/active/{task-id}/task.md
151
163
 
152
164
  Next step - run requirements analysis:
153
- - Claude Code / OpenCode: /analyze-task {task-id}
154
- - Gemini CLI: /{{project}}:analyze-task {task-id}
155
- - Codex CLI: $analyze-task {task-id}
165
+ - Claude Code / OpenCode: /analyze-task {task-ref}
166
+ - Gemini CLI: /{{project}}:analyze-task {task-ref}
167
+ - Codex CLI: $analyze-task {task-ref}
156
168
  ```
157
169
 
170
+
171
+
158
172
  ## Completion Checklist
159
173
 
160
174
  - [ ] Created the task file `.agents/workspace/active/{task-id}/task.md`
@@ -13,6 +13,10 @@ description: "从 Issue 导入并创建任务"
13
13
  - 不要编写或修改业务代码。仅做导入
14
14
  - 执行本技能后,你**必须**立即更新任务状态
15
15
 
16
+ ## 任务入参短号别名
17
+
18
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
19
+
16
20
  ## 执行流程
17
21
 
18
22
  ### 1. 获取 Issue 信息
@@ -119,6 +123,14 @@ date "+%Y-%m-%d %H:%M:%S%:z"
119
123
 
120
124
  ### 7. 完成校验
121
125
 
126
+ **先调用短号分配**(保证注册表 entry 已分配;完成校验阶段会读取):
127
+
128
+ ```bash
129
+ node .agents/scripts/task-short-id.js alloc "$task_id"
130
+ ```
131
+
132
+ 如失败(退出码非 0),按提示「归档若干任务」或「调高 task.shortIdLength」处理;不要继续执行后续步骤。
133
+
122
134
  运行完成校验,确认任务产物和同步状态符合规范:
123
135
 
124
136
  ```bash
@@ -136,13 +148,13 @@ node .agents/scripts/validate-artifact.js gate import-issue .agents/workspace/ac
136
148
 
137
149
  > 仅在校验通过后执行本步骤。
138
150
 
139
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
151
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
140
152
 
141
153
  ```
142
154
  Issue #{number} 已导入。
143
155
 
144
156
  任务信息:
145
- - 任务 ID:{task-id}
157
+ - 任务 ID:{task-id}(短号 {task-ref})
146
158
  - 标题:{title}
147
159
  - 工作流:{workflow}
148
160
 
@@ -150,11 +162,13 @@ Issue #{number} 已导入。
150
162
  - 任务文件:.agents/workspace/active/{task-id}/task.md
151
163
 
152
164
  下一步 - 执行需求分析:
153
- - Claude Code / OpenCode:/analyze-task {task-id}
154
- - Gemini CLI:/agent-infra:analyze-task {task-id}
155
- - Codex CLI:$analyze-task {task-id}
165
+ - Claude Code / OpenCode:/analyze-task {task-ref}
166
+ - Gemini CLI:/agent-infra:analyze-task {task-ref}
167
+ - Codex CLI:$analyze-task {task-ref}
156
168
  ```
157
169
 
170
+
171
+
158
172
  ## 完成检查清单
159
173
 
160
174
  - [ ] 创建了任务文件 `.agents/workspace/active/{task-id}/task.md`