@fitlab-ai/agent-infra 0.3.2 → 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 (302) hide show
  1. package/README.md +18 -35
  2. package/README.zh-CN.md +18 -35
  3. package/lib/defaults.json +5 -12
  4. package/lib/init.js +9 -25
  5. package/lib/paths.js +3 -42
  6. package/lib/update.js +43 -32
  7. package/package.json +2 -1
  8. package/templates/.agents/QUICKSTART.md +17 -7
  9. package/templates/.agents/QUICKSTART.zh-CN.md +17 -7
  10. package/templates/.agents/README.md +21 -14
  11. package/templates/.agents/README.zh-CN.md +21 -14
  12. package/templates/.agents/skills/analyze-task/SKILL.md +7 -10
  13. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +7 -9
  14. package/templates/.agents/skills/block-task/SKILL.md +9 -13
  15. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +9 -12
  16. package/templates/.agents/skills/check-task/SKILL.md +4 -8
  17. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +4 -6
  18. package/templates/.agents/skills/close-codescan/SKILL.md +1 -4
  19. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +1 -3
  20. package/templates/.agents/skills/close-dependabot/SKILL.md +1 -4
  21. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +1 -3
  22. package/templates/.agents/skills/commit/SKILL.md +26 -198
  23. package/templates/.agents/skills/commit/SKILL.zh-CN.md +26 -197
  24. package/templates/.agents/skills/commit/reference/commit-message.md +60 -0
  25. package/templates/.agents/skills/commit/reference/commit-message.zh-CN.md +60 -0
  26. package/templates/.agents/skills/commit/reference/copyright-check.md +39 -0
  27. package/templates/.agents/skills/commit/reference/copyright-check.zh-CN.md +39 -0
  28. package/templates/.agents/skills/commit/reference/task-status-update.md +88 -0
  29. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +88 -0
  30. package/templates/.agents/skills/complete-task/SKILL.md +8 -13
  31. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +8 -11
  32. package/templates/.agents/skills/create-issue/SKILL.md +32 -251
  33. package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +33 -252
  34. package/templates/.agents/skills/create-issue/reference/label-and-type.md +77 -0
  35. package/templates/.agents/skills/create-issue/reference/label-and-type.zh-CN.md +77 -0
  36. package/templates/.agents/skills/create-issue/reference/template-matching.md +45 -0
  37. package/templates/.agents/skills/create-issue/reference/template-matching.zh-CN.md +45 -0
  38. package/templates/.agents/skills/create-pr/SKILL.md +33 -224
  39. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +32 -222
  40. package/templates/.agents/skills/create-pr/reference/branch-strategy.md +29 -0
  41. package/templates/.agents/skills/create-pr/reference/branch-strategy.zh-CN.md +29 -0
  42. package/templates/.agents/skills/create-pr/reference/pr-body-template.md +86 -0
  43. package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +86 -0
  44. package/templates/.agents/skills/create-release-note/SKILL.md +10 -13
  45. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +10 -12
  46. package/templates/.agents/skills/create-task/SKILL.md +5 -8
  47. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +5 -7
  48. package/templates/.agents/skills/implement-task/SKILL.md +48 -178
  49. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +44 -172
  50. package/templates/.agents/skills/implement-task/reference/implementation-rules.md +58 -0
  51. package/templates/.agents/skills/implement-task/reference/implementation-rules.zh-CN.md +58 -0
  52. package/templates/.agents/skills/implement-task/reference/report-template.md +63 -0
  53. package/templates/.agents/skills/implement-task/reference/report-template.zh-CN.md +63 -0
  54. package/templates/.agents/skills/import-codescan/SKILL.md +2 -5
  55. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +2 -4
  56. package/templates/.agents/skills/import-dependabot/SKILL.md +4 -7
  57. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +4 -6
  58. package/templates/.agents/skills/import-issue/SKILL.md +6 -8
  59. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +6 -8
  60. package/templates/.agents/skills/init-labels/SKILL.md +1 -4
  61. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +1 -4
  62. package/templates/.agents/skills/init-milestones/SKILL.md +1 -3
  63. package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +1 -3
  64. package/templates/.agents/skills/plan-task/SKILL.md +7 -11
  65. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +7 -9
  66. package/templates/.agents/skills/refine-task/SKILL.md +38 -162
  67. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +36 -158
  68. package/templates/.agents/skills/refine-task/reference/fix-workflow.md +76 -0
  69. package/templates/.agents/skills/refine-task/reference/fix-workflow.zh-CN.md +76 -0
  70. package/templates/.agents/skills/refine-task/reference/report-template.md +38 -0
  71. package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +38 -0
  72. package/templates/.agents/skills/refine-title/SKILL.md +1 -4
  73. package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +1 -3
  74. package/templates/.agents/skills/release/SKILL.md +58 -19
  75. package/templates/.agents/skills/release/SKILL.zh-CN.md +58 -18
  76. package/templates/.agents/skills/review-task/SKILL.md +37 -239
  77. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +37 -238
  78. package/templates/.agents/skills/review-task/reference/output-templates.md +72 -0
  79. package/templates/.agents/skills/review-task/reference/output-templates.zh-CN.md +72 -0
  80. package/templates/.agents/skills/review-task/reference/report-template.md +63 -0
  81. package/templates/.agents/skills/review-task/reference/report-template.zh-CN.md +63 -0
  82. package/templates/.agents/skills/review-task/reference/review-criteria.md +24 -0
  83. package/templates/.agents/skills/review-task/reference/review-criteria.zh-CN.md +24 -0
  84. package/templates/.agents/skills/sync-issue/SKILL.md +32 -490
  85. package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +33 -490
  86. package/templates/.agents/skills/sync-issue/reference/comment-publish.md +88 -0
  87. package/templates/.agents/skills/sync-issue/reference/comment-publish.zh-CN.md +88 -0
  88. package/templates/.agents/skills/sync-issue/reference/delivery-detection.md +42 -0
  89. package/templates/.agents/skills/sync-issue/reference/delivery-detection.zh-CN.md +42 -0
  90. package/templates/.agents/skills/sync-issue/reference/label-sync.md +63 -0
  91. package/templates/.agents/skills/sync-issue/reference/label-sync.zh-CN.md +63 -0
  92. package/templates/.agents/skills/sync-issue/reference/milestone-sync.md +37 -0
  93. package/templates/.agents/skills/sync-issue/reference/milestone-sync.zh-CN.md +37 -0
  94. package/templates/.agents/skills/sync-pr/SKILL.md +25 -287
  95. package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +29 -291
  96. package/templates/.agents/skills/sync-pr/reference/comment-publish.md +82 -0
  97. package/templates/.agents/skills/sync-pr/reference/comment-publish.zh-CN.md +82 -0
  98. package/templates/.agents/skills/sync-pr/reference/delivery-detection.md +54 -0
  99. package/templates/.agents/skills/sync-pr/reference/delivery-detection.zh-CN.md +54 -0
  100. package/templates/.agents/skills/test/SKILL.md +1 -3
  101. package/templates/.agents/skills/test/SKILL.zh-CN.md +1 -3
  102. package/templates/.agents/skills/test-integration/SKILL.md +1 -4
  103. package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +1 -3
  104. package/templates/.agents/skills/update-agent-infra/SKILL.md +7 -11
  105. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +7 -9
  106. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +59 -118
  107. package/templates/.agents/skills/upgrade-dependency/SKILL.md +1 -4
  108. package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +1 -3
  109. package/templates/.agents/templates/handoff.md +1 -1
  110. package/templates/.agents/templates/handoff.zh-CN.md +1 -1
  111. package/templates/.agents/workflows/bug-fix.yaml +71 -71
  112. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +1 -1
  113. package/templates/.agents/workflows/feature-development.yaml +71 -71
  114. package/templates/.agents/workflows/feature-development.zh-CN.yaml +1 -1
  115. package/templates/.agents/workflows/refactoring.yaml +76 -76
  116. package/templates/.agents/workflows/refactoring.zh-CN.yaml +1 -1
  117. package/templates/{.agent-workspace → .agents/workspace}/README.md +1 -1
  118. package/templates/{.agent-workspace → .agents/workspace}/README.zh-CN.md +1 -1
  119. package/templates/.claude/CLAUDE.md +14 -52
  120. package/templates/.claude/CLAUDE.zh-CN.md +14 -52
  121. package/templates/.claude/commands/analyze-task.md +1 -1
  122. package/templates/.claude/commands/analyze-task.zh-CN.md +1 -1
  123. package/templates/.claude/commands/block-task.md +2 -1
  124. package/templates/.claude/commands/block-task.zh-CN.md +2 -1
  125. package/templates/.claude/commands/check-task.md +2 -1
  126. package/templates/.claude/commands/check-task.zh-CN.md +2 -1
  127. package/templates/.claude/commands/close-codescan.md +2 -1
  128. package/templates/.claude/commands/close-codescan.zh-CN.md +2 -1
  129. package/templates/.claude/commands/close-dependabot.md +2 -1
  130. package/templates/.claude/commands/close-dependabot.zh-CN.md +2 -1
  131. package/templates/.claude/commands/commit.md +1 -1
  132. package/templates/.claude/commands/commit.zh-CN.md +1 -1
  133. package/templates/.claude/commands/complete-task.md +1 -1
  134. package/templates/.claude/commands/complete-task.zh-CN.md +1 -1
  135. package/templates/.claude/commands/create-issue.md +1 -1
  136. package/templates/.claude/commands/create-issue.zh-CN.md +1 -1
  137. package/templates/.claude/commands/create-pr.md +1 -1
  138. package/templates/.claude/commands/create-pr.zh-CN.md +1 -1
  139. package/templates/.claude/commands/create-release-note.md +2 -1
  140. package/templates/.claude/commands/create-release-note.zh-CN.md +2 -1
  141. package/templates/.claude/commands/create-task.md +1 -1
  142. package/templates/.claude/commands/create-task.zh-CN.md +1 -1
  143. package/templates/.claude/commands/implement-task.md +1 -1
  144. package/templates/.claude/commands/implement-task.zh-CN.md +1 -1
  145. package/templates/.claude/commands/import-codescan.md +1 -0
  146. package/templates/.claude/commands/import-codescan.zh-CN.md +2 -1
  147. package/templates/.claude/commands/import-dependabot.md +1 -0
  148. package/templates/.claude/commands/import-dependabot.zh-CN.md +2 -1
  149. package/templates/.claude/commands/import-issue.md +1 -1
  150. package/templates/.claude/commands/import-issue.zh-CN.md +1 -1
  151. package/templates/.claude/commands/init-labels.md +1 -0
  152. package/templates/.claude/commands/init-labels.zh-CN.md +2 -1
  153. package/templates/.claude/commands/init-milestones.md +2 -1
  154. package/templates/.claude/commands/init-milestones.zh-CN.md +2 -1
  155. package/templates/.claude/commands/plan-task.md +1 -1
  156. package/templates/.claude/commands/plan-task.zh-CN.md +1 -1
  157. package/templates/.claude/commands/refine-task.zh-CN.md +1 -1
  158. package/templates/.claude/commands/refine-title.md +2 -1
  159. package/templates/.claude/commands/refine-title.zh-CN.md +2 -1
  160. package/templates/.claude/commands/release.md +2 -1
  161. package/templates/.claude/commands/release.zh-CN.md +2 -1
  162. package/templates/.claude/commands/review-task.md +1 -1
  163. package/templates/.claude/commands/review-task.zh-CN.md +1 -1
  164. package/templates/.claude/commands/sync-issue.md +1 -1
  165. package/templates/.claude/commands/sync-issue.zh-CN.md +1 -1
  166. package/templates/.claude/commands/sync-pr.md +1 -1
  167. package/templates/.claude/commands/sync-pr.zh-CN.md +1 -1
  168. package/templates/.claude/commands/test-integration.md +2 -1
  169. package/templates/.claude/commands/test-integration.zh-CN.md +2 -1
  170. package/templates/.claude/commands/test.md +1 -1
  171. package/templates/.claude/commands/test.zh-CN.md +1 -1
  172. package/templates/.claude/commands/update-agent-infra.md +2 -1
  173. package/templates/.claude/commands/update-agent-infra.zh-CN.md +2 -1
  174. package/templates/.claude/commands/upgrade-dependency.md +2 -1
  175. package/templates/.claude/commands/upgrade-dependency.zh-CN.md +2 -1
  176. package/templates/.claude/hooks/check-version-format.sh +44 -0
  177. package/templates/.claude/settings.json +14 -0
  178. package/templates/.gemini/commands/_project_/analyze-task.toml +1 -1
  179. package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +1 -1
  180. package/templates/.gemini/commands/_project_/block-task.toml +1 -1
  181. package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +1 -1
  182. package/templates/.gemini/commands/_project_/check-task.toml +1 -1
  183. package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +1 -1
  184. package/templates/.gemini/commands/_project_/close-codescan.toml +1 -1
  185. package/templates/.gemini/commands/_project_/close-codescan.zh-CN.toml +1 -1
  186. package/templates/.gemini/commands/_project_/close-dependabot.toml +1 -1
  187. package/templates/.gemini/commands/_project_/close-dependabot.zh-CN.toml +1 -1
  188. package/templates/.gemini/commands/_project_/commit.toml +1 -1
  189. package/templates/.gemini/commands/_project_/commit.zh-CN.toml +1 -1
  190. package/templates/.gemini/commands/_project_/complete-task.toml +1 -1
  191. package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +1 -1
  192. package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +1 -1
  193. package/templates/.gemini/commands/_project_/create-pr.toml +1 -1
  194. package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +1 -1
  195. package/templates/.gemini/commands/_project_/create-release-note.toml +1 -1
  196. package/templates/.gemini/commands/_project_/create-release-note.zh-CN.toml +1 -1
  197. package/templates/.gemini/commands/_project_/create-task.toml +1 -1
  198. package/templates/.gemini/commands/_project_/create-task.zh-CN.toml +1 -1
  199. package/templates/.gemini/commands/_project_/implement-task.toml +1 -1
  200. package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +1 -1
  201. package/templates/.gemini/commands/_project_/import-codescan.zh-CN.toml +1 -1
  202. package/templates/.gemini/commands/_project_/import-dependabot.zh-CN.toml +1 -1
  203. package/templates/.gemini/commands/_project_/import-issue.toml +1 -1
  204. package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +1 -1
  205. package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +1 -1
  206. package/templates/.gemini/commands/_project_/init-milestones.toml +1 -1
  207. package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +1 -1
  208. package/templates/.gemini/commands/_project_/plan-task.toml +1 -1
  209. package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +1 -1
  210. package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +1 -1
  211. package/templates/.gemini/commands/_project_/refine-title.toml +1 -1
  212. package/templates/.gemini/commands/_project_/refine-title.zh-CN.toml +1 -1
  213. package/templates/.gemini/commands/_project_/release.toml +1 -1
  214. package/templates/.gemini/commands/_project_/release.zh-CN.toml +1 -1
  215. package/templates/.gemini/commands/_project_/review-task.toml +1 -1
  216. package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +1 -1
  217. package/templates/.gemini/commands/_project_/sync-issue.toml +1 -1
  218. package/templates/.gemini/commands/_project_/sync-issue.zh-CN.toml +1 -1
  219. package/templates/.gemini/commands/_project_/sync-pr.toml +1 -1
  220. package/templates/.gemini/commands/_project_/sync-pr.zh-CN.toml +1 -1
  221. package/templates/.gemini/commands/_project_/test-integration.toml +1 -1
  222. package/templates/.gemini/commands/_project_/test-integration.zh-CN.toml +1 -1
  223. package/templates/.gemini/commands/_project_/test.toml +1 -1
  224. package/templates/.gemini/commands/_project_/test.zh-CN.toml +1 -1
  225. package/templates/.gemini/commands/_project_/update-agent-infra.toml +1 -1
  226. package/templates/.gemini/commands/_project_/update-agent-infra.zh-CN.toml +1 -1
  227. package/templates/.gemini/commands/_project_/upgrade-dependency.toml +1 -1
  228. package/templates/.gemini/commands/_project_/upgrade-dependency.zh-CN.toml +1 -1
  229. package/templates/.github/hooks/check-version-format.sh +29 -0
  230. package/templates/.github/hooks/pre-commit +8 -0
  231. package/templates/.opencode/COMMAND_STYLE_GUIDE.md +6 -6
  232. package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +6 -6
  233. package/templates/.opencode/commands/analyze-task.md +1 -1
  234. package/templates/.opencode/commands/analyze-task.zh-CN.md +1 -1
  235. package/templates/.opencode/commands/block-task.md +1 -1
  236. package/templates/.opencode/commands/block-task.zh-CN.md +1 -1
  237. package/templates/.opencode/commands/check-task.md +1 -1
  238. package/templates/.opencode/commands/check-task.zh-CN.md +1 -1
  239. package/templates/.opencode/commands/close-codescan.md +1 -1
  240. package/templates/.opencode/commands/close-codescan.zh-CN.md +1 -1
  241. package/templates/.opencode/commands/close-dependabot.md +1 -1
  242. package/templates/.opencode/commands/close-dependabot.zh-CN.md +1 -1
  243. package/templates/.opencode/commands/commit.md +1 -1
  244. package/templates/.opencode/commands/commit.zh-CN.md +1 -1
  245. package/templates/.opencode/commands/complete-task.md +1 -1
  246. package/templates/.opencode/commands/complete-task.zh-CN.md +1 -1
  247. package/templates/.opencode/commands/create-issue.zh-CN.md +1 -1
  248. package/templates/.opencode/commands/create-pr.md +1 -1
  249. package/templates/.opencode/commands/create-pr.zh-CN.md +1 -1
  250. package/templates/.opencode/commands/create-release-note.md +1 -1
  251. package/templates/.opencode/commands/create-release-note.zh-CN.md +1 -1
  252. package/templates/.opencode/commands/create-task.md +1 -1
  253. package/templates/.opencode/commands/create-task.zh-CN.md +1 -1
  254. package/templates/.opencode/commands/implement-task.md +1 -1
  255. package/templates/.opencode/commands/implement-task.zh-CN.md +1 -1
  256. package/templates/.opencode/commands/import-codescan.zh-CN.md +1 -1
  257. package/templates/.opencode/commands/import-dependabot.zh-CN.md +1 -1
  258. package/templates/.opencode/commands/import-issue.md +1 -1
  259. package/templates/.opencode/commands/import-issue.zh-CN.md +1 -1
  260. package/templates/.opencode/commands/init-labels.zh-CN.md +1 -1
  261. package/templates/.opencode/commands/init-milestones.md +1 -1
  262. package/templates/.opencode/commands/init-milestones.zh-CN.md +1 -1
  263. package/templates/.opencode/commands/plan-task.md +1 -1
  264. package/templates/.opencode/commands/plan-task.zh-CN.md +1 -1
  265. package/templates/.opencode/commands/refine-task.zh-CN.md +1 -1
  266. package/templates/.opencode/commands/refine-title.md +1 -1
  267. package/templates/.opencode/commands/refine-title.zh-CN.md +1 -1
  268. package/templates/.opencode/commands/release.md +1 -1
  269. package/templates/.opencode/commands/release.zh-CN.md +1 -1
  270. package/templates/.opencode/commands/review-task.md +1 -1
  271. package/templates/.opencode/commands/review-task.zh-CN.md +1 -1
  272. package/templates/.opencode/commands/sync-issue.md +1 -1
  273. package/templates/.opencode/commands/sync-issue.zh-CN.md +1 -1
  274. package/templates/.opencode/commands/sync-pr.md +1 -1
  275. package/templates/.opencode/commands/sync-pr.zh-CN.md +1 -1
  276. package/templates/.opencode/commands/test-integration.md +1 -1
  277. package/templates/.opencode/commands/test-integration.zh-CN.md +1 -1
  278. package/templates/.opencode/commands/test.md +1 -1
  279. package/templates/.opencode/commands/test.zh-CN.md +1 -1
  280. package/templates/.opencode/commands/update-agent-infra.md +1 -1
  281. package/templates/.opencode/commands/update-agent-infra.zh-CN.md +1 -1
  282. package/templates/.opencode/commands/upgrade-dependency.md +1 -1
  283. package/templates/.opencode/commands/upgrade-dependency.zh-CN.md +1 -1
  284. package/templates/AGENTS.md +11 -3
  285. package/templates/AGENTS.zh-CN.md +11 -3
  286. package/templates/.editorconfig +0 -15
  287. package/templates/.github/ISSUE_TEMPLATE/01_bug_report.yml +0 -149
  288. package/templates/.github/ISSUE_TEMPLATE/02_question.yml +0 -101
  289. package/templates/.github/ISSUE_TEMPLATE/03_feature_request.yml +0 -131
  290. package/templates/.github/ISSUE_TEMPLATE/04_documentation.yml +0 -165
  291. package/templates/.github/ISSUE_TEMPLATE/05_other.yml +0 -147
  292. package/templates/.github/ISSUE_TEMPLATE/config.yml +0 -11
  293. package/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -123
  294. package/templates/.github/dependabot.yml +0 -17
  295. package/templates/.github/hooks/check-utf8-encoding.sh +0 -25
  296. package/templates/.github/release.yml +0 -27
  297. package/templates/.github/workflows/pr-title-check.yml +0 -42
  298. package/templates/.mailmap +0 -4
  299. package/templates/CONTRIBUTING.md +0 -126
  300. package/templates/CONTRIBUTING.zh-CN.md +0 -124
  301. package/templates/SECURITY.md +0 -131
  302. package/templates/SECURITY.zh-CN.md +0 -131
