@fitlab-ai/agent-infra 0.4.0 → 0.4.1

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 (270) hide show
  1. package/README.md +1 -3
  2. package/README.zh-CN.md +1 -3
  3. package/lib/defaults.json +2 -0
  4. package/lib/init.js +1 -6
  5. package/lib/update.js +0 -55
  6. package/package.json +1 -1
  7. package/templates/.agents/QUICKSTART.md +10 -0
  8. package/templates/.agents/QUICKSTART.zh-CN.md +10 -0
  9. package/templates/.agents/README.md +18 -11
  10. package/templates/.agents/README.zh-CN.md +18 -11
  11. package/templates/.agents/skills/analyze-task/SKILL.md +1 -4
  12. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +1 -3
  13. package/templates/.agents/skills/block-task/SKILL.md +1 -5
  14. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +1 -4
  15. package/templates/.agents/skills/check-task/SKILL.md +1 -5
  16. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +1 -3
  17. package/templates/.agents/skills/close-codescan/SKILL.md +1 -4
  18. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +1 -3
  19. package/templates/.agents/skills/close-dependabot/SKILL.md +1 -4
  20. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +1 -3
  21. package/templates/.agents/skills/commit/SKILL.md +26 -198
  22. package/templates/.agents/skills/commit/SKILL.zh-CN.md +26 -197
  23. package/templates/.agents/skills/commit/reference/commit-message.md +60 -0
  24. package/templates/.agents/skills/commit/reference/commit-message.zh-CN.md +60 -0
  25. package/templates/.agents/skills/commit/reference/copyright-check.md +39 -0
  26. package/templates/.agents/skills/commit/reference/copyright-check.zh-CN.md +39 -0
  27. package/templates/.agents/skills/commit/reference/task-status-update.md +88 -0
  28. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +88 -0
  29. package/templates/.agents/skills/complete-task/SKILL.md +1 -6
  30. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +1 -4
  31. package/templates/.agents/skills/create-issue/SKILL.md +32 -251
  32. package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +33 -252
  33. package/templates/.agents/skills/create-issue/reference/label-and-type.md +77 -0
  34. package/templates/.agents/skills/create-issue/reference/label-and-type.zh-CN.md +77 -0
  35. package/templates/.agents/skills/create-issue/reference/template-matching.md +45 -0
  36. package/templates/.agents/skills/create-issue/reference/template-matching.zh-CN.md +45 -0
  37. package/templates/.agents/skills/create-pr/SKILL.md +33 -224
  38. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +32 -222
  39. package/templates/.agents/skills/create-pr/reference/branch-strategy.md +29 -0
  40. package/templates/.agents/skills/create-pr/reference/branch-strategy.zh-CN.md +29 -0
  41. package/templates/.agents/skills/create-pr/reference/pr-body-template.md +86 -0
  42. package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +86 -0
  43. package/templates/.agents/skills/create-release-note/SKILL.md +10 -13
  44. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +10 -12
  45. package/templates/.agents/skills/create-task/SKILL.md +1 -4
  46. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +1 -3
  47. package/templates/.agents/skills/implement-task/SKILL.md +46 -176
  48. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +42 -170
  49. package/templates/.agents/skills/implement-task/reference/implementation-rules.md +58 -0
  50. package/templates/.agents/skills/implement-task/reference/implementation-rules.zh-CN.md +58 -0
  51. package/templates/.agents/skills/implement-task/reference/report-template.md +63 -0
  52. package/templates/.agents/skills/implement-task/reference/report-template.zh-CN.md +63 -0
  53. package/templates/.agents/skills/import-codescan/SKILL.md +1 -4
  54. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -3
  55. package/templates/.agents/skills/import-dependabot/SKILL.md +1 -4
  56. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +1 -3
  57. package/templates/.agents/skills/import-issue/SKILL.md +1 -3
  58. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +1 -3
  59. package/templates/.agents/skills/init-labels/SKILL.md +1 -4
  60. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +1 -4
  61. package/templates/.agents/skills/init-milestones/SKILL.md +1 -3
  62. package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +1 -3
  63. package/templates/.agents/skills/plan-task/SKILL.md +1 -5
  64. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +1 -3
  65. package/templates/.agents/skills/refine-task/SKILL.md +38 -162
  66. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +36 -158
  67. package/templates/.agents/skills/refine-task/reference/fix-workflow.md +76 -0
  68. package/templates/.agents/skills/refine-task/reference/fix-workflow.zh-CN.md +76 -0
  69. package/templates/.agents/skills/refine-task/reference/report-template.md +38 -0
  70. package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +38 -0
  71. package/templates/.agents/skills/refine-title/SKILL.md +1 -4
  72. package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +1 -3
  73. package/templates/.agents/skills/release/SKILL.md +10 -12
  74. package/templates/.agents/skills/release/SKILL.zh-CN.md +10 -11
  75. package/templates/.agents/skills/review-task/SKILL.md +37 -239
  76. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +37 -238
  77. package/templates/.agents/skills/review-task/reference/output-templates.md +72 -0
  78. package/templates/.agents/skills/review-task/reference/output-templates.zh-CN.md +72 -0
  79. package/templates/.agents/skills/review-task/reference/report-template.md +63 -0
  80. package/templates/.agents/skills/review-task/reference/report-template.zh-CN.md +63 -0
  81. package/templates/.agents/skills/review-task/reference/review-criteria.md +24 -0
  82. package/templates/.agents/skills/review-task/reference/review-criteria.zh-CN.md +24 -0
  83. package/templates/.agents/skills/sync-issue/SKILL.md +29 -487
  84. package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +30 -487
  85. package/templates/.agents/skills/sync-issue/reference/comment-publish.md +88 -0
  86. package/templates/.agents/skills/sync-issue/reference/comment-publish.zh-CN.md +88 -0
  87. package/templates/.agents/skills/sync-issue/reference/delivery-detection.md +42 -0
  88. package/templates/.agents/skills/sync-issue/reference/delivery-detection.zh-CN.md +42 -0
  89. package/templates/.agents/skills/sync-issue/reference/label-sync.md +63 -0
  90. package/templates/.agents/skills/sync-issue/reference/label-sync.zh-CN.md +63 -0
  91. package/templates/.agents/skills/sync-issue/reference/milestone-sync.md +37 -0
  92. package/templates/.agents/skills/sync-issue/reference/milestone-sync.zh-CN.md +37 -0
  93. package/templates/.agents/skills/sync-pr/SKILL.md +25 -287
  94. package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +29 -291
  95. package/templates/.agents/skills/sync-pr/reference/comment-publish.md +82 -0
  96. package/templates/.agents/skills/sync-pr/reference/comment-publish.zh-CN.md +82 -0
  97. package/templates/.agents/skills/sync-pr/reference/delivery-detection.md +54 -0
  98. package/templates/.agents/skills/sync-pr/reference/delivery-detection.zh-CN.md +54 -0
  99. package/templates/.agents/skills/test/SKILL.md +1 -3
  100. package/templates/.agents/skills/test/SKILL.zh-CN.md +1 -3
  101. package/templates/.agents/skills/test-integration/SKILL.md +1 -4
  102. package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +1 -3
  103. package/templates/.agents/skills/update-agent-infra/SKILL.md +2 -6
  104. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +2 -4
  105. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +42 -46
  106. package/templates/.agents/skills/upgrade-dependency/SKILL.md +1 -4
  107. package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +1 -3
  108. package/templates/.claude/CLAUDE.md +13 -51
  109. package/templates/.claude/CLAUDE.zh-CN.md +13 -51
  110. package/templates/.claude/commands/analyze-task.md +1 -1
  111. package/templates/.claude/commands/analyze-task.zh-CN.md +1 -1
  112. package/templates/.claude/commands/block-task.md +2 -1
  113. package/templates/.claude/commands/block-task.zh-CN.md +2 -1
  114. package/templates/.claude/commands/check-task.md +2 -1
  115. package/templates/.claude/commands/check-task.zh-CN.md +2 -1
  116. package/templates/.claude/commands/close-codescan.md +2 -1
  117. package/templates/.claude/commands/close-codescan.zh-CN.md +2 -1
  118. package/templates/.claude/commands/close-dependabot.md +2 -1
  119. package/templates/.claude/commands/close-dependabot.zh-CN.md +2 -1
  120. package/templates/.claude/commands/commit.md +1 -1
  121. package/templates/.claude/commands/commit.zh-CN.md +1 -1
  122. package/templates/.claude/commands/complete-task.md +1 -1
  123. package/templates/.claude/commands/complete-task.zh-CN.md +1 -1
  124. package/templates/.claude/commands/create-issue.md +1 -1
  125. package/templates/.claude/commands/create-issue.zh-CN.md +1 -1
  126. package/templates/.claude/commands/create-pr.md +1 -1
  127. package/templates/.claude/commands/create-pr.zh-CN.md +1 -1
  128. package/templates/.claude/commands/create-release-note.md +2 -1
  129. package/templates/.claude/commands/create-release-note.zh-CN.md +2 -1
  130. package/templates/.claude/commands/create-task.md +1 -1
  131. package/templates/.claude/commands/create-task.zh-CN.md +1 -1
  132. package/templates/.claude/commands/implement-task.md +1 -1
  133. package/templates/.claude/commands/implement-task.zh-CN.md +1 -1
  134. package/templates/.claude/commands/import-codescan.md +1 -0
  135. package/templates/.claude/commands/import-codescan.zh-CN.md +2 -1
  136. package/templates/.claude/commands/import-dependabot.md +1 -0
  137. package/templates/.claude/commands/import-dependabot.zh-CN.md +2 -1
  138. package/templates/.claude/commands/import-issue.md +1 -1
  139. package/templates/.claude/commands/import-issue.zh-CN.md +1 -1
  140. package/templates/.claude/commands/init-labels.md +1 -0
  141. package/templates/.claude/commands/init-labels.zh-CN.md +2 -1
  142. package/templates/.claude/commands/init-milestones.md +2 -1
  143. package/templates/.claude/commands/init-milestones.zh-CN.md +2 -1
  144. package/templates/.claude/commands/plan-task.md +1 -1
  145. package/templates/.claude/commands/plan-task.zh-CN.md +1 -1
  146. package/templates/.claude/commands/refine-task.zh-CN.md +1 -1
  147. package/templates/.claude/commands/refine-title.md +2 -1
  148. package/templates/.claude/commands/refine-title.zh-CN.md +2 -1
  149. package/templates/.claude/commands/release.md +2 -1
  150. package/templates/.claude/commands/release.zh-CN.md +2 -1
  151. package/templates/.claude/commands/review-task.md +1 -1
  152. package/templates/.claude/commands/review-task.zh-CN.md +1 -1
  153. package/templates/.claude/commands/sync-issue.md +1 -1
  154. package/templates/.claude/commands/sync-issue.zh-CN.md +1 -1
  155. package/templates/.claude/commands/sync-pr.md +1 -1
  156. package/templates/.claude/commands/sync-pr.zh-CN.md +1 -1
  157. package/templates/.claude/commands/test-integration.md +2 -1
  158. package/templates/.claude/commands/test-integration.zh-CN.md +2 -1
  159. package/templates/.claude/commands/test.md +1 -1
  160. package/templates/.claude/commands/test.zh-CN.md +1 -1
  161. package/templates/.claude/commands/update-agent-infra.md +2 -1
  162. package/templates/.claude/commands/update-agent-infra.zh-CN.md +2 -1
  163. package/templates/.claude/commands/upgrade-dependency.md +2 -1
  164. package/templates/.claude/commands/upgrade-dependency.zh-CN.md +2 -1
  165. package/templates/.gemini/commands/_project_/analyze-task.toml +1 -1
  166. package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +1 -1
  167. package/templates/.gemini/commands/_project_/block-task.toml +1 -1
  168. package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +1 -1
  169. package/templates/.gemini/commands/_project_/check-task.toml +1 -1
  170. package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +1 -1
  171. package/templates/.gemini/commands/_project_/close-codescan.toml +1 -1
  172. package/templates/.gemini/commands/_project_/close-codescan.zh-CN.toml +1 -1
  173. package/templates/.gemini/commands/_project_/close-dependabot.toml +1 -1
  174. package/templates/.gemini/commands/_project_/close-dependabot.zh-CN.toml +1 -1
  175. package/templates/.gemini/commands/_project_/commit.toml +1 -1
  176. package/templates/.gemini/commands/_project_/commit.zh-CN.toml +1 -1
  177. package/templates/.gemini/commands/_project_/complete-task.toml +1 -1
  178. package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +1 -1
  179. package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +1 -1
  180. package/templates/.gemini/commands/_project_/create-pr.toml +1 -1
  181. package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +1 -1
  182. package/templates/.gemini/commands/_project_/create-release-note.toml +1 -1
  183. package/templates/.gemini/commands/_project_/create-release-note.zh-CN.toml +1 -1
  184. package/templates/.gemini/commands/_project_/create-task.toml +1 -1
  185. package/templates/.gemini/commands/_project_/create-task.zh-CN.toml +1 -1
  186. package/templates/.gemini/commands/_project_/implement-task.toml +1 -1
  187. package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +1 -1
  188. package/templates/.gemini/commands/_project_/import-codescan.zh-CN.toml +1 -1
  189. package/templates/.gemini/commands/_project_/import-dependabot.zh-CN.toml +1 -1
  190. package/templates/.gemini/commands/_project_/import-issue.toml +1 -1
  191. package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +1 -1
  192. package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +1 -1
  193. package/templates/.gemini/commands/_project_/init-milestones.toml +1 -1
  194. package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +1 -1
  195. package/templates/.gemini/commands/_project_/plan-task.toml +1 -1
  196. package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +1 -1
  197. package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +1 -1
  198. package/templates/.gemini/commands/_project_/refine-title.toml +1 -1
  199. package/templates/.gemini/commands/_project_/refine-title.zh-CN.toml +1 -1
  200. package/templates/.gemini/commands/_project_/release.toml +1 -1
  201. package/templates/.gemini/commands/_project_/release.zh-CN.toml +1 -1
  202. package/templates/.gemini/commands/_project_/review-task.toml +1 -1
  203. package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +1 -1
  204. package/templates/.gemini/commands/_project_/sync-issue.toml +1 -1
  205. package/templates/.gemini/commands/_project_/sync-issue.zh-CN.toml +1 -1
  206. package/templates/.gemini/commands/_project_/sync-pr.toml +1 -1
  207. package/templates/.gemini/commands/_project_/sync-pr.zh-CN.toml +1 -1
  208. package/templates/.gemini/commands/_project_/test-integration.toml +1 -1
  209. package/templates/.gemini/commands/_project_/test-integration.zh-CN.toml +1 -1
  210. package/templates/.gemini/commands/_project_/test.toml +1 -1
  211. package/templates/.gemini/commands/_project_/test.zh-CN.toml +1 -1
  212. package/templates/.gemini/commands/_project_/update-agent-infra.toml +1 -1
  213. package/templates/.gemini/commands/_project_/update-agent-infra.zh-CN.toml +1 -1
  214. package/templates/.gemini/commands/_project_/upgrade-dependency.toml +1 -1
  215. package/templates/.gemini/commands/_project_/upgrade-dependency.zh-CN.toml +1 -1
  216. package/templates/.github/hooks/check-version-format.sh +29 -0
  217. package/templates/.github/hooks/pre-commit +8 -0
  218. package/templates/.opencode/commands/analyze-task.md +1 -1
  219. package/templates/.opencode/commands/analyze-task.zh-CN.md +1 -1
  220. package/templates/.opencode/commands/block-task.md +1 -1
  221. package/templates/.opencode/commands/block-task.zh-CN.md +1 -1
  222. package/templates/.opencode/commands/check-task.md +1 -1
  223. package/templates/.opencode/commands/check-task.zh-CN.md +1 -1
  224. package/templates/.opencode/commands/close-codescan.md +1 -1
  225. package/templates/.opencode/commands/close-codescan.zh-CN.md +1 -1
  226. package/templates/.opencode/commands/close-dependabot.md +1 -1
  227. package/templates/.opencode/commands/close-dependabot.zh-CN.md +1 -1
  228. package/templates/.opencode/commands/commit.md +1 -1
  229. package/templates/.opencode/commands/commit.zh-CN.md +1 -1
  230. package/templates/.opencode/commands/complete-task.md +1 -1
  231. package/templates/.opencode/commands/complete-task.zh-CN.md +1 -1
  232. package/templates/.opencode/commands/create-issue.zh-CN.md +1 -1
  233. package/templates/.opencode/commands/create-pr.md +1 -1
  234. package/templates/.opencode/commands/create-pr.zh-CN.md +1 -1
  235. package/templates/.opencode/commands/create-release-note.md +1 -1
  236. package/templates/.opencode/commands/create-release-note.zh-CN.md +1 -1
  237. package/templates/.opencode/commands/create-task.md +1 -1
  238. package/templates/.opencode/commands/create-task.zh-CN.md +1 -1
  239. package/templates/.opencode/commands/implement-task.md +1 -1
  240. package/templates/.opencode/commands/implement-task.zh-CN.md +1 -1
  241. package/templates/.opencode/commands/import-codescan.zh-CN.md +1 -1
  242. package/templates/.opencode/commands/import-dependabot.zh-CN.md +1 -1
  243. package/templates/.opencode/commands/import-issue.md +1 -1
  244. package/templates/.opencode/commands/import-issue.zh-CN.md +1 -1
  245. package/templates/.opencode/commands/init-labels.zh-CN.md +1 -1
  246. package/templates/.opencode/commands/init-milestones.md +1 -1
  247. package/templates/.opencode/commands/init-milestones.zh-CN.md +1 -1
  248. package/templates/.opencode/commands/plan-task.md +1 -1
  249. package/templates/.opencode/commands/plan-task.zh-CN.md +1 -1
  250. package/templates/.opencode/commands/refine-task.zh-CN.md +1 -1
  251. package/templates/.opencode/commands/refine-title.md +1 -1
  252. package/templates/.opencode/commands/refine-title.zh-CN.md +1 -1
  253. package/templates/.opencode/commands/release.md +1 -1
  254. package/templates/.opencode/commands/release.zh-CN.md +1 -1
  255. package/templates/.opencode/commands/review-task.md +1 -1
  256. package/templates/.opencode/commands/review-task.zh-CN.md +1 -1
  257. package/templates/.opencode/commands/sync-issue.md +1 -1
  258. package/templates/.opencode/commands/sync-issue.zh-CN.md +1 -1
  259. package/templates/.opencode/commands/sync-pr.md +1 -1
  260. package/templates/.opencode/commands/sync-pr.zh-CN.md +1 -1
  261. package/templates/.opencode/commands/test-integration.md +1 -1
  262. package/templates/.opencode/commands/test-integration.zh-CN.md +1 -1
  263. package/templates/.opencode/commands/test.md +1 -1
  264. package/templates/.opencode/commands/test.zh-CN.md +1 -1
  265. package/templates/.opencode/commands/update-agent-infra.md +1 -1
  266. package/templates/.opencode/commands/update-agent-infra.zh-CN.md +1 -1
  267. package/templates/.opencode/commands/upgrade-dependency.md +1 -1
  268. package/templates/.opencode/commands/upgrade-dependency.zh-CN.md +1 -1
  269. package/templates/AGENTS.md +10 -2
  270. package/templates/AGENTS.zh-CN.md +10 -2
