@fitlab-ai/agent-infra 0.7.1 → 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 (137) hide show
  1. package/bin/cli.ts +11 -0
  2. package/dist/bin/cli.js +12 -0
  3. package/dist/lib/sandbox/commands/create.js +10 -2
  4. package/dist/lib/sandbox/commands/enter.js +8 -7
  5. package/dist/lib/sandbox/commands/list-running.js +21 -32
  6. package/dist/lib/sandbox/commands/ls.js +20 -22
  7. package/dist/lib/sandbox/index.js +7 -3
  8. package/dist/lib/sandbox/task-resolver.js +1 -1
  9. package/dist/lib/sandbox/tools.js +1 -1
  10. package/dist/lib/table.js +29 -0
  11. package/dist/lib/task/commands/ls.js +122 -0
  12. package/dist/lib/task/commands/show.js +135 -0
  13. package/dist/lib/task/frontmatter.js +32 -0
  14. package/dist/lib/task/index.js +41 -0
  15. package/dist/lib/task/short-id.js +80 -0
  16. package/lib/sandbox/commands/create.ts +11 -2
  17. package/lib/sandbox/commands/enter.ts +8 -7
  18. package/lib/sandbox/commands/list-running.ts +23 -37
  19. package/lib/sandbox/commands/ls.ts +25 -25
  20. package/lib/sandbox/index.ts +7 -3
  21. package/lib/sandbox/task-resolver.ts +1 -1
  22. package/lib/sandbox/tools.ts +1 -1
  23. package/lib/table.ts +32 -0
  24. package/lib/task/commands/ls.ts +138 -0
  25. package/lib/task/commands/show.ts +139 -0
  26. package/lib/task/frontmatter.ts +30 -0
  27. package/lib/task/index.ts +44 -0
  28. package/lib/task/short-id.ts +97 -0
  29. package/package.json +1 -1
  30. package/templates/.agents/hooks/auto-resume.sh +87 -0
  31. package/templates/.agents/rules/create-issue.github.en.md +1 -1
  32. package/templates/.agents/rules/create-issue.github.zh-CN.md +1 -1
  33. package/templates/.agents/rules/milestone-inference.github.en.md +4 -1
  34. package/templates/.agents/rules/milestone-inference.github.zh-CN.md +4 -1
  35. package/templates/.agents/rules/next-step-output.en.md +59 -0
  36. package/templates/.agents/rules/next-step-output.zh-CN.md +59 -0
  37. package/templates/.agents/rules/task-short-id.en.md +54 -62
  38. package/templates/.agents/rules/task-short-id.zh-CN.md +35 -54
  39. package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +17 -0
  40. package/templates/.agents/scripts/task-short-id.js +32 -189
  41. package/templates/.agents/skills/analyze-task/SKILL.en.md +10 -12
  42. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +10 -12
  43. package/templates/.agents/skills/analyze-task/config/verify.en.json +1 -1
  44. package/templates/.agents/skills/analyze-task/config/verify.zh-CN.json +1 -1
  45. package/templates/.agents/skills/block-task/SKILL.en.md +6 -6
  46. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +6 -6
  47. package/templates/.agents/skills/block-task/config/verify.json +1 -1
  48. package/templates/.agents/skills/cancel-task/SKILL.en.md +6 -6
  49. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +6 -6
  50. package/templates/.agents/skills/cancel-task/config/verify.json +1 -1
  51. package/templates/.agents/skills/check-task/SKILL.en.md +12 -10
  52. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +12 -10
  53. package/templates/.agents/skills/close-codescan/SKILL.en.md +6 -6
  54. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +6 -6
  55. package/templates/.agents/skills/close-dependabot/SKILL.en.md +6 -6
  56. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +6 -6
  57. package/templates/.agents/skills/code-task/SKILL.en.md +10 -6
  58. package/templates/.agents/skills/code-task/SKILL.zh-CN.md +11 -6
  59. package/templates/.agents/skills/code-task/config/verify.en.json +2 -1
  60. package/templates/.agents/skills/code-task/config/verify.zh-CN.json +2 -1
  61. package/templates/.agents/skills/code-task/reference/fix-mode.en.md +10 -5
  62. package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +10 -5
  63. package/templates/.agents/skills/code-task/reference/output-template.en.md +3 -3
  64. package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +3 -3
  65. package/templates/.agents/skills/code-task/reference/report-template.en.md +8 -0
  66. package/templates/.agents/skills/code-task/reference/report-template.zh-CN.md +8 -0
  67. package/templates/.agents/skills/commit/SKILL.en.md +2 -2
  68. package/templates/.agents/skills/commit/SKILL.zh-CN.md +2 -2
  69. package/templates/.agents/skills/commit/reference/task-status-update.en.md +9 -9
  70. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +9 -9
  71. package/templates/.agents/skills/complete-task/SKILL.en.md +6 -2
  72. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +6 -2
  73. package/templates/.agents/skills/complete-task/config/verify.en.json +1 -1
  74. package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +1 -1
  75. package/templates/.agents/skills/create-pr/SKILL.en.md +6 -6
  76. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +6 -6
  77. package/templates/.agents/skills/create-pr/config/verify.json +2 -1
  78. package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +1 -1
  79. package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +1 -1
  80. package/templates/.agents/skills/create-pr/reference/pr-body-template.en.md +3 -3
  81. package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +3 -3
  82. package/templates/.agents/skills/create-task/SKILL.en.md +17 -17
  83. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +17 -17
  84. package/templates/.agents/skills/create-task/config/verify.json +1 -1
  85. package/templates/.agents/skills/import-codescan/SKILL.en.md +8 -8
  86. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +8 -8
  87. package/templates/.agents/skills/import-codescan/config/verify.json +1 -1
  88. package/templates/.agents/skills/import-dependabot/SKILL.en.md +8 -8
  89. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +8 -8
  90. package/templates/.agents/skills/import-dependabot/config/verify.json +1 -1
  91. package/templates/.agents/skills/import-issue/SKILL.en.md +7 -7
  92. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +7 -7
  93. package/templates/.agents/skills/plan-task/SKILL.en.md +10 -12
  94. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +10 -12
  95. package/templates/.agents/skills/plan-task/config/verify.en.json +1 -1
  96. package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +1 -1
  97. package/templates/.agents/skills/restore-task/SKILL.en.md +1 -1
  98. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +1 -1
  99. package/templates/.agents/skills/review-analysis/SKILL.en.md +4 -2
  100. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +4 -2
  101. package/templates/.agents/skills/review-analysis/config/verify.en.json +3 -2
  102. package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +3 -2
  103. package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +15 -15
  104. package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +15 -15
  105. package/templates/.agents/skills/review-analysis/reference/report-template.en.md +7 -1
  106. package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +7 -1
  107. package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +2 -0
  108. package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +2 -0
  109. package/templates/.agents/skills/review-code/SKILL.en.md +5 -2
  110. package/templates/.agents/skills/review-code/SKILL.zh-CN.md +5 -2
  111. package/templates/.agents/skills/review-code/config/verify.en.json +3 -2
  112. package/templates/.agents/skills/review-code/config/verify.zh-CN.json +3 -2
  113. package/templates/.agents/skills/review-code/reference/output-templates.en.md +9 -9
  114. package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +9 -9
  115. package/templates/.agents/skills/review-code/reference/report-template.en.md +7 -1
  116. package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +7 -1
  117. package/templates/.agents/skills/review-code/reference/review-criteria.en.md +2 -0
  118. package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +2 -0
  119. package/templates/.agents/skills/review-plan/SKILL.en.md +4 -2
  120. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +4 -2
  121. package/templates/.agents/skills/review-plan/config/verify.en.json +3 -2
  122. package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +3 -2
  123. package/templates/.agents/skills/review-plan/reference/output-templates.en.md +15 -15
  124. package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +15 -15
  125. package/templates/.agents/skills/review-plan/reference/report-template.en.md +7 -1
  126. package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +7 -1
  127. package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +2 -0
  128. package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +2 -0
  129. package/templates/.agents/templates/task.en.md +0 -1
  130. package/templates/.agents/templates/task.zh-CN.md +0 -1
  131. package/templates/.agents/workflows/bug-fix.en.yaml +1 -1
  132. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +1 -1
  133. package/templates/.agents/workflows/feature-development.en.yaml +1 -1
  134. package/templates/.agents/workflows/feature-development.zh-CN.yaml +1 -1
  135. package/templates/.agents/workflows/refactoring.en.yaml +1 -1
  136. package/templates/.agents/workflows/refactoring.zh-CN.yaml +1 -1
  137. package/templates/.claude/settings.json +11 -0