@@ -1,201 +1,46 @@
1
1
  ---
2
2
  name: create-pr
3
- description: >
4
- 创建 Pull Request 到指定或自动推断的目标分支。
5
- 当用户要求创建 PR 时触发。可选参数:目标分支。
3
+ description: "创建 Pull Request 到目标分支"
6
4
  ---
7
5
 
8
6
  # 创建 Pull Request
9
7
 
10
- 创建 Pull Request。可选参数:目标分支。
8
+ 创建 Pull Request,并在与任务关联时立即补齐核心元数据。
11
9
 
12
10
  ## 执行流程
13
11
 
14
12
  ### 1. 确定目标分支
15
13
 
16
- - 如果用户提供了参数(例如 `main`、`develop`、`3.6.x`),使用其作为目标分支
17
- - 如果没有参数,自动检测:
18
- ```bash
19
- git branch --show-current
20
- git log --oneline --decorate --first-parent -20
21
- ```
22
- **检测规则**:
23
- - 当前在 main/trunk 分支 -> 目标是该分支
24
- - 当前在 feature 分支 -> 从日志装饰中找到最近的父分支
25
- - 无法确定 -> 询问用户
14
+ 如果用户显式提供参数就直接使用;否则根据 Git 历史和分支拓扑自动推断。
26
15
 
