@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
@@ -4,6 +4,11 @@ Read this file before changing code during fix mode.
4
4
 
5
5
  ## Plan the Fixes
6
6
 
7
+ **Verify each finding first (mandatory before editing)**: for every finding in `{review-artifact}`, Read/Grep the cited `file:line` and the corresponding `git diff` to confirm the issue is real:
8
+ - Holds → include it in the classification and fixes below
9
+ - Unfounded / based on a wrong `file:line` / hallucinated → do not change code; give a counter-argument in the report's `## Per-Finding Verification` section and record it under unresolved issues
10
+ - Do not expand fixes to issues the review did not list
11
+
7
12
  Classify and prioritize work:
8
13
  1. **Blockers first**
9
14
  2. **Then major issues**
@@ -18,7 +23,7 @@ Detailed priority rules:
18
23
  - Blockers must all be fixed before anything else
19
24
  - Major issues should all be fixed in the same pass unless a blocker prevents progress
20
25
  - Minor issues are optional only after Blockers and Majors are resolved
21
- - If you disagree with a finding, record that disagreement under unresolved issues instead of silently skipping it
26
+ - If you disagree with a finding, or judge it hallucinated after verification, do not silently skip it; give a counter-argument in the report's `## Per-Finding Verification` section and record it under unresolved issues
22
27
 
23
28
  ### Meta-category: env-blocked
24
29
 
@@ -66,9 +71,9 @@ Fix status:
66
71
 
67
72
  Next step - re-review or commit:
68
73
  - Re-review (always recommended):
69
- - Claude Code / OpenCode: /review-code {task-id}
70
- - Gemini CLI: /agent-infra:review-code {task-id}
71
- - Codex CLI: $review-code {task-id}
74
+ - Claude Code / OpenCode: /review-code {task-ref}
75
+ - Gemini CLI: /agent-infra:review-code {task-ref}
76
+ - Codex CLI: $review-code {task-ref}
72
77
  - Commit directly (optional; only when all issues are resolved and changes are low risk):
73
78
  - Claude Code / OpenCode: /commit
74
79
  - Gemini CLI: /agent-infra:commit
@@ -79,7 +84,7 @@ Next step - re-review or commit:
79
84
 
80
85
  1. **Prerequisite**: a code review artifact must exist (`review-code.md` or `review-code-r{N}.md`)
81
86
  2. **No auto-commit**: do not run `git commit`
82
- 3. **Scope discipline**: only fix reviewed issues
87
+ 3. **Scope discipline**: verify each reviewed issue one by one — fix it if it holds, rebut it if it does not; do not expand to issues the review did not list
83
88
  4. **Disagreement handling**: record any disagreement in the report
84
89
  5. **Re-review**: always recommend `review-code` as the default next step after fix mode
85
90
  6. **Consistency**: the latest review artifact, Activity Log entry, and code report must reference the same round
@@ -4,6 +4,11 @@
4
4
 
5
5
  ## 规划修复
6
6
 
7
+ **先逐条核实(动手前必做)**:对 `{review-artifact}` 的每一条发现,先 Read/Grep 其引用的 `file:line` 与对应 `git diff`,确认问题真实存在:
8
+ - 成立 → 纳入下方分类与修复
9
+ - 不成立 / 基于错误 `file:line` / 幻觉 → 不改代码,在报告 `## 对审查发现的逐条核实` 给出反证,并记入 unresolved issues
10
+ - 不擅自把修复扩大到审查未列出的问题
11
+
7
12
  按以下顺序分类并确定优先级:
8
13
  1. **先处理 Blocker**
9
14
  2. **再处理 Major**
@@ -18,7 +23,7 @@
18
23
  - 所有 Blocker 都必须最先修完
19
24
  - 只要没有被 Blocker 阻塞,所有 Major 都应在同一轮一并修复
20
25
  - 只有在 Blocker 和 Major 都解决后,Minor 才是可选项
21
- - 如果你不同意某条审查意见,不要静默跳过,而是把分歧记录到 unresolved issues
26
+ - 如果你不同意某条审查意见,或核实后判定为幻觉,不要静默跳过,而是在报告 `## 对审查发现的逐条核实` 给出反证并记录到 unresolved issues
22
27
 