@@ -24,7 +24,7 @@ description: "根据自然语言描述创建任务"
24
24
 
25
25
  ## 任务入参短号别名
26
26
 
27
- > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
27
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
28
28
 
29
29
  ## 执行步骤
30
30
  ### 1. 解析用户描述
@@ -108,12 +108,12 @@ date "+%Y-%m-%d %H:%M:%S%:z"
108
108
  - `## 上下文` 中的 `- **分支**:`:更新为生成的分支名
109
109
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
110
110
  ```
111
- - {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
112
112
  ```
113
113
 
114
114
  ### 4. 按 `.agents/rules/create-issue.md` 级联创建 Issue
115
115
 
116
- 在 task.md 落盘并记录 `Task Created` 后,先读取 `.agents/rules/create-issue.md` 并按其中描述的步骤执行 Issue 创建。
116
+ 在 task.md 落盘并记录 `Create Task` 后,先读取 `.agents/rules/create-issue.md` 并按其中描述的步骤执行 Issue 创建。
117
117
 
118
118
  规则文件由当前配置的代码平台决定其内容:
119
119
  - 支持 Issue 创建的平台:包含完整的认证检测、模板检测、label/Issue Type/milestone 推断、Issue 创建调用、`task.md` 回写流程
@@ -129,7 +129,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
129
129
 