@@ -1,92 +1,52 @@
1
1
  ---
2
2
  name: refine-task
3
- description: >
4
- 处理代码审查反馈并修复审查中发现的问题。按优先级(Blocker -> Major -> Minor)修复。
5
- 仅处理审查中标记的问题,不添加额外变更。当用户要求修复审查问题时触发。参数:task-id。
3
+ description: "处理代码审查反馈并修复问题"
6
4
  ---
7
5
 
8
6
  # 修复审查问题
9
7
 
8
+ 修复审查发现的问题,并产出 `refinement.md` 或 `refinement-r{N}.md`。
9
+
10
10
  ## 行为边界 / 关键规则
11
11
 
12
- - 仅修复审查中标记的问题 —— 不要添加无关变更或额外的"改进"
13
- - 不要自动提交。绝不自动执行 `git commit` 或 `git add`
14
- - 执行本技能后,你**必须**立即更新 task.md 中的任务状态
12
+ - 只修复审查产物中记录的问题
13
+ - 绝不自动执行 `git add` 或 `git commit`
14
+ - 执行本技能后,你**必须**立即更新 task.md
15
15
 
16
16
  ## 执行步骤
17
17
 
18
18
  ### 1. 验证前置条件
19
19
 
20
- 检查必要文件:
21
- - `.agents/workspace/active/{task-id}/task.md` - 任务文件
20
+ 要求存在:
21
+ - `.agents/workspace/active/{task-id}/task.md`
22
22
  - 至少一个审查产物:`review.md` 或 `review-r{N}.md`
