@fitlab-ai/agent-infra 0.5.5 → 0.5.7

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 (110) hide show
  1. package/README.md +182 -1
  2. package/README.zh-CN.md +182 -1
  3. package/bin/cli.js +28 -4
  4. package/lib/defaults.json +1 -0
  5. package/lib/init.js +68 -4
  6. package/lib/prompt.js +28 -1
  7. package/lib/render.js +1 -1
  8. package/lib/sandbox/commands/create.js +7 -3
  9. package/lib/sandbox/commands/rm.js +6 -4
  10. package/lib/sandbox/commands/vm.js +43 -16
  11. package/lib/sandbox/config.js +5 -0
  12. package/lib/sandbox/engine.js +125 -16
  13. package/lib/sandbox/shell.js +47 -7
  14. package/lib/sandbox/task-resolver.js +13 -6
  15. package/lib/sandbox/tools.js +18 -14
  16. package/package.json +2 -2
  17. package/templates/.agents/QUICKSTART.en.md +17 -0
  18. package/templates/.agents/QUICKSTART.zh-CN.md +17 -0
  19. package/templates/.agents/README.en.md +121 -0
  20. package/templates/.agents/README.zh-CN.md +121 -0
  21. package/templates/.agents/rules/issue-pr-commands.en.md +5 -0
  22. package/templates/.agents/rules/issue-pr-commands.zh-CN.md +5 -0
  23. package/templates/.agents/rules/issue-sync.en.md +5 -0
  24. package/templates/.agents/rules/issue-sync.zh-CN.md +5 -0
  25. package/templates/.agents/rules/label-milestone-setup.en.md +5 -0
  26. package/templates/.agents/rules/label-milestone-setup.zh-CN.md +5 -0
  27. package/templates/.agents/rules/milestone-inference.en.md +5 -0
  28. package/templates/.agents/rules/milestone-inference.github.en.md +6 -5
  29. package/templates/.agents/rules/milestone-inference.github.zh-CN.md +6 -5
  30. package/templates/.agents/rules/milestone-inference.zh-CN.md +5 -0
  31. package/templates/.agents/rules/pr-sync.en.md +5 -0
  32. package/templates/.agents/rules/pr-sync.zh-CN.md +5 -0
  33. package/templates/.agents/rules/release-commands.en.md +5 -0
  34. package/templates/.agents/rules/release-commands.zh-CN.md +5 -0
  35. package/templates/.agents/rules/security-alerts.en.md +5 -0
  36. package/templates/.agents/rules/security-alerts.zh-CN.md +5 -0
  37. package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +47 -12
  38. package/templates/.agents/scripts/platform-adapters/platform-sync.js +6 -0
  39. package/templates/.agents/skills/analyze-task/SKILL.en.md +3 -3
  40. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +3 -3
  41. package/templates/.agents/skills/block-task/SKILL.en.md +1 -1
  42. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +1 -1
  43. package/templates/.agents/skills/cancel-task/SKILL.en.md +1 -1
  44. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +2 -2
  45. package/templates/.agents/skills/check-task/SKILL.en.md +1 -1
  46. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +1 -1
  47. package/templates/.agents/skills/close-codescan/SKILL.en.md +1 -1
  48. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +1 -1
  49. package/templates/.agents/skills/close-dependabot/SKILL.en.md +1 -1
  50. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +1 -1
  51. package/templates/.agents/skills/commit/SKILL.en.md +1 -1
  52. package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
  53. package/templates/.agents/skills/create-issue/SKILL.en.md +2 -2
  54. package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +2 -2
  55. package/templates/.agents/skills/create-pr/SKILL.en.md +1 -1
  56. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +1 -1
  57. package/templates/.agents/skills/create-release-note/SKILL.en.md +8 -1
  58. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +8 -1
  59. package/templates/.agents/skills/create-task/SKILL.en.md +2 -2
  60. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +2 -2
  61. package/templates/.agents/skills/implement-task/SKILL.en.md +3 -3
  62. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +3 -3
  63. package/templates/.agents/skills/import-codescan/SKILL.en.md +2 -2
  64. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +2 -2
  65. package/templates/.agents/skills/import-dependabot/SKILL.en.md +2 -2
  66. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +2 -2
  67. package/templates/.agents/skills/import-issue/SKILL.en.md +12 -4
  68. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +12 -4
  69. package/templates/.agents/skills/import-issue/config/verify.json +2 -1
  70. package/templates/.agents/skills/init-labels/SKILL.en.md +1 -1
  71. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +1 -1
  72. package/templates/.agents/skills/init-labels/scripts/init-labels.sh +6 -0
  73. package/templates/.agents/skills/init-milestones/SKILL.en.md +1 -1
  74. package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +1 -1
  75. package/templates/.agents/skills/init-milestones/scripts/init-milestones.sh +6 -0
  76. package/templates/.agents/skills/plan-task/SKILL.en.md +3 -3
  77. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +3 -3
  78. package/templates/.agents/skills/post-release/SKILL.en.md +95 -0
  79. package/templates/.agents/skills/post-release/SKILL.zh-CN.md +95 -0
  80. package/templates/.agents/skills/refine-task/SKILL.en.md +2 -2
  81. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +2 -2
  82. package/templates/.agents/skills/refine-title/SKILL.en.md +1 -1
  83. package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +1 -1
  84. package/templates/.agents/skills/release/SKILL.en.md +6 -1
  85. package/templates/.agents/skills/release/SKILL.zh-CN.md +6 -1
  86. package/templates/.agents/skills/release/scripts/manage-milestones.sh +6 -0
  87. package/templates/.agents/skills/restore-task/SKILL.en.md +2 -2
  88. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +2 -2
  89. package/templates/.agents/skills/review-task/SKILL.en.md +3 -3
  90. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +3 -3
  91. package/templates/.agents/skills/test/SKILL.en.md +1 -1
  92. package/templates/.agents/skills/test/SKILL.zh-CN.md +1 -1
  93. package/templates/.agents/skills/test-integration/SKILL.en.md +1 -1
  94. package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +1 -1
  95. package/templates/.agents/skills/update-agent-infra/SKILL.en.md +10 -2
  96. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +4 -2
  97. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +598 -7
  98. package/templates/.agents/skills/upgrade-dependency/SKILL.en.md +1 -1
  99. package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +1 -1
  100. package/templates/.agents/templates/task.en.md +2 -2
  101. package/templates/.agents/templates/task.zh-CN.md +2 -2
  102. package/templates/.claude/commands/post-release.en.md +8 -0
  103. package/templates/.claude/commands/post-release.zh-CN.md +8 -0
  104. package/templates/.gemini/commands/_project_/post-release.en.toml +6 -0
  105. package/templates/.gemini/commands/_project_/post-release.zh-CN.toml +6 -0
  106. package/templates/.github/workflows/metadata-sync.yml +1 -1
  107. package/templates/.github/workflows/pr-label.yml +1 -1
  108. package/templates/.github/workflows/status-label.yml +1 -1
  109. package/templates/.opencode/commands/post-release.en.md +9 -0
  110. package/templates/.opencode/commands/post-release.zh-CN.md +9 -0