130
130
  ### 5. 完成校验
131
131
 
132
- **先调用短号分配**(保证 `short_id` 写回 task.md + 注册表 entry 已在;完成校验阶段会读取):
132
+ **先调用短号分配**(保证注册表 entry 已分配;完成校验阶段会读取):
133
133
 
134
134
  ```bash
135
135
  node .agents/scripts/task-short-id.js alloc "$task_id"
@@ -154,14 +154,14 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
154
154
 
155
155
  > 仅在校验通过后执行本步骤。
156
156
 
157
- > **重要**:以下「下一步」中列出的所有 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)。
158
158
 
159
159
  场景 A:已创建 Issue 时输出:
160
160
  ```
161
161
  任务已创建,并已级联创建 Issue。
162
162
 
163
163
  任务信息:
164
- - 任务 ID:{task-id}
164
+ - 任务 ID:{task-id}(短号 {task-ref})
165
165
  - 标题:{title}
166
166
  - 类型:{type}
167
167
  - 工作流:{workflow}
@@ -171,9 +171,9 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
171
171
  - 任务文件:.agents/workspace/active/{task-id}/task.md
172
172
 
173
173
  下一步 - 执行需求分析:
174
- - Claude Code / OpenCode:/analyze-task {task-id}
175
- - Gemini CLI:/{{project}}:analyze-task {task-id}
176
- - 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}
177
177
  ```
178
178
 
179
179
  场景 B:未创建 Issue 时输出:
@@ -181,7 +181,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
181
181
  任务已创建。
182
182
 
183
183
  任务信息:
184
- - 任务 ID:{task-id}
184
+ - 任务 ID:{task-id}(短号 {task-ref})
185
185
  - 标题:{title}
186
186
  - 类型:{type}
187
187
  - 工作流:{workflow}
@@ -190,9 +190,9 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
190
190
  - 任务文件:.agents/workspace/active/{task-id}/task.md
191
191
 
192
192
  下一步 - 执行需求分析:
193
- - Claude Code / OpenCode:/analyze-task {task-id}
194
- - Gemini CLI:/{{project}}:analyze-task {task-id}
195
- - 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}
196
196
  ```
197
197
 
198
198
  场景 C:Issue 创建失败时输出:
@@ -200,7 +200,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
200
200
  任务已创建,但 Issue 级联创建失败。
201
201
 
202
202
  任务信息:
203
- - 任务 ID:{task-id}
203
+ - 任务 ID:{task-id}(短号 {task-ref})
204
204
  - 标题:{title}
205
205
  - 类型:{type}
206
206
  - 工作流:{workflow}
