@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
@@ -63,13 +63,13 @@ Report:
63
63
 
64
64
  Suggest next step:
65
65
 
66
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
66
+ > Before rendering next steps, read `.agents/rules/next-step-output.md`, invoke the shared helper only for the selected scenario, and insert its stdout at `{next-step-commands}`.
67
+
68
+ Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill commit`.
67
69
 
68
70
  ```
69
71
  Next step - commit changes:
70
- - Claude Code / OpenCode: /commit
71
- - Gemini CLI: /{{project}}:commit
72
- - Codex CLI: $commit
72
+ {next-step-commands}
73
73
  ```
74
74
 
75
75
  ## Notes
@@ -63,13 +63,13 @@ description: >
63
63
 
64
64
  建议下一步:
65
65
 
66
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
66
+ > 渲染下一步前先读取 `.agents/rules/next-step-output.md`,仅为已选场景调用统一 helper,并将 stdout 填入 `{next-step-commands}`。
67
+
68
+ 使用 `agent-infra-internal agent-client next-steps --skill commit` 生成本场景的 `{next-step-commands}`。
67
69
 
68
70
  ```
69
71
  下一步 - 提交代码:
70
- - Claude Code / OpenCode:/commit
71
- - Gemini CLI:/{{project}}:commit
72
- - Codex CLI:$commit
72
+ {next-step-commands}
73
73
  ```
74
74
 
75
75
  ## 注意事项
@@ -1,17 +1,17 @@
1
1
  ---
2
2
  name: watch-pr
3
3
  description: >
4
- Watch a PR's required checks and self-heal on failure.
5
- Use when you need to monitor a PR's required checks and auto-recover on failure.
4
+ Watch PR readiness and self-heal required-check failures or merge conflicts.
5
+ Use when a PR must be monitored until checks pass and it is explicitly mergeable.
6
6
  ---
7
7
 
8
8
  # Watch Pull Request
9
9
 
10
- After `create-pr`, continuously watch the PR's required CI checks: when everything is green, guide toward merge; when a required check fails, pull the logs, fix and push locally, then re-poll; when the fix attempt limit is reached or the failure is non-code / unlocatable, stop and ask the user for help. Platform-specific commands live in `.agents/rules/pr-checks-commands.md`; this skill body stays platform-agnostic.
10
+ After `create-pr`, continuously watch required checks and mergeability for the same PR head. Only passed checks plus explicit mergeability may reach success; check failures use the existing repair path, conflicts use constrained rebase healing, and unknown or unsafe states fail closed.
11
11
 
12
12
  ## Behavior Boundaries / Key Rules
13
13
 
14
- - Only watch + self-heal the current PR's required checks; make no changes unrelated to the failing check.
14
+ - Only self-heal the current PR's required checks and text merge conflicts; do not add approval or repository-rule readiness dimensions.
15
15
  - Self-heal publishes through Git workflow intents, but **affected tests must pass first**; the attempt cap and code-layer authorization remain unchanged.
16
16
  - The help exit is "produce-then-stop": end this round, output the blocker explanation, and wait for the user to trigger the next step — **never** ask mid-flow.
17
17
  - Bare numbers / `NN` / `TASK-id` arguments are always resolved as task short ids (see `.agents/rules/task-short-id.md`); a PR number is passed only via `--pr <number>` / a PR URL / omission (current branch), never reusing the bare-number syntax.
@@ -44,21 +44,21 @@ Resolve the target PR number `{pr#}` and an optional `{task-id}` via these deter
44
44
  - Scenario C (`--pr <number>` or a PR URL): use that PR number directly as `{pr#}`; then determine `{task-id}` via "Reverse-lookup task".
45
45
  - Reverse-lookup task (scenarios A / C): use task context/query capabilities to find the unique active task bound to `{pr#}`. If none exists, stop and request binding first; the typed checks intent does not create a second taskless state machine.
46
46
 
47
- ### 2. Watch Required Checks
47
+ ### 2. Watch PR Readiness
48
48
 
49
49
  Before running this step, read `reference/monitor-and-heal.md` and `.agents/rules/pr-checks-commands.md`.
50
50
 
51
- Initialize the in-memory list `repairCommits=[]` for this run. Run `agent-infra-internal platform-checks watch {task-id} --interval-seconds 30 --deadline-seconds 1800`, then route its structured `checks.state` to the all-green, failure, or pending path.
51
+ Initialize `repairCommits=[]` and `rebaseAttempts=0`. Run `agent-infra-internal platform-checks watch {task-id} --interval-seconds 30 --deadline-seconds 1800`, then route only by `readiness.state`: `ready` to step 7, `conflicting|checks-failed` to step 3, and `pending|timed-out|cancelled` to step 4.
52
52
 
53
- ### 3. Failure Self-Heal Loop
53
+ ### 3. Self-Heal Loop
54
54
 
55
55
  Before running this step, read the "Self-Heal Decision Tree" of `reference/monitor-and-heal.md` and "Resolve a Failing Run id and Pull Logs" of `.agents/rules/pr-checks-commands.md`.
56
56
 
57
- For a locatable code-layer failure, make the minimum fix and run relevant tests. Then call `git-workflow commit` and `git-workflow push`; append only a remotely verified SHA to `repairCommits`.
57
+ For `checks-failed`, minimally fix a locatable code-layer failure, test, and publish through the existing commit/push intents. For `conflicting`, follow the reference's same-repository, clean-tree, head/base identity, rebase, full-test, and `git-workflow push-rebased` exact-lease flow, capped at two attempts. Append only remotely verified SHAs, then watch the new head again; any failed safety check goes to step 4.
58
58
 
59
59
  ### 4. Help Exit (Produce-Then-Stop)
60
60
 
61
- When self-heal hits the cap, the failure is non-code, the run id is unlocatable, or step 2 times out while pending, stop this round and summarize for the user: the blocker, the fixes attempted (including each fix commit), and the relevant failing job and run/log links (report shape in the "Help report template" of `reference/monitor-and-heal.md`). Do **not** render a next-step command; wait for the user. Then, on the task-anchored path, run steps 5/6 to record this round's outcome.
61
+ When healing hits a cap, a check failure is non-code/unlocatable, readiness stays unknown, or rebase, tests, remote identity, or exact lease cannot close safely, stop and report the PR head/base, conflict paths, remote facts, tests, and attempts using the reference template. Do **not** render a next-step command. Then run steps 5/6 on the task-anchored path.
62
62
 
63
63
  ### 5. Update Task State
64
64
 
@@ -77,7 +77,7 @@ Update `.agents/workspace/active/{task-id}/task.md`:
77
77
  - **Do not change** `pr_status` (keep `created`) or `current_step`
78
78
  - **Append** to `## Activity Log` (do not overwrite prior entries; `{N}` = number of existing Watch PR entries for this task + 1):
79
79
  ```
80
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Watch PR (Round {N})** by {agent} — {green: all required checks green, repair commits: {k} [{SHA summary}] / blocked: blocked: {summary}}
80
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Watch PR (Round {N})** by {agent} — {success: PR ready, repair commits: {k} [{SHA summary}] / blocked: blocked: {summary}}
81
81
  ```
82
82
 
83
83
  ### 6. Verification Gate
@@ -101,27 +101,27 @@ Keep the gate output in your reply as the verification evidence. Without current
101
101
 
102
102
  > On the task-anchored path, execute this step only after the gate passes.
103
103
 
104
- > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). Before rendering the final output, read `.agents/rules/next-step-output.md` and apply both of its rules: (1) render `{task-ref}` in the "Next steps" commands as the short id `NN` (falling back to the full TASK-id when unallocated or released); (2) append the `Completed at` line as the very last line of the user-facing output (this applies to every user-facing output — success, error, and early-return paths alike, not only the success path).
104
+ > Before rendering next steps, read `.agents/rules/next-step-output.md`, invoke the shared helper only for the selected scenario, and insert its stdout at `{next-step-commands}`.
105
105
 
