@fitlab-ai/agent-infra 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/README.md +23 -15
  2. package/README.zh-CN.md +23 -15
  3. package/lib/defaults.json +5 -9
  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 +17 -7
  8. package/templates/.agents/QUICKSTART.zh-CN.md +23 -13
  9. package/templates/.agents/README.md +33 -27
  10. package/templates/.agents/README.zh-CN.md +35 -29
  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 +39 -221
  38. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +39 -220
  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 +2 -5
  46. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +2 -4
  47. package/templates/.agents/skills/implement-task/SKILL.md +47 -176
  48. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +43 -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 +2 -3
  58. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +2 -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 +40 -162
  66. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +38 -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 +34 -490
  84. package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +34 -489
  85. package/templates/.agents/skills/sync-issue/reference/comment-publish.md +84 -0
  86. package/templates/.agents/skills/sync-issue/reference/comment-publish.zh-CN.md +84 -0
  87. package/templates/.agents/skills/sync-issue/reference/label-sync.md +62 -0
  88. package/templates/.agents/skills/sync-issue/reference/label-sync.zh-CN.md +62 -0
  89. package/templates/.agents/skills/sync-issue/reference/milestone-sync.md +37 -0
  90. package/templates/.agents/skills/sync-issue/reference/milestone-sync.zh-CN.md +37 -0
  91. package/templates/.agents/skills/sync-pr/SKILL.md +37 -284
  92. package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +41 -288
  93. package/templates/.agents/skills/sync-pr/reference/comment-publish.md +82 -0
  94. package/templates/.agents/skills/sync-pr/reference/comment-publish.zh-CN.md +82 -0
  95. package/templates/.agents/skills/sync-pr/reference/delivery-detection.md +54 -0
  96. package/templates/.agents/skills/sync-pr/reference/delivery-detection.zh-CN.md +54 -0
  97. package/templates/.agents/skills/test/SKILL.md +1 -3
  98. package/templates/.agents/skills/test/SKILL.zh-CN.md +1 -3
  99. package/templates/.agents/skills/test-integration/SKILL.md +1 -4
  100. package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +1 -3
  101. package/templates/.agents/skills/update-agent-infra/SKILL.md +2 -6
  102. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +2 -4
  103. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +45 -55
  104. package/templates/.agents/skills/upgrade-dependency/SKILL.md +1 -4
  105. package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +1 -3
  106. package/templates/.claude/commands/analyze-task.md +1 -1
  107. package/templates/.claude/commands/analyze-task.zh-CN.md +1 -1
  108. package/templates/.claude/commands/block-task.md +2 -1
  109. package/templates/.claude/commands/block-task.zh-CN.md +2 -1
  110. package/templates/.claude/commands/check-task.md +2 -1
  111. package/templates/.claude/commands/check-task.zh-CN.md +2 -1
  112. package/templates/.claude/commands/close-codescan.md +2 -1
  113. package/templates/.claude/commands/close-codescan.zh-CN.md +2 -1
  114. package/templates/.claude/commands/close-dependabot.md +2 -1
  115. package/templates/.claude/commands/close-dependabot.zh-CN.md +2 -1
  116. package/templates/.claude/commands/commit.md +1 -1
  117. package/templates/.claude/commands/commit.zh-CN.md +1 -1
  118. package/templates/.claude/commands/complete-task.md +1 -1
  119. package/templates/.claude/commands/complete-task.zh-CN.md +1 -1
  120. package/templates/.claude/commands/create-issue.md +1 -1
  121. package/templates/.claude/commands/create-issue.zh-CN.md +1 -1
  122. package/templates/.claude/commands/create-pr.md +2 -2
  123. package/templates/.claude/commands/create-pr.zh-CN.md +2 -2
  124. package/templates/.claude/commands/create-release-note.md +2 -1
  125. package/templates/.claude/commands/create-release-note.zh-CN.md +2 -1
  126. package/templates/.claude/commands/create-task.md +1 -1
  127. package/templates/.claude/commands/create-task.zh-CN.md +1 -1
  128. package/templates/.claude/commands/implement-task.md +1 -1
  129. package/templates/.claude/commands/implement-task.zh-CN.md +1 -1
  130. package/templates/.claude/commands/import-codescan.md +1 -0
  131. package/templates/.claude/commands/import-codescan.zh-CN.md +2 -1
  132. package/templates/.claude/commands/import-dependabot.md +1 -0
  133. package/templates/.claude/commands/import-dependabot.zh-CN.md +2 -1
  134. package/templates/.claude/commands/import-issue.md +1 -1
  135. package/templates/.claude/commands/import-issue.zh-CN.md +1 -1
  136. package/templates/.claude/commands/init-labels.md +1 -0
  137. package/templates/.claude/commands/init-labels.zh-CN.md +2 -1
  138. package/templates/.claude/commands/init-milestones.md +2 -1
  139. package/templates/.claude/commands/init-milestones.zh-CN.md +2 -1
  140. package/templates/.claude/commands/plan-task.md +1 -1
  141. package/templates/.claude/commands/plan-task.zh-CN.md +1 -1
  142. package/templates/.claude/commands/refine-task.zh-CN.md +1 -1
  143. package/templates/.claude/commands/refine-title.md +2 -1
  144. package/templates/.claude/commands/refine-title.zh-CN.md +2 -1
  145. package/templates/.claude/commands/release.md +2 -1
  146. package/templates/.claude/commands/release.zh-CN.md +2 -1
  147. package/templates/.claude/commands/review-task.md +1 -1
  148. package/templates/.claude/commands/review-task.zh-CN.md +1 -1
  149. package/templates/.claude/commands/sync-issue.md +1 -1
  150. package/templates/.claude/commands/sync-issue.zh-CN.md +1 -1
  151. package/templates/.claude/commands/sync-pr.md +2 -2
  152. package/templates/.claude/commands/sync-pr.zh-CN.md +2 -2
  153. package/templates/.claude/commands/test-integration.md +2 -1
  154. package/templates/.claude/commands/test-integration.zh-CN.md +2 -1
  155. package/templates/.claude/commands/test.md +1 -1
  156. package/templates/.claude/commands/test.zh-CN.md +1 -1
  157. package/templates/.claude/commands/update-agent-infra.md +2 -1
  158. package/templates/.claude/commands/update-agent-infra.zh-CN.md +2 -1
  159. package/templates/.claude/commands/upgrade-dependency.md +2 -1
  160. package/templates/.claude/commands/upgrade-dependency.zh-CN.md +2 -1
  161. package/templates/.gemini/commands/_project_/analyze-task.toml +1 -1
  162. package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +1 -1
  163. package/templates/.gemini/commands/_project_/block-task.toml +1 -1
  164. package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +1 -1
  165. package/templates/.gemini/commands/_project_/check-task.toml +1 -1
  166. package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +1 -1
  167. package/templates/.gemini/commands/_project_/close-codescan.toml +1 -1
  168. package/templates/.gemini/commands/_project_/close-codescan.zh-CN.toml +1 -1
  169. package/templates/.gemini/commands/_project_/close-dependabot.toml +1 -1
  170. package/templates/.gemini/commands/_project_/close-dependabot.zh-CN.toml +1 -1
  171. package/templates/.gemini/commands/_project_/commit.toml +1 -1
  172. package/templates/.gemini/commands/_project_/commit.zh-CN.toml +1 -1
  173. package/templates/.gemini/commands/_project_/complete-task.toml +1 -1
  174. package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +1 -1
  175. package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +1 -1
  176. package/templates/.gemini/commands/_project_/create-pr.toml +1 -1
  177. package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +1 -1
  178. package/templates/.gemini/commands/_project_/create-release-note.toml +1 -1
  179. package/templates/.gemini/commands/_project_/create-release-note.zh-CN.toml +1 -1
  180. package/templates/.gemini/commands/_project_/create-task.toml +1 -1
  181. package/templates/.gemini/commands/_project_/create-task.zh-CN.toml +1 -1
  182. package/templates/.gemini/commands/_project_/implement-task.toml +1 -1
  183. package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +1 -1
  184. package/templates/.gemini/commands/_project_/import-codescan.zh-CN.toml +1 -1
  185. package/templates/.gemini/commands/_project_/import-dependabot.zh-CN.toml +1 -1
  186. package/templates/.gemini/commands/_project_/import-issue.toml +1 -1
  187. package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +1 -1
  188. package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +1 -1
  189. package/templates/.gemini/commands/_project_/init-milestones.toml +1 -1
  190. package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +1 -1
  191. package/templates/.gemini/commands/_project_/plan-task.toml +1 -1
  192. package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +1 -1
  193. package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +1 -1
  194. package/templates/.gemini/commands/_project_/refine-title.toml +1 -1
  195. package/templates/.gemini/commands/_project_/refine-title.zh-CN.toml +1 -1
  196. package/templates/.gemini/commands/_project_/release.toml +1 -1
  197. package/templates/.gemini/commands/_project_/release.zh-CN.toml +1 -1
  198. package/templates/.gemini/commands/_project_/review-task.toml +1 -1
  199. package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +1 -1
  200. package/templates/.gemini/commands/_project_/sync-issue.toml +1 -1
  201. package/templates/.gemini/commands/_project_/sync-issue.zh-CN.toml +1 -1
  202. package/templates/.gemini/commands/_project_/sync-pr.toml +2 -2
  203. package/templates/.gemini/commands/_project_/sync-pr.zh-CN.toml +2 -2
  204. package/templates/.gemini/commands/_project_/test-integration.toml +1 -1
  205. package/templates/.gemini/commands/_project_/test-integration.zh-CN.toml +1 -1
  206. package/templates/.gemini/commands/_project_/test.toml +1 -1
  207. package/templates/.gemini/commands/_project_/test.zh-CN.toml +1 -1
  208. package/templates/.gemini/commands/_project_/update-agent-infra.toml +1 -1
  209. package/templates/.gemini/commands/_project_/update-agent-infra.zh-CN.toml +1 -1
  210. package/templates/.gemini/commands/_project_/upgrade-dependency.toml +1 -1
  211. package/templates/.gemini/commands/_project_/upgrade-dependency.zh-CN.toml +1 -1
  212. package/templates/.github/hooks/check-version-format.sh +29 -0
  213. package/templates/.github/hooks/pre-commit +8 -0
  214. package/templates/.opencode/commands/analyze-task.md +1 -1
  215. package/templates/.opencode/commands/analyze-task.zh-CN.md +1 -1
  216. package/templates/.opencode/commands/block-task.md +1 -1
  217. package/templates/.opencode/commands/block-task.zh-CN.md +1 -1
  218. package/templates/.opencode/commands/check-task.md +1 -1
  219. package/templates/.opencode/commands/check-task.zh-CN.md +1 -1
  220. package/templates/.opencode/commands/close-codescan.md +1 -1
  221. package/templates/.opencode/commands/close-codescan.zh-CN.md +1 -1
  222. package/templates/.opencode/commands/close-dependabot.md +1 -1
  223. package/templates/.opencode/commands/close-dependabot.zh-CN.md +1 -1
  224. package/templates/.opencode/commands/commit.md +1 -1
  225. package/templates/.opencode/commands/commit.zh-CN.md +1 -1
  226. package/templates/.opencode/commands/complete-task.md +1 -1
  227. package/templates/.opencode/commands/complete-task.zh-CN.md +1 -1
  228. package/templates/.opencode/commands/create-issue.zh-CN.md +1 -1
  229. package/templates/.opencode/commands/create-pr.md +1 -1
  230. package/templates/.opencode/commands/create-pr.zh-CN.md +1 -1
  231. package/templates/.opencode/commands/create-release-note.md +1 -1
  232. package/templates/.opencode/commands/create-release-note.zh-CN.md +1 -1
  233. package/templates/.opencode/commands/create-task.md +1 -1
  234. package/templates/.opencode/commands/create-task.zh-CN.md +1 -1
  235. package/templates/.opencode/commands/implement-task.md +1 -1
  236. package/templates/.opencode/commands/implement-task.zh-CN.md +1 -1
  237. package/templates/.opencode/commands/import-codescan.zh-CN.md +1 -1
  238. package/templates/.opencode/commands/import-dependabot.zh-CN.md +1 -1
  239. package/templates/.opencode/commands/import-issue.md +1 -1
  240. package/templates/.opencode/commands/import-issue.zh-CN.md +1 -1
  241. package/templates/.opencode/commands/init-labels.zh-CN.md +1 -1
  242. package/templates/.opencode/commands/init-milestones.md +1 -1
  243. package/templates/.opencode/commands/init-milestones.zh-CN.md +1 -1
  244. package/templates/.opencode/commands/plan-task.md +1 -1
  245. package/templates/.opencode/commands/plan-task.zh-CN.md +1 -1
  246. package/templates/.opencode/commands/refine-task.zh-CN.md +1 -1
  247. package/templates/.opencode/commands/refine-title.md +1 -1
  248. package/templates/.opencode/commands/refine-title.zh-CN.md +1 -1
  249. package/templates/.opencode/commands/release.md +1 -1
  250. package/templates/.opencode/commands/release.zh-CN.md +1 -1
  251. package/templates/.opencode/commands/review-task.md +1 -1
  252. package/templates/.opencode/commands/review-task.zh-CN.md +1 -1
  253. package/templates/.opencode/commands/sync-issue.md +1 -1
  254. package/templates/.opencode/commands/sync-issue.zh-CN.md +1 -1
  255. package/templates/.opencode/commands/sync-pr.md +2 -2
  256. package/templates/.opencode/commands/sync-pr.zh-CN.md +2 -2
  257. package/templates/.opencode/commands/test-integration.md +1 -1
  258. package/templates/.opencode/commands/test-integration.zh-CN.md +1 -1
  259. package/templates/.opencode/commands/test.md +1 -1
  260. package/templates/.opencode/commands/test.zh-CN.md +1 -1
  261. package/templates/.opencode/commands/update-agent-infra.md +1 -1
  262. package/templates/.opencode/commands/update-agent-infra.zh-CN.md +1 -1
  263. package/templates/.opencode/commands/upgrade-dependency.md +1 -1
  264. package/templates/.opencode/commands/upgrade-dependency.zh-CN.md +1 -1
  265. package/templates/.claude/CLAUDE.md +0 -176
  266. package/templates/.claude/CLAUDE.zh-CN.md +0 -176
  267. package/templates/.claude/project-rules.md +0 -65
  268. package/templates/.claude/project-rules.zh-CN.md +0 -65
  269. package/templates/.codex/README.md +0 -38
  270. package/templates/.codex/README.zh-CN.md +0 -37
  271. package/templates/.opencode/COMMAND_STYLE_GUIDE.md +0 -232
  272. package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +0 -232
  273. package/templates/.opencode/README.md +0 -76
  274. package/templates/.opencode/README.zh-CN.md +0 -77
  275. package/templates/AGENTS.md +0 -104
  276. package/templates/AGENTS.zh-CN.md +0 -104
