@fitlab-ai/agent-infra 0.9.1 → 0.9.3

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 (476) hide show
  1. package/README.md +24 -11
  2. package/README.zh-CN.md +24 -11
  3. package/bin/cli.ts +12 -0
  4. package/dist/bin/cli.js +14 -0
  5. package/dist/bin/internal-cli.js +30 -0
  6. package/dist/lib/agent-client.js +163 -0
  7. package/dist/lib/agent-clients/adapter.js +337 -0
  8. package/dist/lib/agent-clients/adapters/antigravity-cli.js +64 -0
  9. package/dist/lib/agent-clients/adapters/claude-code.js +71 -0
  10. package/dist/lib/agent-clients/adapters/codex-sandbox.js +210 -0
  11. package/dist/lib/agent-clients/adapters/codex.js +63 -0
  12. package/dist/lib/agent-clients/adapters/index.js +20 -0
  13. package/dist/lib/agent-clients/adapters/opencode.js +73 -0
  14. package/dist/lib/agent-clients/config.js +215 -0
  15. package/dist/lib/agent-clients/custom-tuis.js +99 -0
  16. package/dist/lib/agent-clients/invocation.js +9 -0
  17. package/dist/lib/agent-clients/next-steps.js +47 -0
  18. package/dist/lib/agent-clients/project-assets.js +45 -0
  19. package/dist/lib/agent-clients/reconcile.js +236 -0
  20. package/dist/lib/agent-clients/registry.js +78 -0
  21. package/dist/lib/agent-clients/schema.js +75 -0
  22. package/dist/lib/agent-clients/tokens.js +49 -0
  23. package/dist/lib/agent-clients/types.js +29 -0
  24. package/dist/lib/builtin-tuis.js +9 -14
  25. package/dist/lib/defaults.json +85 -73
  26. package/dist/lib/git/review-snapshot.js +25 -10
  27. package/dist/lib/git/reviewed-commit-equivalence.js +110 -0
  28. package/dist/lib/git/workflow.js +54 -1
  29. package/dist/lib/init.js +47 -91
  30. package/dist/lib/internal/agent-client.js +174 -0
  31. package/dist/lib/internal/git-workflow.js +7 -2
  32. package/dist/lib/internal/platform-checks.js +3 -3
  33. package/dist/lib/internal/platform-comment.js +29 -2
  34. package/dist/lib/internal/platform-issue.js +7 -0
  35. package/dist/lib/internal/platform-pr-review.js +132 -0
  36. package/dist/lib/internal/platform-pr.js +20 -2
  37. package/dist/lib/internal/platform-release-notes.js +52 -16
  38. package/dist/lib/internal/pr-review-grade.js +140 -0
  39. package/dist/lib/internal/release-workflow.js +82 -20
  40. package/dist/lib/internal/task-activity.js +73 -0
  41. package/dist/lib/internal/task-event.js +17 -1
  42. package/dist/lib/internal/task-lifecycle.js +7 -0
  43. package/dist/lib/internal/task-orchestration.js +196 -0
  44. package/dist/lib/internal/task-review.js +70 -0
  45. package/dist/lib/merge.js +2 -1
  46. package/dist/lib/platform/adapters.js +45 -1
  47. package/dist/lib/platform/change-request-git-evidence.js +113 -0
  48. package/dist/lib/platform/completion-backfill.js +122 -0
  49. package/dist/lib/platform/issue-comments.js +3 -2
  50. package/dist/lib/platform/merged-pr-equivalence.js +156 -16
  51. package/dist/lib/platform/pr-checks.js +101 -50
  52. package/dist/lib/platform/pr-review.js +166 -0
  53. package/dist/lib/platform/pull-requests.js +432 -7
  54. package/dist/lib/platform/release-notes.js +85 -3
  55. package/dist/lib/platform/releases.js +1 -1
  56. package/dist/lib/platform/verification-required.js +8 -10
  57. package/dist/lib/pr-review/evidence-grading.js +229 -0
  58. package/dist/lib/prompt.js +15 -3
  59. package/dist/lib/release/channels.js +4 -1
  60. package/dist/lib/release/workflow.js +4 -2
  61. package/dist/lib/remove-dir.js +25 -0
  62. package/dist/lib/run/tui.js +11 -7
  63. package/dist/lib/sandbox/agent-client-reconciler.js +234 -0
  64. package/dist/lib/sandbox/clipboard/linux.js +2 -1
  65. package/dist/lib/sandbox/commands/create.js +76 -200
  66. package/dist/lib/sandbox/commands/enter.js +17 -1
  67. package/dist/lib/sandbox/commands/prune.js +2 -2
  68. package/dist/lib/sandbox/commands/rm.js +3 -2
  69. package/dist/lib/sandbox/commands/show.js +1 -1
  70. package/dist/lib/sandbox/config.js +21 -4
  71. package/dist/lib/sandbox/constants.js +3 -0
  72. package/dist/lib/sandbox/dockerfile.js +2 -1
  73. package/dist/lib/sandbox/managed-fs.js +10 -5
  74. package/dist/lib/sandbox/recovery.js +52 -36
  75. package/dist/lib/sandbox/shell.js +1 -1
  76. package/dist/lib/sandbox/tool-types.js +8 -0
  77. package/dist/lib/sandbox/tools.js +2 -126
  78. package/dist/lib/task/activity-intent.js +101 -0
  79. package/dist/lib/task/artifact-lifecycle.js +3 -50
  80. package/dist/lib/task/commands/decisions.js +50 -20
  81. package/dist/lib/task/commands/log.js +15 -14
  82. package/dist/lib/task/delegation-receipts.js +128 -0
  83. package/dist/lib/task/events.js +146 -8
  84. package/dist/lib/task/finalization-artifacts.js +35 -0
  85. package/dist/lib/task/lifecycle-execution.js +46 -0
  86. package/dist/lib/task/orchestration.js +784 -0
  87. package/dist/lib/task/review-artifacts.js +143 -59
  88. package/dist/lib/task/review-finalization.js +186 -0
  89. package/dist/lib/task/review-fingerprint.js +4 -0
  90. package/dist/lib/task/task-execution-lock.js +231 -0
  91. package/dist/lib/task/verification-checks.js +2 -1
  92. package/dist/lib/task/verification-engine.js +372 -28
  93. package/dist/lib/task/verification-review.js +1 -1
  94. package/dist/lib/task/verification.js +5 -2
  95. package/dist/lib/task/workspace-snapshot.js +46 -0
  96. package/dist/lib/update.js +42 -161
  97. package/lib/agent-client.ts +214 -0
  98. package/lib/agent-clients/adapter.ts +534 -0
  99. package/lib/agent-clients/adapters/antigravity-cli.ts +65 -0
  100. package/lib/agent-clients/adapters/claude-code.ts +79 -0
  101. package/lib/agent-clients/adapters/codex-sandbox.ts +245 -0
  102. package/lib/agent-clients/adapters/codex.ts +67 -0
  103. package/lib/agent-clients/adapters/index.ts +27 -0
  104. package/lib/agent-clients/adapters/opencode.ts +75 -0
  105. package/lib/agent-clients/config.ts +323 -0
  106. package/lib/agent-clients/custom-tuis.ts +149 -0
  107. package/lib/agent-clients/invocation.ts +19 -0
  108. package/lib/agent-clients/next-steps.ts +85 -0
  109. package/lib/agent-clients/project-assets.ts +96 -0
  110. package/lib/agent-clients/reconcile.ts +325 -0
  111. package/lib/agent-clients/registry.ts +154 -0
  112. package/lib/agent-clients/schema.ts +80 -0
  113. package/lib/agent-clients/tokens.ts +53 -0
  114. package/lib/agent-clients/types.ts +92 -0
  115. package/lib/benchmark/schemas/v1.0.0/case-manifest.schema.json +120 -0
  116. package/lib/benchmark/schemas/v1.0.0/common.schema.json +109 -0
  117. package/lib/benchmark/schemas/v1.0.0/grader-result.schema.json +160 -0
  118. package/lib/benchmark/schemas/v1.0.0/run-manifest.schema.json +122 -0
  119. package/lib/benchmark/schemas/v1.0.0/subject.schema.json +227 -0
  120. package/lib/builtin-tuis.ts +16 -15
  121. package/lib/defaults.json +24 -12
  122. package/lib/git/review-snapshot.ts +39 -9
  123. package/lib/git/reviewed-commit-equivalence.ts +135 -0
  124. package/lib/git/workflow.ts +66 -2
  125. package/lib/init.ts +53 -121
  126. package/lib/internal/agent-client.ts +186 -0
  127. package/lib/internal/git-workflow.ts +6 -2
  128. package/lib/internal/platform-checks.ts +4 -4
  129. package/lib/internal/platform-comment.ts +17 -2
  130. package/lib/internal/platform-issue.ts +4 -0
  131. package/lib/internal/platform-pr-review.ts +104 -0
  132. package/lib/internal/platform-pr.ts +14 -1
  133. package/lib/internal/platform-release-notes.ts +59 -16
  134. package/lib/internal/pr-review-grade.ts +130 -0
  135. package/lib/internal/release-workflow.ts +79 -20
  136. package/lib/internal/task-activity.ts +55 -0
  137. package/lib/internal/task-event.ts +9 -1
  138. package/lib/internal/task-lifecycle.ts +4 -0
  139. package/lib/internal/task-orchestration.ts +171 -0
  140. package/lib/internal/task-review.ts +70 -0
  141. package/lib/merge.ts +2 -1
  142. package/lib/platform/adapters.ts +169 -3
  143. package/lib/platform/change-request-git-evidence.ts +159 -0
  144. package/lib/platform/completion-backfill.ts +134 -0
  145. package/lib/platform/issue-comments.ts +3 -2
  146. package/lib/platform/merged-pr-equivalence.ts +178 -19
  147. package/lib/platform/pr-checks.ts +121 -66
  148. package/lib/platform/pr-review.ts +201 -0
  149. package/lib/platform/pull-requests.ts +529 -27
  150. package/lib/platform/release-notes.ts +100 -4
  151. package/lib/platform/releases.ts +1 -1
  152. package/lib/platform/verification-required.ts +12 -10
  153. package/lib/pr-review/evidence-grading.ts +318 -0
  154. package/lib/prompt.ts +16 -3
  155. package/lib/release/channels.ts +4 -1
  156. package/lib/release/workflow.ts +4 -3
  157. package/lib/remove-dir.ts +28 -0
  158. package/lib/run/tui.ts +12 -5
  159. package/lib/sandbox/agent-client-reconciler.ts +378 -0
  160. package/lib/sandbox/clipboard/linux.ts +2 -1
  161. package/lib/sandbox/commands/create.ts +111 -212
  162. package/lib/sandbox/commands/enter.ts +23 -1
  163. package/lib/sandbox/commands/prune.ts +2 -2
  164. package/lib/sandbox/commands/rm.ts +3 -2
  165. package/lib/sandbox/commands/show.ts +1 -1
  166. package/lib/sandbox/config.ts +31 -4
  167. package/lib/sandbox/constants.ts +6 -0
  168. package/lib/sandbox/dockerfile.ts +2 -1
  169. package/lib/sandbox/managed-fs.ts +18 -5
  170. package/lib/sandbox/recovery.ts +98 -67
  171. package/lib/sandbox/shell.ts +1 -1
  172. package/lib/sandbox/tool-types.ts +143 -0
  173. package/lib/sandbox/tools.ts +5 -157
  174. package/lib/server/server.schema.json +2 -2
  175. package/lib/task/activity-intent.ts +128 -0
  176. package/lib/task/artifact-lifecycle.ts +3 -39
  177. package/lib/task/commands/decisions.ts +53 -20
  178. package/lib/task/commands/log.ts +15 -14
  179. package/lib/task/delegation-receipts.ts +199 -0
  180. package/lib/task/events.ts +164 -11
  181. package/lib/task/finalization-artifacts.ts +58 -0
  182. package/lib/task/lifecycle-execution.ts +106 -0
  183. package/lib/task/orchestration.ts +1022 -0
  184. package/lib/task/review-artifacts.ts +201 -69
  185. package/lib/task/review-finalization.ts +306 -0
  186. package/lib/task/review-fingerprint.ts +5 -0
  187. package/lib/task/task-execution-lock.ts +296 -0
  188. package/lib/task/verification-checks.ts +2 -1
  189. package/lib/task/verification-engine.ts +424 -28
  190. package/lib/task/verification-review.ts +1 -0
  191. package/lib/task/verification.ts +8 -3
  192. package/lib/task/workspace-snapshot.ts +57 -0
  193. package/lib/update.ts +48 -184
  194. package/package.json +4 -4
  195. package/templates/.agents/QUICKSTART.en.md +25 -8
  196. package/templates/.agents/QUICKSTART.zh-CN.md +25 -8
  197. package/templates/.agents/README.en.md +29 -25
  198. package/templates/.agents/README.zh-CN.md +29 -25
  199. package/templates/.agents/hooks/lifecycle-delegation.js +75 -0
  200. package/templates/.agents/rules/README.en.md +2 -0
  201. package/templates/.agents/rules/README.zh-CN.md +2 -0
  202. package/templates/.agents/rules/commit-and-pr.en.md +1 -0
  203. package/templates/.agents/rules/commit-and-pr.zh-CN.md +1 -0
  204. package/templates/.agents/rules/create-issue.github.en.md +4 -2
  205. package/templates/.agents/rules/create-issue.github.zh-CN.md +4 -2
  206. package/templates/.agents/rules/human-decision-context.en.md +14 -12
  207. package/templates/.agents/rules/human-decision-context.zh-CN.md +14 -12
  208. package/templates/.agents/rules/issue-fields.github.en.md +3 -1
  209. package/templates/.agents/rules/issue-fields.github.zh-CN.md +3 -1
  210. package/templates/.agents/rules/issue-pr-commands.en.md +5 -3
  211. package/templates/.agents/rules/issue-pr-commands.github.en.md +5 -3
  212. package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +5 -3
  213. package/templates/.agents/rules/issue-pr-commands.zh-CN.md +5 -3
  214. package/templates/.agents/rules/issue-sync.github.en.md +7 -3
  215. package/templates/.agents/rules/issue-sync.github.zh-CN.md +8 -4
  216. package/templates/.agents/rules/lifecycle-orchestration.en.md +24 -0
  217. package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +24 -0
  218. package/templates/.agents/rules/milestone-inference.github.en.md +4 -2
  219. package/templates/.agents/rules/milestone-inference.github.zh-CN.md +4 -2
  220. package/templates/.agents/rules/next-step-output.en.md +18 -0
  221. package/templates/.agents/rules/next-step-output.zh-CN.md +18 -0
  222. package/templates/.agents/rules/no-mid-flow-questions.en.md +19 -0
  223. package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +19 -0
  224. package/templates/.agents/rules/pr-checks-commands.en.md +3 -3
  225. package/templates/.agents/rules/pr-checks-commands.github.en.md +2 -2
  226. package/templates/.agents/rules/pr-checks-commands.github.zh-CN.md +2 -2
  227. package/templates/.agents/rules/pr-checks-commands.zh-CN.md +3 -3
  228. package/templates/.agents/rules/pr-sync.en.md +3 -1
  229. package/templates/.agents/rules/pr-sync.github.en.md +11 -1
  230. package/templates/.agents/rules/pr-sync.github.zh-CN.md +11 -1
  231. package/templates/.agents/rules/pr-sync.zh-CN.md +3 -1
  232. package/templates/.agents/rules/release-commands.en.md +1 -1
  233. package/templates/.agents/rules/release-commands.github.en.md +21 -5
  234. package/templates/.agents/rules/release-commands.github.zh-CN.md +21 -5
  235. package/templates/.agents/rules/release-commands.zh-CN.md +1 -1
  236. package/templates/.agents/rules/review-handshake.en.md +4 -4
  237. package/templates/.agents/rules/review-handshake.zh-CN.md +4 -4
  238. package/templates/.agents/rules/review-method.en.md +113 -0
  239. package/templates/.agents/rules/review-method.zh-CN.md +98 -0
  240. package/templates/.agents/rules/task-management.en.md +11 -0
  241. package/templates/.agents/rules/task-management.zh-CN.md +11 -0
  242. package/templates/.agents/skills/analyze-task/SKILL.en.md +15 -12
  243. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +15 -12
  244. package/templates/.agents/skills/block-task/SKILL.en.md +11 -9
  245. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +11 -9
  246. package/templates/.agents/skills/cancel-task/SKILL.en.md +10 -8
  247. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +11 -9
  248. package/templates/.agents/skills/check-task/SKILL.en.md +16 -16
  249. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +16 -16
  250. package/templates/.agents/skills/close-codescan/SKILL.en.md +7 -5
  251. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +7 -5
  252. package/templates/.agents/skills/close-dependabot/SKILL.en.md +7 -5
  253. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +7 -5
  254. package/templates/.agents/skills/code-task/SKILL.en.md +10 -7
  255. package/templates/.agents/skills/code-task/SKILL.zh-CN.md +13 -10
  256. package/templates/.agents/skills/code-task/reference/fix-mode.en.md +14 -16
  257. package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +14 -16
  258. package/templates/.agents/skills/code-task/reference/output-template.en.md +3 -3
  259. package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +3 -3
  260. package/templates/.agents/skills/commit/SKILL.en.md +13 -1
  261. package/templates/.agents/skills/commit/SKILL.zh-CN.md +13 -1
  262. package/templates/.agents/skills/commit/reference/commit-message.en.md +1 -1
  263. package/templates/.agents/skills/commit/reference/commit-message.zh-CN.md +1 -1
  264. package/templates/.agents/skills/commit/reference/issue-metadata-sync.en.md +1 -1
  265. package/templates/.agents/skills/commit/reference/issue-metadata-sync.zh-CN.md +1 -1
  266. package/templates/.agents/skills/commit/reference/pr-summary-sync.en.md +1 -1
  267. package/templates/.agents/skills/commit/reference/pr-summary-sync.zh-CN.md +1 -1
  268. package/templates/.agents/skills/commit/reference/task-status-update.en.md +24 -28
  269. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +24 -28
  270. package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +6 -4
  271. package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +6 -4
  272. package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +1 -1
  273. package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +1 -1
  274. package/templates/.agents/skills/complete-task/SKILL.en.md +23 -8
  275. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +23 -8
  276. package/templates/.agents/skills/complete-task/config/verify.en.json +1 -0
  277. package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +1 -0
  278. package/templates/.agents/skills/complete-task/reference/external-delivery.en.md +17 -0
  279. package/templates/.agents/skills/complete-task/reference/external-delivery.zh-CN.md +17 -0
  280. package/templates/.agents/skills/create-pr/SKILL.en.md +13 -11
  281. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +13 -11
  282. package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +1 -1
  283. package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +1 -1
  284. package/templates/.agents/skills/create-pr/reference/pr-body-template.en.md +3 -3
  285. package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +3 -3
  286. package/templates/.agents/skills/create-release-note/SKILL.en.md +17 -16
  287. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +17 -16
  288. package/templates/.agents/skills/create-task/SKILL.en.md +16 -14
  289. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +16 -14
  290. package/templates/.agents/skills/import-codescan/SKILL.en.md +5 -5
  291. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +5 -5
  292. package/templates/.agents/skills/import-dependabot/SKILL.en.md +5 -5
  293. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +5 -5
  294. package/templates/.agents/skills/import-issue/SKILL.en.md +10 -8
  295. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +10 -8
  296. package/templates/.agents/skills/init-labels/SKILL.en.md +4 -4
  297. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +4 -4
  298. package/templates/.agents/skills/init-milestones/SKILL.en.md +4 -4
  299. package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +4 -4
  300. package/templates/.agents/skills/plan-task/SKILL.en.md +13 -10
  301. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +13 -10
  302. package/templates/.agents/skills/post-release/SKILL.en.md +2 -0
  303. package/templates/.agents/skills/post-release/SKILL.zh-CN.md +2 -0
  304. package/templates/.agents/skills/refine-title/SKILL.en.md +1 -1
  305. package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +1 -1
  306. package/templates/.agents/skills/release/SKILL.en.md +16 -10
  307. package/templates/.agents/skills/release/SKILL.zh-CN.md +16 -10
  308. package/templates/.agents/skills/restore-task/SKILL.en.md +4 -1
  309. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +4 -1
  310. package/templates/.agents/skills/review-analysis/SKILL.en.md +18 -4
  311. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +19 -5
  312. package/templates/.agents/skills/review-analysis/config/verify.en.json +6 -0
  313. package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +6 -0
  314. package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +13 -15
  315. package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +13 -15
  316. package/templates/.agents/skills/review-analysis/reference/report-template.en.md +51 -5
  317. package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +52 -6
  318. package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +25 -22
  319. package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +25 -22
  320. package/templates/.agents/skills/review-code/SKILL.en.md +35 -12
  321. package/templates/.agents/skills/review-code/SKILL.zh-CN.md +35 -12
  322. package/templates/.agents/skills/review-code/config/verify.en.json +7 -0
  323. package/templates/.agents/skills/review-code/config/verify.zh-CN.json +7 -0
  324. package/templates/.agents/skills/review-code/reference/concurrency-risks.en.md +25 -0
  325. package/templates/.agents/skills/review-code/reference/concurrency-risks.zh-CN.md +25 -0
  326. package/templates/.agents/skills/review-code/reference/cross-platform-risks.en.md +27 -0
  327. package/templates/.agents/skills/review-code/reference/cross-platform-risks.zh-CN.md +27 -0
  328. package/templates/.agents/skills/review-code/reference/documentation-antipatterns.en.md +13 -0
  329. package/templates/.agents/skills/review-code/reference/documentation-antipatterns.zh-CN.md +13 -0
  330. package/templates/.agents/skills/review-code/reference/migration-risks.en.md +25 -0
  331. package/templates/.agents/skills/review-code/reference/migration-risks.zh-CN.md +25 -0
  332. package/templates/.agents/skills/review-code/reference/output-templates.en.md +22 -24
  333. package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +22 -24
  334. package/templates/.agents/skills/review-code/reference/report-template.en.md +54 -7
  335. package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +54 -7
  336. package/templates/.agents/skills/review-code/reference/review-criteria.en.md +29 -24
  337. package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +29 -24
  338. package/templates/.agents/skills/review-code/reference/security-risks.en.md +25 -0
  339. package/templates/.agents/skills/review-code/reference/security-risks.zh-CN.md +25 -0
  340. package/templates/.agents/skills/review-plan/SKILL.en.md +18 -4
  341. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +19 -5
  342. package/templates/.agents/skills/review-plan/config/verify.en.json +6 -0
  343. package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +6 -0
  344. package/templates/.agents/skills/review-plan/reference/output-templates.en.md +13 -15
  345. package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +13 -15
  346. package/templates/.agents/skills/review-plan/reference/report-template.en.md +61 -5
  347. package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +61 -5
  348. package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +21 -24
  349. package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +21 -24
  350. package/templates/.agents/skills/review-pr/SKILL.en.md +158 -0
  351. package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +158 -0
  352. package/templates/.agents/skills/review-pr/config/verify.en.json +37 -0
  353. package/templates/.agents/skills/review-pr/config/verify.zh-CN.json +37 -0
  354. package/templates/.agents/skills/review-pr/reference/evidence-grading.en.md +65 -0
  355. package/templates/.agents/skills/review-pr/reference/evidence-grading.zh-CN.md +65 -0
  356. package/templates/.agents/skills/review-pr/reference/output-guidance.en.md +18 -0
  357. package/templates/.agents/skills/review-pr/reference/output-guidance.zh-CN.md +18 -0
  358. package/templates/.agents/skills/review-pr/reference/report-template.en.md +85 -0
  359. package/templates/.agents/skills/review-pr/reference/report-template.zh-CN.md +85 -0
  360. package/templates/.agents/skills/run-task/SKILL.en.md +22 -0
  361. package/templates/.agents/skills/run-task/SKILL.zh-CN.md +22 -0
  362. package/templates/.agents/skills/run-task/config/verify.en.json +10 -0
  363. package/templates/.agents/skills/run-task/config/verify.zh-CN.json +10 -0
  364. package/templates/.agents/skills/run-task/reference/host-validation.en.md +20 -0
  365. package/templates/.agents/skills/run-task/reference/host-validation.zh-CN.md +20 -0
  366. package/templates/.agents/skills/test/SKILL.en.md +4 -4
  367. package/templates/.agents/skills/test/SKILL.zh-CN.md +4 -4
  368. package/templates/.agents/skills/test-integration/SKILL.en.md +4 -4
  369. package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +4 -4
  370. package/templates/.agents/skills/update-agent-infra/SKILL.en.md +5 -5
  371. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +5 -5
  372. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +664 -246
  373. package/templates/.agents/skills/upgrade-dependency/SKILL.en.md +4 -4
  374. package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +4 -4
  375. package/templates/.agents/skills/watch-pr/SKILL.en.md +21 -21
  376. package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +21 -21
  377. package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +27 -6
  378. package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +26 -5
  379. package/templates/.agents/templates/task.en.md +1 -1
  380. package/templates/.agents/templates/task.zh-CN.md +1 -1
  381. package/templates/.agents/workflows/bug-fix.en.yaml +3 -3
  382. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +3 -3
  383. package/templates/.agents/workflows/code-review.en.yaml +1 -1
  384. package/templates/.agents/workflows/code-review.zh-CN.yaml +1 -1
  385. package/templates/.agents/workflows/feature-development.en.yaml +4 -4
  386. package/templates/.agents/workflows/feature-development.zh-CN.yaml +4 -4
  387. package/templates/.agents/workflows/refactoring.en.yaml +3 -3
  388. package/templates/.agents/workflows/refactoring.zh-CN.yaml +3 -3
  389. package/templates/.claude/agents/agent-infra-lifecycle-executor.en.md +6 -0
  390. package/templates/.claude/agents/agent-infra-lifecycle-executor.zh-CN.md +6 -0
  391. package/templates/.claude/agents/agent-infra-lifecycle-reviewer.en.md +6 -0
  392. package/templates/.claude/agents/agent-infra-lifecycle-reviewer.zh-CN.md +6 -0
  393. package/templates/.claude/commands/post-release.en.md +1 -0
  394. package/templates/.claude/commands/post-release.zh-CN.md +1 -0
  395. package/templates/.claude/commands/review-pr.en.md +8 -0
  396. package/templates/.claude/commands/review-pr.zh-CN.md +8 -0
  397. package/templates/.claude/commands/run-task.en.md +8 -0
  398. package/templates/.claude/commands/run-task.zh-CN.md +8 -0
  399. package/templates/.claude/settings.json +24 -0
  400. package/templates/.codex/agents/agent-infra-lifecycle-executor.en.toml +3 -0
  401. package/templates/.codex/agents/agent-infra-lifecycle-executor.zh-CN.toml +3 -0
  402. package/templates/.codex/agents/agent-infra-lifecycle-reviewer.en.toml +3 -0
  403. package/templates/.codex/agents/agent-infra-lifecycle-reviewer.zh-CN.toml +3 -0
  404. package/templates/.gemini/commands/_project_/review-pr.en.toml +10 -0
  405. package/templates/.gemini/commands/_project_/review-pr.zh-CN.toml +10 -0
  406. package/templates/.opencode/commands/post-release.en.md +2 -0
  407. package/templates/.opencode/commands/post-release.zh-CN.md +2 -0
  408. package/templates/.opencode/commands/review-pr.en.md +11 -0
  409. package/templates/.opencode/commands/review-pr.zh-CN.md +11 -0
  410. package/templates/.opencode/commands/run-task.en.md +11 -0
  411. package/templates/.opencode/commands/run-task.zh-CN.md +11 -0
  412. package/templates/.gemini/commands/_project_/analyze-task.en.toml +0 -10
  413. package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +0 -10
  414. package/templates/.gemini/commands/_project_/archive-tasks.en.toml +0 -10
  415. package/templates/.gemini/commands/_project_/archive-tasks.zh-CN.toml +0 -10
  416. package/templates/.gemini/commands/_project_/block-task.en.toml +0 -10
  417. package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +0 -10
  418. package/templates/.gemini/commands/_project_/cancel-task.en.toml +0 -10
  419. package/templates/.gemini/commands/_project_/cancel-task.zh-CN.toml +0 -10
  420. package/templates/.gemini/commands/_project_/check-task.en.toml +0 -10
  421. package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +0 -10
  422. package/templates/.gemini/commands/_project_/close-codescan.en.toml +0 -8
  423. package/templates/.gemini/commands/_project_/close-codescan.zh-CN.toml +0 -8
  424. package/templates/.gemini/commands/_project_/close-dependabot.en.toml +0 -8
  425. package/templates/.gemini/commands/_project_/close-dependabot.zh-CN.toml +0 -8
  426. package/templates/.gemini/commands/_project_/code-task.en.toml +0 -10
  427. package/templates/.gemini/commands/_project_/code-task.zh-CN.toml +0 -10
  428. package/templates/.gemini/commands/_project_/commit.en.toml +0 -10
  429. package/templates/.gemini/commands/_project_/commit.zh-CN.toml +0 -10
  430. package/templates/.gemini/commands/_project_/complete-manual-validation.en.toml +0 -10
  431. package/templates/.gemini/commands/_project_/complete-manual-validation.zh-CN.toml +0 -10
  432. package/templates/.gemini/commands/_project_/complete-task.en.toml +0 -10
  433. package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +0 -10
  434. package/templates/.gemini/commands/_project_/create-pr.en.toml +0 -10
  435. package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +0 -10
  436. package/templates/.gemini/commands/_project_/create-release-note.en.toml +0 -8
  437. package/templates/.gemini/commands/_project_/create-release-note.zh-CN.toml +0 -8
  438. package/templates/.gemini/commands/_project_/create-task.en.toml +0 -8
  439. package/templates/.gemini/commands/_project_/create-task.zh-CN.toml +0 -8
  440. package/templates/.gemini/commands/_project_/import-codescan.en.toml +0 -8
  441. package/templates/.gemini/commands/_project_/import-codescan.zh-CN.toml +0 -8
  442. package/templates/.gemini/commands/_project_/import-dependabot.en.toml +0 -8
  443. package/templates/.gemini/commands/_project_/import-dependabot.zh-CN.toml +0 -8
  444. package/templates/.gemini/commands/_project_/import-issue.en.toml +0 -8
  445. package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +0 -8
  446. package/templates/.gemini/commands/_project_/init-labels.en.toml +0 -8
  447. package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +0 -8
  448. package/templates/.gemini/commands/_project_/init-milestones.en.toml +0 -10
  449. package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +0 -10
  450. package/templates/.gemini/commands/_project_/plan-task.en.toml +0 -10
  451. package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +0 -10
  452. package/templates/.gemini/commands/_project_/post-release.en.toml +0 -6
  453. package/templates/.gemini/commands/_project_/post-release.zh-CN.toml +0 -6
  454. package/templates/.gemini/commands/_project_/refine-title.en.toml +0 -8
  455. package/templates/.gemini/commands/_project_/refine-title.zh-CN.toml +0 -8
  456. package/templates/.gemini/commands/_project_/release.en.toml +0 -8
  457. package/templates/.gemini/commands/_project_/release.zh-CN.toml +0 -8
  458. package/templates/.gemini/commands/_project_/restore-task.en.toml +0 -8
  459. package/templates/.gemini/commands/_project_/restore-task.zh-CN.toml +0 -8
  460. package/templates/.gemini/commands/_project_/review-analysis.en.toml +0 -10
  461. package/templates/.gemini/commands/_project_/review-analysis.zh-CN.toml +0 -10
  462. package/templates/.gemini/commands/_project_/review-code.en.toml +0 -10
  463. package/templates/.gemini/commands/_project_/review-code.zh-CN.toml +0 -10
  464. package/templates/.gemini/commands/_project_/review-plan.en.toml +0 -10
  465. package/templates/.gemini/commands/_project_/review-plan.zh-CN.toml +0 -10
  466. package/templates/.gemini/commands/_project_/test-integration.en.toml +0 -6
  467. package/templates/.gemini/commands/_project_/test-integration.zh-CN.toml +0 -6
  468. package/templates/.gemini/commands/_project_/test.en.toml +0 -6
  469. package/templates/.gemini/commands/_project_/test.zh-CN.toml +0 -6
  470. package/templates/.gemini/commands/_project_/update-agent-infra.en.toml +0 -6
  471. package/templates/.gemini/commands/_project_/update-agent-infra.zh-CN.toml +0 -6
  472. package/templates/.gemini/commands/_project_/upgrade-dependency.en.toml +0 -8
  473. package/templates/.gemini/commands/_project_/upgrade-dependency.zh-CN.toml +0 -8
  474. package/templates/.gemini/commands/_project_/watch-pr.en.toml +0 -10
  475. package/templates/.gemini/commands/_project_/watch-pr.zh-CN.toml +0 -10
  476. package/templates/.gemini/settings.json +0 -3