27
- ### 2. 读取 PR 模板
16
+ > 详细分支判断规则见 `reference/branch-strategy.md`。自动推断 base 分支前,先读取 `reference/branch-strategy.md`。
28
17
 
29
- 从仓库中读取 `.github/PULL_REQUEST_TEMPLATE.md`。
18
+ ### 2. 准备 PR 正文
30
19
 
31
- 如果模板不存在,使用标准格式。
20
+ 读取 `.github/PULL_REQUEST_TEMPLATE.md`(如存在),参考最近合并的 PR 风格,并收集 `<target-branch>` 到 `HEAD` 的全部提交。
32
21
 
33
- ### 3. 参考最近合并的 PR
22
+ > 模板处理、HEREDOC 正文生成和 `Generated with AI assistance` 要求见 `reference/pr-body-template.md`。编写正文前先读取 `reference/pr-body-template.md`。
34
23
 
35
- ```bash
36
- gh pr list --limit 3 --state merged --json number,title,body
37
- ```
38
-
39
- 以此作为风格和格式参考。
40
-
41
- ### 4. 分析当前分支变更
42
-
43
- ```bash
44
- git status
45
- git log <target-branch>..HEAD --oneline
46
- git diff <target-branch>...HEAD --stat
47
- git diff <target-branch>...HEAD
48
- ```
49
-
50
- 理解将包含在此 PR 中的所有提交和变更。查看**所有**提交,而不仅仅是最新的。
24
+ ### 3. 检查远程分支状态
51
25
 
