@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
@@ -0,0 +1,39 @@
1
+ # 版权检查
2
+
3
+ 在修改任何版权头之前先读取本文件。
4
+
5
+ ## 更新版权头年份(关键)
6
+
7
+ ### 获取当前年份
8
+
9
+ ```bash
10
+ date +%Y
11
+ ```
12
+
13
+ ### 检查已修改文件
14
+
15
+ ```bash
16
+ git status --short
17
+ ```
18
+
19
+ ### 对每个已修改文件执行
20
+
21
+ 检查文件是否包含版权头:
22
+
23
+ ```bash
24
+ grep "Copyright.*[0-9]\{4\}" <modified_file>
25
+ ```
26
+
27
+ 如果存在版权头且年份已过期,必须使用当前年份更新。
28
+
29
+ 常见更新模式:
30
+ - `Copyright (C) 2024-2025` -> `Copyright (C) 2024-{CURRENT_YEAR}`
31
+ - `Copyright (C) 2024` -> `Copyright (C) 2024-{CURRENT_YEAR}`
32
+ - `Copyright (C) 2025` -> 如果文件已经使用当前年份,则更新为 `Copyright (C) {CURRENT_YEAR}`
33
+
34
+ ### 版权检查清单
35
+
36
+ - [ ] 使用 `date +%Y`
37
+ - [ ] 检查每一个已修改文件
38
+ - [ ] 只更新已修改文件
39
+ - [ ] 绝对不要硬编码当前年份
@@ -0,0 +1,88 @@
1
+ # Task Status Update
2
+
3
+ Read this file before choosing the post-commit task-state branch.
4
+
5
+ ## Update the Related Task State
6
+
7
+ Get the current time first:
8
+
9
+ ```bash
10
+ date "+%Y-%m-%d %H:%M:%S"
11
+ ```
12
+
13
+ For every task-related commit, append this Activity Log entry in `task.md`:
14
+
15
+ ```text
16
+ - {yyyy-MM-dd HH:mm:ss} — **Commit** by {agent} — {commit hash short} {commit subject}
17
+ ```
18
+
19
+ Before selecting the next step, verify:
20
+ - `current_step` and the latest workflow progress in `task.md`
21
+ - whether the latest `review.md` / `review-r{N}.md` passed without findings
22
+ - whether there are still pending fixes, review work, or PR creation steps
23
+
24
+ Choose exactly one case:
25
+
26
+ | Decision Basis | Required Case |
27
+ |---|---|
28
+ | all workflow steps completed + latest review approved with no findings + all tests passed | Case 1: final commit |
29
+ | unfinished steps, pending fixes, or waiting on others still exist | Case 2: more work remains |
30
+ | this commit prepares the task for code review | Case 3: ready for review |
31
+ | code is committed, review is done, and the next step is PR creation | Case 4: ready for PR |
32
+
33
+ Never apply more than one case. Match the single next-step branch first, then update the task.
34
+
35
+ ### Case 1: Final Commit
36
+
37
+ Prerequisites:
38
+ - [ ] all code committed
39
+ - [ ] all tests passed
40
+ - [ ] code review approved
41
+ - [ ] all workflow steps completed
42
+
43
+ Required next-step commands:
44
+
45
+ ```text
46
+ Next step - complete and archive the task:
47
+ - Claude Code / OpenCode: /complete-task {task-id}
48
+ - Gemini CLI: /agent-infra:complete-task {task-id}
49
+ - Codex CLI: $complete-task {task-id}
50
+ ```
51
+
52
+ ### Case 2: More Work Remains
53
+
54
+ If more work is still pending:
55
+ - update `updated_at` in `task.md`
56
+ - record what this commit finished
57
+ - record what the next human or agent action is
58
+
59
+ ### Case 3: Ready for Review
60
+
61
+ If this commit hands work over to code review:
62
+ - update `current_step` to `code-review`
63
+ - update `updated_at`
64
+ - mark implementation as finished in the workflow state
65
+
66
+ Required next-step commands:
67
+
68
+ ```text
69
+ Next step - code review:
70
+ - Claude Code / OpenCode: /review-task {task-id}
71
+ - Gemini CLI: /agent-infra:review-task {task-id}
72
+ - Codex CLI: $review-task {task-id}
73
+ ```
74
+
75
+ ### Case 4: Ready for PR
76
+
77
+ If the next step is Pull Request creation:
78
+ - update `updated_at`
79
+ - record the PR plan in `task.md`
80
+
81
+ Required next-step commands:
82
+
83
+ ```text
84
+ Next step - create Pull Request:
85
+ - Claude Code / OpenCode: /create-pr
86
+ - Gemini CLI: /agent-infra:create-pr
87
+ - Codex CLI: $create-pr
88
+ ```
@@ -0,0 +1,88 @@
1
+ # 任务状态更新
2
+
3
+ 在选择提交后的任务状态分支之前先读取本文件。
4
+
5
+ ## 更新关联任务状态
6
+
7
+ 先获取当前时间:
8
+
9
+ ```bash
10
+ date "+%Y-%m-%d %H:%M:%S"
11
+ ```
12
+
13
+ 对于每一次与任务相关的提交,都要在 `task.md` 中追加以下 Activity Log:
14
+
15
+ ```text
16
+ - {yyyy-MM-dd HH:mm:ss} — **Commit** by {agent} — {commit hash short} {commit subject}
17
+ ```
18
+
19
+ 在决定下一步之前,先确认:
20
+ - `task.md` 中的 `current_step` 和最新工作流进度
21
+ - 最新的 `review.md` / `review-r{N}.md` 是否无问题通过
22
+ - 是否仍然存在待修复项、待审查工作或待创建 PR 的步骤
23
+
24
+ 必须且只能选择一个分支:
25
+
26
+ | 判断依据 | 必选分支 |
27
+ |---|---|
28
+ | 所有工作流步骤都已完成 + 最新审查无问题通过 + 所有测试通过 | 场景 1:最终提交 |
29
+ | 仍有未完成步骤、待修复项或等待他人的动作 | 场景 2:还有后续工作 |
30
+ | 这次提交是为了把任务交给代码审查 | 场景 3:准备进入审查 |
31
+ | 代码已提交、审查已完成,下一步是创建 PR | 场景 4:准备创建 PR |
32
+
33
+ 绝对不要同时套用多个分支。先匹配唯一的下一步分支,再更新任务。
34
+
35
+ ### 场景 1:最终提交
36
+
37
+ 前置条件:
38
+ - [ ] 所有代码都已提交
39
+ - [ ] 所有测试通过
40
+ - [ ] 代码审查已通过
41
+ - [ ] 所有工作流步骤已完成
42
+
43
+ 必带下一步命令:
44
+
45
+ ```text
46
+ 下一步 - 完成并归档任务:
47
+ - Claude Code / OpenCode: /complete-task {task-id}
48
+ - Gemini CLI: /agent-infra:complete-task {task-id}
49
+ - Codex CLI: $complete-task {task-id}
50
+ ```
51
+
52
+ ### 场景 2:还有后续工作
53
+
54
+ 如果仍有工作待完成:
55
+ - 更新 `task.md` 中的 `updated_at`
56
+ - 记录这次提交完成了什么
57
+ - 记录下一位人类或 agent 需要继续做什么
58
+
59
+ ### 场景 3:准备进入审查
60
+
61
+ 如果这次提交把工作移交给代码审查:
62
+ - 将 `current_step` 更新为 `code-review`
63
+ - 更新 `updated_at`
64
+ - 在工作流状态中标记实现阶段已完成
65
+
66
+ 必带下一步命令:
67
+
68
+ ```text
69
+ 下一步 - 代码审查:
70
+ - Claude Code / OpenCode: /review-task {task-id}
71
+ - Gemini CLI: /agent-infra:review-task {task-id}
72
+ - Codex CLI: $review-task {task-id}
73
+ ```
74
+
75
+ ### 场景 4:准备创建 PR
76
+
77
+ 如果下一步是创建 Pull Request:
78
+ - 更新 `updated_at`
79
+ - 在 `task.md` 中记录 PR 计划
80
+
81
+ 必带下一步命令:
82
+
83
+ ```text
84
+ 下一步 - 创建 Pull Request:
85
+ - Claude Code / OpenCode: /create-pr
86
+ - Gemini CLI: /agent-infra:create-pr
87
+ - Codex CLI: $create-pr
88
+ ```
@@ -1,11 +1,6 @@
1
1
  ---