106
106
  Output per scenario:
107
- - "All green" + task-anchored: state that all required checks passed, then render exactly one exit based on whether this run created repair commits (`{task-ref}` becomes the short id):
107
+ - `ready` + task-anchored: state that required checks passed and the current head is explicitly mergeable, then render exactly one exit based on whether this run created repair commits (`{task-ref}` becomes the short id):
108
108
 
109
109
  `repairCommits.length == 0`:
110
110
 
111
+ Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`.
112
+
111
113
  ```
112
114
  Next step - Complete and archive the task:
113
- - Claude Code / OpenCode: /complete-task {task-ref}
114
- - Gemini CLI: /{{project}}:complete-task {task-ref}
115
- - Codex CLI: $complete-task {task-ref}
115
+ {next-step-commands}
116
116
  ```
117
117
 
118
118
  `repairCommits.length > 0`:
119
119
 
120
+ Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}`.
121
+
120
122
  ```
121
123
  Next step - Re-run code review:
122
- - Claude Code / OpenCode: /review-code {task-ref}
123
- - Gemini CLI: /{{project}}:review-code {task-ref}
124
- - Codex CLI: $review-code {task-ref}
124
+ {next-step-commands}
125
125
  ```
126
126
 
127
127
  - "Blocked": output only the step 4 blocker explanation; do not recommend a next-step command.
@@ -129,11 +129,11 @@ Output per scenario:
129
129
  ## Completion Checklist
130
130
 
131
131
  - [ ] Resolved the target PR (and any task context)