52
- ### 5. 检查远程分支状态
26
+ 确认当前分支是否已有 upstream;必要时执行 `git push -u origin <current-branch>`。
53
27
 
54
- ```bash
55
- git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null
56
- ```
28
+ ### 4. 创建 PR
57
29
 
58
- ### 6. 如未推送则先推送
59
-
60
- ```bash
61
- git push -u origin <current-branch>
62
- ```
63
-
64
- ### 7. 创建 PR
65
-
66
- - 如果存在关联的活跃任务,从 task.md 提取 `issue_number`
67
- - 如果 `issue_number` 存在,查询 Issue 信息(容错,失败时跳过):
68
- ```bash
69
- gh issue view {issue-number} --json number,title --jq '.number' 2>/dev/null
70
- ```
71
- - 遵循 `.github/PULL_REQUEST_TEMPLATE.md` 格式填写所有部分
72
- - 参考最近合并的 PR 的风格
73
- - 使用 HEREDOC 格式传递 body
74
- - 如果 `issue_number` 存在:
75
- - 将模板中的 `{$IssueNumber}` 替换为实际 Issue 编号
76
- - 在 `Related Issue` 部分使用 `Closes #{issue_number}`
77
- - 如果 `issue_number` 不存在,保持原有行为
78
- - PR 必须以 `Generated with AI assistance` 结尾
79
-
80
- ```bash
81
- gh pr create --base <target-branch> --title "<title>" --assignee @me --body "$(cat <<'EOF'
82
- <按模板填写的完整 PR 描述>
83
-
84
- Generated with AI assistance
85
- EOF
86
- )"
87
- ```
30
+ 使用 `gh pr create --base <target-branch> --title "<title>" --assignee @me --body ...` 创建 PR。
88
31
 