@@ -100,7 +100,7 @@ description: "查看任务的当前状态和进度"
100
100
 
101
101
  ### 5. 建议下一步操作
102
102
 
103
- 根据当前工作流状态,建议合适的下一个技能。必须展示下表中所有 TUI 列的命令格式,不要只展示当前 AI 代理对应的列:
103
+ 根据当前工作流状态,建议合适的下一个技能。必须展示下表中所有 TUI 列的命令格式,不要只展示当前 AI 代理对应的列。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名):
104
104
 
105
105
  > **⚠️ 条件判断 — 你必须先根据 `status`、`current_step`、最新产物和最新审查结果,选择下表中唯一匹配的一行:**
106
106
  >
@@ -84,7 +84,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
84
84
 
85
85
  ### 8. Inform User
86
86
 
87
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
87
+ > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
88
88
 
89
89
  ```
90
90
  Code Scanning alert #{alert-number} dismissed.
@@ -84,7 +84,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
84
84
 
85
85
  ### 8. 告知用户
86
86
 
87
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
87
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
88
88
 
89
89
  ```
90
90
  Code Scanning 告警 #{alert-number} 已关闭。
@@ -92,7 +92,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
92
92
 
93
93
  ### 8. Inform User
94
94
 
95
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
95
+ > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
96
96
 