132
- - [ ] Completed required-checks watching with an all-green / blocked conclusion
133
- - [ ] Self-heal limited to locatable code-layer failures, with local tests passing before push and within the fix cap
132
+ - [ ] Completed readiness watching; success requires passed checks and explicit mergeability
133
+ - [ ] Check/rebase healing passed local tests and its safety intent within the attempt cap
134
134
  - [ ] Task-anchored path: updated task.md and appended the Watch PR Activity Log entry
135
135
  - [ ] Task-anchored path: verification gate passed
136
- - [ ] Showed the user all TUI next-step command formats (green exit; the blocked exit renders no next step)
136
+ - [ ] Rendered the selected next-step commands through the shared helper
137
137
 
138
138
  ## Stop
139
139
 
@@ -1,17 +1,17 @@
1
1
  ---
2
2
  name: watch-pr
3
3
  description: >
4
- 监控 PR 的 required checks 并在失败时自愈。
5
- 当需要监控 PR 的 required checks 并在失败时自愈时使用。
4
+ 监控 PR readiness,并在 required checks 失败或合并冲突时自愈。
5
+ 当需要持续监控 PR 直到门禁通过且明确可合入时使用。
6
6
  ---
7
7
 
8
8
  # 监控 Pull Request
9
9
 
10
- 在 `create-pr` 之后持续监控 PR 的 required CI checks:全绿则引导合入,required check 失败则自动拉日志、本地修复并推送、重新轮询;达修复上限或属非代码层/不可定位失败则停止并向用户求助。平台专属命令集中在 `.agents/rules/pr-checks-commands.md`,本技能正文保持平台无关。
10
+ 在 `create-pr` 之后持续监控同一 PR head 的 required checks 与 mergeability。只有 checks 通过且平台明确可合入才进入成功出口;check 失败走既有修复,合并冲突走受限 rebase 自愈,未知或无法安全闭环时 fail-closed。
11
11
 
12
12
  ## 行为边界 / 关键规则
13
13
 
14
- - 仅监控 + 自愈当前 PR 的 required checks;不做与失败 check 无关的改动。
14
+ - 仅监控 + 自愈当前 PR 的 required checks 与文本合并冲突;不扩展到审批或其他仓库规则。
15
15
  - 自愈通过 Git workflow intent 发布修复,但**发布前必须本地跑通相关测试**;修复上限与代码层分类授权不变。
16
16
  - 求助出口是「产出后停止」语义:停止本轮、输出阻塞说明、等待用户主动触发,**不**中途提问。
17
17
  - 裸数字 / `NN` / `TASK-id` 入参一律按任务短号解析(见 `.agents/rules/task-short-id.md`);PR 号只走 `--pr <number>` / PR URL / 省略(当前分支),不复用裸数字语法。
@@ -44,21 +44,21 @@ description: >
44
44
  - 场景 C(`--pr <number>` 或 PR URL):直接取该 PR 号为 `{pr#}`;随后按「反查任务」确定 `{task-id}`。
45
45
  - 反查任务(场景 A / C):通过任务上下文/任务查询取得与 `{pr#}` 唯一绑定的 active task。未命中时停止并提示先绑定 PR;typed checks intent 不建立第二套无任务状态机。
46
46
 
47
- ### 2. 监控 required checks
47
+ ### 2. 监控 PR readiness
48
48
 
49
49
  执行此步骤前,先读取 `reference/monitor-and-heal.md` 与 `.agents/rules/pr-checks-commands.md`。
50
50
 
51
- 进入本轮时初始化内存列表 `repairCommits=[]`。调用 `agent-infra-internal platform-checks watch {task-id} --interval-seconds 30 --deadline-seconds 1800`,按结构化 `checks.state` 分为「全绿」/「失败」/「挂起」,分别进入步骤 7、步骤 3 或步骤 4。
51
+ 进入本轮时初始化 `repairCommits=[]` 与 `rebaseAttempts=0`。调用 `agent-infra-internal platform-checks watch {task-id} --interval-seconds 30 --deadline-seconds 1800`,只按结构化 `readiness.state` 分流:`ready` 进入步骤 7,`conflicting` 或 `checks-failed` 进入步骤 3,`pending|timed-out|cancelled` 进入步骤 4。
52
52
 
53
- ### 3. 失败自愈循环
53
+ ### 3. 自愈循环
54
54
 
55
55
  执行此步骤前,先读取 `reference/monitor-and-heal.md` 的「自愈决策树」与 `.agents/rules/pr-checks-commands.md` 的「解析失败 run id 并拉日志」。
56
56
 
57
- 只对可定位代码层失败最小修复并测试;通过后依次调用 `git-workflow commit` 与 `git-workflow push`,仅记录远端复核成功的 SHA。达硬上限或 run 不可定位时转步骤 4。
57
+ `checks-failed` 只对可定位代码层失败做最小修复和测试,再用既有 commit/push intent 发布。`conflicting` 严格执行 reference 的同仓库、干净工作树、head/base 身份、rebase、完整测试与 `git-workflow push-rebased` 精确 lease 流程;上限 2 次。仅记录远端复核成功的 SHA,随后重新监控新 head;任一安全检查失败转步骤 4。
58
58
 