89
- ### 8. 同步 PR 元数据(如果与任务相关)
32
+ 如果关联任务提供了 `issue_number`,必须在 PR 正文中保留 `Closes #{issue-number}`。
90
33
 
91
- 如果存在关联的活跃任务,在创建 PR 后立即同步以下元数据:
34
+ ### 5. 同步 PR 元数据
92
35
 
93
- **a) 检查 label 体系是否已初始化**
36
+ 对任务关联 PR,立即同步这些核心元数据:
37
+ - 执行 `gh label list --search "type:" --limit 1 --json name --jq 'length'`
38
+ - 使用 `gh pr edit {pr-number} --add-label "{type-label}"` 添加 type label
39
+ - 使用 `gh pr edit {pr-number} --add-label "in: {module}"` 添加相关 `in:` labels
40
+ - 使用 `gh pr edit {pr-number} --milestone "{milestone-title}"` 设置里程碑
41
+ - 通过 `Closes #{issue-number}` 保持 Development 关联
94
42
 
95
- 执行:
96
-
97
- ```bash
98
- gh label list --search "type:" --limit 1 --json name --jq 'length'
99
- ```
100
-
101
- - 返回 `0` -> 先执行 `init-labels` 技能,然后重新执行本步骤
102
- - 返回非 `0` -> 继续
103
-
104
- **b) 查询 Issue 元数据**
105
-
106
- 如果 task.md 包含 `issue_number`,查询 Issue 的 Labels 和 Milestone(容错):
107
-
108
- ```bash
109
- gh issue view {issue-number} --json labels,milestone 2>/dev/null
110
- ```
111
-
112
- 如果查询失败(Issue 不存在、权限不足等),跳过 Issue 元数据继承,后续步骤仅使用 task.md 静态映射。
113
-
114
- 记录查询结果供后续子步骤使用:
115
- - `{issue-labels}` — Issue 上的 Labels 列表
116
- - `{issue-milestone}` — Issue 上的 Milestone 标题(如有)
117
-
118
- **c) 同步 type label**
119
-
120
- 根据 task.md 的 `type` 字段按下表映射:
121
-
122
- | task.md type | GitHub label |
123
- |---|---|
124
- | bug、bugfix | `type: bug` |
125
- | feature | `type: feature` |
126
- | enhancement | `type: enhancement` |
127
- | refactor、refactoring | `type: enhancement` |
128
- | documentation | `type: documentation` |
129
- | dependency-upgrade | `type: dependency-upgrade` |
130
- | task | `type: task` |
131
- | 其他 | 跳过 |
132
-
133
- 如果 task.md 的 `type` 可以映射到标准 type label,执行:
134
-
135
- ```bash
136
- gh pr edit {pr-number} --add-label "{type-label}"
137
- ```
138
-
139
- **d) 继承 Issue Labels**
140
-
141
- 如果 `{issue-labels}` 非空,筛选出不以 `type:` 或 `status:` 开头的 labels,对每个 label 执行(容错,label 不存在时跳过):
142
-
143
- ```bash
144
- gh pr edit {pr-number} --add-label "{label-name}"
145
- ```
146
-
147
- 只添加,不移除 PR 上现有的 labels。
148
-
149
- **e) 同步 in: label**
150
-
151
- 从实现报告或分析报告提取受影响模块,确认对应 label 存在后执行:
152
-
153
- ```bash
154
- gh pr edit {pr-number} --add-label "in: {module}"
155
- ```
156
-
157
- 只添加,不移除现有的 `in:` labels。
158
-
159
- **f) 同步 Milestone**
160
-
161
- 基于 `sync-pr` 的里程碑推断策略,并扩展 Issue Milestone 优先级:
162
- - 先检查 PR 是否已有 milestone
163
- - 再检查 task.md 是否显式指定 `milestone`
164
- - 再检查 Issue 是否已有 milestone(使用 `{issue-milestone}`)
165
- - 否则基于当前分支、版本分支或最新 tag 推断
166
- - 最终回退到 `General Backlog`
167
-
168
- 找到目标后执行:
169
-
170
- ```bash
171
- gh pr edit {pr-number} --milestone "{milestone-title}"
172
- ```
173
-
174
- **g) 同步 Development 关联**
175
-
176
- 如果 task.md 包含 `issue_number`,读取 PR body:
177
-
178
- ```bash
179
- gh pr view {pr-number} --json body --jq '.body // ""'
180
- ```
181
-
182
- 如果 body 不包含以下任一关键词:
183
- - `Closes #{issue-number}`
184
- - `Fixes #{issue-number}`
185
- - `Resolves #{issue-number}`
186
-
187
- 则在末尾追加:
188
-
189
- ```bash
190
- gh pr edit {pr-number} --body "$(cat <<'EOF'
191
- {existing-body}
192
-
193
- Closes #{issue-number}
194
- EOF
195
- )"
196
- ```
197
-
198
- ### 9. 更新任务状态(如果与任务相关)
43
+ ### 6. 更新任务状态
199
44
 
200
45
  获取当前时间:
201
46
 
@@ -203,58 +48,23 @@ EOF
203
48
  date "+%Y-%m-%d %H:%M:%S"