23
23
 
24
- 注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
25
-
26
- 如果缺少 `task.md` 或没有任何审查产物,提示用户先完成前置步骤。
27
-
28
- 随后执行以下发现与校验:
29
- 1. 扫描任务目录中的审查产物文件(`review.md`、`review-r{N}.md`)
30
- 2. 取最高轮次的审查产物作为本次修复输入,记为 `{review-artifact}`
31
- 3. 扫描修复产物文件(`refinement.md`、`refinement-r{N}.md`)并确定本轮修复产物:
32
- - 如果不存在 `refinement.md` 且不存在 `refinement-r*.md` → 本轮为第 1 轮,产出 `refinement.md`
33
- - 如果存在 `refinement.md` 且不存在 `refinement-r*.md` → 本轮为第 2 轮,产出 `refinement-r2.md`
34
- - 如果存在 `refinement-r{N}.md` → 本轮为第 N+1 轮,产出 `refinement-r{N+1}.md`
35
- - 记录 `{refinement-round}` 和 `{refinement-artifact}`
36
- 4. 扫描实现报告文件(`implementation.md`、`implementation-r{N}.md`),取最高轮次作为修复上下文的 `{implementation-artifact}`
37
- - 记录 `{implementation-artifact}`
38
- 5. **一致性校验**:检查 `task.md` 的 `## 活动日志` 中最近一条 Code Review 记录的轮次号和文件名,是否与步骤 2 扫描到的最新审查产物匹配
24
+ 在前置检查阶段必须记录 `{review-artifact}`、`{refinement-round}`、`{refinement-artifact}`,并从最新实现报告中记录 `{implementation-artifact}`。
39
25
 