23
28
  ### 元类目:env-blocked
24
29
 
@@ -66,9 +71,9 @@ env-blocked 项不在修复范围。处理规则:
66
71
 
67
72
  下一步 - 重新审查或提交:
68
73
  - 重新审查(始终推荐):
69
- - Claude Code / OpenCode:/review-code {task-id}
70
- - Gemini CLI:/agent-infra:review-code {task-id}
71
- - Codex CLI:$review-code {task-id}
74
+ - Claude Code / OpenCode:/review-code {task-ref}
75
+ - Gemini CLI:/agent-infra:review-code {task-ref}
76
+ - Codex CLI:$review-code {task-ref}
72
77
  - 直接提交(可选;仅在所有问题已解决且风险可控时):
73
78
  - Claude Code / OpenCode:/commit
74
79
  - Gemini CLI:/agent-infra:commit
@@ -79,7 +84,7 @@ env-blocked 项不在修复范围。处理规则:
79
84
 
80
85
  1. **前置条件**:必须存在代码审查产物(`review-code.md` 或 `review-code-r{N}.md`)
81
86
  2. **禁止自动提交**:不要执行 `git commit`
82
- 3. **范围约束**:只修复审查中列出的问题
87
+ 3. **范围约束**:逐条核实审查列出的问题,成立则修复、不成立则反驳;不扩大到审查未列出的问题
83
88
  4. **分歧处理**:如果不同意审查意见,要在报告里明确记录
84
89
  5. **重新审查**:修复后始终推荐执行 `review-code`
85
90
  6. **一致性**:最新审查产物、Activity Log 记录和修复报告必须引用同一轮次
@@ -14,7 +14,7 @@ Output files:
14
14
  - Code report: .agents/workspace/active/{task-id}/{code-artifact}
15
15
 
16
16
  Next step - code review:
17
- - Claude Code / OpenCode: /review-code {task-id}
18
- - Gemini CLI: /{{project}}:review-code {task-id}
19
- - Codex CLI: $review-code {task-id}
17
+ - Claude Code / OpenCode: /review-code {task-ref}
18
+ - Gemini CLI: /{{project}}:review-code {task-ref}
19
+ - Codex CLI: $review-code {task-ref}
20
20
  ```
@@ -14,7 +14,7 @@
14
14
  - 实现报告:.agents/workspace/active/{task-id}/{code-artifact}
15
15
 
16
16
  下一步 - 代码审查:
17
- - Claude Code / OpenCode:/review-code {task-id}
18
- - Gemini CLI:/agent-infra:review-code {task-id}
19
- - Codex CLI:$review-code {task-id}
17
+ - Claude Code / OpenCode:/review-code {task-ref}
18
+ - Gemini CLI:/agent-infra:review-code {task-ref}
19
+ - Codex CLI:$review-code {task-ref}
20
20
  ```
@@ -62,6 +62,14 @@ $ {command}
62
62
 
63
63
  {describe any deviation from the approved plan}
64
64
 
65
+ ## Per-Finding Verification
66
+
67
+ > Fix mode only; for an initial implementation write "(initial implementation this round, no review findings)". Read/Grep-verify each finding of the previous `review-code` before acting on it.
68
+
69
+ | Finding | Reproduced? | Disposition (fix / rebut) |
70
+ |------|----------|----------------------|
71
+ | {finding} | {yes/no, with file:line or command} | {fix note, or counter-argument + recorded under unresolved} |
72
+
65
73
  ## Items for Review
66
74
 
67
75
  **Focus areas for reviewers**:
@@ -62,6 +62,14 @@ $ {command}
62
62
 
63
63
  {describe any deviation from the approved plan}
64
64
 
65
+ ## 对审查发现的逐条核实
66
+
67
+ > 仅修复模式填写;初次实现写「(本轮为初次实现,无审查发现)」。对上一轮 `review-code` 的每条发现先 Read/Grep 核实再处置。
68
+
69
+ | 发现 | 是否复现 | 处置(修复 / 反驳) |
70
+ |------|----------|----------------------|
71
+ | {finding} | {是/否,附 file:line 或命令} | {修复说明,或反证 + 记入 unresolved} |
72
+
65
73
  ## 供审查关注的内容