@@ -1,6 +1,6 @@
1
1
  # 多 AI 协作指南
2
2
 
3
- 本项目支持多个 AI 编程助手协同工作,包括 Claude Code、OpenAI Codex CLI、Gemini CLI、Cursor 等。
3
+ 本项目支持多个 AI 编程助手协同工作,包括 Claude Code、OpenAI Codex CLI、Gemini CLI、OpenCode 等。
4
4
 
5
5
  ## 双配置架构
6
6
 
@@ -8,10 +8,10 @@
8
8
 
9
9
  | AI 工具 | 主要配置 | 备选配置 |
10
10
  |---------|---------|---------|
11
- | Claude Code | `.claude/`(CLAUDE.md、commands/、settings/) | - |
11
+ | Claude Code | `.claude/`(CLAUDE.md、commands/、settings.json) | - |
12
12
  | OpenAI Codex CLI | `AGENTS.md` | - |
13
13
  | Gemini CLI | `AGENTS.md` | - |
14
- | Cursor | `.cursorrules` 或 `.cursor/rules/` | `AGENTS.md` |
14
+ | OpenCode | `AGENTS.md` | - |
15
15
  | 其他 AI 工具 | `AGENTS.md` | 项目 README |
16
16
 
17
17
  - **Claude Code** 使用专属的 `.claude/` 目录存放项目指令、斜杠命令和设置。