40
- Activity Log 记录与实际文件不匹配,立即停止并提示:
26
+ 同时校验 Activity Log 中最近一条 Code Review 记录;如果引用了不存在的文件,立即停止并输出:
41
27
  `Review artifact mismatch: Activity Log references {expected} but file not found. Please verify the review artifact exists.`
42
28
 
43
29
  ### 2. 阅读审查与实现上下文
44
30
 
45
- 仔细阅读步骤 1 中确定的最新审查产物 `{review-artifact}` 和实现产物 `{implementation-artifact}` 以理解:
46
- - 所有阻塞项(必须修复)
47
- - 所有主要问题(应该修复)
48
- - 次要问题(可选优化)
49
- - 审查者的建议和推荐
50
- - 当前实现和之前修复的上下文
51
-
52
- ### 3. 规划修复
53
-
54
- 分类并确定优先级:
55
- 1. **阻塞项优先**:必须解决所有阻塞项
56
- 2. **然后是主要问题**:处理所有主要问题
57
- 3. **最后是次要问题**:如有时间则处理(可选)
31
+ 在修改代码前先读取最新的 `{review-artifact}` `{implementation-artifact}`。
58
32
 
59
- 对于每个问题,确定:
60
- - 需要修改哪些文件
61
- - 具体要做哪些修改
62
- - 如何验证修复
33
+ ### 3. 规划并执行修复
63
34
 
64
- ### 4. 执行代码修复
35
+ Blocker -> Major -> Minor 的顺序处理,始终保持改动聚焦。
65
36
 
66
- 按优先级顺序修复问题:
37
+ > 详细修复流程、优先级和验证循环见 `reference/fix-workflow.md`。执行此步骤前先读取 `reference/fix-workflow.md`。
67
38
 
68
- **对于每个修复**:
69
- 1. 读取受影响的文件
70
- 2. 应用修复
71
- 3. 验证修复是否解决了审查意见
72
- 4. 运行相关测试
39
+ ### 4. 运行测试验证
73
40
 
74
- **修复原则**:
75
- - 仅修复标记的问题 —— 不要添加无关变更
76
- - 不要添加超出要求的额外"改进"
77
- - 保持变更最小化和聚焦
41
+ 修复后运行项目测试命令,并把修复范围限制在审查结论内。
78
42
 