97
97
  ```
98
98
  Security alert #{alert-number} dismissed.
@@ -92,7 +92,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
92
92
 
93
93
  ### 8. 告知用户
94
94
 
95
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
95
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
96
96
 
97
97
  ```
98
98
  安全告警 #{alert-number} 已关闭。
@@ -44,7 +44,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
44
44
 
45
45
  > 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.
46
46
 
47
- > **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`.
47
+ > **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).
48
48
 
49
49
  Append the Commit Activity Log entry and choose exactly one next-step case:
50
50
  - final commit -> `complete-task {task-id}`
@@ -44,7 +44,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
44
44
 
45
45
  > 完整的 4 种状态分支、前置条件检查和多 TUI 下一步命令见 `reference/task-status-update.md`。更新任务状态前,先读取 `reference/task-status-update.md`。
46
46
 
47
- > **重要**:向用户展示下一步时,必须完整输出所有 TUI 命令格式,并直接使用 `reference/task-status-update.md` 中对应场景的标准模板。
47
+ > **重要**:向用户展示下一步时,必须完整输出所有 TUI 命令格式,并直接使用 `reference/task-status-update.md` 中对应场景的标准模板。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
48
48
 
49
49
  追加 Commit 的 Activity Log,并且只能选择一个下一步分支:
50
50
  - 最终提交 -> `complete-task {task-id}`
@@ -81,7 +81,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
81
81
 
82
82
  > Execute this step only after the verification gate passes.
83
83
 
84
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
84
+ > **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).
85
85
 
86
86
  Show the Issue number, URL, labels, Issue Type, milestone result, confirm that `issue_number` was written back, and include the next-step commands in every TUI format:
87
87
 
@@ -98,7 +98,7 @@ Next step - run requirements analysis:
98
98
  - [ ] Used `task.md` as the only content source
99
99
  - [ ] Recorded `issue_number` in task.md
100
100
  - [ ] Updated `updated_at` and appended the Activity Log entry
101
- - [ ] Included all TUI formats for the next-step commands
101
+ - [ ] Included all TUI formats, including any custom TUIs, for the next-step commands
102
102
 
103
103
  ## STOP
104
104
 
@@ -81,7 +81,7 @@ node .agents/scripts/validate-artifact.js gate create-issue .agents/workspace/ac
81
81
 
82
82
  > 仅在校验通过后执行本步骤。
83
83
 
84
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
84
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
85
85
 
86
86
  展示 Issue 编号、URL、labels、Issue Type、milestone 结果,确认 `issue_number` 已回写,并完整输出所有 TUI 里的下一步命令:
87
87
 
@@ -98,7 +98,7 @@ node .agents/scripts/validate-artifact.js gate create-issue .agents/workspace/ac
98
98
  - [ ] 已仅使用 `task.md` 作为内容来源
99
99
  - [ ] 已在 task.md 中记录 `issue_number`
100
100
  - [ ] 已更新 `updated_at` 并追加 Activity Log
101
- - [ ] 已输出所有 TUI 格式的下一步命令
101
+ - [ ] 已输出所有 TUI 格式的下一步命令(含自定义 TUI)
102
102
 
103
103
  ## 停止
104
104
 
@@ -93,7 +93,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
93
93
 
94
94
  > Execute this step only after the verification gate passes.
95
95
 
96
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
96
+ > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
97
97
 
98
98
  Explain the created PR URL, summarize metadata sync and summary-comment results, and recommend `complete-task {task-id}` once the workflow is truly done.
99
99
 
@@ -93,7 +93,7 @@ node .agents/scripts/validate-artifact.js gate create-pr .agents/workspace/activ
93
93
 
94
94
  > 仅在校验通过后执行本步骤。
95
95
 
96
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
96
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
97
97
 
98
98
  说明 PR URL、元数据同步结果、摘要评论结果,并在工作流真正完成后推荐执行 `complete-task {task-id}`。
99
99
 
@@ -119,7 +119,7 @@ If no historical release notes exist, use the following default Markdown format:
119
119
 
120
120
  ## Contributors
121
121
 
122
- @contributor1, @contributor2, @contributor3
122
+ @contributor1, @contributor2, @contributor3, @reporter1 (reported #N)
123
123
  ```