@@ -214,9 +214,9 @@ Issue 创建失败:
214
214
  - 任务文件:.agents/workspace/active/{task-id}/task.md
215
215
 
216
216
  下一步 - 执行需求分析:
217
- - Claude Code / OpenCode:/analyze-task {task-id}
218
- - Gemini CLI:/{{project}}:analyze-task {task-id}
219
- - 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}
220
220
 
221
221
  后续如需平台同步:修复认证/网络/模板问题后,可按 `.agents/rules/create-issue.md` 对当前任务手动执行一次 Issue 创建;或手动创建/查找 Issue,并把 `issue_number` 写入 task.md,后续技能会接管级联同步。
222
222
  ```
@@ -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": {
@@ -15,7 +15,7 @@ Import the specified Code Scanning (CodeQL) alert and create a remediation task.
15
15
 
16
16
  ## Task id short ref
17
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.
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
19
 
20
20
  ## Execution Flow
21
21
 
@@ -57,12 +57,12 @@ date "+%Y-%m-%d %H:%M:%S%:z"
57
57
  Update task.md: `current_step` -> `requirement-analysis`.
58
58
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
59
59
  ```
60
- - {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
61
61
  ```
62
62
 
63
63
  ### 4. Verification Gate
64
64
 
65
- **Allocate short id first** (writes `short_id` back to task.md and the registry entry; the validation gate will read it):
65
+ **Allocate short id first** (ensures the registry entry is allocated; the validation gate will read it):
66
66
 
67
67
  ```bash
68
68
  node .agents/scripts/task-short-id.js alloc "$task_id"
@@ -87,7 +87,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
87
87
 
88
88
  > Execute this step only after the verification gate passes.
89
89
 
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).
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).
91
91
 
92
92
  ```
93
93
  Code Scanning alert #{alert-number} imported.
@@ -98,12 +98,12 @@ Alert information:
98
98
  - Location: {file-path}:{line-number}
99
99
 
100
100
  Task information:
101
- - Task ID: {task-id}
101
+ - Task ID: {task-id} (short id {task-ref})
102
102
 
103
103
  Next step:
104
- - Claude Code / OpenCode: /analyze-task {task-id}
105
- - Gemini CLI: /{{project}}:analyze-task {task-id}
106
- - 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}
107
107
  ```
108
108
 
109
109
 
@@ -15,7 +15,7 @@ description: "导入 Code Scanning 告警并创建修复任务"
15
15
 
16
16
  ## 任务入参短号别名
17
17
 
18
- > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
18
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
19
19
 
20
20
  ## 执行流程
21
21
 
@@ -57,12 +57,12 @@ date "+%Y-%m-%d %H:%M:%S%:z"
57
57
  更新 task.md:`current_step` -> `requirement-analysis`。
58
58
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
59
59
  ```
60
- - {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
61
61
  ```
62
62
 
63
63
  ### 4. 完成校验
64
64
 
65
- **先调用短号分配**(保证 `short_id` 写回 task.md + 注册表 entry 已在;完成校验阶段会读取):
65
+ **先调用短号分配**(保证注册表 entry 已分配;完成校验阶段会读取):
66
66
 
67
67
  ```bash
68
68
  node .agents/scripts/task-short-id.js alloc "$task_id"
@@ -87,7 +87,7 @@ node .agents/scripts/validate-artifact.js gate import-codescan .agents/workspace
87
87
 
88
88
  > 仅在校验通过后执行本步骤。
89
89
 
90
- > **重要**:以下「下一步」中列出的所有 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)。
91
91
 
92
92
  ```
93
93
  Code Scanning 告警 #{alert-number} 已导入。
@@ -98,12 +98,12 @@ Code Scanning 告警 #{alert-number} 已导入。
98
98
  - 位置:{file-path}:{line-number}
99
99
 
100
100
  任务信息:
101
- - 任务 ID:{task-id}
101
+ - 任务 ID:{task-id}(短号 {task-ref})
102
102
 
103
103
  下一步:
104
- - Claude Code / OpenCode:/analyze-task {task-id}
105
- - Gemini CLI:/agent-infra:analyze-task {task-id}
106
- - 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}
107
107
  ```
108
108
 
109
109
 
@@ -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
@@ -15,7 +15,7 @@ Import the specified Dependabot security alert and create a remediation task.
15
15
 
16
16
  ## Task id short ref
17
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.
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
19
 
20
20
  ## Execution Flow
21
21
 
@@ -58,12 +58,12 @@ date "+%Y-%m-%d %H:%M:%S%:z"
58
58
  Update task.md: `current_step` -> `requirement-analysis`.
59
59
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
60
60
  ```
61
- - {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
62
62
  ```
63
63
 
64
64
  ### 4. Verification Gate
65
65
 
66
- **Allocate short id first** (writes `short_id` back to task.md and the registry entry; the validation gate will read it):
66
+ **Allocate short id first** (ensures the registry entry is allocated; the validation gate will read it):
67
67
 
68
68
  ```bash
69
69
  node .agents/scripts/task-short-id.js alloc "$task_id"
@@ -88,7 +88,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
88
88
 
89
89
  > Execute this step only after the verification gate passes.
90
90
 
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).
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).
92
92
 
93
93
  ```
94
94
  Security alert #{alert-number} imported.
@@ -99,15 +99,15 @@ Vulnerability information:
99
99
  - Affected package: {package-name}
100
100
 
101
101
  Task information:
102
- - Task ID: {task-id}
102
+ - Task ID: {task-id} (short id {task-ref})
103
103
 
104
104
  Output file:
105
105
  - Task file: .agents/workspace/active/{task-id}/task.md
106
106
 
107
107
  Next step:
108
- - Claude Code / OpenCode: /analyze-task {task-id}
109
- - Gemini CLI: /{{project}}:analyze-task {task-id}
110
- - 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}
111
111
  ```
112
112
 
113
113
 
@@ -15,7 +15,7 @@ description: "导入 Dependabot 安全告警并创建修复任务"
15
15
 
16
16
  ## 任务入参短号别名
17
17
 
18
- > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
18
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
19
19
 
20
20
  ## 执行流程
21
21
 
@@ -58,12 +58,12 @@ date "+%Y-%m-%d %H:%M:%S%:z"
58
58
  更新 task.md:`current_step` -> `requirement-analysis`。
59
59
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
60
60
  ```
61
- - {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
62
62
  ```
63
63
 
64
64
  ### 4. 完成校验
65
65
 
66
- **先调用短号分配**(保证 `short_id` 写回 task.md + 注册表 entry 已在;完成校验阶段会读取):
66
+ **先调用短号分配**(保证注册表 entry 已分配;完成校验阶段会读取):
67
67
 
68
68
  ```bash
69
69
  node .agents/scripts/task-short-id.js alloc "$task_id"
@@ -88,7 +88,7 @@ node .agents/scripts/validate-artifact.js gate import-dependabot .agents/workspa
88
88
 
89
89
  > 仅在校验通过后执行本步骤。
90
90
 
91
- > **重要**:以下「下一步」中列出的所有 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)。
92
92
 
93
93
  ```
94
94
  安全告警 #{alert-number} 已导入。
@@ -99,15 +99,15 @@ node .agents/scripts/validate-artifact.js gate import-dependabot .agents/workspa
99
99
  - 受影响包:{package-name}
100
100
 
101
101
  任务信息:
102
- - 任务 ID:{task-id}
102
+ - 任务 ID:{task-id}(短号 {task-ref})
103
103
 
104
104
  产出文件:
105
105
  - 任务文件:.agents/workspace/active/{task-id}/task.md
106
106
 
107
107
  下一步:
108
- - Claude Code / OpenCode:/analyze-task {task-id}
109
- - Gemini CLI:/agent-infra:analyze-task {task-id}
110
- - 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}
111
111
  ```
112
112
 
113
113
 
@@ -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
@@ -15,7 +15,7 @@ Import the specified Issue and create a task. Argument: issue number.
15
15
 
16
16
  ## Task id short ref
17
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.
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
19
 
20
20
  ## Execution Flow
21
21
 
@@ -123,7 +123,7 @@ If task.md contains a valid `issue_number`, perform these sync actions (skip and
123
123
 
124
124
  ### 7. Verification Gate
125
125
 
126
- **Allocate short id first** (writes `short_id` back to task.md and the registry entry; the validation gate will read it):
126
+ **Allocate short id first** (ensures the registry entry is allocated; the validation gate will read it):
127
127
 
128
128
  ```bash