@@ -7,6 +7,9 @@ description: >
7
7
  ---
8
8
 
9
9
  # 代码审查
10
+ > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
11
+
12
+ 若入口业务操作数包含 `--orchestrated`,绑定 `{execution-flag}` = `--orchestrated` 并原样转发给 summary finalizer 与 completed 事件;否则绑定为空。不得从 `orchestration.json`、环境变量或历史产物推断该标记。
10
13
 
11
14
  审查最新代码轮次,并产出 `review-code.md` 或 `review-code-r{N}.md`。
12
15
 
@@ -46,7 +49,7 @@ agent-infra-internal task-snapshot {task-id} --format text
46
49
 
47
50
  ## 步骤开始:声明 started 事件
48
51
 
49
- 确认前置条件和产物上下文后、本轮第一个产出动作之前执行 `agent-infra-internal task-event {task-id} review-code.started --agent {agent}`。
52
+ 确认前置条件和产物上下文后、本轮第一个产出动作之前执行 `agent-infra-internal task-event {task-id} review-code.started --agent {standard-agent-token}`。
50
53
 
51
54
  ## 执行步骤
52
55
  ### 1. 验证前置条件
@@ -66,13 +69,23 @@ agent-infra-internal task-snapshot {task-id} --format text
66
69
  ### 4. 执行审查