124
124
 
125
125
  **Format rules**:
@@ -130,6 +130,7 @@ If no historical release notes exist, use the following default Markdown format:
130
130
  - **Data sources**:
131
131
  - PR authors from Step 4 `gh pr list --json author`
132
132
  - Commit co-authors from Step 4 `git log ... --format='%(trailers:key=Co-authored-by,valueonly,unfold)'`
133
+ - Issue reporters from linked Issues collected in Step 5 (`author.login` returned by `gh issue view`)
133
134
  - **Contribution count**: `PR count + co-authored commit count` for the same identity, merged across both sources
134
135
  - **Name -> `@login` mapping**:
135
136
  - Raw `Co-authored-by` values are `Name <email>` and must be mapped to a GitHub `@login`
@@ -141,6 +142,12 @@ If no historical release notes exist, use the following default Markdown format:
141
142
  - If the login still cannot be determined reliably, output `@{lowercased first Name token}` and append `<!-- TODO(reviewer): confirm GitHub login for {original Name <email>} -->` below the `Contributors` section
142
143
  - **Sorting**: descending by contribution count, then lexicographically by login for ties
143
144
  - **Deduplication**: use the final mapped `@login` as the key
145
+ - **Issue reporter rules**:
146
+ - Extract `author.login` from each linked Issue collected in Step 5
147
+ - If the login already exists in the final mapped PR author or co-author list, skip it (code contribution already covers this user)
148
+ - Reporter-only contributors use the format `@login (reported #N)`; if the same reporter reported multiple Issues, use `@login (reported #N1, #N2)`
149
+ - Reporters are appended after code contributors in the Contributors section, separated by commas
150
+ - Sort reporters by reported Issue count descending, then lexicographically by login for ties
144
151
  5. Empty sections: Omit sections with no entries
145
152
 
146
153
  ### 8. Present and Confirm
@@ -119,7 +119,7 @@ git log v<prev-version>..v<version> \
119
119
 
120
120
  ## Contributors
121
121
 
122
- @contributor1, @contributor2, @contributor3
122
+ @contributor1, @contributor2, @contributor3, @reporter1 (reported #N)
123
123
  ```
124
124
 
125
125
  **格式规则**:
@@ -130,6 +130,7 @@ git log v<prev-version>..v<version> \
130
130
  - **数据源**:
131
131
  - PR author:来自步骤 4 的 `gh pr list --json author`
132
132
  - Commit co-authors:来自步骤 4 的 `git log ... --format='%(trailers:key=Co-authored-by,valueonly,unfold)'`
133
+ - Issue reporters:来自步骤 5 收集的关联 Issue 的 author(`gh issue view` 返回的 `author.login`)
133
134
  - **贡献数定义**:`该人的 PR 数 + 该人作为 co-author 的 commit 数`(同一身份跨来源合并计数)
134
135
  - **Name → `@login` 映射**:
135
136
  - `Co-authored-by` 原始格式为 `Name <email>`,需要推断对应的 GitHub `@login`
@@ -141,6 +142,12 @@ git log v<prev-version>..v<version> \
141
142
  - 若仍无法可靠确定 login,则输出 `@{Name 首 token 小写}`,并在 `Contributors` 段落下追加 `<!-- TODO(reviewer): 确认 {原始 Name <email>} 的 GitHub login -->`
142
143
  - **排序**:按贡献数降序;贡献数相同时按 login 字典序
143
144
  - **去重**:以最终映射后的 `@login` 为键
145
+ - **Issue reporter 规则**:
146
+ - 从步骤 5 收集到的每个关联 Issue 中提取 `author.login`
147
+ - 如果该 login 已存在于 PR author 或 co-author 的最终映射列表中,跳过(代码贡献已包含该用户)
148
+ - 仅报告贡献的用户以 `@login (reported #N)` 格式展示;同一 reporter 报告多个 Issue 时使用 `@login (reported #N1, #N2)`
149
+ - Reporter 在 Contributors 段落中排在代码贡献者之后,以逗号分隔追加
150
+ - Reporter 之间按报告的 Issue 数量降序排列,数量相同时按 login 字典序
144
151
  5. 空部分:省略没有条目的部分
145
152
 
146
153
  ### 8. 展示并确认
@@ -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.
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).
121
121
 
122
122
  Output format:
123
123
  ```
@@ -150,7 +150,7 @@ Or create a GitHub Issue first:
150
150
  - [ ] Updated `updated_at` to the current time in task.md
151
151
  - [ ] Updated `assigned_to` in task.md
152
152
  - [ ] Appended an Activity Log entry to task.md
153
- - [ ] Informed the user of the next step (must include all TUI command formats; do not filter)
153
+ - [ ] Informed the user of the next step (must include all TUI command formats, including any custom TUIs; do not filter)
154
154
  - [ ] **Did not modify any business code or configuration files** (only task.md)
155
155
 
156
156
  ## STOP
@@ -117,7 +117,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
117
117
 
118
118
  > 仅在校验通过后执行本步骤。
119
119
 
120
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
120
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
121
121
 
122
122
  输出格式:
123
123
  ```
@@ -150,7 +150,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
150
150
  - [ ] 更新了 task.md 中的 `updated_at` 为当前时间
151
151
  - [ ] 更新了 task.md 中的 `assigned_to`
152
152
  - [ ] 追加了 Activity Log 条目到 task.md
153
- - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,不要筛选)
153
+ - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,含自定义 TUI,不要筛选)
154
154
  - [ ] **没有修改任何业务代码或配置文件**(仅 task.md)