66
74
 
67
75
  **建议审查者重点关注**:
@@ -19,7 +19,7 @@ When updating related `task.md` frontmatter, read `.agents/rules/version-stamp.m
19
19
 
20
20
  ## Task id short ref
21
21
 
22
- > 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.
22
+ > 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.
23
23
 
24
24
  ## 1. Check Local Modifications (CRITICAL)
25
25
 
@@ -58,7 +58,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
58
58
 
59
59
  > The full four-case status matrix, prerequisite checks, and multi-TUI next-step commands live in `reference/task-status-update.md`. Read `reference/task-status-update.md` before updating task state.
60
60
 
61
- > **IMPORTANT**: When showing the next step, output every TUI command format in full and directly use the standard template from `reference/task-status-update.md`. 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).
61
+ > **IMPORTANT**: When showing the next step, output every TUI command format in full and directly use the standard template from `reference/task-status-update.md`. 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).
62
62
 
63
63
  Append the Commit Activity Log entry and choose exactly one next-step case:
64
64
  - final commit -> `complete-task {task-id}`
@@ -19,7 +19,7 @@ description: "提交当前变更到 Git"
19
19
 
20
20
  ## 任务入参短号别名
21
21
 
22
- > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
22
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
23
23
 
24
24
  ## 1. 检查本地修改(关键)
25
25
 
@@ -58,7 +58,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
58
58
 
59
59
  > 完整的 4 种状态分支、前置条件检查和多 TUI 下一步命令见 `reference/task-status-update.md`。更新任务状态前,先读取 `reference/task-status-update.md`。
60
60
 
61
- > **重要**:向用户展示下一步时,必须完整输出所有 TUI 命令格式,并直接使用 `reference/task-status-update.md` 中对应场景的标准模板。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
61
+ > **重要**:向用户展示下一步时,必须完整输出所有 TUI 命令格式,并直接使用 `reference/task-status-update.md` 中对应场景的标准模板。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
62
62
 
63
63
  追加 Commit 的 Activity Log,并且只能选择一个下一步分支:
64
64
  - 最终提交 -> `complete-task {task-id}`
@@ -50,9 +50,9 @@ Required next-step commands:
50
50
 
51
51
  ```text
52
52
  Next step - complete and archive the task:
53
- - Claude Code / OpenCode: /complete-task {task-id}
54
- - Gemini CLI: /agent-infra:complete-task {task-id}
55
- - Codex CLI: $complete-task {task-id}
53
+ - Claude Code / OpenCode: /complete-task {task-ref}
54
+ - Gemini CLI: /agent-infra:complete-task {task-ref}
55
+ - Codex CLI: $complete-task {task-ref}
56
56
  ```
57
57
 
58
58
  ### Case 2: More Work Remains
@@ -75,9 +75,9 @@ Required next-step commands:
75
75
 
76
76
  ```text
77
77
  Next step - code review:
78
- - Claude Code / OpenCode: /review-code {task-id}
79
- - Gemini CLI: /agent-infra:review-code {task-id}
80
- - Codex CLI: $review-code {task-id}
78
+ - Claude Code / OpenCode: /review-code {task-ref}
79
+ - Gemini CLI: /agent-infra:review-code {task-ref}
80
+ - Codex CLI: $review-code {task-ref}
81
81
  ```
82
82
 
83
83
  ### Case 4: Ready for PR
@@ -91,9 +91,9 @@ Required next-step commands:
91
91
 
92
92
  ```text
93
93
  Next step - create Pull Request:
94
- - Claude Code / OpenCode: /create-pr {task-id}
95
- - Gemini CLI: /agent-infra:create-pr {task-id}
96
- - Codex CLI: $create-pr {task-id}
94
+ - Claude Code / OpenCode: /create-pr {task-ref}
95
+ - Gemini CLI: /agent-infra:create-pr {task-ref}
96
+ - Codex CLI: $create-pr {task-ref}
97
97
  ```
98
98
 
99
99
  > Note: beyond the four cases, if `task.md` contains a valid `pr_number`, the commit skill must sync the PR summary via `reference/pr-summary-sync.md` before entering the verification gate.
@@ -50,9 +50,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
50
50
 
51
51
  ```text