79
- ### 5. 运行测试验证
80
-
81
- 执行项目的测试命令。参考 `test` 技能获取项目特定的测试命令。
82
-
83
- 确保修复后所有测试仍然通过。
84
-
85
- ### 6. 创建修复报告
43
+ ### 5. 编写修复报告
86
44
 
87
45
  创建 `.agents/workspace/active/{task-id}/{refinement-artifact}`。
88
46
 
89
- ### 7. 更新任务状态
47
+ > 报告结构和示例章节见 `reference/report-template.md`。写报告前先读取 `reference/report-template.md`。
48
+
49
+ ### 6. 更新任务状态
90
50
 
91
51
  获取当前时间:
92
52
 
@@ -94,115 +54,33 @@ description: >
94
54
  date "+%Y-%m-%d %H:%M:%S"
95
55
  ```
96
56
 
97
- 更新 `.agents/workspace/active/{task-id}/task.md`:
98
- - `current_step`:refinement
99
- - `assigned_to`:{当前 AI 代理}
100
- - `updated_at`:{当前时间}
101
- - 记录本轮修复产物:`{refinement-artifact}`(Round `{refinement-round}`)
102
- - **追加**到 `## Activity Log`(不要覆盖之前的记录):
103
- ```
104
- - {yyyy-MM-dd HH:mm:ss} — **Refinement (Round {N}, for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues → {refinement-artifact}
105
- ```
106
-
107
- ### 8. 告知用户
108
-
109
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
110
-
111
- > **⚠️ 条件判断 — 在展示下面两个下一步之前,你必须先判断修复结果:**
112
- >
113
- > - 如果本轮修复了任何 `Blocker` 或 `Major` 问题,或改动影响核心逻辑/测试范围较广,**默认推荐**先执行「重新审查」
114
- > - 如果仅修复 `Minor` 问题,且变更范围很小、风险可控,才可以把「直接提交」作为可选项
115
- > - 如果仍有未修复的 `Blocker` 或 `Major`,**不要**暗示可以直接提交;应明确提示继续修复或重新审查
116
- >
117
- > **禁止把「直接提交」写成默认路径,除非你确认没有剩余高风险问题。**
118
-
119
- 输出格式:
120
- ```
121
- 任务 {task-id} 修复完成。
122
-
123
- 修复情况:
124
- - 阻塞项修复:{数量}/{总数}
125
- - 主要问题修复:{数量}/{总数}
126
- - 次要问题修复:{数量}/{总数}
127
- - 所有测试通过:{是/否}
128
- - 审查输入:{review-artifact}
129
- - 修复产物:{refinement-artifact}
130
-
131
- 下一步 - 重新审查或提交:
132
- - 重新审查(默认推荐;修复了 Blocker/Major 时优先):
133
- - Claude Code / OpenCode:/review-task {task-id}
134
- - Gemini CLI:/agent-infra:review-task {task-id}
135
- - Codex CLI:$review-task {task-id}
136
- - 直接提交(仅限只修复 Minor 且风险可控):
137
- - Claude Code / OpenCode:/commit
138
- - Gemini CLI:/agent-infra:commit
139
- - Codex CLI:$commit
140
- ```
141
-
142
- ## 输出模板
143
-
144
- ```markdown
145
- # 修复报告
146
-
147
- - **修复轮次**:Round {refinement-round}
148
- - **产物文件**:`{refinement-artifact}`
149
- - **审查输入**:`{review-artifact}`
150
- - **实现上下文**:`{implementation-artifact}`
151
-
152
- ### 审查反馈处理
57
+ 更新 task.md,并追加:
58
+ `- {yyyy-MM-dd HH:mm:ss} — **Refinement (Round {N}, for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues → {refinement-artifact}`
153
59
 
154
- #### 阻塞项修复
155
- 1. **{问题标题}**(来自 {review-artifact})
156
- - **修复**:{做了什么修改}
157
- - **文件**:`{file-path}:{line-number}`
158
- - **验证**:{如何验证}
60
+ ### 7. 告知用户
159
61
 
160
- #### 主要问题修复
161
- 1. **{问题标题}**(来自 {review-artifact})
162
- - **修复**:{做了什么修改}
163
- - **文件**:`{file-path}:{line-number}`
164
-
165
- #### 次要问题处理
166
- 1. **{问题标题}**(来自 {review-artifact})
167
- - **修复**:{做了什么修改}
168
-
169
- #### 未处理的问题
170
- - {问题}:{未处理的原因,例如不同意审查建议}
171
-
172
- ### 修复后的测试结果
173
- - 所有测试通过:{是/否}
174
- - 测试输出:{摘要}
175
- ```
62
+ 如果本轮修复了 Blocker 或 Major,默认推荐重新审查。只有在风险确实很低且只修复 Minor 时,才可把直接提交作为备选项。
176
63
 
177
64
  ## 完成检查清单
178
65
 
179
- - [ ] 阅读并理解了所有审查发现
180
- - [ ] 修复了所有阻塞项
181
- - [ ] 修复了所有主要问题
182
- - [ ] 在适当情况下处理了次要问题
183
- - [ ] 修复后所有测试通过
184
- - [ ] 创建了 `{refinement-artifact}` 修复报告
185
- - [ ] 更新了 task.md 中的任务状态
186
- - [ ] 追加了 Activity Log 条目到 task.md
187
- - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,不要筛选)
66
+ - [ ] 已读取最新审查与实现上下文
67
+ - [ ] 已修复所有必需的 Blocker 和 Major 问题
68
+ - [ ] 已写出 `{refinement-artifact}`
69
+ - [ ] 已更新 task.md 并追加 Activity Log
70
+ - [ ] 已根据剩余风险推荐正确的下一步
188
71
 
189
72
  ## 注意事项
190
73
 