@@ -23,10 +23,8 @@
23
23
 
24
24
  ```
25
25
  .agents/ # AI 协作配置(版本控制)
26
- README.md # 本文件(英文)
27
- README.zh-CN.md # 中文版本
26
+ README.md # 协作指南
28
27
  QUICKSTART.md # 快速入门指南
29
- QUICKSTART.zh-CN.md # 快速入门指南(中文)
30
28
  templates/ # 任务和文档模板
31
29
  task.md # 任务模板
32
30
  handoff.md # AI 间交接模板
@@ -36,28 +34,28 @@
36
34
  bug-fix.yaml # 缺陷修复工作流
37
35
  code-review.yaml # 代码审查工作流
38
36
  refactoring.yaml # 重构工作流
39
-
40
- .agents/workspace/ # 运行时工作区(已被 git ignore)
41
- active/ # 当前活跃任务
42
- blocked/ # 被阻塞的任务
43
- completed/ # 已完成的任务
44
- logs/ # 协作日志
37
+ workspace/ # 运行时工作区(已被 git ignore)
38
+ active/ # 当前活跃任务
39
+ blocked/ # 被阻塞的任务
40
+ completed/ # 已完成的任务
41
+ logs/ # 协作日志
45
42
 
46
43
  .claude/ # Claude Code 专属配置
47
44
  CLAUDE.md # Claude 项目指令
48
45
  commands/ # 斜杠命令
49
- settings/ # Claude 设置
46
+ settings.json # Claude 设置
50
47
  ```