59
59
  ### 4. 求助出口(产出后停止)
60
60
 
61
- 当自愈达上限、失败属非代码层、run id 不可定位、或步骤 2 挂起超时时,停止本轮并向用户汇总:阻塞原因、已尝试的修复(含每次修复 commit)、相关失败 job 与 run/log 链接(报告结构见 `reference/monitor-and-heal.md` 的「求助报告模板」)。**不**渲染下一步命令,等待用户裁定。随后在任务锚定路径下执行步骤 5/6 记录本轮结果。
61
+ 当自愈达上限、失败属非代码层、run id 不可定位、readiness 未知/超时,或 rebase、测试、远端身份、精确 lease 任一无法闭环时,停止本轮并按 reference 汇总 PR head/base、冲突文件、远端事实、测试与尝试记录。**不**渲染下一步命令。随后在任务锚定路径下执行步骤 5/6。
62
62
 
63
63
  ### 5. 更新任务状态
64
64
 
@@ -77,7 +77,7 @@ date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
77
77
  - **不改** `pr_status`(保持 `created`)与 `current_step`
78
78
  - **追加**到 `## 活动日志`(不要覆盖之前的记录;`{N}` = 本任务已有 Watch PR 条目数 + 1):
79
79
  ```
80
- - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Watch PR (Round {N})** by {agent} — {全绿:all required checks green, repair commits: {k} [{sha 摘要}] / 阻塞:blocked: {简述}}
80
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Watch PR (Round {N})** by {agent} — {成功:PR ready, repair commits: {k} [{sha 摘要}] / 阻塞:blocked: {简述}}
81
81
  ```
82
82
 
83
83
  ### 6. 完成校验
@@ -101,27 +101,27 @@ agent-infra-internal task-verify {task-id} watch-pr.completed --format text
101
101
 
102
102
  > 任务锚定路径仅在校验通过后执行本步骤。
103
103
 