191
- 1. **前置条件**:必须有审查报告(`review.md` `review-r{N}.md` 存在)
192
- 2. **禁止自动提交**:不要自动执行 `git commit`。提醒用户手动提交
193
- 3. **范围纪律**:仅修复审查中标记的问题 —— 不添加额外变更
194
- 4. **不同意见**:如果不同意某个审查意见,在"未处理的问题"部分记录你的理由
195
- 5. **重新审查**:修复阻塞项后,建议重新运行 review-task 技能进行验证
196
- 6. **一致性要求**:最新审查产物、Activity Log 记录和修复报告标题必须引用同一轮次文件
197
- 7. **版本化规则**:首轮修复使用 `refinement.md`;后续轮次使用 `refinement-r{N}.md`
74
+ - 首轮修复使用 `refinement.md`,后续轮次使用 `refinement-r{N}.md`
75
+ - 若不同意审查意见,要在报告的未解决问题中记录理由
76
+ - 不要把范围扩展到审查项之外
198
77
 
199
78
  ## 停止
200
79
 
201
- 完成检查清单后,**立即停止**。等待用户审查修复结果并决定重新审查还是提交。
80
+ 完成检查清单后立即停止。
202
81
 
203
82
  ## 错误处理
204
83
 
205
- - 任务未找到:提示 "Task {task-id} not found"
206
- - 缺少审查报告:提示 "Review report not found, please run the review-task skill first"
207
- - 审查产物不一致:提示 "Review artifact mismatch: Activity Log references {expected} but file not found. Please verify the review artifact exists."
208
- - 修复后测试失败:输出测试错误,询问用户如何处理
84
+ - 任务未找到:`Task {task-id} not found`
85
+ - 缺少审查报告:`Review report not found, please run the review-task skill first`
86
+ - 审查产物不一致:`Review artifact mismatch: Activity Log references {expected} but file not found. Please verify the review artifact exists.`
@@ -0,0 +1,76 @@
1
+ # Fix Workflow
2
+
3
+ Read this file before changing code during refinement.
4
+
5
+ ## Plan the Fixes
6
+
7
+ Classify and prioritize work:
8
+ 1. **Blockers first**
9
+ 2. **Then major issues**
10
+ 3. **Finally minor issues**
11
+
12
+ For each finding, determine:
13
+ - which files must change
14
+ - what specific fix is required
15
+ - how the fix will be verified
16
+
17
+ Detailed priority rules:
18
+ - Blockers must all be fixed before anything else
19
+ - Major issues should all be fixed in the same pass unless a blocker prevents progress
20
+ - 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
22
+
23
+ ## Execute the Fixes
24
+
25
+ For each fix:
26
+ 1. read the affected files
27
+ 2. apply the smallest necessary change
28
+ 3. verify the change addresses the review feedback
29
+ 4. run the relevant tests
30
+
31
+ ## Run Test Verification
32
+
33
+ Run the project test command from the `test` skill and confirm that all required tests still pass.
34
+
35
+ ## Choose the Next-Step Branch
36
+
37
+ Decision rules:
38
+ 1. if this round fixed any `Blocker` or `Major`, recommend re-review by default
39
+ 2. only when this round fixed Minor issues only and the change is clearly low risk may direct commit be offered as an option
40
+ 3. if any `Blocker` or `Major` remains unresolved, do not suggest direct commit
41
+
42
+ Prohibition:
43
+ - never present direct commit as the only next step unless no high-risk issue remains
44
+
45
+ Required output template:
46
+
47
+ ```text
48
+ Task {task-id} refinement completed.
49
+
50
+ Refinement status:
51
+ - Blockers fixed: {fixed-blockers}/{total-blockers}
52
+ - Major issues fixed: {fixed-majors}/{total-majors}
53
+ - Minor issues fixed: {fixed-minors}/{total-minors}
54
+ - All tests passing: {yes/no}
55
+ - Review input: {review-artifact}
56
+ - Refinement artifact: {refinement-artifact}
57
+
58
+ Next step - re-review or commit:
59
+ - Re-review (recommended by default when Blocker/Major issues were fixed):
60
+ - Claude Code / OpenCode: /review-task {task-id}
61
+ - Gemini CLI: /agent-infra:review-task {task-id}
62
+ - Codex CLI: $review-task {task-id}
63
+ - Commit directly (Minor-only, low-risk changes only):
64
+ - Claude Code / OpenCode: /commit
65
+ - Gemini CLI: /agent-infra:commit
66
+ - Codex CLI: $commit
67
+ ```
68
+
69
+ ## Notes
70
+
71
+ 1. **Prerequisite**: a review artifact must exist (`review.md` or `review-r{N}.md`)
72
+ 2. **No auto-commit**: do not run `git commit`
73
+ 3. **Scope discipline**: only fix reviewed issues
74
+ 4. **Disagreement handling**: record any disagreement in the report
75
+ 5. **Re-review**: after fixing Blockers or Major issues, recommend `review-task`
76
+ 6. **Consistency**: the latest review artifact, Activity Log entry, and refinement report must reference the same round
@@ -0,0 +1,76 @@
1
+ # 修复工作流
2
+
3
+ 在修复阶段修改代码之前先读取本文件。
4
+
5
+ ## 规划修复
6
+
7
+ 按以下顺序分类并确定优先级:
8
+ 1. **先处理 Blocker**
9
+ 2. **再处理 Major**
10
+ 3. **最后处理 Minor**
11
+
12
+ 对每一个问题,都要明确:
13
+ - 哪些文件必须修改
14
+ - 具体需要怎样修复
15
+ - 如何验证修复已经生效
16
+
17
+ 详细优先级规则:
18
+ - 所有 Blocker 都必须最先修完
19
+ - 只要没有被 Blocker 阻塞,所有 Major 都应在同一轮一并修复
20
+ - 只有在 Blocker 和 Major 都解决后,Minor 才是可选项
21
+ - 如果你不同意某条审查意见,不要静默跳过,而是把分歧记录到 unresolved issues
22
+
23
+ ## 执行修复
24
+
25
+ 对每一项修复:
26
+ 1. 读取受影响文件
27
+ 2. 施加最小必要改动
28
+ 3. 验证改动确实解决了审查反馈
29
+ 4. 运行相关测试
30
+
31
+ ## 运行测试验证
32
+
33
+ 运行项目测试命令。项目测试命令以 `test` skill 为准,并确认所有必需测试仍然通过。
34
+
35
+ ## 选择下一步分支
36
+
37
+ 判断规则:
38
+ 1. 如果本轮修复了任何 `Blocker` 或 `Major`,默认推荐重新审查
39
+ 2. 只有当本轮只修复了 Minor,且改动明显低风险时,才可以把直接提交作为一个可选项
40
+ 3. 如果仍有任何 `Blocker` 或 `Major` 未解决,就不要建议直接提交
41
+
42
+ 禁止规则:
43
+ - 只要还存在高风险问题,绝对不要把直接提交写成唯一下一步
44
+
45
+ 必用输出模板:
46
+
47
+ ```text
48
+ 任务 {task-id} 修复完成。
49
+
50
+ 修复情况:
51
+ - 阻塞项修复:{数量}/{总数}
52
+ - 主要问题修复:{数量}/{总数}
53
+ - 次要问题修复:{数量}/{总数}
54
+ - 所有测试通过:{是/否}
55
+ - 审查输入:{review-artifact}
56
+ - 修复产物:{refinement-artifact}
57
+
58
+ 下一步 - 重新审查或提交:
59
+ - 重新审查(默认推荐;修复了 Blocker/Major 时优先):
60
+ - Claude Code / OpenCode:/review-task {task-id}
61
+ - Gemini CLI:/agent-infra:review-task {task-id}
62
+ - Codex CLI:$review-task {task-id}
63
+ - 直接提交(仅限只修复 Minor 且风险可控):
64
+ - Claude Code / OpenCode:/commit
65
+ - Gemini CLI:/agent-infra:commit
66
+ - Codex CLI:$commit
67
+ ```
68
+
69
+ ## 注意事项
70
+
71
+ 1. **前置条件**:必须存在审查产物(`review.md` 或 `review-r{N}.md`)
72
+ 2. **禁止自动提交**:不要执行 `git commit`
73
+ 3. **范围约束**:只修复审查中列出的问题
74
+ 4. **分歧处理**:如果不同意审查意见,要在报告里明确记录
75
+ 5. **重新审查**:修复了 Blocker 或 Major 后,推荐执行 `review-task`
76
+ 6. **一致性**:最新审查产物、Activity Log 记录和修复报告必须引用同一轮次
@@ -0,0 +1,38 @@
1
+ # Refinement Report Template
2
+
3
+ Use this structure when writing `refinement.md` or `refinement-r{N}.md`.
4
+
5
+ ## Output Template
6
+
7
+ ```markdown
8
+ # Refinement Report
9
+
10
+ - **Refinement Round**: Round {refinement-round}
11
+ - **Artifact File**: `{refinement-artifact}`
12
+ - **Review Input**: `{review-artifact}`
13
+ - **Implementation Context**: `{implementation-artifact}`
14
+
15
+ ### Review Feedback Handling
16
+
17
+ #### Blocker Fixes
18
+ 1. **{issue-title}**
19
+ - **Fix**: {what changed}
20
+ - **File**: `{file-path}:{line-number}`
21
+ - **Validation**: {validation}
22
+
23
+ #### Major Issue Fixes
24
+ 1. **{issue-title}**
25
+ - **Fix**: {what changed}
26
+ - **File**: `{file-path}:{line-number}`
27
+
28
+ #### Minor Issue Handling
29
+ 1. **{issue-title}**
30
+ - **Fix**: {what changed}
31
+
32
+ #### Unresolved Issues
33
+ - {issue}: {reason}
34
+
35
+ ### Test Results After Refinement
36
+ - All tests passing: {yes/no}
37
+ - Test output: {summary}
38
+ ```
@@ -0,0 +1,38 @@
1
+ # 修复报告模板
2
+
3
+ 编写 `refinement.md` 或 `refinement-r{N}.md` 时,使用以下结构。
4
+
5
+ ## 输出模板
6
+
7
+ ```markdown
8
+ # 修复报告
9
+
10
+ - **修复轮次**: Round {refinement-round}
11
+ - **产物文件**: `{refinement-artifact}`
12
+ - **审查输入**: `{review-artifact}`
13
+ - **实现上下文**: `{implementation-artifact}`
14
+
15
+ ### 审查反馈处理
16
+
17
+ #### 阻塞项修复
18
+ 1. **{issue-title}**
19
+ - **修复**: {what changed}
20
+ - **文件**: `{file-path}:{line-number}`
21
+ - **验证**: {validation}
22
+
23
+ #### 主要问题修复
24
+ 1. **{issue-title}**
25
+ - **修复**: {what changed}
26
+ - **文件**: `{file-path}:{line-number}`
27
+
28
+ #### 次要问题处理
29
+ 1. **{issue-title}**
30
+ - **修复**: {what changed}
31
+
32
+ #### 未解决问题
33
+ - {issue}: {reason}
34
+
35
+ ### 修复后的测试结果
36
+ - 所有测试通过: {yes/no}
37
+ - 测试输出: {summary}
38
+ ```
@@ -1,9 +1,6 @@
1
1
  ---