51
48
 
52
49
  ## 协作模型
53
50
 
54
51
  多 AI 协作遵循结构化工作流:
55
52
 
56
- ```
57
- 1. 分析 --> 2. 设计 --> 3. 实现
58
- |
59
- 6. 提交 <-- 5. 修复问题 <-- 4. 审查
60
- ```
53
+ 1. 分析
54
+ 2. 设计
55
+ 3. 实现
56
+ 4. 审查
57
+ 5. 修复问题
58
+ 6. 提交
61
59
 
62
60
  ### 阶段详情
63
61
 
@@ -76,26 +74,26 @@
76
74
 
77
75
  每个 AI 工具有不同的优势,请据此分配任务:
78
76
 
79
- | 能力 | Claude Code | Codex CLI | Gemini CLI | Cursor |
80
- |-----|-------------|-----------|------------|--------|
77
+ | 能力 | Claude Code | Codex CLI | Gemini CLI | OpenCode |
78
+ |-----|-------------|-----------|------------|----------|
81
79
  | 代码库分析 | 优秀 | 良好 | 优秀 | 良好 |
82
- | 代码审查 | 优秀 | 良好 | 良好 | 一般 |
80
+ | 代码审查 | 优秀 | 良好 | 良好 | 良好 |
83
81
  | 代码实现 | 良好 | 优秀 | 良好 | 优秀 |