129
129
  node .agents/scripts/task-short-id.js alloc "$task_id"
@@ -148,13 +148,13 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
148
148
 
149
149
  > Execute this step only after the verification gate passes.
150
150
 
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).
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).
152
152
 
153
153
  ```
154
154
  Issue #{number} imported.
155
155
 
156
156
  Task information:
157
- - Task ID: {task-id}
157
+ - Task ID: {task-id} (short id {task-ref})
158
158
  - Title: {title}
159
159
  - Workflow: {workflow}
160
160
 
@@ -162,9 +162,9 @@ Output file:
162
162
  - Task file: .agents/workspace/active/{task-id}/task.md
163
163
 
164
164
  Next step - run requirements analysis:
165
- - Claude Code / OpenCode: /analyze-task {task-id}
166
- - Gemini CLI: /{{project}}:analyze-task {task-id}
167
- - 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}
168
168
  ```
169
169
 
170
170
 
@@ -15,7 +15,7 @@ description: "从 Issue 导入并创建任务"
15
15
 
16
16
  ## 任务入参短号别名
17
17
 
18
- > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
18
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
19
19
 
20
20
  ## 执行流程
21
21
 
@@ -123,7 +123,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
123
123
 
124
124
  ### 7. 完成校验
125
125
 
126
- **先调用短号分配**(保证 `short_id` 写回 task.md + 注册表 entry 已在;完成校验阶段会读取):
126
+ **先调用短号分配**(保证注册表 entry 已分配;完成校验阶段会读取):
127
127
 
128
128
  ```bash
129
129
  node .agents/scripts/task-short-id.js alloc "$task_id"
@@ -148,13 +148,13 @@ node .agents/scripts/validate-artifact.js gate import-issue .agents/workspace/ac
148
148
 
149
149
  > 仅在校验通过后执行本步骤。
150
150
 
151
- > **重要**:以下「下一步」中列出的所有 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)。
152
152
 
153
153
  ```
154
154
  Issue #{number} 已导入。
155
155
 
156
156
  任务信息:
157
- - 任务 ID:{task-id}
157
+ - 任务 ID:{task-id}(短号 {task-ref})
158
158
  - 标题:{title}
159
159
  - 工作流:{workflow}
160
160
 
@@ -162,9 +162,9 @@ Issue #{number} 已导入。
162
162
  - 任务文件:.agents/workspace/active/{task-id}/task.md
163
163
 
164
164
  下一步 - 执行需求分析:
165
- - Claude Code / OpenCode:/analyze-task {task-id}
166
- - Gemini CLI:/agent-infra:analyze-task {task-id}
167
- - 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}
168
168
  ```
169
169
 
170
170
 
@@ -29,7 +29,7 @@ Before the state check is complete, do not make external-state assertions such a
29
29
 
30
30
  ## Task id short ref
31
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.
32
+ > 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.
33
33
 
34
34
  ## Steps
35
35
 
@@ -66,6 +66,8 @@ Use it to understand:
66
66
  - identified technical risks
67
67
  - effort and complexity assessment
68
68
 
69
+ **Round ≥ 2: respond to the prior review (only when a review artifact exists)**: if the task directory contains `review-plan.md` / `review-plan-r{N}.md`, read the highest-round review report; add a `## Response to Prior Review` section to this round's plan artifact, and for each finding verify it via Read/Grep before acting (holds → accept and fix; judged hallucinated/unfounded → rebut with counter-evidence rather than defaulting to compliance); record any open disagreement under `## Open Questions`. Round 1 has no review, so skip this section.
70
+
69
71
  ### 4. Understand the Problem
70
72
 
71
73
  - Read the relevant source files identified in the analysis
@@ -115,15 +117,11 @@ Update `.agents/workspace/active/{task-id}/task.md`:
115
117
  - Mark technical-design as complete in workflow progress and include the actual round when the task template supports it
116
118
  - Before appending the workflow Activity Log entry, re-estimate `effort` based on the technical plan (number of implementation steps, files touched, test matrix scope, integration surface). If the re-estimated value differs from the current value in `task.md`:
117
119
  - Overwrite the `effort` field in frontmatter with the new value
118
- - Prepend an Activity Log entry recording the transition (placed before the `Technical Design (Round N)` entry):
119
- ```
120
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Plan Re-estimate** by {agent} — effort {old} → {new} (rationale: {short basis grounded in this plan})
121
- ```
122
- Both entries may share the same timestamp; ordering is conveyed by list position only.
123
- If the re-estimated value matches the current value, skip the Re-estimate entry. The Flow A sync that follows reads the possibly updated frontmatter and propagates the new value to the Issue automatically.
120
+ - Append a `## Effort Re-estimate` section to this round's plan artifact `{plan-artifact}`, recording: `effort {old} → {new} (rationale: {short basis grounded in this plan})`
121
+ If the re-estimated value matches the current value, skip it: do not write the `## Effort Re-estimate` section. The Flow A sync that follows reads the possibly updated frontmatter and propagates the new value to the Issue automatically.
124
122
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
125
123
  ```
126
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Technical Design (Round {N})** by {agent} — Plan completed, awaiting human review → {artifact-filename}
124
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Plan Task (Round {N})** by {agent} — Plan completed, awaiting human review → {artifact-filename}
127
125
  ```
128
126
 
129
127
  If task.md contains a valid `issue_number`, perform these sync actions (skip and continue on any failure):
@@ -152,7 +150,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
152
150
 
153
151
  > Execute this step only after the verification gate passes.
154
152
 
155
- > **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).
153
+ > **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).
156
154
 
157
155
  Output format:
158
156
  ```
@@ -172,9 +170,9 @@ Important: human review checkpoint.
172
170
  Please review the technical plan before continuing to implementation.
173
171
 
174
172
  Next step - review the technical plan:
175
- - Claude Code / OpenCode: /review-plan {task-id}
176
- - Gemini CLI: /{{project}}:review-plan {task-id}
177
- - Codex CLI: $review-plan {task-id}
173
+ - Claude Code / OpenCode: /review-plan {task-ref}
174
+ - Gemini CLI: /{{project}}:review-plan {task-ref}
175
+ - Codex CLI: $review-plan {task-ref}
178
176
  ```
179
177
 
180
178
  ## Completion Checklist
@@ -29,7 +29,7 @@ tail .agents/workspace/active/{task-id}/task.md
29
29
 
30
30
  ## 任务入参短号别名
31
31
 
32
- > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
32
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
33
33
 
34
34
  ## 执行步骤
35
35
  ### 1. 验证前置条件
@@ -65,6 +65,8 @@ tail .agents/workspace/active/{task-id}/task.md
65
65
  - 已识别的技术风险
66
66
  - 工作量和复杂度评估
67
67
 
68
+ **Round ≥ 2:响应上一轮审查(仅当存在审查产物时)**:若任务目录存在 `review-plan.md` / `review-plan-r{N}.md`,读取最高轮次的审查报告;在本轮方案产物中新增 `## 对上一轮审查的响应` 段,对每条发现先 Read/Grep 核实再处置(成立 → 接受并修正;判定为幻觉/不成立 → 附反证反驳,不默认顺从),未决分歧写入 `## 未决问题`。Round 1 无审查,跳过本段。
69
+
68
70
  ### 4. 理解问题
69
71
 
70
72
  - 阅读分析中识别的相关源码文件
@@ -114,15 +116,11 @@ date "+%Y-%m-%d %H:%M:%S%:z"
114
116
  - 在工作流进度中标记 technical-design 为已完成,并注明实际轮次(如果任务模板支持)
115
117
  - 在追加工作流 Activity Log 条目之前,基于技术方案(实施步骤数、涉及文件、测试矩阵范围、集成面)重估 `effort`。若重估值与 `task.md` 当前值不一致:
116
118
  - 用新值覆盖 frontmatter 的 `effort` 字段