67
70
 
68
71
  遵循 `.agents/workflows/feature-development.yaml`,并同时检查完整变更上下文:
69
- - 一次性记录 `R=$(git rev-parse HEAD)`;本轮报告、指纹和任务审查事实都复用该 R,禁止稍后重新读取 HEAD 代替
70
- - `git diff --binary "$R" -- <post-review-globs>` 覆盖已跟踪变更
72
+ - 一次性记录审查提交 `R=$(git rev-parse HEAD)`;本轮报告、快照树和任务审查事实都复用该 R,禁止稍后重新读取 HEAD 代替
73
+ - 调用 `agent-infra-internal platform-pr inspect {task-id}`:已绑定 PR 且返回 base SHA 时,令差异基线 `D=$(git merge-base "$R" "{base-sha}")`;无 PR 时仅在存在已跟踪或未跟踪工作区变化的前提下令 `D=$R`。无 PR 且工作区干净时无法可靠确定完整提交范围,必须停止并要求先绑定 PR,不得用空 diff 继续审查
74
+ - `git diff --binary "$D" -- <post-review-globs>` 覆盖 `D` 到当前工作区的已提交与未提交跟踪变更
71
75
  - `git ls-files -o --exclude-standard -z -- <post-review-globs>` 覆盖未跟踪新文件