84
- | 大上下文处理 | 良好 | 一般 | 优秀 | 良好 |
85
- | 重构 | 良好 | 良好 | 良好 | 优秀 |
86
- | 文档编写 | 优秀 | 良好 | 良好 | 一般 |
82
+ | 大上下文处理 | 良好 | 一般 | 优秀 | 一般 |
83
+ | 重构 | 良好 | 良好 | 良好 | 良好 |
84
+ | 文档编写 | 优秀 | 良好 | 良好 | 良好 |
87
85
 
88
86
  ### 推荐分配
89
87
 
90
88
  - **分析和审查** - Claude Code(推理能力强,探索全面)
91
- - **代码实现** - Codex CLI 或 Cursor(代码生成快,内联编辑)
89
+ - **代码实现** - Codex CLI 或 OpenCode(代码生成快,命令式工作流顺手)
92
90
  - **大上下文任务** - Gemini CLI(大上下文窗口,适合跨文件分析)
93
- - **快速编辑** - Cursor(IDE 集成,快速迭代)
91
+ - **命令式迭代** - OpenCode(适合按工作流连续推进)
94
92
 
95
93
  ## 快速入门
96
94
 
97
- 1. **阅读快速入门指南**:参见 `QUICKSTART.zh-CN.md` 获取分步说明。
98
- 2. **创建任务**:将 `.agents/templates/task.zh-CN.md` 复制到 `.agents/workspace/active/`。
95
+ 1. **阅读快速入门指南**:参见 `QUICKSTART.md` 获取分步说明。
96
+ 2. **创建任务**:将 `.agents/templates/task.md` 复制到 `.agents/workspace/active/`。
99
97
  3. **分配给 AI**:更新任务元数据中的 `assigned_to` 字段。
100
98
  4. **执行工作流**:按照 `.agents/workflows/` 中相应的工作流执行。
101
99
  5. **交接**:切换 AI 时,从模板创建交接文档。
@@ -118,10 +116,18 @@
118
116
 
119
117
  1. 顶级步骤使用连续整数:`1.`、`2.`、`3.`。
120
118
  2. 只有父步骤下的从属动作才使用子步骤:`1.1`、`1.2`、`2.1`。
121
- 3. 同一步中的分支、条件或多种可能性使用 `a`、`b`、`c` 标记。
119
+ 3. 同一步中的从属选项、条件分支或并列可能性使用 `a`、`b`、`c` 标记;仅用于步骤内部的子项展开,不用于命名独立的决策路径或输出模板。
122
120
  4. 不要使用 `1.5`、`2.5` 这类中间编号;如新增独立步骤,应整体顺延后续编号。
123
121
  5. 调整编号时,必须同步更新文中的步骤引用,确保说明、命令和检查点一致。
124
122
  6. 长 bash 脚本应从 SKILL.md 提取到同级 `scripts/` 目录中,SKILL.md 只保留单行调用(如 `bash .agents/skills/<skill>/scripts/<script>.sh`)和对脚本职责的概要说明。
123
+ 7. 在 SKILL.md 及其 `reference/` 模板中,如需为独立的条件分流、决策路径或输出模板命名,统一使用“场景”命名(例如使用“场景 A”)。
124
+
125
+ ### SKILL.md 体积控制
126
+
127
+ - SKILL.md 正文控制在约 500 tokens(约 80 行 / 2KB)以内。
128
+ - 超过阈值的内容拆分到同级 `reference/` 目录。
129
+ - 骨架中使用明确导航,例如:`执行此步骤前,先读取 reference/xxx.md。`
130
+ - 长脚本继续放在 `scripts/` 目录,优先执行脚本而不是内联大段 bash。
125
131
 
126
132
  ## 常见问题
127
133
 
@@ -1,9 +1,6 @@
1
1
  ---
2
2
  name: analyze-task
3
- description: >
4
- Analyze an existing task and output a requirements analysis document,
5
- supporting multi-round artifacts (`analysis.md` / `analysis-r{N}.md`).
6
- Triggered when the user asks to analyze a task. Argument: task-id.
3
+ description: "Analyze a task and produce a requirements document"
7
4
  ---
8
5
 
9
6
  # Analyze Task
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: analyze-task
3
- description: >
4
- 分析已有任务并输出需求分析文档,支持多轮分析产物(analysis.md / analysis-r{N}.md)。
5
- 当用户要求分析某个任务时触发。参数:task-id。
3
+ description: "分析任务并输出需求分析文档"
6
4
  ---
7
5
 
8
6
  # 分析任务
@@ -1,10 +1,6 @@
1
1
  ---
2
2
  name: block-task