117
- - `Technical Design (Round N)` 条目之前追加一条转移记录:
118
- ```
119
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Plan Re-estimate** by {agent} — effort {old} → {new} (rationale: {基于本轮方案的简短依据})
120
- ```
121
- 两条条目可共用同一时间戳,顺序仅通过列表位置表达。
122
- 若重估值与当前值一致,跳过 Re-estimate 条目。后续 Flow A 同步会读取可能更新过的 frontmatter,并自动把新值同步到 Issue。
119
+ - 在本轮方案产物 `{plan-artifact}` 中追加 `## 工作量重估` 段,记录一条:`effort {old} → {new} (rationale: {基于本轮方案的简短依据})`
120
+ 若重估值与当前值一致,跳过:不写入 `## 工作量重估` 段。后续 Flow A 同步会读取可能更新过的 frontmatter,并自动把新值同步到 Issue。
123
121
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
124
122
  ```
125
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Technical Design (Round {N})** by {agent} — Plan completed, awaiting human review → {artifact-filename}
123
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Plan Task (Round {N})** by {agent} — Plan completed, awaiting human review → {artifact-filename}
126
124
  ```
127
125
 
128
126
  如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续):
@@ -151,7 +149,7 @@ node .agents/scripts/validate-artifact.js gate plan-task .agents/workspace/activ
151
149
 
152
150
  > 仅在校验通过后执行本步骤。
153
151
 
154
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
152
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
155
153
 
156
154
  输出格式:
157
155
  ```
@@ -171,9 +169,9 @@ node .agents/scripts/validate-artifact.js gate plan-task .agents/workspace/activ
171
169
  请在继续实现之前审查技术方案。
172
170
 
173
171
  下一步 - 审查技术方案:
174
- - Claude Code / OpenCode:/review-plan {task-id}
175
- - Gemini CLI:/{{project}}:review-plan {task-id}
176
- - Codex CLI:$review-plan {task-id}
172
+ - Claude Code / OpenCode:/review-plan {task-ref}
173
+ - Gemini CLI:/agent-infra:review-plan {task-ref}
174
+ - Codex CLI:$review-plan {task-ref}
177
175
  ```
178
176
 
179
177
  ## 完成检查清单
@@ -33,7 +33,7 @@
33
33
  ]
34
34
  },
35
35
  "activity-log": {
36
- "expected_action_pattern": "Technical Design \\(Round \\d+\\)",
36
+ "expected_action_pattern": "(Plan Task|Technical Design) \\(Round \\d+\\)",
37
37
  "freshness_minutes": 30
38
38
  },
39
39
  "platform-sync": {
@@ -33,7 +33,7 @@
33
33
  ]
34
34
  },
35
35
  "activity-log": {
36
- "expected_action_pattern": "Technical Design \\(Round \\d+\\)",
36
+ "expected_action_pattern": "(Plan Task|Technical Design) \\(Round \\d+\\)",
37
37
  "freshness_minutes": 30
38
38
  },
39
39
  "platform-sync": {
@@ -18,7 +18,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
18
18
 
19
19
  ## Task id short ref
20
20
 
21
- > 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.
21
+ > 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.
22
22
 
23
23
  ## Steps
24
24
 
@@ -18,7 +18,7 @@ description: "从平台 Issue 评论还原本地任务文件"
18
18
 
19
19
  ## 任务入参短号别名
20
20
 
21
- > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
21
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
22
22
 
23
23
  ## 执行步骤
24
24
  ### 1. 验证输入与环境
@@ -28,7 +28,7 @@ tail .agents/workspace/active/{task-id}/task.md
28
28
 
29
29
  ## Task id short ref
30
30
 
31
- > 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.
31
+ > 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.
32
32
 
33
33
  ## Steps
34
34
 
@@ -65,7 +65,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
65
65
  ```
66
66
 
67
67
  Set `current_step` to `requirement-analysis-review`, refresh task metadata, and append:
68
- `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Analysis Review (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}[ (+ {n} env-blocked)] → {review-artifact}`
68
+ `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Analysis (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}[ (+ {n} env-blocked)] → {review-artifact}`
69
69
 
70
70
  If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md`, sync the task comment, and publish the `{review-artifact}` comment.
71
71
 
@@ -78,3 +78,5 @@ node .agents/scripts/validate-artifact.js gate review-analysis .agents/workspace
78
78
  ### 8. Tell the User
79
79
 
80
80
  Use the conclusion branch in `reference/output-templates.md` and show all TUI command formats.
81
+
82
+ > 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.