204
49
  ```
205
50
 
206
- 如果有关联的活跃任务,更新 `.agent-workspace/active/{task-id}/task.md`:
207
- - `pr_number`:{pr-number}
208
- - `updated_at`:{当前时间}
209
- - **追加**到 `## Activity Log`(不要覆盖之前的记录):
210
- ```
211
- - {yyyy-MM-dd HH:mm:ss} — **PR Created** by {agent} — PR #{pr-number} created
212
- ```
213
-
214
- ### 10. 输出结果
215
-
216
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
51
+ 如果当前 PR 关联任务,更新 task.md 的 `pr_number`、`updated_at`,并追加 PR Created 的 Activity Log。
217
52
 
218
- > **⚠️ 下一步判断 — 你必须先判断创建 PR 后的真实下一步,再展示下面的命令:**
219
- >
220
- > - 如果 `task.md` 有有效 `issue_number`,且需要把 PR 状态或审查摘要同步回任务上下文,优先提示「发布审查摘要(可选)」
221
- > - 如果所有工作流步骤已经完成,或创建 PR 后下一步就是归档任务,提示「完成任务」
222
- > - 如果以上两者都适用,必须明确顺序:**先同步 PR 进度,再完成任务**
223
- >
224
- > **禁止把「完成任务」写成唯一下一步,如果仍需要同步进度或补充 PR 上下文。**
53
+ ### 7. 告知用户
225
54
 
226
- ```
227
- PR 已创建:{pr-url}
228
-
229
- 元数据同步:
230
- - Labels:{type-label-result}, {in-label-result}
231
- - Milestone:{milestone-result}
232
- - Development:{development-result}
233
-
234
- 下一步(如在任务工作流中):
235
- - 发布审查摘要(可选;有关联任务或需要同步 PR 状态时建议先执行):
236
- - Claude Code / OpenCode:/sync-pr {task-id}
237
- - Gemini CLI:/{{project}}:sync-pr {task-id}
238
- - Codex CLI:$sync-pr {task-id}
239
- - 完成任务(所有工作流步骤完成后执行):
240
- - Claude Code / OpenCode:/complete-task {task-id}
241
- - Gemini CLI:/{{project}}:complete-task {task-id}
242
- - Codex CLI:$complete-task {task-id}
243
- ```
55
+ 说明 PR URL、元数据同步结果,并按顺序给出两个后续动作:
56
+ - 可选执行 `sync-pr {task-id}`,发布面向 reviewer 的上下文摘要
57
+ - 当整个工作流真正完成后执行 `complete-task {task-id}`
244
58
 
245
59
  ## 注意事项
246
60
 
247
- 1. **遵循 PR 模板**:填写模板中所有必要部分
248
- 2. **参考风格**:匹配最近合并的 PR 的格式和风格
249
- 3. **标题格式**:遵循 Conventional Commits 或项目规范
250
- 4. **所有提交都重要**:分析分支中的**所有**提交,而不仅仅是最新的
251
- 5. **自动同步元数据**:如果与任务相关,create-pr 必须在创建后立即补齐 labels、milestone 和 development 关联
61
+ - 必须检查分支中的全部提交,而不是只看最后一个
62
+ - `create-pr` 不能把 type label 映射委托给 `sync-pr`,必须在本技能内内联处理
63
+ - 如果从 Issue 继承元数据失败,继续使用 task.md 和分支推断兜底
252
64
 
253
65
  ## 错误处理
254
66
 