3
- description: >
4
- Mark a task as blocked and record the blocking reason, moving it from
5
- the active directory to the blocked directory. Use when a task cannot
6
- proceed due to technical problems, unclear requirements, missing resources,
7
- or pending decisions. Arguments: task-id, optional blocking reason.
3
+ description: "Mark a task as blocked and record the reason"
8
4
  ---
9
5
 
10
6
  # Block Task
@@ -1,9 +1,6 @@
1
1
  ---
2
2
  name: block-task
3
- description: >
4
- 标记任务为阻塞状态并记录阻塞原因,将其从 active 目录移动到 blocked 目录。
5
- 当任务因技术问题、需求不清晰、缺少资源或待定决策而无法继续时使用。
6
- 参数:task-id,可选的阻塞原因。
3
+ description: "标记任务为阻塞状态并记录原因"
7
4
  ---
8
5
 
9
6
  # 标记任务阻塞
@@ -1,10 +1,6 @@
1
1
  ---
2
2
  name: check-task
3
- description: >
4
- Check a task's current status, workflow progress, and context files. This is a
5
- read-only operation that reports the task status and recommends appropriate
6
- next steps. Triggered when the user asks to inspect task status. Argument:
7
- task-id.
3
+ description: "Check a task's current status and progress"
8
4
  ---
9
5
 
10
6
  # Check Task Status
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: check-task
3
- description: >
4
- 查看任务的当前状态、工作流进度和上下文文件。这是只读操作,报告任务状态并建议
5
- 适当的下一步操作。当用户要求查看任务状态时触发。参数:task-id。
3
+ description: "查看任务的当前状态和进度"
6
4
  ---
7
5
 
8
6
  # 查看任务状态
@@ -1,9 +1,6 @@
1
1
  ---
2
2
  name: close-codescan
3
- description: >
4
- Dismiss a Code Scanning (CodeQL) alert with a documented justification.
5
- Triggered when the user asks to dismiss a Code Scanning alert.
6
- Argument: alert number.
3
+ description: "Close a Code Scanning alert with a documented reason"
7
4
  ---
8
5
 
9
6
  # Dismiss Code Scanning Alert
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: close-codescan
3
- description: >
4
- 关闭 Code Scanning(CodeQL)告警并提供有据可查的理由。
5
- 当用户要求关闭 Code Scanning 告警时触发。参数:告警编号。
3
+ description: "关闭 Code Scanning 告警并记录理由"
6
4
  ---
7
5
 
8
6
  # 关闭 Code Scanning 告警
@@ -1,9 +1,6 @@
1
1
  ---
2
2
  name: close-dependabot
3
- description: >
4
- Dismiss a Dependabot security alert with a documented justification.
5
- Triggered when the user asks to dismiss a Dependabot alert.
6
- Argument: alert number.
3
+ description: "Close a Dependabot alert with a documented reason"
7
4
  ---
8
5
 
9
6
  # Dismiss Dependabot Alert
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: close-dependabot
3
- description: >
4
- 关闭 Dependabot 安全告警并提供有据可查的理由。
5
- 当用户要求关闭 Dependabot 告警时触发。参数:告警编号。
3
+ description: "关闭 Dependabot 安全告警并记录理由"
6
4
  ---
7
5
 
8
6
  # 关闭 Dependabot 告警
@@ -1,139 +1,40 @@
1
1
  ---
2
2
  name: commit
3
- description: >
4
- Commit current changes to Git, including copyright header year
5
- check and task status update. Triggered when the user requests
6
- a code commit or save changes.
3
+ description: "Commit the current changes to Git"
7
4
  ---
8
5
 
9
6
  # Commit Changes
10
7
 
11
- Commit current changes to Git.
8
+ Create a Git commit without overwriting user work and update the related task state when needed.
12
9
 
13
- ## Step 0: Check Local Modifications (CRITICAL)
10
+ ## 1. Check Local Modifications (CRITICAL)
14
11
 
15
- **Mandatory**: Before any edits, you **must** check the user's local modifications to avoid overwriting their work.
12
+ Before any edit, inspect:
16
13
 
17
14
  ```bash
18
15
  git status --short
19
16
  git diff
20
17
  ```
21
18
 
22
- **Rules**:
23
- 1. **Read `git diff` output carefully** - understand what the user has already changed
24
- 2. **Make incremental edits** on top of user modifications - do not overwrite their implementation
25
- 3. **If your planned edits conflict** with user modifications, ask the user first:
26
- ```
27
- This file has local modifications:
28
- - Your changes: [describe user's changes]
29
- - My planned changes: [describe planned changes]
30
- Please confirm how to proceed.
31
- ```
32
- 4. **Do NOT** rewrite code the user has already implemented
33
- 5. **Do NOT** add "improvements" the user didn't ask for
19
+ Respect existing user changes. If your planned edit conflicts with them, stop and ask before proceeding.
34
20
 