2
2
  name: complete-task
3
- description: >
4
- Mark a task as completed and archive it by moving the task directory from
5
- active/ to completed/. Verifies that all workflow steps are done, code is
6
- reviewed and committed, and tests pass before allowing completion.
7
- Triggered when the user requests task completion or archiving.
8
- Argument: task-id.
3
+ description: "Mark a task as completed and archive it"
9
4
  ---
10
5
 
11
6
  # Complete Task
@@ -19,7 +14,7 @@ description: >
19
14
 
20
15
  ### 1. Verify Task Exists
21
16
 
22
- Check that the task exists in `.agent-workspace/active/{task-id}/`.
17
+ Check that the task exists in `.agents/workspace/active/{task-id}/`.
23
18
 
24
19
  Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, e.g. `TASK-20260306-143022`
25
20
 
@@ -61,7 +56,7 @@ Get the current time:
61
56
  date "+%Y-%m-%d %H:%M:%S"
62
57
  ```
63
58
 
64
- Update `.agent-workspace/active/{task-id}/task.md`:
59
+ Update `.agents/workspace/active/{task-id}/task.md`:
65
60
  - `status`: completed
66
61
  - `completed_at`: {current timestamp}
67
62
  - `updated_at`: {current timestamp}
@@ -76,13 +71,13 @@ Update `.agent-workspace/active/{task-id}/task.md`:
76
71
  Move the task directory from active to completed:
77
72
 
78
73
  ```bash
79
- mv .agent-workspace/active/{task-id} .agent-workspace/completed/{task-id}
74
+ mv .agents/workspace/active/{task-id} .agents/workspace/completed/{task-id}
80
75
  ```
81
76
 
82
77
  ### 5. Verify Archive
83
78
 
84
79
  ```bash