255
- - 无提交可推送:提示 "No commits found between {target} and HEAD"
256
- - 推送被拒绝:建议先执行 `git pull --rebase`
257
- - PR 已存在:显示已有的 PR URL
258
- - Issue 不存在或无权限:跳过 Issue 元数据继承,记录 "Issue #{number} not accessible, skipping metadata inheritance"
259
- - Issue Label 不可用:跳过对应 label,记录 "Label '{name}' not found, skipping"
260
- - Issue Milestone 不可用:回退到分支推断策略
67
+ - `{target}` `HEAD` 之间没有可提交内容
68
+ - 推送被拒绝:建议执行 `git pull --rebase`
69
+ - 已存在 PR:直接输出当前 PR URL
70
+ - 无法访问 Issue 元数据:跳过继承并继续
@@ -0,0 +1,29 @@
1
+ # Branch Strategy
2
+
3
+ Read this file before inferring the base branch.
4
+
5
+ ## Determine Target Branch
6
+
7
+ - If the user provides an argument such as `main`, `develop`, or `3.6.x`, use it directly.
8
+ - If no argument is provided, inspect:
9
+
10
+ ```bash
11
+ git branch --show-current
12
+ git log --oneline --decorate --first-parent -20
13
+ ```
14
+
15
+ Decision rules:
16
+ - current branch is `main` or `trunk` -> use that branch
17
+ - current branch is a feature branch -> infer the nearest parent branch from log decorations
18
+ - cannot determine -> ask the user
19
+
20
+ Feature-branch parent inference details:
21
+ - inspect the nearest decorated ancestor in first-parent history
22
+ - prefer `{major}.{minor}.x` release lines over `main` / `master` when the feature branch was cut from a release line
23
+ - if both a release line and `main` seem plausible, choose the nearer ancestor in history
24
+ - if no reliable parent can be inferred, stop and ask the user instead of guessing
25
+
26
+ Next-step rule after PR creation:
27
+ - if `issue_number` exists and reviewer-facing context still needs publishing, recommend `sync-pr {task-id}` first
28
+ - if all workflow work is complete after PR creation, recommend `complete-task {task-id}` second
29
+ - never present `complete-task` as the only next step when PR context still needs syncing
@@ -0,0 +1,29 @@
1
+ # 分支策略
2
+
3
+ 在推断 base branch 之前先读取本文件。
4
+
5
+ ## 确定目标分支
6
+
7
+ - 如果用户显式提供了参数,例如 `main`、`develop` 或 `3.6.x`,直接使用它。
8
+ - 如果没有提供参数,检查:
9
+
10
+ ```bash
11
+ git branch --show-current
12
+ git log --oneline --decorate --first-parent -20
13
+ ```
14
+
15
+ 判断规则:
16
+ - 当前分支是 `main` 或 `trunk` -> 使用该分支
17
+ - 当前分支是 feature branch -> 从 log decoration 推断最近的父分支
18
+ - 无法可靠判断 -> 直接询问用户
19
+
20
+ Feature branch 父分支推断细则:
21
+ - 在 first-parent 历史中检查最近的已标记祖先
22
+ - 如果该 feature branch 是从 release line 切出的,优先选择 `{major}.{minor}.x`,而不是 `main` / `master`
23
+ - 如果 release line 和 `main` 看起来都合理,选择历史上更近的那个祖先
24
+ - 如果无法可靠推断父分支,不要猜测,直接停止并询问用户
25
+
26
+ 创建 PR 后的下一步规则:
27
+ - 如果存在 `issue_number`,且面向 reviewer 的上下文还未发布,优先推荐 `sync-pr {task-id}`
28
+ - 如果 PR 创建后工作流已经真正结束,再把 `complete-task {task-id}` 作为第二步推荐
29
+ - 当 PR 上下文仍需同步时,绝对不要把 `complete-task` 作为唯一下一步
@@ -0,0 +1,86 @@
1
+ # PR Body Template Rules
2
+
3
+ Read this file before generating the PR title and body.
4
+
5
+ ## Read the PR Template
6
+
7
+ Read `.github/PULL_REQUEST_TEMPLATE.md` from the repository. If it does not exist, use the standard format.
8
+
9
+ ## Review Recent Merged PRs for Reference
10
+
11
+ ```bash
12
+ gh pr list --limit 3 --state merged --json number,title,body
13
+ ```
14
+
15
+ Use the recent merged PRs as style and formatting references.
16
+
17
+ ## Analyze Current Branch Changes
18
+
19
+ ```bash
20
+ git status
21
+ git log <target-branch>..HEAD --oneline
22
+ git diff <target-branch>...HEAD --stat
23
+ git diff <target-branch>...HEAD
24
+ ```
25
+
26
+ ## Sync PR Metadata
27
+
28
+ Before syncing labels, verify the standard label system:
29
+
30
+ ```bash
31
+ gh label list --search "type:" --limit 1 --json name --jq 'length'
32
+ ```
33
+
34
+ If the result is `0`, run `init-labels` before retrying metadata sync.
35
+
36
+ Type label mapping:
37
+
38
+ | task.md type | GitHub label |
39
+ |---|---|
40
+ | `bug`, `bugfix` | `type: bug` |
41
+ | `feature` | `type: feature` |
42
+ | `enhancement` | `type: enhancement` |
43
+ | `refactor`, `refactoring` | `type: enhancement` |
44
+ | `documentation` | `type: documentation` |
45
+ | `dependency-upgrade` | `type: dependency-upgrade` |
46
+ | `task` | `type: task` |
47
+ | other values | skip |
48
+
49
+ Metadata sync order:
50
+ 1. query Issue labels and milestone best-effort with `gh issue view {issue-number} --json labels,milestone`
51
+ 2. add the mapped type label with `gh pr edit {pr-number} --add-label "{type-label}"`
52
+ 3. inherit non-`type:` and non-`status:` Issue labels with repeated `gh pr edit ... --add-label`
53
+ 4. add relevant `in: {module}` labels without removing existing ones
54
+ 5. resolve milestone in order: PR -> task.md -> Issue -> branch/tag inference -> `General Backlog`
55
+ 6. ensure the PR body contains `Closes #{issue-number}` or an equivalent closing keyword
56
+
57
+ ## Create the PR
58
+
59
+ - Extract `issue_number` from task.md when this work belongs to an active task
60
+ - If `issue_number` exists, query the Issue best-effort with `gh issue view {issue-number} --json number,title --jq '.number'`
61
+ - Use HEREDOC to pass the PR body
62
+ - Replace `{$IssueNumber}` in the template when present
63
+ - End the PR body with `Generated with AI assistance`
64
+
65
+ ```bash
66
+ gh pr create --base <target-branch> --title "<title>" --assignee @me --body "$(cat <<'EOF'
67
+ <Complete PR description following template>
68
+
69
+ Generated with AI assistance
70
+ EOF
71
+ )"
72
+ ```
73
+
74
+ Final user output should include both follow-up paths in order:
75
+
76
+ ```text
77
+ Next steps:
78
+ - optional reviewer summary sync:
79
+ - Claude Code / OpenCode: /sync-pr {task-id}
80
+ - Gemini CLI: /agent-infra:sync-pr {task-id}
81
+ - Codex CLI: $sync-pr {task-id}
82
+ - complete the task after the workflow truly finishes:
83
+ - Claude Code / OpenCode: /complete-task {task-id}
84
+ - Gemini CLI: /agent-infra:complete-task {task-id}
85
+ - Codex CLI: $complete-task {task-id}
86
+ ```
@@ -0,0 +1,86 @@
1
+ # PR 正文模板规则
2
+
3
+ 在生成 PR 标题和正文之前先读取本文件。
4
+
5
+ ## 读取 PR 模板
6
+
7
+ 读取仓库中的 `.github/PULL_REQUEST_TEMPLATE.md`。如果不存在,则使用标准格式。
8
+
9
+ ## 参考最近合并的 PR
10
+
11
+ ```bash
12
+ gh pr list --limit 3 --state merged --json number,title,body
13
+ ```
14
+
15
+ 把最近合并的 PR 当作风格和排版参考。
16
+
17
+ ## 分析当前分支变更
18
+
19
+ ```bash
20
+ git status
21
+ git log <target-branch>..HEAD --oneline
22
+ git diff <target-branch>...HEAD --stat
23
+ git diff <target-branch>...HEAD
24
+ ```
25
+
26
+ ## 同步 PR 元数据
27
+
28
+ 在同步 label 之前,先确认标准 label 体系已经存在:
29
+
30
+ ```bash
31
+ gh label list --search "type:" --limit 1 --json name --jq 'length'
32
+ ```
33
+
34
+ 如果结果是 `0`,先执行 `init-labels`,再重试元数据同步。
35
+
36
+ Type label 映射:
37
+
38
+ | task.md type | GitHub label |
39
+ |---|---|
40
+ | `bug`, `bugfix` | `type: bug` |
41
+ | `feature` | `type: feature` |
42
+ | `enhancement` | `type: enhancement` |
43
+ | `refactor`, `refactoring` | `type: enhancement` |
44
+ | `documentation` | `type: documentation` |
45
+ | `dependency-upgrade` | `type: dependency-upgrade` |
46
+ | `task` | `type: task` |
47
+ | 其他值 | 跳过 |
48
+
49
+ 元数据同步顺序:
50
+ 1. 用 `gh issue view {issue-number} --json labels,milestone` 尽力查询 Issue 的 labels 和 milestone
51
+ 2. 用 `gh pr edit {pr-number} --add-label "{type-label}"` 添加映射后的 type label
52
+ 3. 用重复的 `gh pr edit ... --add-label` 继承非 `type:`、非 `status:` 的 Issue labels
53
+ 4. 添加相关的 `in: {module}` label,但不要移除已有 label
54
+ 5. 按 `PR -> task.md -> Issue -> branch/tag inference -> General Backlog` 的顺序解析 milestone
55
+ 6. 确保 PR 正文包含 `Closes #{issue-number}` 或等价的 closing keyword
56
+
57
+ ## 创建 PR
58
+
59
+ - 当当前工作属于活动任务时,从 task.md 中提取 `issue_number`
60
+ - 如果存在 `issue_number`,用 `gh issue view {issue-number} --json number,title --jq '.number'` 尽力查询对应 Issue
61
+ - 使用 HEREDOC 传递 PR 正文
62
+ - 如果模板中存在 `{$IssueNumber}`,替换它
63
+ - PR 正文结尾必须带上 `Generated with AI assistance`
64
+
65
+ ```bash
66
+ gh pr create --base <target-branch> --title "<title>" --assignee @me --body "$(cat <<'EOF'
67
+ <Complete PR description following template>
68
+
69
+ Generated with AI assistance
70
+ EOF
71
+ )"
72
+ ```
73
+
74
+ 最终用户输出必须按顺序包含这两类后续动作:
75
+
76
+ ```text
77
+ 下一步:
78
+ - 可选:同步 reviewer 摘要:
79
+ - Claude Code / OpenCode: /sync-pr {task-id}
80
+ - Gemini CLI: /agent-infra:sync-pr {task-id}
81
+ - Codex CLI: $sync-pr {task-id}
82
+ - 工作流真正结束后完成任务:
83
+ - Claude Code / OpenCode: /complete-task {task-id}
84
+ - Gemini CLI: /agent-infra:complete-task {task-id}
85
+ - Codex CLI: $complete-task {task-id}
86
+ ```
@@ -1,9 +1,6 @@
1
1
  ---