72
- - 把 `mode=worktree`、基线 `R` 写入临时 JSON,调用 `agent-infra-internal git-workflow snapshot --input {file}` 一次生成审查差异指纹 `F` 与审查快照树 `T`,并写入报告
76
+ - 把 `mode=worktree`、`baseline=R`、`diffBase=D` 写入临时 JSON,调用 `agent-infra-internal git-workflow snapshot --input {file}` 一次生成覆盖完整提交范围的审查差异指纹 `F` 与当前工作区审查快照树 `T`;把 `R`、`D`、`F`、`T` 全部写入报告
73
77
 
78
+ > 上述事实采集完成后,先读取 `.agents/rules/review-method.md`,以其作为 readiness 证据并按 Pass 2–5 完成追踪、风险镜头、反证和归类;报告必须记录全部五遍覆盖。
74
79
  > 详细审查标准、严重程度划分和 reviewer 关注点见 `reference/review-criteria.md`。执行此步骤前先读取 `reference/review-criteria.md`。
75
- > 测试审查硬门禁:当 `git diff` 触及测试文件时,必须先读取 `.agents/rules/testing-discipline.md` 并逐条核对(尤其"正向已覆盖时不应再加反向断言")。
80
+
81
+ 代码阶段按以下顺序落实共享五遍协议:
82
+ - Pass 1 读取完整 diff、未跟踪文件、最新 code artifact、已批准 plan/review-plan、任务来源和测试原始结果。
83
+ - Pass 2 建立验收/方案—实现—验证映射,并逐文件记录 changed lines、必要调用方/被调用方、状态/数据流和未覆盖区域。
84
+ - Pass 3 先检查整体设计,再检查逐文件语义;逐行判断共享风险镜头注册表,完整读取所有命中 reference。测试变更由注册表中的 `testing-discipline` 镜头加载 `.agents/rules/testing-discipline.md`,不得维护另一份触发清单。
85
+ - Pass 4 检查保护条件、调用约束、测试覆盖和更窄影响范围等反证。
86
+ - Pass 5 核对 finding、manual-validation、advisory、证据类型、未验证假设、账本和 verdict。
87
+
88
+ 报告必须填写 `reference/report-template.md` 中的代码实现专项覆盖;镜头命中但 reference 缺失/未加载,或风险缺口未分类时不得给出通过结论。
76
89
 