2
2
  name: refine-title
3
- description: >
4
- Deeply analyze Issue or PR content and reformat the title to
5
- Conventional Commits format. Triggered when the user requests
6
- title optimization. Argument: issue or PR number.
3
+ description: "Rewrite an Issue or PR title in Conventional Commits format"
7
4
  ---
8
5
 
9
6
  # Refine Title
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: refine-title
3
- description: >
4
- 深度分析 Issue 或 PR 内容,并将其标题重构为 Conventional Commits 格式。
5
- 当用户要求优化标题时触发。参数:issue 或 PR 编号。
3
+ description: "重构 Issue/PR 标题为 Conventional Commits 格式"
6
4
  ---
7
5
 
8
6
  # 重构标题
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: release
3
- description: >
4
- Execute the version release workflow. Triggered when the user
5
- requests a version release. Argument: version number (X.Y.Z).
3
+ description: "Run the version release workflow"
6
4
  ---
7
5
 
8
6
  # Version Release
@@ -13,7 +11,7 @@ Execute the version release workflow for the specified version.
13
11
 
14
12
  ## Execution Flow
15
13
 
16
- ### Step 1: Parse and Validate Version
14
+ ### 1. Parse and Validate Version
17
15
 
18
16
  Extract version from arguments. Must match `X.Y.Z` format.
19
17
 
@@ -23,7 +21,7 @@ Parse components:
23
21
 
24
22
  If format is invalid, error: "Version format incorrect, expected X.Y.Z (e.g. 1.2.3)"
25
23
 
26
- ### Step 2: Verify Clean Workspace
24
+ ### 2. Verify Clean Workspace
27
25
 