35
- ## Step 1: Update Copyright Header Years (CRITICAL)
21
+ ## 2. Update Copyright Headers
36
22
 
37
- **Mandatory**: Before committing, check and update copyright headers in all modified files.
23
+ Use the current year dynamically and only update files that are already modified.
38
24
 
39
- ### Get Current Year
25
+ > The full copyright workflow lives in `reference/copyright-check.md`. Read `reference/copyright-check.md` before editing any header.
40
26
 
41
- ```bash
42
- date +%Y
43
- ```
44
-
45
- **Never hardcode the year.**
46
-
47
- ### Check Modified Files
48
-
49
- ```bash
50
- git status --short
51
- ```
52
-
53
- ### For Each Modified File
54
-
55
- Check if the file has a copyright header:
56
- ```bash
57
- grep "Copyright.*[0-9]\{4\}" <modified_file>
58
- ```
59
-
60
- If it has a copyright header and the year is not current, update the year.
61
-
62
- **Common formats**:
63
- - `Copyright (C) 2024-2025` -> `Copyright (C) 2024-{CURRENT_YEAR}`
64
- - `Copyright (C) 2024` -> `Copyright (C) 2024-{CURRENT_YEAR}`
65
- - `Copyright (C) 2025` -> `Copyright (C) {CURRENT_YEAR}` (if already current)
66
-
67
- ### Copyright Checklist
68
-
69
- Before executing `git commit`:
70
- - [ ] Used `date +%Y` to dynamically get the current year
71
- - [ ] Checked all files about to be committed
72
- - [ ] Updated copyright year in all files that have copyright headers
73
- - [ ] **Never** hardcoded the year
74
- - [ ] **Only** updated modified files, not the entire project
75
-
76
- ## Step 2: Analyze Changes and Generate Commit Message
77
-
78
- ```bash
79
- git status
80
- git diff
81
- git log --oneline -5
82
- ```
83
-
84
- Generate commit message in Conventional Commits format:
85
- - `<type>(<scope>): <subject>` (English imperative mood, max 50 chars)
86
- - Body: 2-4 bullet points explaining what and why
87
- - Signature block:
88
- - `Co-Authored-By: {Your Model Name} <noreply@provider.com>`
89
- - If task-related, append extra `Co-Authored-By` lines for other contributing agents
90
-
91
- ### Multi-Agent Co-Authorship (If Task-Related)
92
-
93
- If the commit belongs to an active task and `.agents/workspace/active/{task-id}/task.md` exists:
94
-
95
- 1. Read the `## Activity Log` section from `task.md`.
96
- 2. Extract all unique agent names from entries matching `by {agent}`. A loose pattern such as `by (\S+)` is acceptable.
97
- 3. Exclude `human` because the Git author is already the human user.
98
- 4. Map each agent to a `Co-Authored-By` line:
99
-
100
- | Agent | Signature |
101
- |-------|-----------|
102
- | `claude` | `Co-Authored-By: Claude <noreply@anthropic.com>` |
103
- | `codex` | `Co-Authored-By: Codex <noreply@openai.com>` |
104
- | `gemini` | `Co-Authored-By: Gemini <noreply@google.com>` |
105
- | `opencode` | `Co-Authored-By: OpenCode <noreply@opencode.ai>` |
106
-
107
- 5. Build the signature block with these rules:
108
- - Keep the current executing agent's signature in its original position.
109
- - Append other unique participating agents as additional `Co-Authored-By` lines.
110
- - Do not duplicate the current agent if it already appears in `Activity Log`.
111
- - For unknown agent names, use `Co-Authored-By: {Agent} <noreply@unknown>`.
112
-
113
- If the commit is not task-related, keep the existing single-signature behavior.
114
-
115
- ## Step 3: Create Commit
27
+ ## 3. Build the Commit Message
116
28
 
117
- ```bash
118
- git add <specific-files>
119
- git commit -m "$(cat <<'EOF'
120
- <type>(<scope>): <subject>
29
+ Review status, diff, and recent history, then prepare a Conventional Commit with the correct co-author lines.
121
30
 
122
- - <bullet point 1>
123
- - <bullet point 2>
31
+ > Commit message rules, examples, and multi-agent co-authorship details live in `reference/commit-message.md`. Read `reference/commit-message.md` before writing the commit.
124
32
 
125
- Co-Authored-By: {Your Model Name} <noreply@provider.com>
126
- <additional Co-Authored-By lines for other task participants, if any>
127
- EOF
128
- )"
129
- ```
33
+ ## 4. Create the Commit
130
34
 
131
- **Important**:
132
- - Add specific files by name - do NOT use `git add -A` or `git add .`
133
- - Do NOT commit files that may contain secrets (.env, credentials, keys)
134
- - For task-related commits, keep the current agent first and append the extra lines generated above
35
+ Stage specific files only and run `git commit` with the prepared message.
135
36
 