77
90
  ### 5. 编写审查报告
78
91
 
@@ -83,18 +96,28 @@ agent-infra-internal task-snapshot {task-id} --format text
83
96
  ### 6. 更新任务状态
84
97
 
85
98
  - 报告完成后,新 finding 逐条调用 `agent-infra-internal task-ledger {task-id} finding-upsert --stage code --review-artifact {review-artifact} --ordinal {n} --severity {blocker|major|minor} --evidence {review-artifact}#{anchor}`;复核上一轮响应时调用 `finding-review --id {ledger-id} --status {confirmed|closed|open|needs-human-decision} --evidence {相称证据}`。不得扫描编号或手写账本行
86
- - 全部账本写入完成后只调用一次 `agent-infra-internal task-ledger {task-id} stage-status --stage code`。以 `stageStatus.canAdvance` 决定 verdict 和下一步,并以 `unresolvedFindingCounts` 填写 blocker/major/minor;仅 `canAdvance=true` 可用 Approved
99
+ - 全部账本写入完成后只调用一次 `agent-infra-internal task-review {task-id} finalize-summary --stage code --artifact {review-artifact} {execution-flag}`
100
+
101
+ 从该次返回值绑定并复用以下结构化映射:
102
+
103
+ ```text
104
+ {unresolved-blockers} = stageStatus.unresolvedFindingCounts.blocker
105
+ {unresolved-major} = stageStatus.unresolvedFindingCounts.major
106
+ {unresolved-minor} = stageStatus.unresolvedFindingCounts.minor
107
+ ```
108
+
109
+ 该 intent 原子最终化报告摘要并返回同一次账本快照;不得再调用 `stage-status`、手工替换占位符或扫描问题清单。最终化失败或返回字段缺失时,停止在完成事件之前。以同一次返回的 `stageStatus.canAdvance` 决定 verdict 和下一步;仅 `canAdvance=true` 可用 Approved
87
110
  - 仅当 `canAdvance=true`、本轮结论为 Approved 且 `T == R^{tree}` 时写入 `last_reviewed_commit: {R}`;Approved 快照包含未提交差异时清除旧值。否则保留既有值,不得推进或清空
88
111
  - Approved 出口继续按 `reference/output-templates.md` 采集 PR 与 required-checks 事实:未提交/未推送走 `commit`,无 PR 走 `create-pr`(无 PR 流程除外),checks 未终态走 `watch-pr`,仅 `HEAD == last_reviewed_commit == PR head` 且 checks 为 `passed|no-required` 时走 `complete-task`;不得仅按审查轮次分流
89
- - 完成 `last_reviewed_commit` 处理后执行 `agent-infra-internal task-event {task-id} review-code.completed --agent {agent} --artifact {review-artifact} --verdict {approved|changes-requested|rejected} --blockers {n} --major {n} --minor {n} --manual-validation {n}`
112
+ - 完成 `last_reviewed_commit` 处理后执行 `agent-infra-internal task-event {task-id} review-code.completed --agent {standard-agent-token} --artifact {review-artifact} --verdict {approved|changes-requested|rejected} --blockers {unresolved-blockers} --major {unresolved-major} --minor {unresolved-minor} --manual-validation {n} {execution-flag}`
90
113
 
91
114
  完成日志必须始终写入 `Manual-validation: {n}` 字段,0 也保留。
92
115
  `manual-validation` 是 `ai task log` 中 review 行「人工校验点」(EN `Manual-validation`)计数的数据源;不要新增并行人工验证字段。
93
116
 
94
117
  如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续):
95
- - 调用 `agent-infra-internal platform-issue sync {task-id} --agent {agent} --status in-progress`
96
- - 调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}`
97
- - 调用 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {review-artifact} --agent {agent}`
118
+ - 调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status in-progress`
119
+ - 调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
120
+ - 调用 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {review-artifact} --agent {standard-agent-token}`
98
121
 
99
122
  ### 7. 完成校验
100
123
 
@@ -128,7 +151,7 @@ manual-validation 的数量不参与分支选择,只作为人工校验计数
128
151
 