155
155
 
156
156
  ## 停止
@@ -95,8 +95,8 @@ Update `.agents/workspace/active/{task-id}/task.md`:
95
95
 
96
96
  If task.md contains a valid `issue_number`, perform these sync actions (skip and continue on any failure; read `.agents/rules/issue-sync.md` first and complete upstream repository detection plus permission detection):
97
97
  - Set `status: in-progress` by following issue-sync.md
98
- - Publish the `{implementation-artifact}` comment
99
98
  - Create or update the `<!-- sync-issue:{task-id}:task -->` comment (follow the task.md comment sync rule in issue-sync.md)
99
+ - Publish the `{implementation-artifact}` comment
100
100
 
101
101
  ### 10. 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. Use the output template in `reference/output-template.md`.
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). Use the output template in `reference/output-template.md`.
121
121
 
122
122
  ## Completion Checklist
123
123
 
@@ -125,7 +125,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
125
125
  - [ ] Created `{implementation-artifact}`
126
126
  - [ ] All required tests passed
127
127
  - [ ] Updated task.md and appended the Activity Log entry
128
- - [ ] Included every TUI command format in the user-facing next step
128
+ - [ ] Included every TUI command format, including any custom TUIs, in the user-facing next step
129
129
 
130
130
  ## STOP
131
131
 
@@ -95,8 +95,8 @@ date "+%Y-%m-%d %H:%M:%S%:z"
95
95
 
96
96
  如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续;执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测):
97
97
  - 按 issue-sync.md 设置 `status: in-progress`
98
- - 发布 `{implementation-artifact}` 评论
99
98
  - 创建或更新 `<!-- sync-issue:{task-id}:task -->` 评论(按 issue-sync.md 的 task.md 评论同步规则)
99
+ - 发布 `{implementation-artifact}` 评论
100
100
 
101
101
  ### 10. 完成校验
102
102
 
@@ -117,7 +117,7 @@ node .agents/scripts/validate-artifact.js gate implement-task .agents/workspace/
117
117
 
118
118
  > 仅在校验通过后执行本步骤。
119
119
 
120
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。输出格式见 `reference/output-template.md`。
120
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。输出格式见 `reference/output-template.md`。
121
121
 
122
122
  ## 完成检查清单
123
123
 
@@ -125,7 +125,7 @@ node .agents/scripts/validate-artifact.js gate implement-task .agents/workspace/
125
125
  - [ ] 已创建 `{implementation-artifact}`
126
126
  - [ ] 所有必需测试通过
127
127
  - [ ] 已更新 task.md 并追加 Activity Log