2
2
  name: create-release-note
3
- description: >
4
- Generate release notes from PRs and commits between two versions.
5
- Triggered when the user requests release note generation.
6
- Arguments: version number, optional previous version.
3
+ description: "Generate release notes from PRs and commits"
7
4
  ---
8
5
 
9
6
  # Create Release Notes
@@ -12,13 +9,13 @@ Generate comprehensive release notes for a version based on merged PRs and commi
12
9
 
13
10
  ## Execution Flow
14
11
 
15
- ### Step 1: Parse Arguments
12
+ ### 1. Parse Arguments
16
13
 
17
14
  From arguments:
18
15
  - `<version>`: Current release version (required), format `X.Y.Z`
19
16
  - `<prev-version>`: Previous version (optional), auto-detected if not provided
20
17
 
21
- ### Step 2: Determine Version Range
18
+ ### 2. Determine Version Range
22
19
 
23
20
  **Current tag**: `v<version>`
24
21
 
@@ -34,7 +31,7 @@ git rev-parse v<version>
34
31
  git rev-parse v<prev-version>
35
32
  ```
36
33
 
37
- ### Step 3: Reference Historical Release Notes Format and Categories
34
+ ### 3. Reference Historical Release Notes Format and Categories
38
35
 
39
36
  Fetch multiple published release notes as format references, then use a predefined complete category list:
40
37
 
@@ -59,7 +56,7 @@ done
59
56
  - When generating release notes in Step 7, **must** follow both the historical format style and the full category list gathered in Step 3
60
57
  - If no historical release notes exist, use the default format defined in Step 7
61
58
 
62
- ### Step 4: Collect Merged PRs
59
+ ### 4. Collect Merged PRs
63
60
 
64
61
  Get the date range between tags, then query merged PRs:
65
62
 
@@ -79,7 +76,7 @@ Also collect direct commits without PRs:
79
76
  git log v<prev-version>..v<version> --format="%H %s" --no-merges
80
77
  ```
81
78
 
82
- ### Step 5: Collect Related Issues
79
+ ### 5. Collect Related Issues
83
80
 
84
81
  From each PR body, extract linked Issues:
85
82
  - Match patterns: `Closes #N`, `Fixes #N`, `Resolves #N` (case-insensitive)
@@ -88,7 +85,7 @@ From each PR body, extract linked Issues:
88
85
  gh issue view <N> --json number,title,labels,url
89
86
  ```
90
87
 
91
- ### Step 6: Classify Changes
88
+ ### 6. Classify Changes
92
89
 
93
90
  **By type** (from PR title conventional commit prefix):
94
91
  - `feat`, `perf`, `refactor`, dependency upgrades -> Enhancement
@@ -99,7 +96,7 @@ gh issue view <N> --json number,title,labels,url
99
96
  - Infer module from PR title brackets like `[module]` or conventional scope `feat(module):`
100
97
  - Fallback: analyze changed files
101
98
 
102
- ### Step 7: Generate Release Notes
99
+ ### 7. Generate Release Notes
103
100
 
104
101
  **Prioritize the historical format style obtained in Step 3 and ensure all categories listed in Step 3 are covered.** If historical release notes exist, strictly follow their section structure, heading style (including emojis), item format, and bilingual layout.
105
102
 
@@ -128,7 +125,7 @@ If no historical release notes exist, use the following default Markdown format:
128
125
  4. Contributors: Deduplicated, sorted by contribution count (descending)
129
126
  5. Empty sections: Omit sections with no entries
130
127
 
131
- ### Step 8: Present and Confirm
128
+ ### 8. Present and Confirm
132
129
 
133
130
  Show the generated release notes to the user.
134
131
 
@@ -136,7 +133,7 @@ Ask:
136
133
  1. Need any adjustments?
137
134
  2. Create a GitHub Draft Release?
138
135
 
139
- ### Step 9: Create Draft Release (If Confirmed)
136
+ ### 9. Create Draft Release (If Confirmed)
140
137
 
141
138
  ```bash
142
139
  gh release create v<version> \