129
152
  > 渲染最终输出前先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令的 `{task-ref}` 渲染为当前任务短号 `NN`(取值与回退见该文件),其他 `{task-id}` 占位(报告标题、路径)保持完整 TASK-id 形式;(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
130
153
 
131
- 向用户展示下一步时,必须包含所有 TUI 命令格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
154
+ 向用户通过统一 helper 渲染已选场景的下一步命令。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
132
155
 
133
156
  ## 完成检查清单
134
157
 
@@ -136,7 +159,7 @@ manual-validation 的数量不参与分支选择,只作为人工校验计数
136
159
  - [ ] 已创建 `{review-artifact}`
137
160
  - [ ] 已更新 task.md 并追加 Activity Log
138
161
  - [ ] 用户输出中只选择了一个审查结论分支
139
- - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,含自定义 TUI,不要筛选)
162
+ - [ ] 已通过统一 helper 渲染已选场景的下一步命令
140
163
 
141
164
  ## 注意事项
142
165
 
@@ -19,6 +19,9 @@
19
19
  "file_pattern": "review-code.md|review-code-r{N}.md",
20
20
  "required_sections": [
21
21
  "Review Summary",
22
+ "Review Coverage Declaration",
23
+ "Code Implementation Coverage",
24
+ "Traceability Matrix",
22
25
  "Findings",
23
26
  "Non-blocking Advisories",
24
27
  "Manual Validation Items",
@@ -33,10 +36,14 @@
33
36
  "^\\$ ",
34
37
  "^- \\*\\*Overall Verdict\\*\\*[::]\\s*(?:通过|需要修改|拒绝|Approved|Changes Requested|Rejected)\\s*$",
35
38
  "^- \\*\\*Review Baseline Commit\\*\\*[::]\\s*\\S",
39
+ "^- \\*\\*Reviewed Diff Base\\*\\*[::]\\s*[0-9a-f]{40,64}\\s*$",
36
40
  "^- \\*\\*Reviewed Diff Fingerprint\\*\\*[::]\\s*sha256:[0-9a-f]{64}\\s*$",
37
41
  "^- \\*\\*Reviewed Snapshot Tree\\*\\*[::]\\s*[0-9a-f]{40,64}\\s*$"
38
42
  ]
39
43
  },
44
+ "review-summary": {
45
+ "stage": "code"
46
+ },
40
47
  "review-fact": {},
41
48
  "activity-log": {
42
49
  "expected_action_pattern": "(Review Code|Code Review) \\(Round \\d+\\)"
@@ -19,6 +19,9 @@
19
19
  "file_pattern": "review-code.md|review-code-r{N}.md",
20
20
  "required_sections": [
21
21
  "审查摘要",
22
+ "检视覆盖声明",
23
+ "代码实现专项覆盖",
24
+ "追踪矩阵",
22
25
  "问题清单",
23
26
  "非阻塞建议",
24
27
  "人工校验项",
@@ -33,10 +36,14 @@
33
36
  "^\\$ ",
34
37
  "^- \\*\\*总体结论\\*\\*[::]\\s*(?:通过|需要修改|拒绝|Approved|Changes Requested|Rejected)\\s*$",
35
38
  "^- \\*\\*审查基线提交\\*\\*[::]\\s*\\S",
39
+ "^- \\*\\*审查差异基线\\*\\*[::]\\s*[0-9a-f]{40,64}\\s*$",
36
40
  "^- \\*\\*审查差异指纹\\*\\*[::]\\s*sha256:[0-9a-f]{64}\\s*$",
37
41
  "^- \\*\\*审查快照树\\*\\*[::]\\s*[0-9a-f]{40,64}\\s*$"
38
42
  ]
39
43
  },
44
+ "review-summary": {
45
+ "stage": "code"
46
+ },
40
47
  "review-fact": {},