52
52
  下一步 - 完成并归档任务:
53
- - Claude Code / OpenCode: /complete-task {task-id}
54
- - Gemini CLI: /agent-infra:complete-task {task-id}
55
- - Codex CLI: $complete-task {task-id}
53
+ - Claude Code / OpenCode: /complete-task {task-ref}
54
+ - Gemini CLI: /agent-infra:complete-task {task-ref}
55
+ - Codex CLI: $complete-task {task-ref}
56
56
  ```
57
57
 
58
58
  ### 场景 2:还有后续工作
@@ -75,9 +75,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
75
75
 
76
76
  ```text
77
77
  下一步 - 代码审查:
78
- - Claude Code / OpenCode: /review-code {task-id}
79
- - Gemini CLI: /agent-infra:review-code {task-id}
80
- - Codex CLI: $review-code {task-id}
78
+ - Claude Code / OpenCode: /review-code {task-ref}
79
+ - Gemini CLI: /agent-infra:review-code {task-ref}
80
+ - Codex CLI: $review-code {task-ref}
81
81
  ```
82
82
 
83
83
  ### 场景 4:准备创建 PR
@@ -91,9 +91,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
91
91
 
92
92
  ```text
93
93
  下一步 - 创建 Pull Request:
94
- - Claude Code / OpenCode: /create-pr {task-id}
95
- - Gemini CLI: /agent-infra:create-pr {task-id}
96
- - Codex CLI: $create-pr {task-id}
94
+ - Claude Code / OpenCode: /create-pr {task-ref}
95
+ - Gemini CLI: /agent-infra:create-pr {task-ref}
96
+ - Codex CLI: $create-pr {task-ref}
97
97
  ```
98
98
 
99
99
  > 注意:四个场景之外,只要 `task.md` 中存在有效 `pr_number`,commit 技能必须先按 `reference/pr-summary-sync.md` 同步 PR 摘要,再进入完成校验。
@@ -28,7 +28,7 @@ Before the state check is complete, do not make external-state assertions such a
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
 
@@ -89,7 +89,7 @@ Update `.agents/workspace/active/{task-id}/task.md`:
89
89
  - Verify and check off all items in `## Completion Checklist` (change `- [ ]` to `- [x]`)
90
90
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
91
91
  ```
92
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Completed** by {agent} — Task moved to completed/
92
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Complete Task** by {agent} — Task moved to completed/
93
93
  ```
94
94
 
95
95
  ### 4. Move Task
@@ -146,6 +146,8 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
146
146
 
147
147
  > Execute this step only after the verification gate passes.
148
148
 
149
+ > The completion timestamp line (the last line of the whole output) uses `date "+%Y-%m-%d %H:%M:%S"` (local timezone, no offset) and always sits at the very end of the output for at-a-glance scanning across windows. This skill renders no "Next steps" commands but still prints the line.
150
+
149
151
  Output format:
150
152
  ```
151
153
  Task {task-id} completed; task directory moved to completed/.
@@ -157,6 +159,8 @@ Task info:
157
159
 
158
160
  Deliverables:
159
161
  - {List of key outputs: files modified, tests added, etc.}
162
+
163
+ Completed at: {completion-time}
160
164
  ```
161
165
 
162
166
 
@@ -28,7 +28,7 @@ tail .agents/workspace/active/{task-id}/task.md
28
28
 
29
29
  ## 任务入参短号别名
30
30
 
31
- > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
31
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
32
32
 
33
33
  ## 执行步骤
34
34
  ### 1. 验证任务存在
@@ -88,7 +88,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
88
88
  - 逐项验证并勾选 `## 完成检查清单` 中的所有条目(将 `- [ ]` 改为 `- [x]`)
89
89
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
90
90
  ```
91
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Completed** by {agent} — Task moved to completed/
91
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Complete Task** by {agent} — Task moved to completed/
92
92
  ```