128
- - [ ] 已向用户展示所有 TUI 格式的下一步命令
128
+ - [ ] 已向用户展示所有 TUI 格式的下一步命令(含自定义 TUI)
129
129
 
130
130
  ## 停止
131
131
 
@@ -75,7 +75,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
75
75
 
76
76
  > Execute this step only after the verification gate passes.
77
77
 
78
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
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).
79
79
 
80
80
  ```
81
81
  Code Scanning alert #{alert-number} imported.
@@ -101,7 +101,7 @@ Next step:
101
101
  - [ ] Updated `current_step` to requirement-analysis in task.md
102
102
  - [ ] Updated `updated_at` to the current time in task.md
103
103
  - [ ] Appended an Activity Log entry to task.md
104
- - [ ] Informed the user of the next step (must include all TUI command formats; do not filter)
104
+ - [ ] Informed the user of the next step (must include all TUI command formats, including any custom TUIs; do not filter)
105
105
 
106
106
  ## Error Handling
107
107
 
@@ -75,7 +75,7 @@ node .agents/scripts/validate-artifact.js gate import-codescan .agents/workspace
75
75
 
76
76
  > 仅在校验通过后执行本步骤。
77
77
 
78
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
78
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
79
79
 
80
80
  ```
81
81
  Code Scanning 告警 #{alert-number} 已导入。
@@ -101,7 +101,7 @@ Code Scanning 告警 #{alert-number} 已导入。
101
101
  - [ ] 更新了 task.md 中的 `current_step` 为 requirement-analysis
102
102
  - [ ] 更新了 task.md 中的 `updated_at` 为当前时间
103
103
  - [ ] 追加了 Activity Log 条目到 task.md
104
- - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,不要筛选)
104
+ - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,含自定义 TUI,不要筛选)
105
105
 
106
106
  ## 错误处理
107
107
 
@@ -76,7 +76,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
76
76
 
77
77
  > Execute this step only after the verification gate passes.
78
78
 
79
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
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).
80
80
 
81
81
  ```
82
82
  Security alert #{alert-number} imported.
@@ -105,7 +105,7 @@ Next step:
105
105
  - [ ] Updated `current_step` to requirement-analysis in task.md
106
106
  - [ ] Updated `updated_at` to the current time in task.md
107
107
  - [ ] Appended an Activity Log entry to task.md
108
- - [ ] Informed the user of the next step (must include all TUI command formats; do not filter)
108
+ - [ ] Informed the user of the next step (must include all TUI command formats, including any custom TUIs; do not filter)
109
109
 
110
110
  ## Error Handling
111
111
 
@@ -76,7 +76,7 @@ node .agents/scripts/validate-artifact.js gate import-dependabot .agents/workspa
76
76
 
77
77
  > 仅在校验通过后执行本步骤。
78
78
 
79
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
79
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
80
80
 
81
81
  ```
82
82
  安全告警 #{alert-number} 已导入。
@@ -105,7 +105,7 @@ node .agents/scripts/validate-artifact.js gate import-dependabot .agents/workspa
105
105
  - [ ] 更新了 task.md 中的 `current_step` 为 requirement-analysis
106
106
  - [ ] 更新了 task.md 中的 `updated_at` 为当前时间
107
107
  - [ ] 追加了 Activity Log 条目到 task.md
108
- - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,不要筛选)
108
+ - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,含自定义 TUI,不要筛选)
109
109
 
110
110
  ## 错误处理
111
111
 
@@ -74,7 +74,14 @@ Update `.agents/workspace/active/{task-id}/task.md`:
74
74
 
75
75
  If task.md contains a valid `issue_number`, use the Issue update command from `.agents/rules/issue-pr-commands.md` to add the current executor as an assignee. The behavioral boundary still follows `.agents/rules/issue-sync.md`.
76
76
 
77
- ### 6. Verification Gate
77
+ ### 6. Sync to the Issue
78
+
79
+ If task.md contains a valid `issue_number`, perform these sync actions (skip and continue on any failure):
80
+ - Read `.agents/rules/issue-sync.md` before syncing, and complete upstream repository detection plus permission detection
81
+ - Check the Issue's current milestone; if it is unset, read `.agents/rules/milestone-inference.md` and infer plus set the milestone using "Stage 1: `create-issue`". If `has_triage=false` or the inference is uncertain, skip and continue
82
+ - Create or update the `<!-- sync-issue:{task-id}:task -->` comment (follow the task.md comment sync rule in issue-sync.md)
83
+
84
+ ### 7. Verification Gate
78
85
 