41
48
  "activity-log": {
42
49
  "expected_action_pattern": "(Review Code|Code Review) \\(Round \\d+\\)"
@@ -0,0 +1,25 @@
1
+ # Concurrency Risk Review
2
+
3
+ ## Scope
4
+
5
+ Use when changes touch asynchronous coordination, shared state, locks, retries, idempotency, races, cancellation, or timeouts.
6
+
7
+ ## Review Questions
8
+
9
+ - Are shared-state ownership, atomic boundaries, and visibility explicit?
10
+ - Do retries, timeouts, cancellation, and duplicate delivery remain idempotent and resource-safe?
11
+ - Can competing order or failure interleavings cause lost updates, duplicate side effects, or deadlocks?
12
+
13
+ ## Evidence Requirements
14
+
15
+ Record key state transitions, event order, and synchronization boundaries. Support conclusions with deterministic concurrency tests, call chains, or data flows.
16
+
17
+ ## Common Counterexamples
18
+
19
+ - Inferring concurrency safety from one successful sequential execution.
20
+ - Checking only that a lock exists without its granularity, ordering, and release paths.
21
+ - Replacing explainable evidence with one successful randomized stress run.
22
+
23
+ ## When Closure Is Not Possible
24
+
25
+ Record reproducible races or leaks as findings, checks requiring a real scheduler or load environment as manual-validation, and uncovered interleavings as a gap.
@@ -0,0 +1,25 @@
1
+ # 并发风险检视
2
+
3
+ ## 适用范围
4
+
5
+ 当变更触及异步协调、共享状态、锁、重试、幂等、竞态、取消或超时时使用。
6
+
7
+ ## 检视问题
8
+
9
+ - 共享状态的所有权、原子边界和可见性是否明确。
10
+ - 重试、超时、取消和重复交付是否保持幂等且不会泄漏资源。
11
+ - 竞争顺序和失败交错是否会产生丢失更新、重复副作用或死锁。
12
+
13
+ ## 证据要求
14
+
15
+ 记录关键状态转换、事件顺序和同步边界;使用确定性并发测试、调用链或数据流支撑结论。
16
+
17
+ ## 常见反例
18
+
19
+ - 单次顺序执行通过就推断并发安全。
20
+ - 只检查加锁存在,不检查锁粒度、顺序和释放路径。
21
+ - 用随机压力测试的单次成功替代可解释证据。
22
+
23
+ ## 无法闭环时
24
+
25
+ 可重现的竞态或资源泄漏形成 finding;需要真实调度器或负载环境的检查进入 manual-validation;未覆盖交错记录为 gap。
@@ -0,0 +1,27 @@
1
+ # Cross-platform Risk Review
2
+
3
+ ## Scope
4
+
5
+ Use when changes touch OS branches, path or case behavior, shells and commands, permissions, symlinks, newlines or encodings, signals and processes, or platform fallbacks.
6
+
7
+ When the change also touches test files and must express real platform guards or test execution scope, read `.agents/rules/cross-platform-tests.md` in full. That second-level rule governs test scope only; this file governs implementation semantics. Do not load the second level when tests are unchanged.
8
+
9
+ ## Review Questions
10
+
11
+ - Do paths, shells, permissions, and process behavior use the real semantics of each target platform?
12
+ - Do platform fallbacks preserve consistent outcomes and distinguish unsupported behavior from runtime failure?
13
+ - Do tests execute on genuinely supported platforms instead of simulating coverage with early returns?
14
+
15
+ ## Evidence Requirements
16
+
17
+ Record affected platforms, implementation branches, and fallback paths. When test scope is involved, also record second-level rule readiness and `onPlatforms()` guards.
18
+
19
+ ## Common Counterexamples
20
+
21
+ - Inferring equivalence across platforms from success on the development platform.
22
+ - Simulating path or shell behavior with string concatenation.
23
+ - Loading the test-guard rule unconditionally for formal completeness.
24
+
25
+ ## When Closure Is Not Possible
26
+
27
+ Record reproducible platform defects as findings, checks that only a specific real platform can close as manual-validation, and actual platform risks left uncovered by missing, unloaded, or insufficient rules as a gap. A structural gate cannot replace semantic judgment.
@@ -0,0 +1,27 @@
1
+ # 跨平台风险检视
2
+
3
+ ## 适用范围
4
+
5
+ 当变更触及 OS 分支、路径与大小写、shell/命令、权限、符号链接、换行/编码、信号/进程或平台回退时使用。
6
+
7
+ 若变更同时触及测试文件,且需要表达真实平台守卫或测试运行范围,继续完整读取 `.agents/rules/cross-platform-tests.md`。该二级规则只约束测试运行范围;本文件负责实现层的平台语义。没有测试变更时不加载二级规则。
8
+
9
+ ## 检视问题
10
+
11
+ - 路径、shell、权限和进程行为是否使用目标平台真实语义。
12
+ - 平台回退是否保留一致结果,并区分不支持与运行失败。
13
+ - 测试是否在真实支持平台执行,而非用测试体内早返回伪装覆盖。
14
+
15
+ ## 证据要求
16
+
17
+ 记录受影响平台、实现分支和回退路径;涉及测试范围时同时记录二级规则加载证据和 `onPlatforms()` 守卫。
18
+
19
+ ## 常见反例
20
+
21
+ - 用当前开发平台成功推断所有平台等价。
22
+ - 以字符串拼接模拟路径或 shell 行为。
23
+ - 为形式完整无条件加载测试守卫规则。
24
+
25
+ ## 无法闭环时
26
+
27
+ 可复现的平台缺陷形成 finding;只能在特定真实平台闭环的事项进入 manual-validation;规则缺失、未加载或未覆盖的实际平台风险记录为 gap,不得用结构 gate 替代语义判断。
@@ -0,0 +1,13 @@
1
+ # Documentation Anti-patterns
2
+
3
+ When reviewing new or changed documentation, require it to describe the current behavior after the change instead of using historical differences as a substitute for current facts.
4
+
5
+ ## Backward-looking Descriptions of Removed Functionality
6
+
7
+ When functionality has been removed, current-behavior documentation should not keep saying that the functionality "no longer exists" or "was removed." Such wording keeps a deleted concept in the set of current knowledge that readers must understand.
8
+
9
+ Terms such as `不再`, `no longer`, `已被移除`, `removed`, and `used to` can locate candidate text, but a match is not a finding by itself. Judge the documentation's purpose and change context:
10
+
11
+ - Current reference documentation, rules, and usage instructions should directly describe supported behavior.
12
+ - Migration guides, changelogs, and historical records may preserve necessary before-and-after differences when their historical or migration context is explicit.
13
+ - Record a finding only when backward-looking wording preserves a deleted concept as current knowledge, and cite the exact file and line.
@@ -0,0 +1,13 @@
1
+ # 文档反模式
2
+
3
+ 审查新增或修改的文档时,文档应描述变更后的当前行为,而不是用历史差异替代当前事实。
4
+
5
+ ## 已删除功能的反向描述
6
+
7
+ 当功能已经删除时,面向当前行为的文档不应继续写“该功能不再存在”或“该能力已被移除”。这类反向描述会让已删除概念继续成为读者必须理解的现行知识。
8
+
9
+ `不再`、`no longer`、`已被移除`、`removed` 和 `used to` 等词可用于定位候选文本,但命中本身不是 finding。审查者必须结合文档用途和变更上下文判断:
10
+
11
+ - 当前参考文档、规则和使用说明应直接描述现在支持的行为。
12
+ - 迁移指南、变更日志和历史记录可以保留必要的前后差异,但应明确其历史或迁移语境。
13
+ - 只有当反向措辞把已删除概念保留为现行知识时,才应登记 finding,并引用准确的文件和行号。
@@ -0,0 +1,25 @@
1
+ # Migration and Compatibility Risk Review
2
+
3
+ ## Scope
4
+
5
+ Use when changes touch persistent formats, schemas, configuration/frontmatter, compatibility reads, migrations, or rollback behavior.
6
+
7
+ ## Review Questions
8
+
9
+ - Can old data or configuration be read safely, and is the post-write version boundary explicit?
10
+ - Is migration repeatable, and can execution recover or continue after partial failure?
11
+ - Does the rollback path match the compatibility window between old and new formats?
12
+
13
+ ## Evidence Requirements
14
+
15
+ Record the transition from old input to new state, version decisions, and failure states. Prefer migration tests, fixtures, state transitions, or specification conflicts.
16
+
17
+ ## Common Counterexamples
18
+
19
+ - Testing only fresh installation and ignoring existing state.
20
+ - Assuming migration succeeds once while ignoring retries and partial writes.
21
+ - Replacing data-semantic validation with format-existence checks.
22
+
23
+ ## When Closure Is Not Possible
24
+
25
+ Record reproducible corruption or compatibility failures as findings, checks requiring real historical data as manual-validation, and missing samples or rollback evidence as a gap.
@@ -0,0 +1,25 @@
1
+ # 迁移与兼容风险检视
2
+
3
+ ## 适用范围
4
+
5
+ 当变更触及持久化格式、schema、配置/frontmatter、兼容读取、迁移或回滚行为时使用。
6
+
7
+ ## 检视问题
8
+
9
+ - 旧数据或旧配置能否被安全读取,写入后的版本边界是否明确。
10
+ - 迁移是否可重复执行,部分失败后能否恢复或继续。
11
+ - 回滚路径是否与新旧格式的兼容窗口一致。
12
+
13
+ ## 证据要求
14
+
15
+ 记录旧输入到新状态的转换、版本判定和失败状态;优先使用迁移测试、fixture、状态转换或规范冲突。
16
+
17
+ ## 常见反例
18
+
19
+ - 只验证全新安装,不验证已有状态。
20
+ - 假设迁移一次成功,忽略重试和部分写入。
21
+ - 用格式存在性测试替代数据语义验证。
22
+
23
+ ## 无法闭环时
24
+
25
+ 可复现的数据损坏或兼容失败形成 finding;需要真实历史数据的验证进入 manual-validation;缺少样本或回滚证据时记录 gap。
@@ -17,11 +17,9 @@ Prohibitions:
17
17
  - never mix text from different branches
18
18
  - if `Blocker > 0`, never output an approval template
19
19
  - never count manual-validation findings as blockers / major issues / minor issues, and never use them to trigger Branch B/C/D
20
- - always include every TUI command format in the selected branch
20
+ - generate `{next-step-commands}` for the selected branch through the shared helper
21
21
  - The count line shows 5 numbers. Manual-validation (`{e}`) does not affect selection. `Human-decision` (`{h}`) counts this stage's `needs-human-decision` rows; because those rows are unresolved, `{h} > 0` means `canAdvance=false`. Expand the "Pending human-decision pre-block" from `.agents/rules/next-step-output.md` and show revision and re-review paths only.
22
22
 
23
- For Branches B/C/D, follow the revision commands with re-review commands: `/review-code {task-ref}`, `/{{project}}:review-code {task-ref}`, and `$review-code {task-ref}`.
24
-
25
23
  ### Branch A: Approved with No Findings
26
24
 
27
25
  Do not route by review round. Compare reviewed snapshot tree `T` with the tree of baseline `R`, then read `prFlow` / `pr_number`; when a PR exists, call `agent-infra-internal platform-checks inspect {task-id}`. Select exactly one mutually exclusive exit:
@@ -45,51 +43,51 @@ Reminder: manual-validation findings must be carried in the PR description as a
45
43
 
46
44
  #### Branch A1: Commit or Push
47
45
 
46
+ Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill commit --task-ref {task-ref}`.
47
+
48
48
  ```text
49
49
  Next step - commit or push the code:
50
- - Claude Code / OpenCode: /commit {task-ref}
51
- - Gemini CLI: /{{project}}:commit {task-ref}
52
- - Codex CLI: $commit {task-ref}
50
+ {next-step-commands}
53
51
  ```
54
52
 
55
53
  #### Branch A2: Create a Pull Request
56
54
 
55
+ Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill create-pr --task-ref {task-ref}`.
56
+
57
57
  ```text
58
58
  Next step - create a Pull Request:
59
- - Claude Code / OpenCode: /create-pr {task-ref}
60
- - Gemini CLI: /{{project}}:create-pr {task-ref}
61
- - Codex CLI: $create-pr {task-ref}
59
+ {next-step-commands}
62
60
  ```
63
61
 
64
62
  #### Branch A3: Watch Required Checks
65
63
 
64
+ Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill watch-pr --task-ref {task-ref}`.
65
+
66
66
  ```text
67
67
  Next step - watch PR checks:
68
- - Claude Code / OpenCode: /watch-pr {task-ref}
69
- - Gemini CLI: /{{project}}:watch-pr {task-ref}
70
- - Codex CLI: $watch-pr {task-ref}
68
+ {next-step-commands}
71
69
  ```
72
70
 
73
71
  #### Branch A4: Complete and Archive
74
72
 
73
+ Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`.
74
+
75
75
  ```text
76
76
  Next step - complete and archive the task:
77
- - Claude Code / OpenCode: /complete-task {task-ref}
78
- - Gemini CLI: /{{project}}:complete-task {task-ref}
79
- - Codex CLI: $complete-task {task-ref}
77
+ {next-step-commands}
80
78
  ```
81
79
 
82
80
  ### Branch B: Changes Requested (Major / Minor)
83
81
 
82
+ Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill code-task --task-ref {task-ref}`.
83
+
84
84
  ```text
85
85
  Task {task-id} review completed. Verdict: changes requested.
86
86
  - Blockers: 0 | Major: {n} | Minor: {n} | Manual-validation: {e} | Human-decision: {h}
87
87
  - Review report: .agents/workspace/active/{task-id}/{review-artifact}
88
88
 
89
89
  Next step - fix the findings:
90
- - Claude Code / OpenCode: /code-task {task-ref}
91
- - Gemini CLI: /{{project}}:code-task {task-ref}
92
- - Codex CLI: $code-task {task-ref}
90
+ {next-step-commands}
93
91
 
94
92
  [When manual-validation > 0, append this final line:]
95
93
  Reminder: manual-validation findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
@@ -97,15 +95,15 @@ Reminder: manual-validation findings must be carried in the PR description as a
97
95
 
98
96
  ### Branch C: Changes Requested
99
97
 
98
+ Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill code-task --task-ref {task-ref}`.
99
+
100
100
  ```text
101
101
  Task {task-id} review completed. Verdict: changes requested.
102
102
  - Blockers: {n} | Major: {n} | Minor: {n} | Manual-validation: {e} | Human-decision: {h}
103
103
  - Review report: .agents/workspace/active/{task-id}/{review-artifact}
104
104
 
105
105
  Next step - fix the findings:
106
- - Claude Code / OpenCode: /code-task {task-ref}
107
- - Gemini CLI: /{{project}}:code-task {task-ref}
108
- - Codex CLI: $code-task {task-ref}
106
+ {next-step-commands}
109
107
 
110
108
  [When manual-validation > 0, append this final line:]
111
109
  Reminder: manual-validation findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
@@ -113,15 +111,15 @@ Reminder: manual-validation findings must be carried in the PR description as a
113
111
 
114
112
  ### Branch D: Rejected
115
113
 
114
+ Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill plan-task --task-ref {task-ref}`.
115
+
116
116
  ```text
117
117
  Task {task-id} review completed. Verdict: rejected, re-design the technical plan.
118
118
  - Blockers: {n} | Major: {n} | Minor: {n} | Manual-validation: {e} | Human-decision: {h}
119
119
  - Review report: .agents/workspace/active/{task-id}/{review-artifact}
120
120
 
121
121
  Next step - re-design the technical plan:
122
- - Claude Code / OpenCode: /plan-task {task-ref}
123
- - Gemini CLI: /{{project}}:plan-task {task-ref}
124
- - Codex CLI: $plan-task {task-ref}
122
+ {next-step-commands}
125
123
 
126
124
  > Note: Rejected means the implementation direction needs to be reworked end-to-end, not patched locally. Core artifact lifecycle branch #7 refuses a direct `/code-task` and requires a fresh plan first.
127
125
 
@@ -17,11 +17,9 @@
17
17
  - 不要混用不同场景的文案
18
18
  - 只要 `Blocker > 0`,就绝对不能输出通过模板
19
19
  - manual-validation 项绝对不能被计入 blocker / major / minor 计数,也不能用作触发场景 B/C/D 的依据
20
- - 所选场景中必须包含所有 TUI 命令格式
20
+ - 所选场景必须通过统一 helper 生成 `{next-step-commands}`
21
21
  - 计数行固定显示 5 个数字。manual-validation(`{e}`)不影响分支;`人工裁决`(`{h}`)是本阶段 `needs-human-decision` 行数,属于未闭环账本状态,因此 `{h} > 0` 时 `canAdvance=false`,必须按 `.agents/rules/next-step-output.md` 的「人工裁决待办前置块」展开详情,并只输出修订与复审路径。
22
22
 
23
- 场景 B/C/D 在修订命令后继续列出复审命令:`/review-code {task-ref}`、`/{{project}}:review-code {task-ref}`、`$review-code {task-ref}`。
24
-
25
23
  ### 场景 A:通过且无问题
26
24
 
27
25
  通过后不得按轮次路由。先比较审查快照树 `T` 与基线 `R` 的树,再读取任务的 `prFlow` / `pr_number`;存在 PR 时调用 `agent-infra-internal platform-checks inspect {task-id}`。只选择以下一个互斥出口:
@@ -45,51 +43,51 @@
45
43
 
46
44
  #### 场景 A1:提交或推送
47
45
 
46
+ 使用 `agent-infra-internal agent-client next-steps --skill commit --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
47
+
48
48
  ```text
49
49
  下一步 - 提交或推送代码:
50
- - Claude Code / OpenCode:/commit {task-ref}
51
- - Gemini CLI:/{{project}}:commit {task-ref}
52
- - Codex CLI:$commit {task-ref}
50
+ {next-step-commands}
53
51
  ```
54
52
 
55
53
  #### 场景 A2:创建 Pull Request
56
54
 
55
+ 使用 `agent-infra-internal agent-client next-steps --skill create-pr --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
56
+
57
57
  ```text
58
58
  下一步 - 创建 Pull Request:
59
- - Claude Code / OpenCode:/create-pr {task-ref}
60
- - Gemini CLI:/{{project}}:create-pr {task-ref}
61
- - Codex CLI:$create-pr {task-ref}
59
+ {next-step-commands}
62
60
  ```
63
61
 
64
62
  #### 场景 A3:监控 required checks
65
63
 
64
+ 使用 `agent-infra-internal agent-client next-steps --skill watch-pr --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
65
+
66
66
  ```text
67
67
  下一步 - 监控 PR 检查:
68
- - Claude Code / OpenCode:/watch-pr {task-ref}
69
- - Gemini CLI:/{{project}}:watch-pr {task-ref}
70
- - Codex CLI:$watch-pr {task-ref}
68
+ {next-step-commands}
71
69
  ```
72
70
 
73
71
  #### 场景 A4:完成并归档
74
72
 
73
+ 使用 `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
74
+
75
75
  ```text
76
76
  下一步 - 完成并归档任务:
77
- - Claude Code / OpenCode:/complete-task {task-ref}
78
- - Gemini CLI:/{{project}}:complete-task {task-ref}
79
- - Codex CLI:$complete-task {task-ref}
77
+ {next-step-commands}
80
78
  ```
81
79
 
82
80
  ### 场景 B:需要修改(major / minor)
83
81
 
82
+ 使用 `agent-infra-internal agent-client next-steps --skill code-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
83
+
84
84
  ```text
85
85
  任务 {task-id} 代码审查完成。结论:需要修改。
86
86
  - 阻塞项:0 | 主要问题:{n} | 次要问题:{n} | 人工校验点:{e} | 人工裁决:{h}
87
87
  - 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
88
88
 
89
89
  下一步 - 修复问题:
90
- - Claude Code / OpenCode:/code-task {task-ref}
91
- - Gemini CLI:/{{project}}:code-task {task-ref}
92
- - Codex CLI:$code-task {task-ref}
90
+ {next-step-commands}
93
91
 
94
92
  [当 manual-validation > 0 时,在最后附加一行:]
95
93
  提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
@@ -97,15 +95,15 @@
97
95
 
98
96
  ### 场景 C:需要修改
99
97
 
98
+ 使用 `agent-infra-internal agent-client next-steps --skill code-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
99
+
100
100
  ```text
101
101
  任务 {task-id} 代码审查完成。结论:需要修改。
102
102
  - 阻塞项:{n} | 主要问题:{n} | 次要问题:{n} | 人工校验点:{e} | 人工裁决:{h}
103
103
  - 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
104
104
 
105
105
  下一步 - 修复问题:
106
- - Claude Code / OpenCode:/code-task {task-ref}
107
- - Gemini CLI:/{{project}}:code-task {task-ref}
108
- - Codex CLI:$code-task {task-ref}
106
+ {next-step-commands}
109
107
 
110
108
  [当 manual-validation > 0 时,在最后附加一行:]
111
109
  提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
@@ -113,15 +111,15 @@
113
111
 
114
112
  ### 场景 D:拒绝
115
113
 
114
+ 使用 `agent-infra-internal agent-client next-steps --skill plan-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
115
+
116
116
  ```text
117
117
  任务 {task-id} 代码审查完成。结论:拒绝,需要重新设计方案。
118
118
  - 阻塞项:{n} | 主要问题:{n} | 次要问题:{n} | 人工校验点:{e} | 人工裁决:{h}
119
119
  - 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
120
120
 
121
121
  下一步 - 重新设计技术方案:
122
- - Claude Code / OpenCode:/plan-task {task-ref}
123
- - Gemini CLI:/{{project}}:plan-task {task-ref}
124
- - Codex CLI:$plan-task {task-ref}
122
+ {next-step-commands}
125
123
 
126
124
  > 注意:Rejected 表示实现方向需要整体重做,不是局部修复。核心 artifact lifecycle 的分支 #7 会拒绝直接 `/code-task`,要求先重新方案设计。
127
125