93
93
 
94
94
  ### 4. 转移任务
@@ -145,6 +145,8 @@ node .agents/scripts/validate-artifact.js gate complete-task .agents/workspace/c
145
145
 
146
146
  > 仅在校验通过后执行本步骤。
147
147
 
148
+ > 完成时间收尾行(整段输出的最后一行)取值 `date "+%Y-%m-%d %H:%M:%S"`(本地时区、不带偏移),固定放在输出的绝对末尾,便于多窗口扫视。本 skill 不渲染「下一步」命令,但仍统一打印该收尾行。
149
+
148
150
  输出格式:
149
151
  ```
150
152
  任务 {task-id} 已完成,任务目录已转移到 completed/。
@@ -156,6 +158,8 @@ node .agents/scripts/validate-artifact.js gate complete-task .agents/workspace/c
156
158
 
157
159
  交付物:
158
160
  - {关键产出列表:修改的文件、添加的测试等}
161
+
162
+ Completed at: {completion-time}
159
163
  ```
160
164
 
161
165
 
@@ -18,7 +18,7 @@
18
18
  "require_completed_at": true
19
19
  },
20
20
  "activity-log": {
21
- "expected_action_pattern": "Completed",
21
+ "expected_action_pattern": "(Complete Task|Completed)",
22
22
  "freshness_minutes": 30
23
23
  },
24
24
  "completion-checklist": {
@@ -18,7 +18,7 @@
18
18
  "require_completed_at": true
19
19
  },
20
20
  "activity-log": {
21
- "expected_action_pattern": "Completed",
21
+ "expected_action_pattern": "(Complete Task|Completed)",
22
22
  "freshness_minutes": 30
23
23
  },