136
- ## Step 4: Update Task Status (If Task-Related)
37
+ ## 5. Update Task Status When Applicable
137
38
 
138
39
  Get the current time:
139
40
 
@@ -141,93 +42,20 @@ Get the current time:
141
42
  date "+%Y-%m-%d %H:%M:%S"
142
43
  ```
143
44
 
144
- After committing, update task status based on the situation:
145
-
146
- For all cases below, **append** to `## Activity Log` in task.md (do NOT overwrite previous entries):
147
- ```
148
- - {yyyy-MM-dd HH:mm:ss} — **Commit** by {agent} — {commit hash short} {commit subject}
149
- ```
150
-
151
- > **⚠️ Situation Check — you must inspect task state first, then choose exactly one matching case below:**
152
- >
153
- > - Check `task.md` for `current_step`, workflow progress, and the latest `## Activity Log` entry
154
- > - Check whether the latest `review.md` / `review-r{N}.md` exists and whether the latest review passed with no issues
155
- > - Check whether any follow-up repair, review, or PR creation step is still pending
156
- >
157
- > | Decision basis | Required case |
158
- > |---------------|---------------|
159
- > | All workflow steps complete + latest review passed with no issues + all tests pass | Case 1: Final Commit |
160
- > | There are still incomplete steps, unresolved fixes, or waiting actions | Case 2: More Work Needed |
161
- > | The purpose of this commit is to send the implementation/refinement into code review | Case 3: Ready for Review |
162
- > | Code is committed, review is done, and the next action should be PR creation | Case 4: Ready for PR |
163
- >
164
- > **Do not mix multiple cases. You must decide first, then output the single matching next step.**
165
-
166
- ### Case 1: Final Commit (Trigger: all work is done and the next step is task archival)
167
-
168
- If this is the last commit and all work is done:
169
-
170
- Prerequisites:
171
- - [ ] All code committed
172
- - [ ] All tests pass
173
- - [ ] Code review passed
174
- - [ ] All workflow steps complete
175
-
176
- Suggest next step:
177
-
178
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
179
-
180
- ```
181
- Next step - complete and archive the task:
182
- - Claude Code / OpenCode: /complete-task {task-id}
183
- - Gemini CLI: /{{project}}:complete-task {task-id}
184
- - Codex CLI: $complete-task {task-id}
185
- ```
186
-
187
- ### Case 2: More Work Needed (Trigger: incomplete steps, unresolved issues, or pending collaboration remain)
45
+ > The full four-case status matrix, prerequisite checks, and multi-TUI next-step commands live in `reference/task-status-update.md`. Read `reference/task-status-update.md` before updating task state.
188
46
 
189
- If there's follow-up work (awaiting review, more fixes needed):
190
- - Update `task.md`: set `updated_at` to current time
191
- - Record this commit's content and next steps in task.md
47
+ Append the Commit Activity Log entry and choose exactly one next-step case:
48
+ - final commit -> `complete-task {task-id}`
49
+ - more work remains -> update task.md and stop
50
+ - ready for review -> `review-task {task-id}`
51
+ - ready for PR -> `create-pr`
192
52
 
193
- ### Case 3: Ready for Review (Trigger: the next action should be `review-task`)
194
-
195
- If the commit is ready for code review:
196
- - Update `task.md`: set `current_step` to `code-review`
197
- - Update `task.md`: set `updated_at` to current time
198
- - Mark implementation step as complete in workflow progress
199
-
200
- Suggest next step:
201
-
202
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
203
-
204
- ```
205
- Next step - code review:
206
- - Claude Code / OpenCode: /review-task {task-id}
207
- - Gemini CLI: /{{project}}:review-task {task-id}
208
- - Codex CLI: $review-task {task-id}
209
- ```
210
-
211
- ### Case 4: Ready for PR (Trigger: the next action should be `create-pr`)
212
-
213
- If the commit should become a Pull Request:
214
- - Update `task.md`: set `updated_at` to current time
215
- - Record PR plan in task.md
216
-
217
- Suggest next step:
53
+ ## Notes
218
54
 
219
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
55
+ - Never commit secrets such as `.env`, credentials, or keys
56
+ - Keep the current agent first in the co-author block
57
+ - Do not use `git add -A` or `git add .`
220
58
 
221
- ```
222
- Next step - create a Pull Request:
223
- - Claude Code / OpenCode: /create-pr
224
- - Gemini CLI: /{{project}}:create-pr
225
- - Codex CLI: $create-pr
226
- ```
227
-
228
- ## Notes
59
+ ## Error Handling
229
60
 
230
- - Do NOT commit files containing sensitive information (.env, credentials, etc.)
231
- - Ensure commit messages clearly describe the changes
232
- - Follow the project's Conventional Commits conventions
233
- - If task status update fails, warn the user but do not block the commit
61
+ - If the task status update fails, warn the user but do not block the commit