79
86
  Run the verification gate to confirm the task artifact and sync state are valid:
80
87
 
@@ -89,11 +96,11 @@ Handle the result as follows:
89
96
 
90
97
  Keep the gate output in your reply as fresh evidence. Do not claim completion without output from this run.
91
98
 
92
- ### 7. Inform User
99
+ ### 8. Inform User
93
100
 
94
101
  > Execute this step only after the verification gate passes.
95
102
 
96
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
103
+ > **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).
97
104
 
98
105
  ```
99
106
  Issue #{number} imported.
@@ -119,7 +126,8 @@ Next step - run requirements analysis:
119
126
  - [ ] Updated `current_step` to requirement-analysis
120
127
  - [ ] Updated `updated_at` to the current time
121
128
  - [ ] Appended an Activity Log entry to task.md
122
- - [ ] Informed the user of the next step (must include all TUI command formats; do not filter)
129
+ - [ ] Synced the task comment to the Issue
130
+ - [ ] Informed the user of the next step (must include all TUI command formats, including any custom TUIs; do not filter)
123
131
  - [ ] **Did not modify any business code**
124
132
 
125
133
  ## STOP
@@ -74,7 +74,14 @@ date "+%Y-%m-%d %H:%M:%S%:z"
74
74
 
75
75
  如果 task.md 中存在有效的 `issue_number`,按 `.agents/rules/issue-pr-commands.md` 的 Issue 更新命令为当前执行者添加 assignee;Assignee 同步的边界仍遵循 `.agents/rules/issue-sync.md`。
76
76
 
77
- ### 6. 完成校验
77
+ ### 6. 同步到 Issue
78
+
79
+ 如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续):
80
+ - 执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测
81
+ - 检查 Issue 当前 milestone;如果未设置,先读取 `.agents/rules/milestone-inference.md`,按其中的「阶段 1:`create-issue`」规则推断并设置 milestone;如果 `has_triage=false` 或推断不确定,跳过并继续
82
+ - 创建或更新 `<!-- sync-issue:{task-id}:task -->` 评论(按 issue-sync.md 的 task.md 评论同步规则)
83
+
84
+ ### 7. 完成校验
78
85
 
79
86
  运行完成校验,确认任务产物和同步状态符合规范:
80
87
 
@@ -89,11 +96,11 @@ node .agents/scripts/validate-artifact.js gate import-issue .agents/workspace/ac
89
96
 
90
97
  将校验输出保留在回复中作为当次验证输出。没有当次校验输出,不得声明完成。
91
98
 
92
- ### 7. 告知用户
99
+ ### 8. 告知用户
93
100
 
94
101
  > 仅在校验通过后执行本步骤。
95
102
 
96
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
103
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
97
104
 
98
105
  ```
99
106
  Issue #{number} 已导入。
@@ -119,7 +126,8 @@ Issue #{number} 已导入。
119
126
  - [ ] 更新了 `current_step` 为 requirement-analysis
120
127
  - [ ] 更新了 `updated_at` 为当前时间
121
128
  - [ ] 追加了 Activity Log 条目到 task.md
122
- - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,不要筛选)
129
+ - [ ] 同步了 task 评论到 Issue
130
+ - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,含自定义 TUI,不要筛选)
123
131
  - [ ] **没有修改任何业务代码**
124
132
 
125
133
  ## 停止
@@ -22,7 +22,8 @@
22
22
  },
23
23
  "platform-sync": {
24
24
  "when": "issue_number_exists",
25
- "issue_must_exist": true
25
+ "issue_must_exist": true,
26
+ "verify_task_comment_content": true
26
27
  }
27
28
  }
28
29
  }
@@ -85,7 +85,7 @@ Operational notes:
85
85
 
86
86
  ### 6. Inform User
87
87
 
88
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
88
+ > **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).
89
89
 