24
24
  "completion-checklist": {
@@ -13,7 +13,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
13
13
 
14
14
  ## Task id short ref
15
15
 
16
- > If `{task-id}` begins with `#`, follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
16
+ > 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.
17
17
 
18
18
  ## Execution Flow
19
19
 
@@ -28,9 +28,9 @@ Branch on the result:
28
28
  ```
29
29
  This project does not enable the PR flow (`.agents/.airc.json` sets `requiresPullRequest: false`).
30
30
  No Pull Request is required; run instead:
31
- - Claude Code / OpenCode: /complete-task {task-id}
32
- - Gemini CLI: /agent-infra:complete-task {task-id}
33
- - Codex CLI: $complete-task {task-id}
31
+ - Claude Code / OpenCode: /complete-task {task-ref}
32
+ - Gemini CLI: /agent-infra:complete-task {task-ref}
33
+ - Codex CLI: $complete-task {task-ref}
34
34
  ```
35
35
 
36
36
  ### 1. Parse Command Arguments
@@ -96,7 +96,7 @@ Get the current time:
96
96
  date "+%Y-%m-%d %H:%M:%S%:z"
97
97
  ```
98
98
 
99
- If `{task-id}` is available, update task.md with `pr_number`, `updated_at`, `agent_infra_version`, and append the PR Created Activity Log entry including metadata-sync and summary results.
99
+ If `{task-id}` is available, update task.md with `pr_number`, `updated_at`, `agent_infra_version`, and append the Create PR Activity Log entry including metadata-sync and summary results.
100
100
 
101
101
  ### 9. Verification Gate
102
102
 
@@ -117,7 +117,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
117
117
 
118
118
  > Execute this step only after the verification gate passes.
119
119
 
120
- > **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).
120
+ > **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).
121
121
 
122
122
  Explain the created PR URL, summarize metadata sync and summary-comment results, and recommend `complete-task {task-id}` once the workflow is truly done.
123
123
 
@@ -13,7 +13,7 @@ description: "创建 Pull Request 到目标分支"
13
13
 
14
14
  ## 任务入参短号别名
15
15
 
16
- > 如果 `{task-id}` 入参以 `#` 开头,先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
16
+ > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
17
17
 
18
18
  ## 执行流程
19
19
 
@@ -28,9 +28,9 @@ description: "创建 Pull Request 到目标分支"
28
28
  ```
29
29
  当前项目未启用 PR 流程(`.agents/.airc.json` 中 `requiresPullRequest: false`)。
30
30
  无需创建 Pull Request,请直接运行:
31
- - Claude Code / OpenCode:/complete-task {task-id}
32
- - Gemini CLI:/agent-infra:complete-task {task-id}
33
- - Codex CLI:$complete-task {task-id}
31
+ - Claude Code / OpenCode:/complete-task {task-ref}
32
+ - Gemini CLI:/agent-infra:complete-task {task-ref}
33
+ - Codex CLI:$complete-task {task-ref}
34
34
  ```
35
35
 
36
36
  ### 1. 解析命令参数
@@ -96,7 +96,7 @@ description: "创建 Pull Request 到目标分支"
96
96
  date "+%Y-%m-%d %H:%M:%S%:z"
97
97
  ```
98
98
 
99
- 如果获取到了 `{task-id}`,更新 task.md 的 `pr_number`、`updated_at`、`agent_infra_version`,并追加 PR Created 的 Activity Log,记录元数据同步和摘要发布结果。
99
+ 如果获取到了 `{task-id}`,更新 task.md 的 `pr_number`、`updated_at`、`agent_infra_version`,并追加 Create PR 的 Activity Log,记录元数据同步和摘要发布结果。
100
100
 
101
101
  ### 9. 完成校验
102
102
 
@@ -117,7 +117,7 @@ node .agents/scripts/validate-artifact.js gate create-pr .agents/workspace/activ
117
117
 
118
118
  > 仅在校验通过后执行本步骤。
119
119
 
120
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
120
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
121
121
 
122
122
  说明 PR URL、元数据同步结果、摘要评论结果,并在工作流真正完成后推荐执行 `complete-task {task-id}`。
123
123
 
@@ -15,7 +15,7 @@
15
15
  ]
16
16
  },
17
17
  "activity-log": {
18
- "expected_action_pattern": "PR Created",
18
+ "expected_action_pattern": "(Create PR|PR Created)",
19
19
  "freshness_minutes": 30
20
20
  },
21
21
  "platform-sync": {
@@ -26,6 +26,7 @@
26
26
  "verify_pr_assignee": true,
27
27
  "verify_issue_fields": true,
28
28
  "verify_milestone": true,
29
+ "verify_milestone_specific": true,
29
30
  "expected_pr_comment_marker_key": "prSummary"
30
31
  }
31
32
  }
@@ -12,4 +12,4 @@ Read this file before creating or updating the single reviewer-facing PR summary
12
12
 
13
13
  ## Result Reporting
14
14
 
15
- Reuse the normalized result string from `.agents/rules/pr-sync.md` in this skill's user output or `PR Created` Activity Log.
15
+ Reuse the normalized result string from `.agents/rules/pr-sync.md` in this skill's user output or `Create PR` Activity Log.
@@ -12,4 +12,4 @@
12
12
 
13
13
  ## 结果回传
14
14
 
15
- 将 `.agents/rules/pr-sync.md` 中的结果回传字符串用于当前 skill 的用户输出或 `PR Created` Activity Log 复用。
15
+ 将 `.agents/rules/pr-sync.md` 中的结果回传字符串用于当前 skill 的用户输出或 `Create PR` Activity Log 复用。
@@ -69,7 +69,7 @@ Final user output should include this follow-up path:
69
69
  ```text
70
70
  Next steps:
71
71
  - complete the task after the workflow truly finishes:
72
- - Claude Code / OpenCode: /complete-task {task-id}
73
- - Gemini CLI: /agent-infra:complete-task {task-id}
74
- - Codex CLI: $complete-task {task-id}
72
+ - Claude Code / OpenCode: /complete-task {task-ref}
73
+ - Gemini CLI: /agent-infra:complete-task {task-ref}
74
+ - Codex CLI: $complete-task {task-ref}
75
75
  ```
@@ -69,7 +69,7 @@ Milestone 规则:
69
69
  ```text
70
70
  Next steps:
71
71
  - complete the task after the workflow truly finishes:
72
- - Claude Code / OpenCode: /complete-task {task-id}
73
- - Gemini CLI: /agent-infra:complete-task {task-id}
74
- - Codex CLI: $complete-task {task-id}
72
+ - Claude Code / OpenCode: /complete-task {task-ref}
73
+ - Gemini CLI: /agent-infra:complete-task {task-ref}
74
+ - Codex CLI: $complete-task {task-ref}
75
75
  ```
@@ -24,7 +24,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
24
24
 
25
25
  ## Task id short ref
26
26
 
27
- > 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.
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
28
 
29
29
  ## Steps
30
30
 
@@ -109,12 +109,12 @@ Update `.agents/workspace/active/{task-id}/task.md`:
109
109
  - `## Context` -> `- **Branch**:`: update it to the generated branch name
110
110
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
111
111
  ```
112
- - {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
113
113
  ```
114
114
 
115
115
  ### 4. Cascade Issue Creation via `.agents/rules/create-issue.md`
116
116
 
117
- 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.
118
118
 
119
119
  The rule's content is determined by the configured code platform:
120
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`
@@ -130,7 +130,7 @@ Handle the result:
130
130
 
131
131
  ### 5. Verification Gate
132
132
 
133
- **Allocate short id first** (writes `short_id` back to task.md and the registry entry; the validation gate will read it):
133
+ **Allocate short id first** (ensures the registry entry is allocated; the validation gate will read it):
134
134
 
135
135
  ```bash
136
136
  node .agents/scripts/task-short-id.js alloc "$task_id"
@@ -155,14 +155,14 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
155
155
 
156
156
  > Execute this step only after the verification gate passes.
157
157
 
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).
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).
159
159
 