104
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染最终输出前,先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令把 `{task-ref}` 渲染为短号 `NN`(未分配/已释放时回退完整 TASK-id);(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
104
+ > 渲染下一步前先读取 `.agents/rules/next-step-output.md`,仅为已选场景调用统一 helper,并将 stdout 填入 `{next-step-commands}`。
105
105
 
106
106
  按场景输出:
107
- - 「全绿」+ 任务锚定:说明所有 required checks 已通过,并只按本轮是否产生修复 commit 渲染一个出口(`{task-ref}` 替换为短号):
107
+ - `ready` + 任务锚定:说明 required checks 已通过且当前 head 明确可合入,并只按本轮是否产生修复 commit 渲染一个出口(`{task-ref}` 替换为短号):
108
108
 
109
109
  `repairCommits.length == 0`:
110
110
 
111
+ 使用 `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
112
+
111
113
  ```
112
114
  下一步 - 完成并归档任务:
113
- - Claude Code / OpenCode:/complete-task {task-ref}
114
- - Gemini CLI:/{{project}}:complete-task {task-ref}
115
- - Codex CLI:$complete-task {task-ref}
115
+ {next-step-commands}
116
116
  ```
117
117
 
118
118
  `repairCommits.length > 0`:
119
119
 
120
+ 使用 `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
121
+
120
122
  ```
121
123
  下一步 - 重新代码审查:
122
- - Claude Code / OpenCode:/review-code {task-ref}
123
- - Gemini CLI:/{{project}}:review-code {task-ref}
124
- - Codex CLI:$review-code {task-ref}
124
+ {next-step-commands}
125
125
  ```
126
126
 
127
127
  - 「阻塞」:仅输出步骤 4 的阻塞说明,不推荐下一步命令。
@@ -129,11 +129,11 @@ agent-infra-internal task-verify {task-id} watch-pr.completed --format text
129
129
  ## 完成检查清单
130
130
 
131
131
  - [ ] 解析出目标 PR(及可能的任务上下文)
132
- - [ ] 完成 required checks 监控,得到全绿 / 阻塞结论
133
- - [ ] 自愈仅限可定位的代码层失败,且推送前本地测试通过、未超修复上限
132
+ - [ ] 完成 readiness 监控,只有 checks 通过且明确可合入才得到成功结论
133
+ - [ ] check / rebase 自愈均通过本地测试和对应安全 intent,且未超修复上限
134
134
  - [ ] 任务锚定路径:更新了 task.md 并追加 Watch PR 的 Activity Log
135
135
  - [ ] 任务锚定路径:完成校验通过
136
- - [ ] 向用户展示了所有 TUI 格式的下一步命令(全绿出口;阻塞出口不渲染下一步)
136
+ - [ ] 已通过统一 helper 渲染已选场景的下一步命令
137
137
 
138
138
  ## 停止
139
139
 
@@ -2,13 +2,14 @@
2
2
 
3
3
  Platform-agnostic decision logic for `watch-pr` steps 2/3/4. The concrete platform commands (watch, resolve a failing run, pull logs, read the PR number) live in `.agents/rules/pr-checks-commands.md`; this file only describes platform-independent classification and decisions.
4
4
 
5
- ## Outcome Classification
5
+ ## Readiness Classification
6
6
 
7
- After running the watch command from `.agents/rules/pr-checks-commands.md`, classify by its exit code into three buckets:
7
+ After the watch command, route by structured `readiness.state`:
8
8
 
9
- - All required checks passed → "all green" (SKILL step 7 green exit).
10
- - At least one failed / errored → "failure" (SKILL step 3 self-heal).
11
- - Still pending or the overall time cap was reached → "pending" (SKILL step 4 help exit).
9
+ - `ready`: required checks passed and the same head is explicitly mergeable → SKILL step 7.
10
+ - `checks-failed`: a required check failed or was cancelled → CI healing in SKILL step 3.
11
+ - `conflicting`: the platform explicitly reports a head/base conflict → rebase healing in SKILL step 3.
12
+ - `pending|timed-out|cancelled`: no reliable success fact exists → SKILL step 4.
12
13
 
13
14
  ## Self-Heal Decision Tree
14
15
 
@@ -34,6 +35,23 @@ For each failing check, decide "self-heal" vs "ask for help" in this order:
34
35
  - Append the fix commit SHA to this run's `repairCommits`, increment the fix count, and return to SKILL step 2. When checks turn green, an empty list routes to `complete-task`; a non-empty list routes to `review-code`.
35
36
  - Never make unrelated "drive-by" optimizations; never loosen / skip the failing assertion to "make it green".
36
37
 
38
+ ## Merge-Conflict Healing
39
+
40
+ ```text
41
+ # conflict-heal-contract
42
+ strategy: rebase
43
+ remote-update: exact-lease
44
+ unsafe: help
45
+ ```
46
+
47
+ 1. Continue only when the PR, head, and base repositories match; the current branch equals the head ref; local HEAD equals the snapshot head SHA; and the worktree/index are clean.
48
+ 2. Select a remote that exactly matches the PR repository, fetch the base ref, record the full `expectedBaseHead`, and confirm the remote head still equals the full old SHA.
49
+ 3. Run `git rebase <expectedBaseHead>`. Handle only Git-reported text unmerged paths. If resolution is unsafe, run `git rebase --abort`, record paths and both SHAs, and use help.
50
+ 4. After rebase, run the project `test` skill's full validation. Never push a failing result.
51
+ 5. Write remote, branch, full `expectedOldHead`, `newHead`, baseBranch, and full `expectedBaseHead` to a temporary intent outside the repository; call `agent-infra-internal git-workflow push-rebased --input {intent.json}`.
52
+ 6. Core verifies clean state, branch/HEAD, remote head/base, ancestry, exact `--force-with-lease`, and the post-push SHA. Never fall back to generic force; refresh the PR snapshot or use help.
53
+ 7. On success, append the new SHA to `repairCommits`, increment `rebaseAttempts`, and watch the new head. Cap at two attempts; a final ready state with repairs routes only to `review-code`.
54
+
37
55
  ## Help Report Template
38
56
 
39
57
  When entering the help exit, output the following fixed structure to the user (not written to any artifact file):
@@ -41,7 +59,10 @@ When entering the help exit, output the following fixed structure to the user (n
41
59
  ```
42
60
  PR #{pr#} monitoring is blocked; manual intervention needed.
43
61
 
44
- Blocker: {non-code layer / fix cap reached / run unlocatable / poll timeout}
62
+ Blocker: {non-code layer / cap reached / run unlocatable / readiness unknown / unsafe rebase or update}
63
+ PR head/base: {repository/ref/SHA}
64
+ Conflict and remote facts: {paths / expected and actual head/base / rebase abort state}
65
+ Validation: {command and failure summary, or why it did not run}
45
66
  Failing check: {name} (workflow: {workflow})
46
67
  Failing run / logs: {run/job link}
47
68
  Fixes attempted ({k} total):
@@ -2,13 +2,14 @@
2
2
 
3
3
  `watch-pr` 步骤 2/3/4 的平台无关判定逻辑。具体平台命令(监控、解析失败 run、拉日志、读取 PR 号)见 `.agents/rules/pr-checks-commands.md`;本文件只描述与平台无关的分类与决策。
4
4
 
5
- ## 结果分类
5
+ ## Readiness 分类
6
6
 
7
7
  按 `.agents/rules/pr-checks-commands.md` 的监控命令执行后,依其退出码归为三类:
8
8
 
9
- - 全部 required checks 通过 → 「全绿」(SKILL 步骤 7 全绿出口)。
10
- - 至少一个失败 / 出错 → 「失败」(SKILL 步骤 3 自愈)。
11
- - 仍有 pending 或达到总时长上限 → 「挂起」(SKILL 步骤 4 求助)。
9
+ - `ready`:同一 head 的 required checks 通过且平台明确可合入 → SKILL 步骤 7。
10
+ - `checks-failed`:至少一个 required check 失败或取消 → SKILL 步骤 3 的 CI 自愈。
11
+ - `conflicting`:平台明确当前 head 与 base 冲突 → SKILL 步骤 3 的 rebase 自愈。
12
+ - `pending|timed-out|cancelled`:mergeability/checks 未形成可靠成功事实 → SKILL 步骤 4。
12
13
 
13
14
  ## 自愈决策树
14
15
 
@@ -34,6 +35,23 @@ unknown: help
34
35
  - 将本次修复的 commit SHA 追加到当前运行的 `repairCommits`,修复计数 +1,回到 SKILL 步骤 2 重新监控;全绿时列表为空走 `complete-task`,非空走 `review-code`。
35
36
  - 绝不执行与失败无关的「顺手优化」;不放宽 / 跳过失败的断言来「修绿」。
36
37
 
38
+ ## 合并冲突自愈
39
+
40
+ ```text
41
+ # conflict-heal-contract
42
+ strategy: rebase
43
+ remote-update: exact-lease
44
+ unsafe: help
45
+ ```
46
+
47
+ 1. 仅当 PR、head 与 base repository 完全相同,当前分支等于 head ref,本地 HEAD 等于快照 head SHA,且工作树/暂存区干净时继续;否则求助。
48
+ 2. 找到与 PR repository 精确匹配的 remote,抓取 base ref,记录完整 `expectedBaseHead`,并确认远端 head 仍等于完整旧 SHA。
49
+ 3. 执行 `git rebase <expectedBaseHead>`。只处理 Git 报告的文本 unmerged paths;无法可靠解决时 `git rebase --abort`,记录冲突路径和双方 SHA 后求助。
50
+ 4. rebase 完成后运行项目 `test` skill 的完整验证。失败时不推送。
51
+ 5. 把 remote、branch、完整 `expectedOldHead`、`newHead`、baseBranch 和完整 `expectedBaseHead` 写入仓库外的临时 intent JSON,调用 `agent-infra-internal git-workflow push-rebased --input {intent.json}`。
52
+ 6. core 会复核干净状态、分支/HEAD、远端 head/base、ancestor、精确 `--force-with-lease` 与推送后远端 SHA。任一失败不得改用普通 force;重新取 PR 快照或求助。
53
+ 7. 推送成功后把新 SHA 加入 `repairCommits`,`rebaseAttempts += 1`,重新监控新 head。上限 2 次;最终 ready 且列表非空时只进入 `review-code` 出口。
54
+
37
55
  ## 求助报告模板
38
56
 
39
57
  进入求助出口时,向用户输出以下固定结构(不写入产物文件):
@@ -41,7 +59,10 @@ unknown: help
41
59
  ```
42
60
  PR #{pr#} 监控阻塞,需人工介入。
43
61
 
44
- 阻塞原因:{非代码层 / 达修复上限 / run 不可定位 / 轮询超时}
62
+ 阻塞原因:{非代码层 / 达修复上限 / run 不可定位 / readiness 未知 / rebase 或安全更新失败}
63
+ PR head/base:{repository/ref/SHA}
64
+ 冲突与远端事实:{conflict paths / expected 与 actual head/base / rebase abort 状态}
65
+ 验证:{命令与失败摘要;未运行则说明原因}
45
66
  失败 check:{name}(workflow:{workflow})
46
67
  失败 run / 日志:{run/job 链接}
47
68
  已尝试的修复(共 {k} 次):
@@ -12,7 +12,7 @@ effort: # Optional Issue field: High | Medium | Low
12
12
  start_date: # Optional Issue field for Feature: YYYY-MM-DD
13
13
  target_date: # Optional Issue field for Feature: YYYY-MM-DD
14
14
  current_step: requirement-analysis # requirement-analysis | requirement-analysis-review | technical-design | technical-design-review | code | code-review | completed
15
- assigned_to: # claude | codex | gemini | opencode | human
15
+ assigned_to: # claude | codex | antigravity | opencode | human
16
16
  pr_status: pending # PR status: pending (default) | created (PR created) | skipped (explicitly skipped)
17
17
  ---
18
18
 
@@ -12,7 +12,7 @@ effort: # 可选 Issue 字段:High | Medium | Low
12
12
  start_date: # Feature 可选 Issue 字段:YYYY-MM-DD
13
13
  target_date: # Feature 可选 Issue 字段:YYYY-MM-DD
14
14
  current_step: requirement-analysis # requirement-analysis | requirement-analysis-review | technical-design | technical-design-review | code | code-review | completed
15
- assigned_to: # claude | codex | gemini | opencode | human
15
+ assigned_to: # claude | codex | antigravity | opencode | human
16
16
  pr_status: pending # PR 状态:pending(默认)| created(已创建 PR)| skipped(显式跳过)
17
17
  ---
18
18
 
@@ -14,7 +14,7 @@ steps:
14
14
  description: Reproduce the defect, identify the root cause, and define the fix scope.
15
15
  recommended_agents:
16
16
  - claude
17
- - gemini
17
+ - antigravity
18
18
  tasks:
19
19
  - Understand the defect report and expected behavior
20
20
  - Reproduce the defect when possible
@@ -39,7 +39,7 @@ steps:
39
39
  description: Review whether the defect analysis has sufficient reproduction evidence, a clear root cause, and a scoped fix.
40
40
  recommended_agents:
41
41
  - claude
42
- - gemini
42
+ - antigravity
43
43
  tasks:
44
44
  - Verify reproduction evidence or the non-reproducible explanation
45
45
  - Check root-cause reasoning and impact scope
@@ -93,7 +93,7 @@ steps:
93
93
  description: Review whether the fix plan addresses the root cause, has sufficient tests, and controls side effects.
94
94
  recommended_agents:
95
95
  - claude
96
- - gemini
96
+ - antigravity
97
97
  tasks:
98
98
  - Verify the plan covers the approved root-cause analysis
99
99
  - Check regression test strategy and potential side effects
@@ -13,7 +13,7 @@ steps:
13
13
  description: 复现缺陷,识别根本原因,确定修复范围。
14
14
  recommended_agents:
15
15
  - claude
16
- - gemini
16
+ - antigravity
17
17
  tasks:
18
18
  - 理解缺陷报告和预期行为
19
19
  - 复现缺陷(如果可能)
@@ -38,7 +38,7 @@ steps:
38
38
  description: 审查缺陷分析是否复现充分、根因明确且修复范围清晰。
39
39
  recommended_agents:
40
40
  - claude
41
- - gemini
41
+ - antigravity
42
42
  tasks:
43
43
  - 验证缺陷复现或不可复现说明
44
44
  - 检查根因推导和影响范围
@@ -92,7 +92,7 @@ steps:
92
92
  description: 审查修复方案是否覆盖根因、测试充分且副作用可控。
93
93
  recommended_agents:
94
94
  - claude
95
- - gemini
95
+ - antigravity
96
96
  tasks:
97
97
  - 验证方案覆盖已批准的根因分析
98
98
  - 检查回归测试策略和潜在副作用
@@ -9,7 +9,7 @@ steps:
9
9
  description: Load context and understand the scope of changes.
10
10
  recommended_agents:
11
11
  - claude
12
- - gemini
12
+ - antigravity
13
13
  tasks:
14
14
  - Read the PR description and linked issues
15
15
  - Review the diff to understand what changed
@@ -9,7 +9,7 @@ steps:
9
9
  description: 加载上下文并理解变更范围。
10
10
  recommended_agents:
11
11
  - claude
12
- - gemini
12
+ - antigravity
13
13
  tasks:
14
14
  - 阅读 PR 描述和关联的 Issue
15
15
  - 审查差异以理解变更内容
@@ -14,7 +14,7 @@ steps:
14
14
  description: Analyze feature requirements, explore the codebase, and identify affected areas.
15
15
  recommended_agents:
16
16
  - claude
17
- - gemini
17
+ - antigravity
18
18
  tasks:
19
19
  - Read and understand the feature requirements
20
20
  - Explore the codebase to identify relevant files and modules
@@ -37,7 +37,7 @@ steps:
37
37
  description: Review whether the requirement analysis is complete, verifiable, and clearly scoped.
38
38
  recommended_agents:
39
39
  - claude
40
- - gemini
40
+ - antigravity
41
41
  tasks:
42
42
  - Check requirement scope, constraints, and acceptance criteria
43
43
  - Verify affected areas and risk identification
@@ -63,7 +63,7 @@ steps:
63
63
  description: Create the technical design for the feature implementation.
64
64
  recommended_agents:
65
65
  - claude
66
- - gemini
66
+ - antigravity
67
67
  tasks:
68
68
  - Define interfaces and data structures
69
69
  - Outline the implementation approach
@@ -93,7 +93,7 @@ steps:
93
93
  description: Review whether the technical design is implementable, low-risk, and requirement-complete.
94
94
  recommended_agents:
95
95
  - claude
96
- - gemini
96
+ - antigravity
97
97
  tasks:
98
98
  - Verify the plan covers the approved analysis
99
99
  - Check architecture fit, risks, and test strategy
@@ -13,7 +13,7 @@ steps:
13
13
  description: 分析功能需求,探索代码库,识别受影响的区域。
14
14
  recommended_agents:
15
15
  - claude
16
- - gemini
16
+ - antigravity
17
17
  tasks:
18
18
  - 阅读并理解功能需求
19
19
  - 探索代码库以识别相关文件和模块
@@ -36,7 +36,7 @@ steps:
36
36
  description: 审查需求分析是否完整、可验证且边界清晰。
37
37
  recommended_agents:
38
38
  - claude
39
- - gemini
39
+ - antigravity
40
40
  tasks:
41
41
  - 检查需求范围、约束和验收标准
42
42
  - 验证受影响区域和风险识别是否充分
@@ -62,7 +62,7 @@ steps:
62
62
  description: 为功能实现创建技术设计方案。
63
63
  recommended_agents:
64
64
  - claude
65
- - gemini
65
+ - antigravity
66
66
  tasks:
67
67
  - 定义接口和数据结构
68
68
  - 概述实现方案
@@ -92,7 +92,7 @@ steps:
92
92
  description: 审查技术方案是否可实施、低风险且覆盖需求。
93
93
  recommended_agents:
94
94
  - claude
95
- - gemini
95
+ - antigravity
96
96
  tasks:
97
97
  - 验证方案覆盖已批准的需求分析
98
98
  - 检查架构一致性、风险和测试策略
@@ -14,7 +14,7 @@ steps:
14
14
  description: Analyze the current code and define the refactoring scope.
15
15
  recommended_agents:
16
16
  - claude
17
- - gemini
17
+ - antigravity
18
18
  tasks:
19
19
  - Identify code to refactor and the reason for refactoring
20
20
  - Map dependencies and callers for affected code
@@ -38,7 +38,7 @@ steps:
38
38
  description: Review whether the refactoring analysis covers dependencies, risks, and the test baseline.
39
39
  recommended_agents:
40
40
  - claude
41
- - gemini
41
+ - antigravity
42
42
  tasks:
43
43
  - Verify the refactoring scope and rationale
44
44
  - Check dependency, caller, and risk identification
@@ -94,7 +94,7 @@ steps:
94
94
  description: Review whether the refactoring plan preserves behavior, is verifiable step by step, and controls risk.
95
95
  recommended_agents:
96
96
  - claude
97
- - gemini
97
+ - antigravity
98
98
  tasks:
99
99
  - Verify the plan covers the approved scope analysis
100
100
  - Check incremental steps, test strategy, and rollback risk
@@ -13,7 +13,7 @@ steps:
13
13
  description: 分析当前代码并确定重构范围。
14
14
  recommended_agents:
15
15
  - claude
16
- - gemini
16
+ - antigravity
17
17
  tasks:
18
18
  - 识别待重构的代码及重构原因
19
19
  - 映射受影响代码的所有依赖项和使用者
@@ -37,7 +37,7 @@ steps:
37
37
  description: 审查重构分析是否覆盖依赖、风险和测试基线。
38
38
  recommended_agents:
39
39
  - claude
40
- - gemini
40
+ - antigravity
41
41
  tasks:
42
42
  - 验证待重构范围和原因
43
43
  - 检查依赖关系、使用者和风险识别
@@ -93,7 +93,7 @@ steps:
93
93
  description: 审查重构方案是否保持行为稳定、步骤可验证且风险可控。
94
94
  recommended_agents:
95
95
  - claude
96
- - gemini
96
+ - antigravity
97
97
  tasks:
98
98
  - 验证方案覆盖已批准的范围分析
99
99
  - 检查增量步骤、测试策略和回滚风险
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: agent-infra-lifecycle-executor
3
+ description: Execute exactly one agent-infra lifecycle stage in a fresh context.
4
+ ---
5
+
6
+ Run only the requested non-review lifecycle skill for the supplied task reference. Do not run any `review-*` skill. Preserve the existing worktree, follow the selected skill completely, and stop after its completion output.
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: agent-infra-lifecycle-executor
3
+ description: 在全新上下文中只执行一个 agent-infra 生命周期阶段。
4
+ ---
5
+
6
+ 只为给定任务引用运行指定的非审查生命周期技能。不得运行任何 `review-*` 技能。保留现有工作树,完整遵循所选技能,并在该技能完成输出后停止。
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: agent-infra-lifecycle-reviewer
3
+ description: Review exactly one agent-infra lifecycle artifact in a fresh isolated context.
4
+ ---
5
+
6
+ Run only the requested `review-*` skill for the supplied task reference. Do not modify business code, do not execute implementation skills, and stop after producing and finalizing the review artifact.
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: agent-infra-lifecycle-reviewer
3
+ description: 在全新隔离上下文中只审查一个 agent-infra 生命周期产物。
4
+ ---
5
+
6
+ 只为给定任务引用运行指定的 `review-*` 技能。不得修改业务代码,不得执行实现技能,并在生成和最终化审查产物后停止。