@fitlab-ai/agent-infra 0.3.0

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 (285) hide show
  1. package/License.txt +21 -0
  2. package/README.md +170 -0
  3. package/README.zh-CN.md +170 -0
  4. package/bin/cli.js +65 -0
  5. package/lib/defaults.json +45 -0
  6. package/lib/init.js +203 -0
  7. package/lib/log.js +27 -0
  8. package/lib/paths.js +48 -0
  9. package/lib/prompt.js +70 -0
  10. package/lib/render.js +99 -0
  11. package/lib/update.js +161 -0
  12. package/lib/version.js +7 -0
  13. package/package.json +48 -0
  14. package/templates/.agent-workspace/README.md +26 -0
  15. package/templates/.agent-workspace/README.zh-CN.md +26 -0
  16. package/templates/.agents/QUICKSTART.md +166 -0
  17. package/templates/.agents/QUICKSTART.zh-CN.md +166 -0
  18. package/templates/.agents/README.md +134 -0
  19. package/templates/.agents/README.zh-CN.md +134 -0
  20. package/templates/.agents/skills/analyze-task/SKILL.md +169 -0
  21. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +169 -0
  22. package/templates/.agents/skills/block-task/SKILL.md +164 -0
  23. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +163 -0
  24. package/templates/.agents/skills/check-task/SKILL.md +122 -0
  25. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +122 -0
  26. package/templates/.agents/skills/close-codescan/SKILL.md +122 -0
  27. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +122 -0
  28. package/templates/.agents/skills/close-dependabot/SKILL.md +130 -0
  29. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +130 -0
  30. package/templates/.agents/skills/commit/SKILL.md +218 -0
  31. package/templates/.agents/skills/commit/SKILL.zh-CN.md +217 -0
  32. package/templates/.agents/skills/complete-task/SKILL.md +139 -0
  33. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +137 -0
  34. package/templates/.agents/skills/create-pr/SKILL.md +126 -0
  35. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +125 -0
  36. package/templates/.agents/skills/create-release-note/SKILL.md +167 -0
  37. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +166 -0
  38. package/templates/.agents/skills/create-task/SKILL.md +143 -0
  39. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +143 -0
  40. package/templates/.agents/skills/implement-task/SKILL.md +229 -0
  41. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +227 -0
  42. package/templates/.agents/skills/import-codescan/SKILL.md +103 -0
  43. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +103 -0
  44. package/templates/.agents/skills/import-dependabot/SKILL.md +107 -0
  45. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +107 -0
  46. package/templates/.agents/skills/import-issue/SKILL.md +119 -0
  47. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +119 -0
  48. package/templates/.agents/skills/init-labels/SKILL.md +74 -0
  49. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +74 -0
  50. package/templates/.agents/skills/init-labels/scripts/init-labels.sh +111 -0
  51. package/templates/.agents/skills/init-milestones/SKILL.md +74 -0
  52. package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +74 -0
  53. package/templates/.agents/skills/init-milestones/scripts/init-milestones.sh +169 -0
  54. package/templates/.agents/skills/plan-task/SKILL.md +225 -0
  55. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +225 -0
  56. package/templates/.agents/skills/refine-task/SKILL.md +200 -0
  57. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +200 -0
  58. package/templates/.agents/skills/refine-title/SKILL.md +84 -0
  59. package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +83 -0
  60. package/templates/.agents/skills/release/SKILL.md +142 -0
  61. package/templates/.agents/skills/release/SKILL.zh-CN.md +141 -0
  62. package/templates/.agents/skills/release/scripts/manage-milestones.sh +80 -0
  63. package/templates/.agents/skills/review-task/SKILL.md +276 -0
  64. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +276 -0
  65. package/templates/.agents/skills/sync-issue/SKILL.md +569 -0
  66. package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +569 -0
  67. package/templates/.agents/skills/sync-pr/SKILL.md +142 -0
  68. package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +142 -0
  69. package/templates/.agents/skills/test/SKILL.md +61 -0
  70. package/templates/.agents/skills/test/SKILL.zh-CN.md +61 -0
  71. package/templates/.agents/skills/test-integration/SKILL.md +70 -0
  72. package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +69 -0
  73. package/templates/.agents/skills/update-agent-infra/SKILL.md +136 -0
  74. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +124 -0
  75. package/templates/.agents/skills/update-agent-infra/scripts/package.json +3 -0
  76. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +469 -0
  77. package/templates/.agents/skills/upgrade-dependency/SKILL.md +88 -0
  78. package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +87 -0
  79. package/templates/.agents/templates/handoff.md +60 -0
  80. package/templates/.agents/templates/handoff.zh-CN.md +60 -0
  81. package/templates/.agents/templates/review-report.md +67 -0
  82. package/templates/.agents/templates/review-report.zh-CN.md +67 -0
  83. package/templates/.agents/templates/task.md +65 -0
  84. package/templates/.agents/templates/task.zh-CN.md +65 -0
  85. package/templates/.agents/workflows/bug-fix.yaml +149 -0
  86. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +149 -0
  87. package/templates/.agents/workflows/code-review.yaml +60 -0
  88. package/templates/.agents/workflows/code-review.zh-CN.yaml +60 -0
  89. package/templates/.agents/workflows/feature-development.yaml +150 -0
  90. package/templates/.agents/workflows/feature-development.zh-CN.yaml +150 -0
  91. package/templates/.agents/workflows/refactoring.yaml +154 -0
  92. package/templates/.agents/workflows/refactoring.zh-CN.yaml +154 -0
  93. package/templates/.claude/CLAUDE.md +163 -0
  94. package/templates/.claude/CLAUDE.zh-CN.md +163 -0
  95. package/templates/.claude/commands/analyze-task.md +8 -0
  96. package/templates/.claude/commands/analyze-task.zh-CN.md +8 -0
  97. package/templates/.claude/commands/block-task.md +8 -0
  98. package/templates/.claude/commands/block-task.zh-CN.md +8 -0
  99. package/templates/.claude/commands/check-task.md +8 -0
  100. package/templates/.claude/commands/check-task.zh-CN.md +8 -0
  101. package/templates/.claude/commands/close-codescan.md +8 -0
  102. package/templates/.claude/commands/close-codescan.zh-CN.md +8 -0
  103. package/templates/.claude/commands/close-dependabot.md +8 -0
  104. package/templates/.claude/commands/close-dependabot.zh-CN.md +8 -0
  105. package/templates/.claude/commands/commit.md +7 -0
  106. package/templates/.claude/commands/commit.zh-CN.md +7 -0
  107. package/templates/.claude/commands/complete-task.md +8 -0
  108. package/templates/.claude/commands/complete-task.zh-CN.md +8 -0
  109. package/templates/.claude/commands/create-pr.md +8 -0
  110. package/templates/.claude/commands/create-pr.zh-CN.md +8 -0
  111. package/templates/.claude/commands/create-release-note.md +8 -0
  112. package/templates/.claude/commands/create-release-note.zh-CN.md +8 -0
  113. package/templates/.claude/commands/create-task.md +8 -0
  114. package/templates/.claude/commands/create-task.zh-CN.md +8 -0
  115. package/templates/.claude/commands/implement-task.md +8 -0
  116. package/templates/.claude/commands/implement-task.zh-CN.md +8 -0
  117. package/templates/.claude/commands/import-codescan.md +8 -0
  118. package/templates/.claude/commands/import-codescan.zh-CN.md +8 -0
  119. package/templates/.claude/commands/import-dependabot.md +8 -0
  120. package/templates/.claude/commands/import-dependabot.zh-CN.md +8 -0
  121. package/templates/.claude/commands/import-issue.md +8 -0
  122. package/templates/.claude/commands/import-issue.zh-CN.md +8 -0
  123. package/templates/.claude/commands/init-labels.md +7 -0
  124. package/templates/.claude/commands/init-labels.zh-CN.md +7 -0
  125. package/templates/.claude/commands/init-milestones.md +8 -0
  126. package/templates/.claude/commands/init-milestones.zh-CN.md +8 -0
  127. package/templates/.claude/commands/plan-task.md +8 -0
  128. package/templates/.claude/commands/plan-task.zh-CN.md +8 -0
  129. package/templates/.claude/commands/refine-task.md +8 -0
  130. package/templates/.claude/commands/refine-task.zh-CN.md +8 -0
  131. package/templates/.claude/commands/refine-title.md +8 -0
  132. package/templates/.claude/commands/refine-title.zh-CN.md +8 -0
  133. package/templates/.claude/commands/release.md +8 -0
  134. package/templates/.claude/commands/release.zh-CN.md +8 -0
  135. package/templates/.claude/commands/review-task.md +8 -0
  136. package/templates/.claude/commands/review-task.zh-CN.md +8 -0
  137. package/templates/.claude/commands/sync-issue.md +8 -0
  138. package/templates/.claude/commands/sync-issue.zh-CN.md +8 -0
  139. package/templates/.claude/commands/sync-pr.md +8 -0
  140. package/templates/.claude/commands/sync-pr.zh-CN.md +8 -0
  141. package/templates/.claude/commands/test-integration.md +7 -0
  142. package/templates/.claude/commands/test-integration.zh-CN.md +7 -0
  143. package/templates/.claude/commands/test.md +7 -0
  144. package/templates/.claude/commands/test.zh-CN.md +7 -0
  145. package/templates/.claude/commands/update-agent-infra.md +7 -0
  146. package/templates/.claude/commands/update-agent-infra.zh-CN.md +7 -0
  147. package/templates/.claude/commands/upgrade-dependency.md +8 -0
  148. package/templates/.claude/commands/upgrade-dependency.zh-CN.md +8 -0
  149. package/templates/.claude/project-rules.md +65 -0
  150. package/templates/.claude/project-rules.zh-CN.md +65 -0
  151. package/templates/.claude/settings.json +20 -0
  152. package/templates/.codex/README.md +38 -0
  153. package/templates/.codex/README.zh-CN.md +37 -0
  154. package/templates/.editorconfig +15 -0
  155. package/templates/.gemini/commands/_project_/analyze-task.toml +8 -0
  156. package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +8 -0
  157. package/templates/.gemini/commands/_project_/block-task.toml +8 -0
  158. package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +8 -0
  159. package/templates/.gemini/commands/_project_/check-task.toml +8 -0
  160. package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +8 -0
  161. package/templates/.gemini/commands/_project_/close-codescan.toml +8 -0
  162. package/templates/.gemini/commands/_project_/close-codescan.zh-CN.toml +8 -0
  163. package/templates/.gemini/commands/_project_/close-dependabot.toml +8 -0
  164. package/templates/.gemini/commands/_project_/close-dependabot.zh-CN.toml +8 -0
  165. package/templates/.gemini/commands/_project_/commit.toml +6 -0
  166. package/templates/.gemini/commands/_project_/commit.zh-CN.toml +6 -0
  167. package/templates/.gemini/commands/_project_/complete-task.toml +8 -0
  168. package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +8 -0
  169. package/templates/.gemini/commands/_project_/create-pr.toml +8 -0
  170. package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +8 -0
  171. package/templates/.gemini/commands/_project_/create-release-note.toml +8 -0
  172. package/templates/.gemini/commands/_project_/create-release-note.zh-CN.toml +8 -0
  173. package/templates/.gemini/commands/_project_/create-task.toml +8 -0
  174. package/templates/.gemini/commands/_project_/create-task.zh-CN.toml +8 -0
  175. package/templates/.gemini/commands/_project_/implement-task.toml +8 -0
  176. package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +8 -0
  177. package/templates/.gemini/commands/_project_/import-codescan.toml +8 -0
  178. package/templates/.gemini/commands/_project_/import-codescan.zh-CN.toml +8 -0
  179. package/templates/.gemini/commands/_project_/import-dependabot.toml +8 -0
  180. package/templates/.gemini/commands/_project_/import-dependabot.zh-CN.toml +8 -0
  181. package/templates/.gemini/commands/_project_/import-issue.toml +8 -0
  182. package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +8 -0
  183. package/templates/.gemini/commands/_project_/init-labels.toml +8 -0
  184. package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +8 -0
  185. package/templates/.gemini/commands/_project_/init-milestones.toml +10 -0
  186. package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +10 -0
  187. package/templates/.gemini/commands/_project_/plan-task.toml +8 -0
  188. package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +8 -0
  189. package/templates/.gemini/commands/_project_/refine-task.toml +8 -0
  190. package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +8 -0
  191. package/templates/.gemini/commands/_project_/refine-title.toml +8 -0
  192. package/templates/.gemini/commands/_project_/refine-title.zh-CN.toml +8 -0
  193. package/templates/.gemini/commands/_project_/release.toml +8 -0
  194. package/templates/.gemini/commands/_project_/release.zh-CN.toml +8 -0
  195. package/templates/.gemini/commands/_project_/review-task.toml +8 -0
  196. package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +8 -0
  197. package/templates/.gemini/commands/_project_/sync-issue.toml +8 -0
  198. package/templates/.gemini/commands/_project_/sync-issue.zh-CN.toml +8 -0
  199. package/templates/.gemini/commands/_project_/sync-pr.toml +8 -0
  200. package/templates/.gemini/commands/_project_/sync-pr.zh-CN.toml +8 -0
  201. package/templates/.gemini/commands/_project_/test-integration.toml +6 -0
  202. package/templates/.gemini/commands/_project_/test-integration.zh-CN.toml +6 -0
  203. package/templates/.gemini/commands/_project_/test.toml +6 -0
  204. package/templates/.gemini/commands/_project_/test.zh-CN.toml +6 -0
  205. package/templates/.gemini/commands/_project_/update-agent-infra.toml +6 -0
  206. package/templates/.gemini/commands/_project_/update-agent-infra.zh-CN.toml +6 -0
  207. package/templates/.gemini/commands/_project_/upgrade-dependency.toml +8 -0
  208. package/templates/.gemini/commands/_project_/upgrade-dependency.zh-CN.toml +8 -0
  209. package/templates/.gemini/settings.json +3 -0
  210. package/templates/.github/ISSUE_TEMPLATE/01_bug_report.yml +149 -0
  211. package/templates/.github/ISSUE_TEMPLATE/02_question.yml +101 -0
  212. package/templates/.github/ISSUE_TEMPLATE/03_feature_request.yml +131 -0
  213. package/templates/.github/ISSUE_TEMPLATE/04_documentation.yml +165 -0
  214. package/templates/.github/ISSUE_TEMPLATE/05_other.yml +147 -0
  215. package/templates/.github/ISSUE_TEMPLATE/config.yml +11 -0
  216. package/templates/.github/PULL_REQUEST_TEMPLATE.md +123 -0
  217. package/templates/.github/dependabot.yml +17 -0
  218. package/templates/.github/hooks/check-utf8-encoding.sh +25 -0
  219. package/templates/.github/release.yml +27 -0
  220. package/templates/.github/workflows/pr-title-check.yml +42 -0
  221. package/templates/.mailmap +4 -0
  222. package/templates/.opencode/COMMAND_STYLE_GUIDE.md +232 -0
  223. package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +232 -0
  224. package/templates/.opencode/README.md +76 -0
  225. package/templates/.opencode/README.zh-CN.md +77 -0
  226. package/templates/.opencode/commands/analyze-task.md +11 -0
  227. package/templates/.opencode/commands/analyze-task.zh-CN.md +11 -0
  228. package/templates/.opencode/commands/block-task.md +11 -0
  229. package/templates/.opencode/commands/block-task.zh-CN.md +11 -0
  230. package/templates/.opencode/commands/check-task.md +11 -0
  231. package/templates/.opencode/commands/check-task.zh-CN.md +11 -0
  232. package/templates/.opencode/commands/close-codescan.md +11 -0
  233. package/templates/.opencode/commands/close-codescan.zh-CN.md +11 -0
  234. package/templates/.opencode/commands/close-dependabot.md +11 -0
  235. package/templates/.opencode/commands/close-dependabot.zh-CN.md +11 -0
  236. package/templates/.opencode/commands/commit.md +9 -0
  237. package/templates/.opencode/commands/commit.zh-CN.md +9 -0
  238. package/templates/.opencode/commands/complete-task.md +11 -0
  239. package/templates/.opencode/commands/complete-task.zh-CN.md +11 -0
  240. package/templates/.opencode/commands/create-pr.md +11 -0
  241. package/templates/.opencode/commands/create-pr.zh-CN.md +11 -0
  242. package/templates/.opencode/commands/create-release-note.md +11 -0
  243. package/templates/.opencode/commands/create-release-note.zh-CN.md +11 -0
  244. package/templates/.opencode/commands/create-task.md +11 -0
  245. package/templates/.opencode/commands/create-task.zh-CN.md +11 -0
  246. package/templates/.opencode/commands/implement-task.md +11 -0
  247. package/templates/.opencode/commands/implement-task.zh-CN.md +11 -0
  248. package/templates/.opencode/commands/import-codescan.md +11 -0
  249. package/templates/.opencode/commands/import-codescan.zh-CN.md +11 -0
  250. package/templates/.opencode/commands/import-dependabot.md +11 -0
  251. package/templates/.opencode/commands/import-dependabot.zh-CN.md +11 -0
  252. package/templates/.opencode/commands/import-issue.md +11 -0
  253. package/templates/.opencode/commands/import-issue.zh-CN.md +11 -0
  254. package/templates/.opencode/commands/init-labels.md +9 -0
  255. package/templates/.opencode/commands/init-labels.zh-CN.md +9 -0
  256. package/templates/.opencode/commands/init-milestones.md +11 -0
  257. package/templates/.opencode/commands/init-milestones.zh-CN.md +11 -0
  258. package/templates/.opencode/commands/plan-task.md +11 -0
  259. package/templates/.opencode/commands/plan-task.zh-CN.md +11 -0
  260. package/templates/.opencode/commands/refine-task.md +11 -0
  261. package/templates/.opencode/commands/refine-task.zh-CN.md +11 -0
  262. package/templates/.opencode/commands/refine-title.md +11 -0
  263. package/templates/.opencode/commands/refine-title.zh-CN.md +11 -0
  264. package/templates/.opencode/commands/release.md +11 -0
  265. package/templates/.opencode/commands/release.zh-CN.md +11 -0
  266. package/templates/.opencode/commands/review-task.md +11 -0
  267. package/templates/.opencode/commands/review-task.zh-CN.md +11 -0
  268. package/templates/.opencode/commands/sync-issue.md +11 -0
  269. package/templates/.opencode/commands/sync-issue.zh-CN.md +11 -0
  270. package/templates/.opencode/commands/sync-pr.md +11 -0
  271. package/templates/.opencode/commands/sync-pr.zh-CN.md +11 -0
  272. package/templates/.opencode/commands/test-integration.md +9 -0
  273. package/templates/.opencode/commands/test-integration.zh-CN.md +9 -0
  274. package/templates/.opencode/commands/test.md +9 -0
  275. package/templates/.opencode/commands/test.zh-CN.md +9 -0
  276. package/templates/.opencode/commands/update-agent-infra.md +9 -0
  277. package/templates/.opencode/commands/update-agent-infra.zh-CN.md +9 -0
  278. package/templates/.opencode/commands/upgrade-dependency.md +11 -0
  279. package/templates/.opencode/commands/upgrade-dependency.zh-CN.md +11 -0
  280. package/templates/AGENTS.md +91 -0
  281. package/templates/AGENTS.zh-CN.md +91 -0
  282. package/templates/CONTRIBUTING.md +126 -0
  283. package/templates/CONTRIBUTING.zh-CN.md +124 -0
  284. package/templates/SECURITY.md +131 -0
  285. package/templates/SECURITY.zh-CN.md +131 -0
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "处理代码审查反馈并修复审查中发现的问题。按优先级(Blocker -> Major -> Minor)修复。 仅处理审查中标记的问题,不添加额外变更。当用户要求修复审查问题时触发。参数:task-id。"
3
+ usage: "/refine-task <task-id>"
4
+ ---
5
+
6
+ 读取并执行 `.agents/skills/refine-task/SKILL.md` 中的 refine-task 技能。
7
+
8
+ 严格按照技能中定义的所有步骤执行。
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "Deep-analyze Issue or PR content and reformat its title to Conventional Commits format"
3
+ usage: "/refine-title <number>"
4
+ ---
5
+
6
+ Read and execute the refine-title skill from `.agents/skills/refine-title/SKILL.md`.
7
+
8
+ Follow all steps defined in the skill exactly.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "深度分析 Issue 或 PR 内容,并将其标题重构为 Conventional Commits 格式。 当用户要求优化标题时触发。参数:issue 或 PR 编号。"
3
+ usage: "/refine-title <number>"
4
+ ---
5
+
6
+ 读取并执行 `.agents/skills/refine-title/SKILL.md` 中的 refine-title 技能。
7
+
8
+ 严格按照技能中定义的所有步骤执行。
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "Execute version release workflow"
3
+ usage: "/release <version>"
4
+ ---
5
+
6
+ Read and execute the release skill from `.agents/skills/release/SKILL.md`.
7
+
8
+ Follow all steps defined in the skill exactly.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "执行版本发布流程。当用户要求发布版本时触发。参数:版本号(X.Y.Z)。"
3
+ usage: "/release <version>"
4
+ ---
5
+
6
+ 读取并执行 `.agents/skills/release/SKILL.md` 中的 release 技能。
7
+
8
+ 严格按照技能中定义的所有步骤执行。
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "Review task implementation and output code review report"
3
+ usage: "/review-task <task-id>"
4
+ ---
5
+
6
+ Read and execute the review-task skill from `.agents/skills/review-task/SKILL.md`.
7
+
8
+ Follow all steps defined in the skill exactly.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "审查任务实现代码并输出代码审查报告,按严重程度分类(Blocker / Major / Minor)。 当用户在实现完成后要求代码审查时触发。参数:task-id。"
3
+ usage: "/review-task <task-id>"
4
+ ---
5
+
6
+ 读取并执行 `.agents/skills/review-task/SKILL.md` 中的 review-task 技能。
7
+
8
+ 严格按照技能中定义的所有步骤执行。
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "Sync task progress to GitHub Issue comment"
3
+ usage: "/sync-issue <task-id>"
4
+ ---
5
+
6
+ Read and execute the sync-issue skill from `.agents/skills/sync-issue/SKILL.md`.
7
+
8
+ Follow all steps defined in the skill exactly.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "将任务处理进度同步到对应的 GitHub Issue 评论。 当用户要求同步进度到 Issue 时触发。参数:task-id。"
3
+ usage: "/sync-issue <task-id>"
4
+ ---
5
+
6
+ 读取并执行 `.agents/skills/sync-issue/SKILL.md` 中的 sync-issue 技能。
7
+
8
+ 严格按照技能中定义的所有步骤执行。
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "Sync task progress to Pull Request comment"
3
+ usage: "/sync-pr <task-id>"
4
+ ---
5
+
6
+ Read and execute the sync-pr skill from `.agents/skills/sync-pr/SKILL.md`.
7
+
8
+ Follow all steps defined in the skill exactly.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "将任务处理进度同步到对应的 Pull Request 评论。 当用户要求同步进度到 PR 时触发。参数:task-id。"
3
+ usage: "/sync-pr <task-id>"
4
+ ---
5
+
6
+ 读取并执行 `.agents/skills/sync-pr/SKILL.md` 中的 sync-pr 技能。
7
+
8
+ 严格按照技能中定义的所有步骤执行。
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: "Run integration test workflow"
3
+ ---
4
+
5
+ Read and execute the test-integration skill from `.agents/skills/test-integration/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: "执行项目集成测试流程。 当用户要求运行集成测试或端到端验证时触发。"
3
+ ---
4
+
5
+ 读取并执行 `.agents/skills/test-integration/SKILL.md` 中的 test-integration 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: "Run full test workflow (compilation + unit tests)"
3
+ ---
4
+
5
+ Read and execute the test skill from `.agents/skills/test/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: "执行项目完整测试流程(编译检查 + 单元测试)。 当用户要求运行测试或验证代码质量时触发。"
3
+ ---
4
+
5
+ 读取并执行 `.agents/skills/test/SKILL.md` 中的 test 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: "Update project AI collaboration config by re-rendering latest templates/"
3
+ ---
4
+
5
+ Read and execute the update-agent-infra skill from `.agents/skills/update-agent-infra/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly, including rendering from `templates/` before applying managed or merged updates.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: "通过重新渲染最新 templates/ 来更新项目 AI 协作配置"
3
+ ---
4
+
5
+ 读取并执行 `.agents/skills/update-agent-infra/SKILL.md` 中的 update-agent-infra 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行,包括先从 `templates/` 渲染,再应用 managed/merged 更新策略。
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "Upgrade dependency package to new version"
3
+ usage: "/upgrade-dependency <pkg> <from> <to>"
4
+ ---
5
+
6
+ Read and execute the upgrade-dependency skill from `.agents/skills/upgrade-dependency/SKILL.md`.
7
+
8
+ Follow all steps defined in the skill exactly.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "升级项目中的指定依赖包到新版本并验证变更。 当用户要求升级依赖时触发。参数:包名、原版本和新版本。"
3
+ usage: "/upgrade-dependency <pkg> <from> <to>"
4
+ ---
5
+
6
+ 读取并执行 `.agents/skills/upgrade-dependency/SKILL.md` 中的 upgrade-dependency 技能。
7
+
8
+ 严格按照技能中定义的所有步骤执行。
@@ -0,0 +1,65 @@
1
+ # Claude Code - Detailed Rules
2
+
3
+ ## Rule Summary
4
+
5
+ | Rule | Level | Description |
6
+ |------|-------|-------------|
7
+ | Commit message format | Critical | Conventional Commits in English |
8
+ | No auto-commit | Critical | Never auto-execute git commit/add |
9
+ | Copyright year update | Critical | Dynamic year via `date +%Y` |
10
+ | Task status management | Critical | Update task.md after each command |
11
+ | PR conventions | Important | Add generation marker |
12
+ | Task semantic recognition | Important | Auto-detect user intent |
13
+
14
+ ## Rule 1: Commit Message Format
15
+
16
+ Format: `<type>(<scope>): <English description>`
17
+
18
+ Types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
19
+
20
+ Must append Co-Authored-By signature with your model name.
21
+
22
+ Use HEREDOC format for multi-line commit messages.
23
+
24
+ ## Rule 2: No Auto-Commit
25
+
26
+ - NEVER execute `git commit` or `git add` automatically
27
+ - Only commit when user explicitly uses `/commit` command
28
+ - Complete code modifications, then remind user to use `/commit`
29
+
30
+ ## Rule 3: PR Submission Rules
31
+
32
+ Before creating PR:
33
+ - All tests must pass
34
+ - Lint checks pass
35
+ - Build succeeds
36
+ - Copyright headers updated
37
+ - Use PR template format
38
+
39
+ ## Rule 4: Copyright Year Update
40
+
41
+ - Get year dynamically: `date +%Y` (never hardcode)
42
+ - Update format: `Copyright (C) 2024-2025` -> `Copyright (C) 2024-2026`
43
+ - Use Edit tool, only update modified files
44
+
45
+ ## Rule 5: Task Semantic Recognition
46
+
47
+ Auto-detect user intent:
48
+ - "analyze issue XXX" -> `/import-issue`
49
+ - "analyze task TASK-..." -> `/analyze-task`
50
+ - "plan/design solution" -> `/plan-task`
51
+ - "implement/code" -> `/implement-task`
52
+ - "review" -> `/review-task`
53
+
54
+ ## Rule 6: Task Status Management
55
+
56
+ CRITICAL: Update task status immediately after command execution.
57
+
58
+ Commands that require updates:
59
+ - `/import-issue`: update current_step, updated_at, assigned_to
60
+ - `/analyze-task`: update current_step, updated_at, assigned_to
61
+ - `/plan-task`: update current_step, updated_at
62
+ - `/implement-task`: update current_step, updated_at
63
+ - `/review-task`: update current_step, updated_at
64
+ - `/complete-task`: update status, completed_at, updated_at
65
+ - `/block-task`: update status, blocked_at, blocked_reason
@@ -0,0 +1,65 @@
1
+ # Claude Code - 详细规则
2
+
3
+ ## 规则总览
4
+
5
+ | 规则 | 级别 | 描述 |
6
+ |------|------|------|
7
+ | 提交信息格式 | 关键 | Conventional Commits 英文格式 |
8
+ | 禁止自动提交 | 关键 | 不自动执行 git commit/add |
9
+ | 版权年份更新 | 关键 | 通过 `date +%Y` 动态获取年份 |
10
+ | 任务状态管理 | 关键 | 每个命令执行后更新 task.md |
11
+ | PR 规范 | 重要 | 添加生成标记 |
12
+ | 任务语义识别 | 重要 | 自动识别用户意图 |
13
+
14
+ ## 规则 1: 提交信息格式
15
+
16
+ 格式: `<type>(<scope>): <英文描述>`
17
+
18
+ 类型: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
19
+
20
+ 必须附加 Co-Authored-By 署名(使用你的模型名称)。
21
+
22
+ 使用 HEREDOC 格式处理多行提交信息。
23
+
24
+ ## 规则 2: 禁止自动提交
25
+
26
+ - 绝对不要自动执行 `git commit` 或 `git add`
27
+ - 仅当用户明确使用 `/commit` 命令时才提交
28
+ - 完成代码修改后,提醒用户使用 `/commit`
29
+
30
+ ## 规则 3: PR 提交规则
31
+
32
+ 创建 PR 前必须确保:
33
+ - 所有测试通过
34
+ - 代码检查通过
35
+ - 构建成功
36
+ - 版权头年份已更新
37
+ - 使用 PR 模板格式
38
+
39
+ ## 规则 4: 版权年份更新
40
+
41
+ - 动态获取年份: `date +%Y`(不要硬编码)
42
+ - 更新格式: `Copyright (C) 2024-2025` -> `Copyright (C) 2024-2026`
43
+ - 使用 Edit 工具,只更新已修改的文件
44
+
45
+ ## 规则 5: 任务语义识别
46
+
47
+ 自动识别用户意图:
48
+ - "分析 issue XXX" -> `/import-issue`
49
+ - "分析任务 TASK-..." -> `/analyze-task`
50
+ - "设计方案" -> `/plan-task`
51
+ - "实施/实现" -> `/implement-task`
52
+ - "审查" -> `/review-task`
53
+
54
+ ## 规则 6: 任务状态管理
55
+
56
+ 关键: 每个命令执行后必须立即更新任务状态。
57
+
58
+ 需要更新的命令:
59
+ - `/import-issue`: 更新 current_step, updated_at, assigned_to
60
+ - `/analyze-task`: 更新 current_step, updated_at, assigned_to
61
+ - `/plan-task`: 更新 current_step, updated_at
62
+ - `/implement-task`: 更新 current_step, updated_at
63
+ - `/review-task`: 更新 current_step, updated_at
64
+ - `/complete-task`: 更新 status, completed_at, updated_at
65
+ - `/block-task`: 更新 status, blocked_at, blocked_reason
@@ -0,0 +1,20 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(tree:*)",
5
+ "Bash(date:*)",
6
+ "Bash(git:*)",
7
+ "Bash(gh:*)",
8
+ "Bash(ls:*)",
9
+ "Bash(pwd:*)",
10
+ "Bash(echo:*)",
11
+ "Bash(mkdir:*)",
12
+ "WebSearch",
13
+ "WebFetch"
14
+ ],
15
+ "deny": [
16
+ "Bash(sudo rm:*)",
17
+ "Bash(rm -rf /:*)"
18
+ ]
19
+ }
20
+ }
@@ -0,0 +1,38 @@
1
+ # Codex Skills ({{project}})
2
+
3
+ This project uses native Codex skills.
4
+
5
+ ## Use Skills Directly
6
+
7
+ - Skills live in `.agents/skills/`
8
+ - Invoke them with `$skill-name`
9
+
10
+ Examples:
11
+
12
+ ```text
13
+ $update-agent-infra
14
+ $create-task add graceful shutdown support
15
+ $plan-task TASK-20260310-105622
16
+ ```
17
+
18
+ ## Where Commands Live
19
+
20
+ Codex reads the actual workflow instructions from the project-local skill
21
+ files, for example:
22
+
23
+ - `.agents/skills/update-agent-infra/SKILL.md`
24
+ - `.agents/skills/create-task/SKILL.md`
25
+ - `.agents/skills/implement-task/SKILL.md`
26
+
27
+ The `.codex/` directory contains project documentation for Codex usage.
28
+
29
+ ## FAQ
30
+
31
+ ### Q: How are skills resolved?
32
+
33
+ A: Codex discovers skills from the current project directory.
34
+
35
+ ### Q: How do I customize a workflow?
36
+
37
+ A: Edit the corresponding `SKILL.md` file under `.agents/skills/`. Template
38
+ projects should update the matching file under `templates/.agents/skills/`.
@@ -0,0 +1,37 @@
1
+ # Codex Skills({{project}})
2
+
3
+ 本项目使用 Codex 原生 skills。
4
+
5
+ ## 直接使用 Skills
6
+
7
+ - 技能文件位于 `.agents/skills/`
8
+ - 使用 `$skill-name` 调用
9
+
10
+ 示例:
11
+
12
+ ```text
13
+ $update-agent-infra
14
+ $create-task 给 postman 添加优雅停机功能
15
+ $plan-task TASK-20260310-105622
16
+ ```
17
+
18
+ ## 命令定义在哪里
19
+
20
+ Codex 会直接读取项目内的技能文件,例如:
21
+
22
+ - `.agents/skills/update-agent-infra/SKILL.md`
23
+ - `.agents/skills/create-task/SKILL.md`
24
+ - `.agents/skills/implement-task/SKILL.md`
25
+
26
+ `.codex/` 目录用于存放本项目的 Codex 使用文档。
27
+
28
+ ## 常见问题
29
+
30
+ ### Q: Skills 是如何解析的?
31
+
32
+ A: Codex 会从当前项目目录中发现并加载 skills。
33
+
34
+ ### Q: 如何自定义工作流?
35
+
36
+ A: 直接编辑 `.agents/skills/` 下对应的 `SKILL.md`。如果是在模板仓库中维护,
37
+ 则同步修改 `templates/.agents/skills/` 中的对应文件。
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 2
10
+
11
+ [*.md]
12
+ trim_trailing_whitespace = false
13
+
14
+ [Makefile]
15
+ indent_style = tab
@@ -0,0 +1,8 @@
1
+ description = "Analyze an existing task and output a requirement analysis document"
2
+ prompt = """
3
+ Analyze task {{args}}.
4
+
5
+ Read and execute the analyze-task skill from `.agents/skills/analyze-task/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "分析已有任务并输出需求分析文档,支持多轮分析产物。 当用户要求分析某个任务时触发。参数:task-id。"
2
+ prompt = """
3
+ 分析任务 {{args}}。
4
+
5
+ 读取并执行 `.agents/skills/analyze-task/SKILL.md` 中的 analyze-task 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "Mark task as blocked and record blocking reason"
2
+ prompt = """
3
+ Block task: {{args}}
4
+
5
+ Read and execute the block-task skill from `.agents/skills/block-task/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "标记任务为阻塞状态并记录阻塞原因,将其从 active 目录移动到 blocked 目录。 当任务因技术问题、需求不清晰、缺少资源或待定决策而无法继续时使用。 参数:task-id,可选的阻塞原因。"
2
+ prompt = """
3
+ 阻塞任务:{{args}}
4
+
5
+ 读取并执行 `.agents/skills/block-task/SKILL.md` 中的 block-task 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "View task current status and progress"
2
+ prompt = """
3
+ Check status of task {{args}}.
4
+
5
+ Read and execute the check-task skill from `.agents/skills/check-task/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "查看任务的当前状态、工作流进度和上下文文件。这是只读操作,报告任务状态并建议 适当的下一步操作。当用户要求查看任务状态时触发。参数:task-id。"
2
+ prompt = """
3
+ 查看任务 {{args}} 的状态。
4
+
5
+ 读取并执行 `.agents/skills/check-task/SKILL.md` 中的 check-task 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "Close Code Scanning alert with documented reason"
2
+ prompt = """
3
+ Close CodeQL alert #{{args}}.
4
+
5
+ Read and execute the close-codescan skill from `.agents/skills/close-codescan/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "关闭 Code Scanning(CodeQL)告警并提供有据可查的理由。 当用户要求关闭 Code Scanning 告警时触发。参数:告警编号。"
2
+ prompt = """
3
+ 关闭 CodeQL 告警 #{{args}}。
4
+
5
+ 读取并执行 `.agents/skills/close-codescan/SKILL.md` 中的 close-codescan 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "Close Dependabot security alert with documented reason"
2
+ prompt = """
3
+ Close Dependabot alert #{{args}}.
4
+
5
+ Read and execute the close-dependabot skill from `.agents/skills/close-dependabot/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "关闭 Dependabot 安全告警并提供有据可查的理由。 当用户要求关闭 Dependabot 告警时触发。参数:告警编号。"
2
+ prompt = """
3
+ 关闭 Dependabot 告警 #{{args}}。
4
+
5
+ 读取并执行 `.agents/skills/close-dependabot/SKILL.md` 中的 close-dependabot 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
8
+ """
@@ -0,0 +1,6 @@
1
+ description = "Commit current changes to Git"
2
+ prompt = """
3
+ Read and execute the commit skill from `.agents/skills/commit/SKILL.md`.
4
+
5
+ Follow all steps defined in the skill exactly.
6
+ """
@@ -0,0 +1,6 @@
1
+ description = "提交当前变更到 Git,包含版权头年份检查和任务状态更新。 当用户要求提交代码或保存变更时触发。"
2
+ prompt = """
3
+ 读取并执行 `.agents/skills/commit/SKILL.md` 中的 commit 技能。
4
+
5
+ 严格按照技能中定义的所有步骤执行。
6
+ """
@@ -0,0 +1,8 @@
1
+ description = "Mark task completed and archive to completed directory"
2
+ prompt = """
3
+ Complete task {{args}}.
4
+
5
+ Read and execute the complete-task skill from `.agents/skills/complete-task/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "标记任务完成并归档,将任务目录从 active/ 移动到 completed/。在允许完成之前, 验证所有工作流步骤已完成、代码已审查并提交、测试已通过。 当用户要求完成或归档任务时触发。参数:task-id。"
2
+ prompt = """
3
+ 完成任务 {{args}}。
4
+
5
+ 读取并执行 `.agents/skills/complete-task/SKILL.md` 中的 complete-task 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "Create Pull Request to specified or auto-detected target branch"
2
+ prompt = """
3
+ Create PR: {{args}}
4
+
5
+ Read and execute the create-pr skill from `.agents/skills/create-pr/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "创建 Pull Request 到指定或自动推断的目标分支。 当用户要求创建 PR 时触发。可选参数:目标分支。"
2
+ prompt = """
3
+ 创建 PR:{{args}}
4
+
5
+ 读取并执行 `.agents/skills/create-pr/SKILL.md` 中的 create-pr 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "Auto-generate structured Release Notes from PR/commit and optionally create GitHub Draft Release"
2
+ prompt = """
3
+ Generate release note: {{args}}
4
+
5
+ Read and execute the create-release-note skill from `.agents/skills/create-release-note/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "从 PR 和 commit 生成版本发布说明。 当用户要求生成发布说明时触发。参数:版本号,可选的上一版本号。"
2
+ prompt = """
3
+ 生成发布说明:{{args}}
4
+
5
+ 读取并执行 `.agents/skills/create-release-note/SKILL.md` 中的 create-release-note 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "Create task from natural language description and generate requirement analysis document"
2
+ prompt = """
3
+ Task description: {{args}}
4
+
5
+ Read and execute the create-task skill from `.agents/skills/create-task/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "根据用户的自然语言描述创建任务并执行需求分析。当用户描述一个新功能、Bug 或改进需求时触发。 唯一的产出是 task.md 和 analysis.md —— 不编写任何业务代码。参数:任务描述文本。"
2
+ prompt = """
3
+ 任务描述:{{args}}
4
+
5
+ 读取并执行 `.agents/skills/create-task/SKILL.md` 中的 create-task 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "Implement task based on technical plan and output implementation report"
2
+ prompt = """
3
+ Implement task {{args}}.
4
+
5
+ Read and execute the implement-task skill from `.agents/skills/implement-task/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "根据技术方案实施任务,编写代码和测试,输出实现报告。当用户在技术方案审查通过后要求实施任务或编码时触发。 参数:task-id。"
2
+ prompt = """
3
+ 实施任务 {{args}}。
4
+
5
+ 读取并执行 `.agents/skills/implement-task/SKILL.md` 中的 implement-task 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
8
+ """