28
26
  ```bash
29
27
  git status --short
@@ -31,7 +29,7 @@ git status --short
31
29
 
32
30
  If there are uncommitted changes, error: "Workspace has uncommitted changes. Please commit or stash first."
33
31
 
34
- ### Step 3: Pre-release Verification
32
+ ### 3. Pre-release Verification
35
33
 
36
34
  <!-- TODO: Replace with your project's pre-release verification steps -->
37
35
 
@@ -50,7 +48,7 @@ Handling rules:
50
48
  - If the current branch is unexpected, print a warning or exit based on your policy
51
49
  - If any verification command fails, stop the release process and fix the issue first
52
50
 
53
- ### Step 4: Update Version References
51
+ ### 4. Update Version References
54
52
 
55
53
  <!-- TODO: Replace with your project's version update steps -->
56
54
 
@@ -76,7 +74,7 @@ Search for version references in project files and update them:
76
74
 
77
75
  If the project uses `package-lock.json`, run `npm install --package-lock-only` after updating `package.json` so the lockfile version stays in sync.
78
76
 
79
- ### Step 5: Rebuild Artifacts
77
+ ### 5. Rebuild Artifacts
80
78
 
81
79
  <!-- TODO: Replace with your project's artifact rebuild steps -->
82
80
 
@@ -91,20 +89,20 @@ Execution guidance:
91
89
  - If your project has no generated artifacts, document that explicitly in the project-specific skill
92
90
  - If the rebuild fails, stop the release process and fix the build first
93
91
 
94
- ### Step 6: Create Release Commit
92
+ ### 6. Create Release Commit
95
93
 
96
94
  ```bash
97
95
  git add -A
98
96
  git commit -m "chore: release v{version}"
99
97
  ```
100
98
 
101
- ### Step 7: Create Git Tag
99
+ ### 7. Create Git Tag
102
100
 
103
101
  ```bash
104
102
  git tag v{version}
105
103
  ```
106
104
 
107
- ### Step 8: Manage Milestones
105
+ ### 8. Manage Milestones
108
106
 
109
107
  Close the milestone for the released version when it exists, and create the missing planning milestones for the next cycle.
110
108
 
@@ -121,7 +119,7 @@ The script is responsible for:
121
119
  - When `PATCH=0`, also ensuring `{MAJOR}.{MINOR+1}.0` and `{MAJOR}.{MINOR+1}.x`
122
120
  - Printing a milestone summary with the released milestone action and new milestone count
123
121
 
124
- ### Step 9: Output Summary
122
+ ### 9. Output Summary
125
123
 
126
124
  > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
127
125
 
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: release
3
- description: >
4
- 执行版本发布流程。当用户要求发布版本时触发。参数:版本号(X.Y.Z)。
3
+ description: "执行版本发布流程"
5
4
  ---
6
5
 
7
6
  # 版本发布
@@ -12,7 +11,7 @@ description: >
12
11
 
13
12
  ## 执行流程
14
13
 
15
- ### 步骤 1:解析并验证版本号
14
+ ### 1. 解析并验证版本号
16
15
 
17
16
  从参数中提取版本。必须匹配 `X.Y.Z` 格式。
18
17
 
@@ -22,7 +21,7 @@ description: >
22
21
 
23
22
  如果格式无效,报错:"Version format incorrect, expected X.Y.Z (e.g. 1.2.3)"
24
23
 
25
- ### 步骤 2:验证工作区干净
24
+ ### 2. 验证工作区干净
26
25
 
27
26
  ```bash
28
27
  git status --short
@@ -30,7 +29,7 @@ git status --short
30
29
 
31
30
  如果有未提交的变更,报错:"Workspace has uncommitted changes. Please commit or stash first."
32
31
 
33
- ### 步骤 3:发布前验证
32
+ ### 3. 发布前验证
34
33
 
35
34
  <!-- TODO: 替换为你的项目发布前验证步骤 -->
36
35
 
@@ -49,7 +48,7 @@ git branch --show-current
49
48
  - 如果当前分支不符合预期,按项目策略输出警告或直接退出
50
49
  - 如果任何验证命令失败,停止发布流程并先修复问题
51
50
 
52
- ### 步骤 4:更新版本引用
51
+ ### 4. 更新版本引用
53
52
 
54
53
  <!-- TODO: 替换为你的项目版本更新步骤 -->
55
54
 
@@ -75,7 +74,7 @@ git branch --show-current
75
74
 
76
75
  如果项目使用 `package-lock.json`,在更新 `package.json` 后运行 `npm install --package-lock-only`,确保锁文件中的版本号保持同步。
77
76
 
78
- ### 步骤 5:重新生成构建产物
77
+ ### 5. 重新生成构建产物
79
78
 
80
79
  <!-- TODO: 替换为你的项目产物重建步骤 -->
81
80
 
@@ -90,20 +89,20 @@ git branch --show-current
90
89
  - 如果项目没有生成产物,请在项目特化版本中明确说明
91
90
  - 如果重建失败,停止发布流程并先修复构建问题
92
91
 
93
- ### 步骤 6:创建发布提交
92
+ ### 6. 创建发布提交
94
93
 
95
94
  ```bash
96
95
  git add -A
97
96
  git commit -m "chore: release v{version}"
98
97
  ```
99
98
 
100
- ### 步骤 7:创建 Git 标签
99
+ ### 7. 创建 Git 标签
101
100
 
102
101
  ```bash
103
102
  git tag v{version}
104
103
  ```
105
104
 
106
- ### 步骤 8:管理里程碑
105
+ ### 8. 管理里程碑
107
106
 
108
107
  为已发布版本关闭对应版本里程碑,并为下一轮创建缺失的规划里程碑。
109
108
 
@@ -120,7 +119,7 @@ bash .agents/skills/release/scripts/manage-milestones.sh "$MAJOR" "$MINOR" "$PAT
120
119
  - 当 `PATCH=0` 时,同时确保 `{MAJOR}.{MINOR+1}.0` 与 `{MAJOR}.{MINOR+1}.x`
121
120
  - 输出包含已发布里程碑动作和新建数量的汇总
122
121
 
123
- ### 步骤 9:输出摘要
122
+ ### 9. 输出摘要
124
123
 
125
124
  > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
126
125