85
- ls .agent-workspace/completed/{task-id}/task.md
80
+ ls .agents/workspace/completed/{task-id}/task.md
86
81
  ```
87
82
 
88
83
  Confirm the task directory was successfully moved.
@@ -111,7 +106,7 @@ Task {task-id} completed and archived.
111
106
  Task info:
112
107
  - Title: {title}
113
108
  - Completed at: {timestamp}
114
- - Archived to: .agent-workspace/completed/{task-id}/
109
+ - Archived to: .agents/workspace/completed/{task-id}/
115
110
 
116
111
  Deliverables:
117
112
  - {List of key outputs: files modified, tests added, etc.}
@@ -121,7 +116,7 @@ Deliverables:
121
116
 
122
117
  - [ ] Verified all workflow steps are complete
123
118
  - [ ] Updated task.md with completed status and timestamp
124
- - [ ] Moved task directory to `.agent-workspace/completed/`
119
+ - [ ] Moved task directory to `.agents/workspace/completed/`
125
120
  - [ ] Verified archive succeeded
126
121
  - [ ] Informed user of completion
127
122
 
@@ -135,7 +130,7 @@ Deliverables:
135
130
 
136
131
  2. **Rollback**: If a task was archived incorrectly:
137
132
  ```bash
138
- mv .agent-workspace/completed/{task-id} .agent-workspace/active/{task-id}
133
+ mv .agents/workspace/completed/{task-id} .agents/workspace/active/{task-id}
139
134
  ```
140
135
  Then update task.md status back to `active`.
141
136
 
@@ -1,9 +1,6 @@
1
1
  ---
2
2
  name: complete-task
3
- description: >
4
- 标记任务完成并归档,将任务目录从 active/ 移动到 completed/。在允许完成之前,
5
- 验证所有工作流步骤已完成、代码已审查并提交、测试已通过。
6
- 当用户要求完成或归档任务时触发。参数:task-id。
3
+ description: "标记任务完成并归档"
7
4
  ---
8
5
 
9
6
  # 完成任务
@@ -17,7 +14,7 @@ description: >
17
14
 
18
15
  ### 1. 验证任务存在
19
16
 
20
- 检查任务是否存在于 `.agent-workspace/active/{task-id}/`。
17
+ 检查任务是否存在于 `.agents/workspace/active/{task-id}/`。
21
18
 
22
19
  注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
23
20
 
@@ -59,7 +56,7 @@ Please complete the missing steps first, or use --force to override.
59
56
  date "+%Y-%m-%d %H:%M:%S"
60
57
  ```
61
58
 
62
- 更新 `.agent-workspace/active/{task-id}/task.md`:
59
+ 更新 `.agents/workspace/active/{task-id}/task.md`:
63
60
  - `status`:completed
64
61
  - `completed_at`:{当前时间戳}
65
62
  - `updated_at`:{当前时间戳}
@@ -74,13 +71,13 @@ date "+%Y-%m-%d %H:%M:%S"
74
71
  将任务目录从 active 移动到 completed:
75
72
 
76
73
  ```bash
77
- mv .agent-workspace/active/{task-id} .agent-workspace/completed/{task-id}
74
+ mv .agents/workspace/active/{task-id} .agents/workspace/completed/{task-id}
78
75
  ```
79
76
 
80
77
  ### 5. 验证归档
81
78
 
82
79
  ```bash
83
- ls .agent-workspace/completed/{task-id}/task.md
80
+ ls .agents/workspace/completed/{task-id}/task.md
84
81
  ```
85
82
 
86
83
  确认任务目录已成功移动。
@@ -109,7 +106,7 @@ ls .agent-workspace/completed/{task-id}/task.md
109
106
  任务信息:
110
107
  - 标题:{title}
111
108
  - 完成时间:{timestamp}
112
- - 归档路径:.agent-workspace/completed/{task-id}/
109
+ - 归档路径:.agents/workspace/completed/{task-id}/
113
110
 
114
111
  交付物:
115
112
  - {关键产出列表:修改的文件、添加的测试等}
@@ -119,7 +116,7 @@ ls .agent-workspace/completed/{task-id}/task.md
119
116
 
120
117
  - [ ] 验证了所有工作流步骤已完成
121
118
  - [ ] 更新了 task.md 的完成状态和时间戳
122
- - [ ] 将任务目录移动到 `.agent-workspace/completed/`
119
+ - [ ] 将任务目录移动到 `.agents/workspace/completed/`
123
120
  - [ ] 验证了归档成功
124
121
  - [ ] 告知了用户完成情况
125
122
 
@@ -133,7 +130,7 @@ ls .agent-workspace/completed/{task-id}/task.md
133
130
 
134
131
  2. **回滚**:如果任务被错误归档:
135
132
  ```bash
136
- mv .agent-workspace/completed/{task-id} .agent-workspace/active/{task-id}
133
+ mv .agents/workspace/completed/{task-id} .agents/workspace/active/{task-id}
137
134
  ```
138
135
  然后将 task.md 中的状态改回 `active`。
139
136