90
90
  After summarizing the label initialization, show:
91
91
 
@@ -85,7 +85,7 @@ bash .agents/skills/init-labels/scripts/init-labels.sh
85
85
 
86
86
  ### 6. 告知用户
87
87
 
88
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
88
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
89
89
 
90
90
  输出 labels 初始化摘要后,提示:
91
91
 
@@ -0,0 +1,6 @@
1
+ #!/bin/sh
2
+
3
+ set -e
4
+
5
+ echo "Label initialization skipped: this code platform does not provide a built-in label adapter." >&2
6
+ exit 0
@@ -62,7 +62,7 @@ Operational notes:
62
62
 
63
63
  ### 5. Inform User
64
64
 
65
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
65
+ > **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).
66
66
 
67
67
  After summarizing the milestone initialization, show:
68
68
 
@@ -62,7 +62,7 @@ bash .agents/skills/init-milestones/scripts/init-milestones.sh "$ARGUMENTS"
62
62
 
63
63
  ### 5. 告知用户
64
64
 
65
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
65
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
66
66
 
67
67
  输出 milestones 初始化摘要后,提示:
68
68
 
@@ -0,0 +1,6 @@
1
+ #!/bin/sh
2
+
3
+ set -e
4
+
5
+ echo "Milestone initialization skipped: this code platform does not provide a built-in milestone adapter." >&2
6
+ exit 0
@@ -99,8 +99,8 @@ Update `.agents/workspace/active/{task-id}/task.md`:
99
99
  If task.md contains a valid `issue_number`, perform these sync actions (skip and continue on any failure):
100
100
  - Read `.agents/rules/issue-sync.md` before syncing, and complete upstream repository detection plus permission detection
101
101
  - Set `status: pending-design-work` by following issue-sync.md
102
- - Publish the `{plan-artifact}` comment
103
102
  - Create or update the `<!-- sync-issue:{task-id}:task -->` comment (follow the task.md comment sync rule in issue-sync.md)
103
+ - Publish the `{plan-artifact}` comment
104
104
 
105
105
  ### 8. Verification Gate
106
106
 
@@ -121,7 +121,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
121
121
 
122
122
  > Execute this step only after the verification gate passes.
123
123
 
124
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
124
+ > **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).
125
125
 
126
126
  Output format:
127
127
  ```
@@ -157,7 +157,7 @@ Next step - implement the task:
157
157
  - [ ] Marked technical-design as complete in workflow progress
158
158
  - [ ] Appended an Activity Log entry to task.md
159
159
  - [ ] Informed the user that this is a human review checkpoint
160
- - [ ] Informed the user of the next step (must include all TUI command formats; do not filter)
160
+ - [ ] Informed the user of the next step (must include all TUI command formats, including any custom TUIs; do not filter)
161
161
 
162
162
  ## STOP
163
163
 
@@ -99,8 +99,8 @@ date "+%Y-%m-%d %H:%M:%S%:z"
99
99
  如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续):
100
100
  - 执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测
101
101
  - 按 issue-sync.md 设置 `status: pending-design-work`
102
- - 发布 `{plan-artifact}` 评论
103
102
  - 创建或更新 `<!-- sync-issue:{task-id}:task -->` 评论(按 issue-sync.md 的 task.md 评论同步规则)
103
+ - 发布 `{plan-artifact}` 评论
104
104
 
105
105
  ### 8. 完成校验
106
106
 
@@ -121,7 +121,7 @@ node .agents/scripts/validate-artifact.js gate plan-task .agents/workspace/activ
121
121
 
122
122
  > 仅在校验通过后执行本步骤。
123
123
 
124
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
124
+ > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
125
125
 
126
126
  输出格式:
127
127
  ```
@@ -157,7 +157,7 @@ node .agents/scripts/validate-artifact.js gate plan-task .agents/workspace/activ
157
157
  - [ ] 在工作流进度中标记了 technical-design 为已完成
158
158
  - [ ] 追加了 Activity Log 条目到 task.md
159
159
  - [ ] 告知了用户这是人工审查检查点
160
- - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,不要筛选)
160
+ - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,含自定义 TUI,不要筛选)
161
161
 
162
162
  ## 停止
163
163