160
160
  Scenario A: when an Issue was created, output:
161
161
  ```
162
162
  Task created and Issue creation cascaded successfully.
163
163
 
164
164
  Task information:
165
- - Task ID: {task-id}
165
+ - Task ID: {task-id} (short id {task-ref})
166
166
  - Title: {title}
167
167
  - Type: {type}
168
168
  - Workflow: {workflow}
@@ -172,9 +172,9 @@ Output file:
172
172
  - Task file: .agents/workspace/active/{task-id}/task.md
173
173
 
174
174
  Next step - run requirements analysis:
175
- - Claude Code / OpenCode: /analyze-task {task-id}
176
- - Gemini CLI: /{{project}}:analyze-task {task-id}
177
- - 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}
178
178
  ```
179
179
 
180
180
  Scenario B: when no Issue was created, output:
@@ -182,7 +182,7 @@ Scenario B: when no Issue was created, output:
182
182
  Task created.
183
183
 
184
184
  Task information:
185
- - Task ID: {task-id}
185
+ - Task ID: {task-id} (short id {task-ref})
186
186
  - Title: {title}
187
187
  - Type: {type}
188
188
  - Workflow: {workflow}
@@ -191,9 +191,9 @@ Output file:
191
191
  - Task file: .agents/workspace/active/{task-id}/task.md
192
192
 
193
193
  Next step - run requirements analysis:
194
- - Claude Code / OpenCode: /analyze-task {task-id}
195
- - Gemini CLI: /{{project}}:analyze-task {task-id}
196
- - 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}
197
197
  ```
198
198
 
199
199
  Scenario C: when Issue creation failed, output:
@@ -201,7 +201,7 @@ Scenario C: when Issue creation failed, output:
201
201
  Task created, but cascade Issue creation failed.
202
202
 
203
203
  Task information:
204
- - Task ID: {task-id}
204
+ - Task ID: {task-id} (short id {task-ref})
205
205
  - Title: {title}
206
206
  - Type: {type}
207
207
  - Workflow: {workflow}
@@ -215,9 +215,9 @@ Output file:
215
215
  - Task file: .agents/workspace/active/{task-id}/task.md
216
216
 
217
217
  Next step - run requirements analysis:
218
- - Claude Code / OpenCode: /analyze-task {task-id}
219
- - Gemini CLI: /{{project}}:analyze-task {task-id}
220
- - 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}
221
221
 
222
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.
223
223
  ```