@fitlab-ai/agent-infra 0.9.2 → 0.9.4

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 (428) hide show
  1. package/README.md +12 -9
  2. package/README.zh-CN.md +12 -9
  3. package/bin/cli.ts +12 -0
  4. package/dist/bin/cli.js +14 -0
  5. package/dist/bin/internal-cli.js +134 -108
  6. package/dist/lib/agent-clients/adapter.js +137 -4
  7. package/dist/lib/agent-clients/adapters/antigravity-cli.js +64 -0
  8. package/dist/lib/{sandbox/credentials.js → agent-clients/adapters/claude-code-credentials.js} +4 -14
  9. package/dist/lib/agent-clients/adapters/claude-code-refresh.js +85 -0
  10. package/dist/lib/agent-clients/adapters/claude-code-sandbox.js +247 -0
  11. package/dist/lib/agent-clients/adapters/claude-code.js +27 -4
  12. package/dist/lib/agent-clients/adapters/codex.js +9 -0
  13. package/dist/lib/agent-clients/adapters/index.js +2 -2
  14. package/dist/lib/agent-clients/adapters/opencode-sandbox.js +108 -0
  15. package/dist/lib/agent-clients/adapters/opencode.js +24 -3
  16. package/dist/lib/agent-clients/adapters/runtimes/claude-code.dockerfile +65 -0
  17. package/dist/lib/agent-clients/config.js +42 -4
  18. package/dist/lib/agent-clients/next-steps.js +11 -2
  19. package/dist/lib/agent-clients/reconcile.js +2 -1
  20. package/dist/lib/agent-clients/registry.js +16 -2
  21. package/dist/lib/agent-clients/schema.js +18 -0
  22. package/dist/lib/agent-clients/tokens.js +49 -0
  23. package/dist/lib/agent-clients/types.js +1 -1
  24. package/dist/lib/defaults.json +1 -1
  25. package/dist/lib/git/workflow.js +54 -1
  26. package/dist/lib/internal/agent-client.js +61 -4
  27. package/dist/lib/internal/git-workflow.js +6 -1
  28. package/dist/lib/internal/platform-checks.js +3 -3
  29. package/dist/lib/internal/platform-comment.js +29 -2
  30. package/dist/lib/internal/platform-issue.js +7 -0
  31. package/dist/lib/internal/platform-pr-review.js +132 -0
  32. package/dist/lib/internal/platform-pr.js +20 -2
  33. package/dist/lib/internal/platform-release-notes.js +52 -16
  34. package/dist/lib/internal/pr-review-grade.js +140 -0
  35. package/dist/lib/internal/release-workflow.js +13 -6
  36. package/dist/lib/internal/sandbox-control.js +24 -0
  37. package/dist/lib/internal/task-activity.js +105 -0
  38. package/dist/lib/internal/task-event.js +17 -1
  39. package/dist/lib/internal/task-ledger.js +12 -3
  40. package/dist/lib/internal/task-lifecycle.js +26 -1
  41. package/dist/lib/internal/task-orchestration.js +167 -18
  42. package/dist/lib/internal/task-review.js +8 -3
  43. package/dist/lib/platform/adapters.js +8 -1
  44. package/dist/lib/platform/completion-backfill.js +122 -0
  45. package/dist/lib/platform/github-client.js +19 -2
  46. package/dist/lib/platform/issue-comments.js +3 -2
  47. package/dist/lib/platform/merged-pr-equivalence.js +115 -5
  48. package/dist/lib/platform/pr-checks.js +65 -42
  49. package/dist/lib/platform/pr-review.js +166 -0
  50. package/dist/lib/platform/pull-requests.js +371 -4
  51. package/dist/lib/platform/release-notes.js +85 -3
  52. package/dist/lib/platform/releases.js +13 -5
  53. package/dist/lib/pr-review/evidence-grading.js +229 -0
  54. package/dist/lib/process-data/index.js +239 -0
  55. package/dist/lib/process-data/normalize.js +198 -0
  56. package/dist/lib/process-data/privacy.js +33 -0
  57. package/dist/lib/process-data/reconcile.js +95 -0
  58. package/dist/lib/process-data/repair.js +58 -0
  59. package/dist/lib/process-data/sources.js +345 -0
  60. package/dist/lib/process-data/store.js +282 -0
  61. package/dist/lib/process-data/types.js +2 -0
  62. package/dist/lib/run/index.js +4 -3
  63. package/dist/lib/run/tui.js +10 -13
  64. package/dist/lib/sandbox/agent-client-reconciler.js +26 -2
  65. package/dist/lib/sandbox/capture.js +7 -2
  66. package/dist/lib/sandbox/commands/create.js +109 -248
  67. package/dist/lib/sandbox/commands/enter.js +15 -47
  68. package/dist/lib/sandbox/commands/list-running.js +16 -6
  69. package/dist/lib/sandbox/commands/ls.js +10 -6
  70. package/dist/lib/sandbox/commands/rebuild.js +4 -3
  71. package/dist/lib/sandbox/commands/refresh.js +4 -84
  72. package/dist/lib/sandbox/commands/rm.js +24 -3
  73. package/dist/lib/sandbox/commands/show.js +13 -4
  74. package/dist/lib/sandbox/commands/start.js +7 -4
  75. package/dist/lib/sandbox/config.js +2 -0
  76. package/dist/lib/sandbox/constants.js +6 -0
  77. package/dist/lib/sandbox/control/client.js +44 -0
  78. package/dist/lib/sandbox/control/protocol.js +35 -0
  79. package/dist/lib/sandbox/control/server.js +109 -0
  80. package/dist/lib/sandbox/dockerfile.js +36 -13
  81. package/dist/lib/sandbox/mounts.js +17 -4
  82. package/dist/lib/sandbox/recovery.js +128 -5
  83. package/dist/lib/sandbox/redaction.js +12 -0
  84. package/dist/lib/sandbox/runtimes/base.dockerfile +24 -74
  85. package/dist/lib/sandbox/workspace-identity.js +95 -0
  86. package/dist/lib/sandbox/workspace-view.js +103 -0
  87. package/dist/lib/task/activity-intent.js +307 -0
  88. package/dist/lib/task/artifact-lifecycle.js +2 -1
  89. package/dist/lib/task/commands/log.js +15 -14
  90. package/dist/lib/task/commit-finalization.js +267 -0
  91. package/dist/lib/task/commit-intent.js +165 -0
  92. package/dist/lib/task/decision-intents.js +31 -17
  93. package/dist/lib/task/delegation-receipts.js +25 -4
  94. package/dist/lib/task/events.js +67 -28
  95. package/dist/lib/task/finalization-artifacts.js +35 -0
  96. package/dist/lib/task/implementation-inputs.js +54 -7
  97. package/dist/lib/task/ledger-intents.js +35 -1
  98. package/dist/lib/task/lifecycle-execution.js +46 -0
  99. package/dist/lib/task/orchestration.js +753 -54
  100. package/dist/lib/task/resolve-ref.js +41 -1
  101. package/dist/lib/task/review-finalization.js +29 -9
  102. package/dist/lib/task/task-execution-lock.js +231 -0
  103. package/dist/lib/task/verification-checks.js +1 -1
  104. package/dist/lib/task/verification-engine.js +218 -2
  105. package/dist/lib/task/verification.js +4 -3
  106. package/dist/lib/task/workspace-snapshot.js +17 -5
  107. package/lib/agent-clients/adapter.ts +201 -4
  108. package/lib/agent-clients/adapters/antigravity-cli.ts +65 -0
  109. package/lib/{sandbox/credentials.ts → agent-clients/adapters/claude-code-credentials.ts} +3 -18
  110. package/lib/agent-clients/adapters/claude-code-refresh.ts +128 -0
  111. package/lib/agent-clients/adapters/claude-code-sandbox.ts +295 -0
  112. package/lib/agent-clients/adapters/claude-code.ts +31 -4
  113. package/lib/agent-clients/adapters/codex.ts +9 -0
  114. package/lib/agent-clients/adapters/index.ts +2 -2
  115. package/lib/agent-clients/adapters/opencode-sandbox.ts +136 -0
  116. package/lib/agent-clients/adapters/opencode.ts +27 -3
  117. package/lib/agent-clients/adapters/runtimes/claude-code.dockerfile +65 -0
  118. package/lib/agent-clients/config.ts +49 -4
  119. package/lib/agent-clients/next-steps.ts +15 -2
  120. package/lib/agent-clients/reconcile.ts +2 -1
  121. package/lib/agent-clients/registry.ts +19 -1
  122. package/lib/agent-clients/schema.ts +18 -0
  123. package/lib/agent-clients/tokens.ts +53 -0
  124. package/lib/agent-clients/types.ts +15 -1
  125. package/lib/defaults.json +1 -1
  126. package/lib/git/workflow.ts +66 -2
  127. package/lib/internal/agent-client.ts +59 -4
  128. package/lib/internal/git-workflow.ts +5 -1
  129. package/lib/internal/platform-checks.ts +4 -4
  130. package/lib/internal/platform-comment.ts +17 -2
  131. package/lib/internal/platform-issue.ts +4 -0
  132. package/lib/internal/platform-pr-review.ts +104 -0
  133. package/lib/internal/platform-pr.ts +14 -1
  134. package/lib/internal/platform-release-notes.ts +59 -16
  135. package/lib/internal/pr-review-grade.ts +130 -0
  136. package/lib/internal/release-workflow.ts +13 -6
  137. package/lib/internal/sandbox-control.ts +24 -0
  138. package/lib/internal/task-activity.ts +91 -0
  139. package/lib/internal/task-event.ts +9 -1
  140. package/lib/internal/task-ledger.ts +12 -3
  141. package/lib/internal/task-lifecycle.ts +26 -1
  142. package/lib/internal/task-orchestration.ts +123 -14
  143. package/lib/internal/task-review.ts +8 -3
  144. package/lib/platform/adapters.ts +29 -2
  145. package/lib/platform/completion-backfill.ts +134 -0
  146. package/lib/platform/github-client.ts +20 -2
  147. package/lib/platform/issue-comments.ts +3 -2
  148. package/lib/platform/merged-pr-equivalence.ts +127 -5
  149. package/lib/platform/pr-checks.ts +73 -46
  150. package/lib/platform/pr-review.ts +201 -0
  151. package/lib/platform/pull-requests.ts +444 -3
  152. package/lib/platform/release-notes.ts +100 -4
  153. package/lib/platform/releases.ts +16 -4
  154. package/lib/pr-review/evidence-grading.ts +318 -0
  155. package/lib/process-data/index.ts +224 -0
  156. package/lib/process-data/normalize.ts +202 -0
  157. package/lib/process-data/privacy.ts +41 -0
  158. package/lib/process-data/reconcile.ts +110 -0
  159. package/lib/process-data/repair.ts +64 -0
  160. package/lib/process-data/sources.ts +354 -0
  161. package/lib/process-data/store.ts +315 -0
  162. package/lib/process-data/types.ts +135 -0
  163. package/lib/run/index.ts +5 -3
  164. package/lib/run/tui.ts +14 -12
  165. package/lib/sandbox/agent-client-reconciler.ts +44 -2
  166. package/lib/sandbox/capture.ts +9 -2
  167. package/lib/sandbox/commands/create.ts +126 -280
  168. package/lib/sandbox/commands/enter.ts +13 -59
  169. package/lib/sandbox/commands/list-running.ts +23 -6
  170. package/lib/sandbox/commands/ls.ts +22 -6
  171. package/lib/sandbox/commands/rebuild.ts +4 -3
  172. package/lib/sandbox/commands/refresh.ts +4 -126
  173. package/lib/sandbox/commands/rm.ts +24 -3
  174. package/lib/sandbox/commands/show.ts +30 -4
  175. package/lib/sandbox/commands/start.ts +6 -4
  176. package/lib/sandbox/config.ts +4 -0
  177. package/lib/sandbox/constants.ts +8 -0
  178. package/lib/sandbox/control/client.ts +55 -0
  179. package/lib/sandbox/control/protocol.ts +75 -0
  180. package/lib/sandbox/control/server.ts +117 -0
  181. package/lib/sandbox/dockerfile.ts +66 -13
  182. package/lib/sandbox/mounts.ts +24 -4
  183. package/lib/sandbox/recovery.ts +163 -6
  184. package/lib/sandbox/redaction.ts +14 -0
  185. package/lib/sandbox/runtimes/base.dockerfile +24 -74
  186. package/lib/sandbox/tool-types.ts +16 -0
  187. package/lib/sandbox/workspace-identity.ts +123 -0
  188. package/lib/sandbox/workspace-view.ts +143 -0
  189. package/lib/server/server.schema.json +2 -2
  190. package/lib/task/activity-intent.ts +417 -0
  191. package/lib/task/artifact-lifecycle.ts +2 -1
  192. package/lib/task/commands/log.ts +15 -14
  193. package/lib/task/commit-finalization.ts +356 -0
  194. package/lib/task/commit-intent.ts +230 -0
  195. package/lib/task/decision-intents.ts +32 -12
  196. package/lib/task/delegation-receipts.ts +34 -5
  197. package/lib/task/events.ts +75 -30
  198. package/lib/task/finalization-artifacts.ts +58 -0
  199. package/lib/task/implementation-inputs.ts +62 -8
  200. package/lib/task/ledger-intents.ts +43 -3
  201. package/lib/task/lifecycle-execution.ts +106 -0
  202. package/lib/task/orchestration.ts +1019 -72
  203. package/lib/task/resolve-ref.ts +46 -1
  204. package/lib/task/review-finalization.ts +40 -9
  205. package/lib/task/task-execution-lock.ts +296 -0
  206. package/lib/task/verification-checks.ts +1 -1
  207. package/lib/task/verification-engine.ts +249 -2
  208. package/lib/task/verification.ts +5 -3
  209. package/lib/task/workspace-snapshot.ts +26 -5
  210. package/package.json +3 -3
  211. package/templates/.agents/QUICKSTART.en.md +25 -8
  212. package/templates/.agents/QUICKSTART.zh-CN.md +25 -8
  213. package/templates/.agents/README.en.md +10 -7
  214. package/templates/.agents/README.zh-CN.md +10 -7
  215. package/templates/.agents/hooks/lifecycle-delegation.js +15 -4
  216. package/templates/.agents/rules/README.en.md +1 -1
  217. package/templates/.agents/rules/README.zh-CN.md +1 -1
  218. package/templates/.agents/rules/create-issue.github.en.md +4 -2
  219. package/templates/.agents/rules/create-issue.github.zh-CN.md +4 -2
  220. package/templates/.agents/rules/human-decision-context.en.md +11 -2
  221. package/templates/.agents/rules/human-decision-context.zh-CN.md +11 -2
  222. package/templates/.agents/rules/issue-fields.github.en.md +3 -1
  223. package/templates/.agents/rules/issue-fields.github.zh-CN.md +3 -1
  224. package/templates/.agents/rules/issue-pr-commands.en.md +5 -3
  225. package/templates/.agents/rules/issue-pr-commands.github.en.md +5 -3
  226. package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +5 -3
  227. package/templates/.agents/rules/issue-pr-commands.zh-CN.md +5 -3
  228. package/templates/.agents/rules/issue-sync.github.en.md +7 -3
  229. package/templates/.agents/rules/issue-sync.github.zh-CN.md +8 -4
  230. package/templates/.agents/rules/lifecycle-orchestration.en.md +5 -2
  231. package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +5 -2
  232. package/templates/.agents/rules/milestone-inference.github.en.md +4 -2
  233. package/templates/.agents/rules/milestone-inference.github.zh-CN.md +4 -2
  234. package/templates/.agents/rules/next-step-output.en.md +3 -1
  235. package/templates/.agents/rules/next-step-output.zh-CN.md +3 -1
  236. package/templates/.agents/rules/no-mid-flow-questions.en.md +17 -0
  237. package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +17 -0
  238. package/templates/.agents/rules/pr-checks-commands.en.md +3 -3
  239. package/templates/.agents/rules/pr-checks-commands.github.en.md +2 -2
  240. package/templates/.agents/rules/pr-checks-commands.github.zh-CN.md +3 -3
  241. package/templates/.agents/rules/pr-checks-commands.zh-CN.md +3 -3
  242. package/templates/.agents/rules/pr-sync.en.md +3 -1
  243. package/templates/.agents/rules/pr-sync.github.en.md +11 -1
  244. package/templates/.agents/rules/pr-sync.github.zh-CN.md +11 -1
  245. package/templates/.agents/rules/pr-sync.zh-CN.md +3 -1
  246. package/templates/.agents/rules/release-commands.en.md +1 -1
  247. package/templates/.agents/rules/release-commands.github.en.md +12 -2
  248. package/templates/.agents/rules/release-commands.github.zh-CN.md +12 -2
  249. package/templates/.agents/rules/release-commands.zh-CN.md +1 -1
  250. package/templates/.agents/rules/review-handshake.zh-CN.md +1 -1
  251. package/templates/.agents/rules/task-management.en.md +13 -0
  252. package/templates/.agents/rules/task-management.zh-CN.md +13 -0
  253. package/templates/.agents/skills/analyze-task/SKILL.en.md +10 -7
  254. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +10 -7
  255. package/templates/.agents/skills/block-task/SKILL.en.md +7 -5
  256. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +7 -5
  257. package/templates/.agents/skills/cancel-task/SKILL.en.md +6 -4
  258. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +6 -4
  259. package/templates/.agents/skills/close-codescan/SKILL.en.md +3 -1
  260. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +3 -1
  261. package/templates/.agents/skills/close-dependabot/SKILL.en.md +3 -1
  262. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +3 -1
  263. package/templates/.agents/skills/code-task/SKILL.en.md +10 -7
  264. package/templates/.agents/skills/code-task/SKILL.zh-CN.md +12 -9
  265. package/templates/.agents/skills/commit/SKILL.en.md +23 -11
  266. package/templates/.agents/skills/commit/SKILL.zh-CN.md +29 -11
  267. package/templates/.agents/skills/commit/reference/commit-message.en.md +1 -1
  268. package/templates/.agents/skills/commit/reference/commit-message.zh-CN.md +1 -1
  269. package/templates/.agents/skills/commit/reference/commit-orchestration.en.md +49 -0
  270. package/templates/.agents/skills/commit/reference/commit-orchestration.zh-CN.md +55 -0
  271. package/templates/.agents/skills/commit/reference/issue-metadata-sync.en.md +1 -1
  272. package/templates/.agents/skills/commit/reference/issue-metadata-sync.zh-CN.md +1 -1
  273. package/templates/.agents/skills/commit/reference/pr-summary-sync.en.md +1 -1
  274. package/templates/.agents/skills/commit/reference/pr-summary-sync.zh-CN.md +1 -1
  275. package/templates/.agents/skills/commit/reference/task-status-update.en.md +4 -4
  276. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +4 -4
  277. package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +6 -4
  278. package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +6 -4
  279. package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +1 -1
  280. package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +1 -1
  281. package/templates/.agents/skills/complete-task/SKILL.en.md +22 -7
  282. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +22 -7
  283. package/templates/.agents/skills/complete-task/config/verify.en.json +1 -0
  284. package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +1 -0
  285. package/templates/.agents/skills/complete-task/reference/external-delivery.en.md +17 -0
  286. package/templates/.agents/skills/complete-task/reference/external-delivery.zh-CN.md +17 -0
  287. package/templates/.agents/skills/create-pr/SKILL.en.md +7 -5
  288. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +7 -5
  289. package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +1 -1
  290. package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +1 -1
  291. package/templates/.agents/skills/create-release-note/SKILL.en.md +17 -16
  292. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +17 -16
  293. package/templates/.agents/skills/create-task/SKILL.en.md +5 -3
  294. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +5 -3
  295. package/templates/.agents/skills/create-task/reference/context-capture.en.md +34 -0
  296. package/templates/.agents/skills/create-task/reference/context-capture.zh-CN.md +34 -0
  297. package/templates/.agents/skills/import-issue/SKILL.en.md +5 -3
  298. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +5 -3
  299. package/templates/.agents/skills/plan-task/SKILL.en.md +8 -5
  300. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +8 -5
  301. package/templates/.agents/skills/post-release/SKILL.en.md +2 -0
  302. package/templates/.agents/skills/post-release/SKILL.zh-CN.md +2 -0
  303. package/templates/.agents/skills/release/SKILL.en.md +16 -10
  304. package/templates/.agents/skills/release/SKILL.zh-CN.md +16 -10
  305. package/templates/.agents/skills/restore-task/SKILL.en.md +4 -1
  306. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +4 -1
  307. package/templates/.agents/skills/review-analysis/SKILL.en.md +7 -4
  308. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +7 -4
  309. package/templates/.agents/skills/review-code/SKILL.en.md +11 -8
  310. package/templates/.agents/skills/review-code/SKILL.zh-CN.md +11 -8
  311. package/templates/.agents/skills/review-code/reference/output-templates.en.md +1 -1
  312. package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +1 -1
  313. package/templates/.agents/skills/review-plan/SKILL.en.md +7 -4
  314. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +7 -4
  315. package/templates/.agents/skills/review-pr/SKILL.en.md +186 -0
  316. package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +186 -0
  317. package/templates/.agents/skills/review-pr/config/verify.en.json +37 -0
  318. package/templates/.agents/skills/review-pr/config/verify.zh-CN.json +37 -0
  319. package/templates/.agents/skills/review-pr/reference/evidence-grading.en.md +65 -0
  320. package/templates/.agents/skills/review-pr/reference/evidence-grading.zh-CN.md +65 -0
  321. package/templates/.agents/skills/review-pr/reference/output-guidance.en.md +18 -0
  322. package/templates/.agents/skills/review-pr/reference/output-guidance.zh-CN.md +18 -0
  323. package/templates/.agents/skills/review-pr/reference/report-template.en.md +85 -0
  324. package/templates/.agents/skills/review-pr/reference/report-template.zh-CN.md +85 -0
  325. package/templates/.agents/skills/run-task/SKILL.en.md +8 -8
  326. package/templates/.agents/skills/run-task/SKILL.zh-CN.md +8 -8
  327. package/templates/.agents/skills/run-task/config/verify.en.json +2 -1
  328. package/templates/.agents/skills/run-task/config/verify.zh-CN.json +2 -1
  329. package/templates/.agents/skills/run-task/reference/host-validation.en.md +20 -0
  330. package/templates/.agents/skills/run-task/reference/host-validation.zh-CN.md +20 -0
  331. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +98 -107
  332. package/templates/.agents/skills/watch-pr/SKILL.en.md +13 -13
  333. package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +13 -13
  334. package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +27 -6
  335. package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +26 -5
  336. package/templates/.agents/templates/task.en.md +2 -2
  337. package/templates/.agents/templates/task.zh-CN.md +2 -2
  338. package/templates/.agents/workflows/bug-fix.en.yaml +3 -3
  339. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +3 -3
  340. package/templates/.agents/workflows/code-review.en.yaml +1 -1
  341. package/templates/.agents/workflows/code-review.zh-CN.yaml +1 -1
  342. package/templates/.agents/workflows/feature-development.en.yaml +4 -4
  343. package/templates/.agents/workflows/feature-development.zh-CN.yaml +4 -4
  344. package/templates/.agents/workflows/refactoring.en.yaml +3 -3
  345. package/templates/.agents/workflows/refactoring.zh-CN.yaml +3 -3
  346. package/templates/.claude/commands/post-release.en.md +1 -0
  347. package/templates/.claude/commands/post-release.zh-CN.md +1 -0
  348. package/templates/.claude/commands/review-pr.en.md +8 -0
  349. package/templates/.claude/commands/review-pr.zh-CN.md +8 -0
  350. package/templates/.claude/commands/watch-pr.en.md +1 -1
  351. package/templates/.claude/commands/watch-pr.zh-CN.md +1 -1
  352. package/templates/.claude/rules/tool-preferences.en.md +20 -0
  353. package/templates/.claude/rules/tool-preferences.zh-CN.md +20 -0
  354. package/templates/.opencode/commands/post-release.en.md +2 -0
  355. package/templates/.opencode/commands/post-release.zh-CN.md +2 -0
  356. package/templates/.opencode/commands/review-pr.en.md +11 -0
  357. package/templates/.opencode/commands/review-pr.zh-CN.md +11 -0
  358. package/templates/.opencode/commands/watch-pr.en.md +1 -1
  359. package/templates/.opencode/commands/watch-pr.zh-CN.md +1 -1
  360. package/dist/lib/agent-clients/adapters/gemini-cli.js +0 -64
  361. package/lib/agent-clients/adapters/gemini-cli.ts +0 -65
  362. package/templates/.gemini/commands/_project_/analyze-task.en.toml +0 -10
  363. package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +0 -10
  364. package/templates/.gemini/commands/_project_/archive-tasks.en.toml +0 -10
  365. package/templates/.gemini/commands/_project_/archive-tasks.zh-CN.toml +0 -10
  366. package/templates/.gemini/commands/_project_/block-task.en.toml +0 -10
  367. package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +0 -10
  368. package/templates/.gemini/commands/_project_/cancel-task.en.toml +0 -10
  369. package/templates/.gemini/commands/_project_/cancel-task.zh-CN.toml +0 -10
  370. package/templates/.gemini/commands/_project_/check-task.en.toml +0 -10
  371. package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +0 -10
  372. package/templates/.gemini/commands/_project_/close-codescan.en.toml +0 -8
  373. package/templates/.gemini/commands/_project_/close-codescan.zh-CN.toml +0 -8
  374. package/templates/.gemini/commands/_project_/close-dependabot.en.toml +0 -8
  375. package/templates/.gemini/commands/_project_/close-dependabot.zh-CN.toml +0 -8
  376. package/templates/.gemini/commands/_project_/code-task.en.toml +0 -10
  377. package/templates/.gemini/commands/_project_/code-task.zh-CN.toml +0 -10
  378. package/templates/.gemini/commands/_project_/commit.en.toml +0 -10
  379. package/templates/.gemini/commands/_project_/commit.zh-CN.toml +0 -10
  380. package/templates/.gemini/commands/_project_/complete-manual-validation.en.toml +0 -10
  381. package/templates/.gemini/commands/_project_/complete-manual-validation.zh-CN.toml +0 -10
  382. package/templates/.gemini/commands/_project_/complete-task.en.toml +0 -10
  383. package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +0 -10
  384. package/templates/.gemini/commands/_project_/create-pr.en.toml +0 -10
  385. package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +0 -10
  386. package/templates/.gemini/commands/_project_/create-release-note.en.toml +0 -8
  387. package/templates/.gemini/commands/_project_/create-release-note.zh-CN.toml +0 -8
  388. package/templates/.gemini/commands/_project_/create-task.en.toml +0 -8
  389. package/templates/.gemini/commands/_project_/create-task.zh-CN.toml +0 -8
  390. package/templates/.gemini/commands/_project_/import-codescan.en.toml +0 -8
  391. package/templates/.gemini/commands/_project_/import-codescan.zh-CN.toml +0 -8
  392. package/templates/.gemini/commands/_project_/import-dependabot.en.toml +0 -8
  393. package/templates/.gemini/commands/_project_/import-dependabot.zh-CN.toml +0 -8
  394. package/templates/.gemini/commands/_project_/import-issue.en.toml +0 -8
  395. package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +0 -8
  396. package/templates/.gemini/commands/_project_/init-labels.en.toml +0 -8
  397. package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +0 -8
  398. package/templates/.gemini/commands/_project_/init-milestones.en.toml +0 -10
  399. package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +0 -10
  400. package/templates/.gemini/commands/_project_/plan-task.en.toml +0 -10
  401. package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +0 -10
  402. package/templates/.gemini/commands/_project_/post-release.en.toml +0 -6
  403. package/templates/.gemini/commands/_project_/post-release.zh-CN.toml +0 -6
  404. package/templates/.gemini/commands/_project_/refine-title.en.toml +0 -8
  405. package/templates/.gemini/commands/_project_/refine-title.zh-CN.toml +0 -8
  406. package/templates/.gemini/commands/_project_/release.en.toml +0 -8
  407. package/templates/.gemini/commands/_project_/release.zh-CN.toml +0 -8
  408. package/templates/.gemini/commands/_project_/restore-task.en.toml +0 -8
  409. package/templates/.gemini/commands/_project_/restore-task.zh-CN.toml +0 -8
  410. package/templates/.gemini/commands/_project_/review-analysis.en.toml +0 -10
  411. package/templates/.gemini/commands/_project_/review-analysis.zh-CN.toml +0 -10
  412. package/templates/.gemini/commands/_project_/review-code.en.toml +0 -10
  413. package/templates/.gemini/commands/_project_/review-code.zh-CN.toml +0 -10
  414. package/templates/.gemini/commands/_project_/review-plan.en.toml +0 -10
  415. package/templates/.gemini/commands/_project_/review-plan.zh-CN.toml +0 -10
  416. package/templates/.gemini/commands/_project_/run-task.en.toml +0 -8
  417. package/templates/.gemini/commands/_project_/run-task.zh-CN.toml +0 -8
  418. package/templates/.gemini/commands/_project_/test-integration.en.toml +0 -6
  419. package/templates/.gemini/commands/_project_/test-integration.zh-CN.toml +0 -6
  420. package/templates/.gemini/commands/_project_/test.en.toml +0 -6
  421. package/templates/.gemini/commands/_project_/test.zh-CN.toml +0 -6
  422. package/templates/.gemini/commands/_project_/update-agent-infra.en.toml +0 -6
  423. package/templates/.gemini/commands/_project_/update-agent-infra.zh-CN.toml +0 -6
  424. package/templates/.gemini/commands/_project_/upgrade-dependency.en.toml +0 -8
  425. package/templates/.gemini/commands/_project_/upgrade-dependency.zh-CN.toml +0 -8
  426. package/templates/.gemini/commands/_project_/watch-pr.en.toml +0 -10
  427. package/templates/.gemini/commands/_project_/watch-pr.zh-CN.toml +0 -10
  428. package/templates/.gemini/settings.json +0 -3
@@ -1,6 +1,6 @@
1
1
  # 多 AI 协作指南
2
2
 
3
- 本项目支持多个 AI 编程助手协同工作,包括 Claude Code、OpenAI Codex CLI、Gemini CLI、OpenCode 等。
3
+ 本项目支持多个 AI 编程助手协同工作,包括 Claude Code、OpenAI Codex CLI、Antigravity CLI、OpenCode 等。
4
4
 
5
5
  ## 双配置架构
6
6
 
@@ -10,7 +10,7 @@
10
10
  |---------|---------|---------|
11
11
  | Claude Code | `.claude/`(CLAUDE.md、commands/、settings.json) | - |
12
12
  | OpenAI Codex CLI | `AGENTS.md` | - |
13
- | Gemini CLI | `AGENTS.md` | - |
13
+ | Antigravity CLI | `AGENTS.md`、`.agents/skills/` | - |
14
14
  | OpenCode | `AGENTS.md` | - |
15
15
  | 其他 AI 工具 | `AGENTS.md` | 项目 README |
16
16
 
@@ -75,7 +75,7 @@
75
75
 
76
76
  每个 AI 工具有不同的优势,请据此分配任务:
77
77
 
78
- | 能力 | Claude Code | Codex CLI | Gemini CLI | OpenCode |
78
+ | 能力 | Claude Code | Codex CLI | Antigravity CLI | OpenCode |
79
79
  |-----|-------------|-----------|------------|----------|
80
80
  | 代码库分析 | 优秀 | 良好 | 优秀 | 良好 |
81
81
  | 代码审查 | 优秀 | 良好 | 良好 | 良好 |
@@ -88,7 +88,7 @@
88
88
 
89
89
  - **分析和审查** - Claude Code(推理能力强,探索全面)
90
90
  - **代码实现** - Codex CLI 或 OpenCode(代码生成快,命令式工作流顺手)
91
- - **大上下文任务** - Gemini CLI(大上下文窗口,适合跨文件分析)
91
+ - **大上下文任务** - Antigravity CLI(大上下文窗口,适合跨文件分析)
92
92
  - **命令式迭代** - OpenCode(适合按工作流连续推进)
93
93
 
94
94
  ## 快速入门
@@ -173,7 +173,7 @@ disable-model-invocation: true # 可选;由支持该能力的 TUI 适配器
173
173
 
174
174
  当生成的 TUI 命令需要禁用模型调用时,将通用可选字段 `disable-model-invocation` 设为 `true`;各 TUI 适配器按自身能力决定是否消费。多行 `description` 如需保留换行,使用 YAML literal block(`|`);同步器会为各 TUI 输出对应的多行元数据格式。
175
175
 
176
- 新增或修改自定义 skill 后,再执行一次 `update-agent-infra`。同步过程会自动检测非内置 skill,并为 Claude Code、Gemini CLI、OpenCode 生成对应命令。
176
+ 新增或修改自定义 skill 后,再执行一次 `update-agent-infra`。同步过程会自动检测非内置 skill,为 Claude Code 和 OpenCode 生成对应命令;Antigravity CLI 则直接发现共享 skill。
177
177
 
178
178
  ### 共享 skill 源
179
179
 
@@ -220,13 +220,16 @@ disable-model-invocation: true # 可选;由支持该能力的 TUI 适配器
220
220
 
221
221
  ## Agent Client 配置
222
222
 
223
- `.agents/.airc.json` 顶层 `agentClients` 数组用于配置全部四个内建客户端(`claude-code`、`codex`、`gemini-cli`、`opencode`)。规范化后的每个条目包含三个字段:
223
+ `.agents/.airc.json` 顶层 `agentClients` 数组用于配置全部四个内建客户端(`claude-code`、`codex`、`antigravity-cli`、`opencode`)。每个规范条目包含三个必填字段和一个可选编排策略:
224
224
 
225
225
  | 字段 | 含义 |
226
226
  |------|------|
227
227
  | `id` | 内建 Agent Client id。规范数组为每个内建客户端保留且仅保留一个条目。 |
228
228
  | `enabled` | agent-infra 是否写入并维护该客户端的项目集成与种子命令。 |
229
229
  | `installInSandbox` | 沙箱镜像是否安装该客户端 CLI;此字段与 `enabled` 相互独立。 |
230
+ | `orchestration` | `run-task` 可选默认策略;必须同时提供 executor/reviewer 的 `model` 与宿主原生 `reasoningEffort`,两个角色可以使用同一模型。 |
231
+
232
+ `run-task` 的显式 model/effort 参数是原子输入:只要提供其中任一字段,就必须完整提供四个 role 字段,不能从配置补齐。完全没有显式策略时,只读取当前客户端的 `orchestration`。模型目录通过 `agent-infra-internal agent-client model-selection --client <id>` 查询,并明确标记 complete、partial 或 interactive-only;局部 override 列表不能当作完整目录。
230
233
 
231
234
  无需手工编辑 JSON,可使用:
232
235
 
@@ -234,7 +237,7 @@ disable-model-invocation: true # 可选;由支持该能力的 TUI 适配器
234
237
  ai agent-client list
235
238
  ai agent-client status
236
239
  ai agent-client enable codex
237
- ai agent-client disable gemini-cli
240
+ ai agent-client disable antigravity-cli
238
241
  ai agent-client configure
239
242
  ```
240
243
 
@@ -1,6 +1,9 @@
1
1
  import { execFileSync } from 'node:child_process';
2
+ import { existsSync } from 'node:fs';
3
+ import { fileURLToPath } from 'node:url';
2
4
 
3
5
  const MAX_INPUT_BYTES = 64 * 1024;
6
+ const localInternalCli = fileURLToPath(new URL('../../dist/bin/internal-cli.js', import.meta.url));
4
7
  const clientIndex = process.argv.indexOf('--client');
5
8
  const client = clientIndex >= 0 ? process.argv[clientIndex + 1] : '';
6
9
  if (client !== 'claude-code') {
@@ -39,10 +42,15 @@ process.stdin.on('end', () => {
39
42
  '--native-agent', String(nativeAgent),
40
43
  '--child-id', String(event.child_id || event.agent_id || event.thread_id || ''),
41
44
  '--parent-id', String(event.parent_id || event.parent_session_id || event.session_id || ''),
42
- '--spawn-mode', String(event.spawn_mode || 'fresh')
45
+ '--spawn-mode', String(event.spawn_mode || (client === 'claude-code' ? 'fresh' : ''))
43
46
  );
44
47
  if (event.model) args.push('--actual-model', String(event.model));
45
- if (event.model_fallback_reason) args.push('--fallback-reason', String(event.model_fallback_reason));
48
+ const actualEffort = event.actual_reasoning_effort || event.reasoning_effort || event.model_reasoning_effort;
49
+ if (actualEffort) args.push('--actual-reasoning-effort', String(actualEffort));
50
+ if (event.model_fallback_reason) args.push('--model-fallback-reason', String(event.model_fallback_reason));
51
+ if (event.reasoning_effort_fallback_reason) {
52
+ args.push('--reasoning-effort-fallback-reason', String(event.reasoning_effort_fallback_reason));
53
+ }
46
54
  } else {
47
55
  args.push(
48
56
  '--native-agent', String(nativeAgent),
@@ -50,9 +58,12 @@ process.stdin.on('end', () => {
50
58
  );
51
59
  }
52
60
  try {
53
- const output = execFileSync('agent-infra-internal', args, {
61
+ const useLocal = existsSync(localInternalCli);
62
+ const command = useLocal ? process.execPath : 'agent-infra-internal';
63
+ const commandArgs = useLocal ? [localInternalCli, ...args] : args;
64
+ const output = execFileSync(command, commandArgs, {
54
65
  encoding: 'utf8',
55
- shell: process.platform === 'win32',
66
+ shell: !useLocal && process.platform === 'win32',
56
67
  stdio: ['ignore', 'pipe', 'pipe']
57
68
  });
58
69
  process.stdout.write(output);
@@ -16,7 +16,7 @@ so you can quickly find "which ones to read" without opening each file.
16
16
  ## Issue / PR
17
17
 
18
18
  - [`issue-pr-commands.md`](issue-pr-commands.md) — PR commands and Issue intent entry points.
19
- - [`pr-checks-commands.md`](pr-checks-commands.md) — Commands to watch PR required checks and pull failure logs (`watch-pr`).
19
+ - [`pr-checks-commands.md`](pr-checks-commands.md) — Commands to watch all PR checks and pull failure logs (`watch-pr`).
20
20
  - [`create-issue.md`](create-issue.md) — Declarative Issue creation after `create-task` writes `task.md`.
21
21
  - [`issue-sync.md`](issue-sync.md) — Issue comment markers and declarative metadata intent contract.
22
22
  - [`issue-fields.md`](issue-fields.md) — Dynamic Issue Type pinned-field mapping boundary.
@@ -15,7 +15,7 @@
15
15
  ## Issue / PR
16
16
 
17
17
  - [`issue-pr-commands.md`](issue-pr-commands.md) — PR 命令集与 Issue intent 入口说明。
18
- - [`pr-checks-commands.md`](pr-checks-commands.md) — 监控 PR required checks、拉取失败日志的命令集(`watch-pr`)。
18
+ - [`pr-checks-commands.md`](pr-checks-commands.md) — 监控 PR 全部 checks、拉取失败日志的命令集(`watch-pr`)。
19
19
  - [`create-issue.md`](create-issue.md) — `create-task` 落盘后的声明式 Issue 创建 intent。
20
20
  - [`issue-sync.md`](issue-sync.md) — Issue 评论 marker 与声明式元数据 intent 契约。
21
21
  - [`issue-fields.md`](issue-fields.md) — 动态 Issue Type pinned 字段映射边界。
@@ -1,10 +1,12 @@
1
1
  # Issue Creation
2
2
 
3
+ > `--agent` values follow the "Collaborator Token Specification" in `.agents/rules/task-management.md`: standard AI short tokens (`claude`/`codex`/`antigravity`/`opencode`/`cursor`), long-name normalization (`claude-code`->`claude`, `antigravity-cli`->`antigravity`), or the `human` manual exception.
4
+
3
5
  After `create-task` writes task.md, create and initialize the Issue through declarative internal intents:
4
6
 
5
7
  ```bash
6
- agent-infra-internal platform-issue create {task-id} --agent {agent}
7
- agent-infra-internal platform-issue sync {task-id} --agent {agent} --status waiting-for-triage --assignees current --milestone initial --issue-type --fields
8
+ agent-infra-internal platform-issue create {task-id} --agent {standard-agent-token}
9
+ agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status waiting-for-triage --assignees current --milestone initial --issue-type --fields
8
10
  ```
9
11
 
10
12
  The core reads only persisted task identity, title, type, description, and requirements, and reuses deterministic `ai task issue-body` rendering. It owns template selection, upstream/capabilities, duplicate prevention, POST outcome boundaries, response validation, and atomic `issue_number` binding.
@@ -1,9 +1,11 @@
1
1
  # Issue 创建
2
2
 
3
+ > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
4
+
3
5
  当 `create-task` 完成本地 `task.md` 落盘后,通过声明式内部命令创建 Issue:
4
6
 
5
7
  ```bash
6
- agent-infra-internal platform-issue create {task-id} --agent {agent}
8
+ agent-infra-internal platform-issue create {task-id} --agent {standard-agent-token}
7
9
  ```
8
10
 
9
11
  命令只从已落盘 task.md 读取身份、标题、类型、描述与需求,并复用 `ai task issue-body` 的确定性正文渲染。它负责模板选择、upstream/capability、已有绑定检查、非幂等 POST 边界、响应身份校验及通过任务写入内核回写 `issue_number`。
@@ -11,7 +13,7 @@ agent-infra-internal platform-issue create {task-id} --agent {agent}
11
13
  创建后的初始元数据使用同一适配层同步:
12
14
 
13
15
  ```bash
14
- agent-infra-internal platform-issue sync {task-id} --agent {agent} \
16
+ agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} \
15
17
  --status waiting-for-triage --assignees current --milestone initial --issue-type --fields
16
18
  ```
17
19
 
@@ -6,7 +6,7 @@ This rule governs every new `[needs-human-decision]` detail block produced by an
6
6
 
7
7
  A maintainer must be able to understand the issue and choose without knowing the internal workflow or asking a model to reconstruct context. Start in plain language: explain why a decision is needed now, what must be chosen, which choice is recommended, and why. Then explain what the choice affects and what could go wrong if the wrong choice is made or no action is taken.
8
8
 
9
- Provide at least two options with short names, and state the benefits and trade-offs of each one. Explain internal terms such as stage, severity, and evidence the first time they appear. IDs and evidence are for lookup and troubleshooting; they do not replace the plain-language explanation.
9
+ Provide at least two options with short names. For each option, explain what would actually be done, what would happen after choosing it, its benefits, and its trade-offs. Each decision must also include at least one everyday example or analogy that stays true to the real effects and helps the maintainer compare the options. Explain internal terms such as stage, severity, and evidence the first time they appear. IDs and evidence are for lookup and troubleshooting; they do not replace the plain-language explanation.
10
10
 
11
11
  ## Canonical Structure
12
12
 
@@ -19,19 +19,28 @@ Provide at least two options with short names, and state the benefits and trade-
19
19
  - **Why this choice**: {reason based on benefits, trade-offs, and current constraints}
20
20
  - **What this affects**: {affected behavior, files, users, or future practice}
21
21
  - **What could go wrong**: {problems caused by the wrong choice or no action}
22
+ - **Everyday example or analogy**: {a familiar comparison that accurately reflects the real effects and helps compare the options}
22
23
 
23
24
  #### Option A: {Name}
24
25
 
26
+ - **What would actually be done**: {how the system or follow-up work would handle this option}
27
+ - **What happens after choosing it**: {specific changes for users, behavior, or follow-up work}
25
28
  - **Benefits**: {what this option provides}
26
29
  - **Trade-offs**: {what this option costs and where it falls short}
27
30
 
28
31
  #### Option B: {Name}
29
32
 
33
+ - **What would actually be done**: {how the system or follow-up work would handle this option}
34
+ - **What happens after choosing it**: {specific changes for users, behavior, or follow-up work}
30
35
  - **Benefits**: {what this option provides}
31
36
  - **Trade-offs**: {what this option costs and where it falls short}
32
37
  ```
33
38
 
34
- Option C and supporting evidence may be added, but none of the information above may be omitted or collapsed into an incomparable one-line option list. The heading ID must match the task.md Review Disagreement Ledger row. Its evidence (the reference used to find the original explanation) must point to this stable heading anchor.
39
+ Option C and supporting evidence may be added, but none of the information above may be omitted or collapsed into an incomparable one-line option list. An example or analogy helps understanding; it does not replace facts, concrete effects, or risks. One example that clearly compares the overall choice is enough, so do not mechanically repeat the same analogy under every option. The heading ID must match the task.md Review Disagreement Ledger row. Its evidence (the reference used to find the original explanation) must point to this stable heading anchor.
40
+
41
+ ## Implementation Intent Declaration
42
+
43
+ For the code stage, the author must add `**Implementation required**: yes/no` after the options, then pass `--needs-implementation true|false` when `finding-review` escalates to `needs-human-decision` or when calling `decision-upsert`. The value is stored as a predeclared implementation input, so maintainers normally omit this option from `ai decide`. Historical tasks without a declaration may still pass it explicitly to `ai decide`; a value that conflicts with an existing declaration is rejected.
35
44
 
36
45
  ## Decision Closure
37
46
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  详情必须让维护者不需要了解内部流程,也不需要再问模型,就能看懂并做选择。先用大白话说明为什么现在需要决定、具体要选什么、建议选哪个以及原因;再说明会影响什么、选错或暂不处理会怎样。
8
8
 
9
- 每项至少提供两个有简短名称的方案,并分别写清好处和代价。第一次出现 stage、severity、evidence 等内部术语时,必须顺手解释它们的意思;ID 和 evidence 只用于后续查找和排查,不能代替问题说明。
9
+ 每项至少提供两个有简短名称的方案,并分别写清实际会怎么做、选了以后会怎样、好处和代价。每项还必须提供至少一个贴近日常、且不歪曲事实的例子或类比,帮助维护者比较方案。第一次出现 stage、severity、evidence 等内部术语时,必须顺手解释它们的意思;ID 和 evidence 只用于后续查找和排查,不能代替问题说明。
10
10
 
11
11
  ## 规范结构
12
12
 
@@ -19,19 +19,28 @@
19
19
  - **为什么这样建议**:{结合好处、代价和现有限制说明原因}
20
20
  - **会影响什么**:{会受影响的功能、文件、用户或后续做法}
21
21
  - **如果选错或暂不处理**:{可能出现的问题}
22
+ - **打个比方**:{用一个贴近日常且符合真实影响的例子或类比,帮助比较方案}
22
23
 
23
24
  #### 方案 A:{名称}
24
25
 
26
+ - **实际会怎么做**:{选择该方案后,系统或后续工作具体怎么处理}
27
+ - **选了以后会怎样**:{用户、功能或后续工作会发生什么具体变化}
25
28
  - **好处**:{选择该方案能得到什么}
26
29
  - **代价**:{选择该方案要付出什么、有哪些局限}
27
30
 
28
31
  #### 方案 B:{名称}
29
32
 
33
+ - **实际会怎么做**:{选择该方案后,系统或后续工作具体怎么处理}
34
+ - **选了以后会怎样**:{用户、功能或后续工作会发生什么具体变化}
30
35
  - **好处**:{选择该方案能得到什么}
31
36
  - **代价**:{选择该方案要付出什么、有哪些局限}
32
37
  ```
33
38
 
34
- 可增加方案 C 或补充证据,但不得省略上述信息或把多个方案压缩为无法分别比较的一行。标题 ID 必须与 task.md `## 审查分歧账本` 行一致;evidence(用于定位原始说明的引用)必须指向该标题的稳定锚点。
39
+ 可增加方案 C 或补充证据,但不得省略上述信息或把多个方案压缩为无法分别比较的一行。例子或类比用于帮助理解,不能替代事实、实际影响和风险说明;一个能清楚比较整体选择的例子即可,不必为每个方案机械重复同一类比。标题 ID 必须与 task.md `## 审查分歧账本` 行一致;evidence(用于定位原始说明的引用)必须指向该标题的稳定锚点。
40
+
41
+ ## 实现意图声明
42
+
43
+ code 阶段的提出者必须在详情块的方案说明后另写 `**是否需要实现**:是/否`,并在 `finding-review` 升级为 `needs-human-decision` 或 `decision-upsert` 时传入 `--needs-implementation true|false`。该值会作为待裁决实现输入保存;维护者执行 `ai decide` 时通常无需再传此参数。历史任务没有预先声明时,仍可在 `ai decide` 中显式传参;显式值与已有声明冲突时命令失败。
35
44
 
36
45
  ## 裁决闭环
37
46
 
@@ -1,9 +1,11 @@
1
1
  # Issue Fields
2
2
 
3
+ > `--agent` values follow the "Collaborator Token Specification" in `.agents/rules/task-management.md`: standard AI short tokens (`claude`/`codex`/`antigravity`/`opencode`/`cursor`), long-name normalization (`claude-code`->`claude`, `antigravity-cli`->`antigravity`), or the `human` manual exception.
4
+
3
5
  Synchronize Issue Type and pinned fields through one intent:
4
6
 
5
7
  ```bash
6
- agent-infra-internal platform-issue sync {task-id} --agent {agent} --issue-type --fields
8
+ agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --issue-type --fields
7
9
  ```
8
10
 
9
11
  Supported task.md mappings are `priority` → `Priority`, `effort` → `Effort`, `start_date` → `Start date`, and `target_date` → `Target date`. The core normalizes localized priority/effort options and validates `YYYY-MM-DD` dates.
@@ -1,9 +1,11 @@
1
1
  # Issue 字段
2
2
 
3
+ > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
4
+
3
5
  Issue Type 与 pinned fields 统一由 `platform-issue` intent 动态读取组织 schema 并同步:
4
6
 
5
7
  ```bash
6
- agent-infra-internal platform-issue sync {task-id} --agent {agent} --issue-type --fields
8
+ agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --issue-type --fields
7
9
  ```
8
10
 
9
11
  ## 支持字段
@@ -1,5 +1,7 @@
1
1
  # PR Platform Intents
2
2
 
3
+ > `--agent` values follow the "Collaborator Token Specification" in `.agents/rules/task-management.md`: standard AI short tokens (`claude`/`codex`/`antigravity`/`opencode`/`cursor`), long-name normalization (`claude-code`->`claude`, `antigravity-cli`->`antigravity`), or the `human` manual exception.
4
+
3
5
  PR lookup, creation, binding, and metadata synchronization go through typed internal intents. Skills decide branches and write titles/bodies; they do not assemble platform commands.
4
6
 
5
7
  ## Inspect
@@ -14,7 +16,7 @@ Write the title and body to files, then run:
14
16
 
15
17
  ```bash
16
18
  agent-infra-internal platform-pr create {task-id} \
17
- --agent {agent} --base {target-branch} --head {current-branch} \
19
+ --agent {standard-agent-token} --base {target-branch} --head {current-branch} \
18
20
  --title-file {title-file} --body-file {body-file}
19
21
  ```
20
22
 
@@ -23,7 +25,7 @@ The core performs exact upstream/head/base lookup first. One match is reused, ze
23
25
  ## Bind
24
26
 
25
27
  ```bash
26
- agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {agent}
28
+ agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {standard-agent-token}
27
29
  ```
28
30
 
29
31
  Conflicting bindings fail without changing `task.md`.
@@ -32,7 +34,7 @@ Conflicting bindings fail without changing `task.md`.
32
34
 
33
35
  ```bash
34
36
  agent-infra-internal platform-pr sync {task-id} \
35
- --agent {agent} --metadata --closing-issue
37
+ --agent {standard-agent-token} --metadata --closing-issue
36
38
  ```
37
39
 
38
40
  The core copies type / `in:` labels, assignee, a specific milestone, and the closing association from the linked Issue. Permission-bound operations report `skipped` under top-level `degraded`; the Issue is never updated in reverse.
@@ -1,5 +1,7 @@
1
1
  # PR Platform Intents
2
2
 
3
+ > `--agent` values follow the "Collaborator Token Specification" in `.agents/rules/task-management.md`: standard AI short tokens (`claude`/`codex`/`antigravity`/`opencode`/`cursor`), long-name normalization (`claude-code`->`claude`, `antigravity-cli`->`antigravity`), or the `human` manual exception.
4
+
3
5
  PR lookup, creation, binding, and metadata synchronization go through typed internal intents. Skills decide branches and write titles/bodies; they do not assemble platform commands.
4
6
 
5
7
  ## Inspect
@@ -12,7 +14,7 @@ agent-infra-internal platform-pr inspect {task-id}
12
14
 
13
15
  ```bash
14
16
  agent-infra-internal platform-pr create {task-id} \
15
- --agent {agent} --base {target-branch} --head {current-branch} \
17
+ --agent {standard-agent-token} --base {target-branch} --head {current-branch} \
16
18
  --title-file {title-file} --body-file {body-file}
17
19
  ```
18
20
 
@@ -21,10 +23,10 @@ The core performs exact upstream/head/base lookup. One match is reused, zero cre
21
23
  ## Bind and synchronize
22
24
 
23
25
  ```bash
24
- agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {agent}
26
+ agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {standard-agent-token}
25
27
 
26
28
  agent-infra-internal platform-pr sync {task-id} \
27
- --agent {agent} --metadata --closing-issue
29
+ --agent {standard-agent-token} --metadata --closing-issue
28
30
  ```
29
31
 
30
32
  Conflicting bindings do not change `task.md`. Metadata comes from the linked Issue, permission-bound items degrade independently, and an already-created PR is never rolled back.
@@ -1,5 +1,7 @@
1
1
  # PR 平台意图命令
2
2
 
3
+ > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
4
+
3
5
  PR 资源的定位、创建、绑定和元数据同步统一通过 typed internal intent;SKILL 只负责决定分支、标题、正文和调用时机,不直接拼装平台命令。
4
6
 
5
7
  ## 定位
@@ -16,7 +18,7 @@ agent-infra-internal platform-pr inspect {task-id}
16
18
 
17
19
  ```bash
18
20
  agent-infra-internal platform-pr create {task-id} \
19
- --agent {agent} --base {target-branch} --head {current-branch} \
21
+ --agent {standard-agent-token} --base {target-branch} --head {current-branch} \
20
22
  --title-file {title-file} --body-file {body-file}
21
23
  ```
22
24
 
@@ -25,7 +27,7 @@ core 会先按 upstream、head 和 base 精确定位;唯一既有 PR 会复用
25
27
  ## 显式绑定
26
28
 
27
29
  ```bash
28
- agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {agent}
30
+ agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {standard-agent-token}
29
31
  ```
30
32
 
31
33
  冲突绑定稳定失败且不修改 `task.md`。
@@ -34,7 +36,7 @@ agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {agent}
34
36
 
35
37
  ```bash
36
38
  agent-infra-internal platform-pr sync {task-id} \
37
- --agent {agent} --metadata --closing-issue
39
+ --agent {standard-agent-token} --metadata --closing-issue
38
40
  ```
39
41
 
40
42
  core 从关联 Issue 复制 type / `in:` labels、assignee、具体 milestone,并确保 closing association。权限不足返回逐项 `skipped` 和顶层 `degraded`;不得反向修改 Issue。
@@ -1,5 +1,7 @@
1
1
  # PR 平台意图命令
2
2
 
3
+ > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
4
+
3
5
  PR 资源的定位、创建、绑定和元数据同步统一通过 typed internal intent;SKILL 只负责决定分支、标题、正文和调用时机,不直接拼装平台命令。
4
6
 
5
7
  ## 定位
@@ -16,7 +18,7 @@ agent-infra-internal platform-pr inspect {task-id}
16
18
 
17
19
  ```bash
18
20
  agent-infra-internal platform-pr create {task-id} \
19
- --agent {agent} --base {target-branch} --head {current-branch} \
21
+ --agent {standard-agent-token} --base {target-branch} --head {current-branch} \
20
22
  --title-file {title-file} --body-file {body-file}
21
23
  ```
22
24
 
@@ -25,7 +27,7 @@ core 会先按 upstream、head 和 base 精确定位;唯一既有 PR 会复用
25
27
  ## 显式绑定
26
28
 
27
29
  ```bash
28
- agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {agent}
30
+ agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {standard-agent-token}
29
31
  ```
30
32
 
31
33
  冲突绑定稳定失败且不修改 `task.md`。
@@ -34,7 +36,7 @@ agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {agent}
34
36
 
35
37
  ```bash
36
38
  agent-infra-internal platform-pr sync {task-id} \
37
- --agent {agent} --metadata --closing-issue
39
+ --agent {standard-agent-token} --metadata --closing-issue
38
40
  ```
39
41
 
40
42
  core 从关联 Issue 复制 type / `in:` labels、assignee、具体 milestone,并确保 closing association。权限不足返回逐项 `skipped` 和顶层 `degraded`;不得反向修改 Issue。
@@ -1,5 +1,7 @@
1
1
  # Issue Sync
2
2
 
3
+ > `--agent` values follow the "Collaborator Token Specification" in `.agents/rules/task-management.md`: standard AI short tokens (`claude`/`codex`/`antigravity`/`opencode`/`cursor`), long-name normalization (`claude-code`->`claude`, `antigravity-cli`->`antigravity`), or the `human` manual exception.
4
+
3
5
  ## Marker Registry
4
6
 
5
7
  | Key | Marker |
@@ -10,13 +12,15 @@
10
12
  | `summary` | `<!-- sync-issue:{task-id}:summary -->` |
11
13
  | `cancel` | `<!-- sync-issue:{task-id}:cancel -->` |
12
14
 
15
+ `pr-review` content is synced only as an Issue artifact comment (via the `artifact` / `artifactChunk` markers) and is never a `restore-task` recovery source; restore still accepts only an Issue number and reads only registered Issue markers, with no PR source.
16
+
13
17
  Comments use `platform-comment`; Issue resources use `platform-issue`:
14
18
 
15
19
  ```bash
16
20
  agent-infra-internal platform-issue inspect {task-id}
17
- agent-infra-internal platform-issue create {task-id} --agent {agent}
18
- agent-infra-internal platform-issue bind {task-id} --issue {number} --agent {agent}
19
- agent-infra-internal platform-issue sync {task-id} --agent {agent} {desired-state-flags}
21
+ agent-infra-internal platform-issue create {task-id} --agent {standard-agent-token}
22
+ agent-infra-internal platform-issue bind {task-id} --issue {number} --agent {standard-agent-token}
23
+ agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} {desired-state-flags}
20
24
  ```
21
25
 
22
26
  The core owns status/in labels, assignees, milestones, Issue Type, pinned fields, requirements, state, capabilities, dry-run, retries, errors, and idempotency. Omitted flags preserve values; `none` explicitly clears them. Status labels converge to at most one, and ambiguous requirement identity fails closed.
@@ -1,5 +1,7 @@
1
1
  # Issue 同步规则
2
2
 
3
+ > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
4
+
3
5
  ## Marker 注册表
4
6
 
5
7
  以下 key 及格式是 Issue 评论身份的兼容契约;调用方只传 key/资源,不自行拼 marker。
@@ -14,6 +16,8 @@
14
16
 
15
17
  `prSummary` 属于 `.agents/rules/pr-sync.md`,本规则不实现 PR 聚合。
16
18
 
19
+ `pr-review` 原文只通过 `artifact` / `artifactChunk` marker 同步为 Issue artifact 评论,不作为 `restore-task` 恢复来源;恢复仍只接受 Issue 编号并只读注册的 Issue marker,不新增 PR 来源。
20
+
17
21
  ## 平台 intent
18
22
 
19
23
  GitHub upstream、认证、capability、分页、marker 查找、幂等 create/update、分片、重试与错误分类由 typed platform core 统一处理:
@@ -23,7 +27,7 @@ agent-infra-internal platform-context resolve [--cwd <path>]
23
27
  agent-infra-internal platform-comment list --issue <N> [--cwd <path>]
24
28
  agent-infra-internal platform-comment owner <task-ref>
25
29
  agent-infra-internal platform-comment sync <task-ref> \
26
- --kind task|artifact|summary|cancel --agent <agent> \
30
+ --kind task|artifact|summary|cancel --agent <standard-agent-token> \
27
31
  [--artifact <canonical.md>] [--body-file <path|->] [--backfill]
28
32
  ```
29
33
 
@@ -54,9 +58,9 @@ agent-infra-internal task-warning {task-id} add \
54
58
 
55
59
  ```bash
56
60
  agent-infra-internal platform-issue inspect {task-id}
57
- agent-infra-internal platform-issue create {task-id} --agent {agent}
58
- agent-infra-internal platform-issue bind {task-id} --issue {number} --agent {agent}
59
- agent-infra-internal platform-issue sync {task-id} --agent {agent} {desired-state-flags}
61
+ agent-infra-internal platform-issue create {task-id} --agent {standard-agent-token}
62
+ agent-infra-internal platform-issue bind {task-id} --issue {number} --agent {standard-agent-token}
63
+ agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} {desired-state-flags}
60
64
  ```
61
65
 
62
66
  `sync` 支持 status/in labels、assignee、milestone、Issue Type、pinned fields、需求复选框与 Issue state。省略 flag 表示 preserve,`none` 表示显式清空。适配层统一处理集合差集、动态 schema、权限降级、dry-run、重试、错误分类与幂等重放;SKILL 不得拼装 `gh issue`、GraphQL 或权限分支。
@@ -10,11 +10,14 @@
10
10
 
11
11
  ## Recovery
12
12
 
13
- `orchestration.json` is the detailed state source. Re-entry reconciles first: completed runs return idempotently; recoverable pauses continue only after the blocker clears; unproven children, unsealed receipts, and baseline drift stay paused. Reviewer identities are never reused.
13
+ `orchestration.json` is the detailed state source. A v2 run persists complete policy, source, and append-only recovery history. Only a v1 run with no pending delegation and zero receipts may be upgraded in place after supplying a complete policy; any historical receipt stays paused because effort is unverifiable. Migration is forward-only: old binaries must not advance active v2 runs.
14
14
 
15
15
  ## Model Policy
16
16
 
17
- Prefer a reviewer model different from the preceding executor. Same-model fallback must record requested model, actual model, and reason; an unrecorded fallback fails closed.
17
+ - A new run persists model and reasoning effort for both roles. Explicit policy is atomic across all four role fields; only a fully absent explicit policy may fall back to the current client's `agentClients[].orchestration`.
18
+ - Route resolves requested model/effort by role, and prepare matches both before snapshotting. Native spawn must not inherit session defaults.
19
+ - Native start records host-observed actual model/effort. Each mismatch needs its own fallback reason, and requested values must never be fabricated as actual evidence.
20
+ - Model selection is labeled as a complete catalog, partial catalog, or interactive-only guidance; a local override enum must not be presented as complete.
18
21
 
19
22
  ## Stable Pause Conditions
20
23
 
@@ -10,11 +10,14 @@
10
10
 
11
11
  ## 恢复语义
12
12
 
13
- `orchestration.json` 是详细状态源。重复入口先 reconcile:已完成 run 幂等返回;可恢复暂停在阻塞解除后继续;无法证明已停止的 child、未封存 receipt 或基线漂移继续保持暂停。旧 reviewer identity 永不复用。
13
+ `orchestration.json` 是详细状态源。v2 run 保存完整策略、来源与 append-only 恢复历史。只有无 pending delegation 且零历史 receipt 的 v1 run 可在补齐完整策略后原地升级;任一历史 receipt 因缺 effort 证据保持暂停。其他阻塞、未封存 receipt 或基线漂移继续保持暂停。迁移是 forward-only,旧二进制不得推进 v2 active run。
14
14
 
15
15
  ## 模型策略
16
16
 
17
- reviewer 优先选择与上一 executor 不同的模型。若客户端只能使用同模型,必须记录 requested model、actual model 和降级原因;缺少降级理由时失败关闭。
17
+ - 新 run 必须固化 executor/reviewer 各自的 model 与 reasoning effort;显式策略必须四字段原子完整,完全没有显式字段时才读取当前 client 的 `agentClients[].orchestration`。重入不得静默改写策略。
18
+ - route 按 role 返回 requested model/effort,prepare 必须在工作区快照前精确匹配两者;原生 spawn 不能继承会话默认值。
19
+ - 原生 start 必须记录宿主观察到的 actual model/effort。任一字段与 requested 不同时必须记录独立 fallback reason;requested 值不得补造 actual 证据。
20
+ - 模型选择能力必须标记 complete catalog、partial catalog 或 interactive-only guidance;局部 override 枚举不得冒充完整目录。
18
21
 
19
22
  ## 稳定暂停条件
20
23
 
@@ -1,13 +1,15 @@
1
1
  # Milestone Inference
2
2
 
3
+ > `--agent` values follow the "Collaborator Token Specification" in `.agents/rules/task-management.md`: standard AI short tokens (`claude`/`codex`/`antigravity`/`opencode`/`cursor`), long-name normalization (`claude-code`->`claude`, `antigravity-cli`->`antigravity`), or the `human` manual exception.
4
+
3
5
  Milestones narrow through declarative Issue intents:
4
6
 
5
7
  ```bash
6
8
  # create/import phase
7
- agent-infra-internal platform-issue sync {task-id} --agent {agent} --milestone initial
9
+ agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --milestone initial
8
10
 
9
11
  # code phase
10
- agent-infra-internal platform-issue sync {task-id} --agent {agent} --milestone specific
12
+ agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --milestone specific
11
13
  ```
12
14
 
13
15
  `initial` prefers a valid task milestone, otherwise the lowest open `X.Y.x`, then `General Backlog`. `specific` narrows a release line to the highest open patch version using main/release-line ancestry. Missing facts or triage permission preserve the remote value and return skipped/degraded. `create-pr` reuses the Issue milestone in the 09/10 PR adapter.
@@ -1,11 +1,13 @@
1
1
  # Milestone 推断规则
2
2
 
3
+ > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
4
+
3
5
  Milestone 继续按生命周期逐步收窄,但候选读取、分支判断、权限降级和写入统一由 `platform-issue` 处理。
4
6
 
5
7
  ## 阶段 1:创建或导入
6
8
 
7
9
  ```bash
8
- agent-infra-internal platform-issue sync {task-id} --agent {agent} --milestone initial
10
+ agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --milestone initial
9
11
  ```
10
12
 
11
13
  优先使用 task.md 中存在且有效的显式 milestone;否则从 open milestones 选择最低 `X.Y.x` 版本线,最后回退 `General Backlog`。`triage=false` 或外部事实不足时保持远端值并返回 skipped/degraded。
@@ -13,7 +15,7 @@ agent-infra-internal platform-issue sync {task-id} --agent {agent} --milestone i
13
15
  ## 阶段 2:`code-task`
14
16
 
15
17
  ```bash
16
- agent-infra-internal platform-issue sync {task-id} --agent {agent} --milestone specific
18
+ agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --milestone specific
17
19
  ```
18
20
 
19
21
  版本线收窄规则保持不变:主干模式在当前版本线取最高 patch;多版本分支模式依据 release-line/main 祖先关系选择版本线。无法可靠判断时保持原值。完成门禁仍拒绝 `X.Y.x`。
@@ -27,10 +27,12 @@ Next-step client commands must come from the shared helper; skills and output te
27
27
  ```bash
28
28
  agent-infra-internal agent-client next-steps \
29
29
  --skill {next-skill-name} \
30
- [--task-ref {task-ref}]
30
+ [--task-ref {task-ref}] \
31
+ [--version {version}]
31
32
  ```
32
33
 
33
34
  - Pass the next skill name for the already-selected scenario. Include `--task-ref` only when that command needs a task reference.
35
+ - Include `--version` only for a versioned release command. It must start with a digit and satisfy `semver.valid(raw) === raw`; never pass an action, complete command, shell fragment, whitespace, or a `v` / `V` / `=` prefix.
34
36
  - The helper lists only built-in clients enabled in `.agents/.airc.json` `agentClients`, followed by valid `customTUIs` in configuration order.
35
37
  - Insert non-empty stdout verbatim at `{next-step-commands}` below the current "Next steps" heading. When stdout is empty, omit the client command block while still rendering reminders, warnings, and `Completed at`.
36
38
  - If the helper writes stderr or exits non-zero, use the current skill's error path and stop; never fall back to a hard-coded client table.
@@ -27,10 +27,12 @@
27
27
  ```bash
28
28
  agent-infra-internal agent-client next-steps \
29
29
  --skill {next-skill-name} \
30
- [--task-ref {task-ref}]
30
+ [--task-ref {task-ref}] \
31
+ [--version {version}]
31
32
  ```
32
33
 
33
34
  - 静态传入当前已选场景的下一 skill 名;只有命令需要任务引用时才传 `--task-ref`。
35
+ - 只有版本化发布命令需要版本时才传 `--version`;值必须是以数字开头且 `semver.valid(raw) === raw` 的规范 SemVer。不得传 action、完整命令、shell 片段、空白或 `v` / `V` / `=` 前缀。
34
36
  - helper 只展示 `.agents/.airc.json` 中 `agentClients` 已启用的内建客户端,并在其后按配置顺序追加合法的 `customTUIs`。
35
37
  - 将非空 stdout 原样放入当前“下一步”标题后的 `{next-step-commands}`;stdout 为空时省略整个客户端命令块,但继续输出提醒、告警和 `Completed at`。
36
38
  - helper 写 stderr 或返回非零时,按当前 skill 的错误路径报告并停止;禁止回退到硬编码客户端表。
@@ -39,6 +39,23 @@ SKILLs currently covered by this exemption:
39
39
 
40
40
  - `analyze-task`: when the task description/requirements are insufficient for a reliable analysis, it may ask questions one at a time at the entry point to converge the requirements
41
41
 
42
+ ### Exemption 4: Remote-publish authorization for the current snapshot
43
+
44
+ After preparation in the current session and presentation of the latest snapshot or exact content, one question may ask whether to perform that remote publish. Authorization never carries across sessions or snapshots. Denial, adjustment, a question, ambiguity, or interruption fails closed without a remote write.
45
+
46
+ SKILLs currently covered by this exemption:
47
+
48
+ - `release`: may confirm publish after presenting the latest release snapshot
49
+ - `create-release-note`: may confirm publish after presenting exact staged notes and their digest
50
+
51
+ ### Exemption 5: Complete model policy missing at lifecycle start
52
+
53
+ Only when `run-task` receives `ORCHESTRATION_MODEL_POLICY_REQUIRED` before any run, baseline, receipt, or child is created may it show model-selection context with its completeness label and ask once for complete executor/reviewer model + reasoning effort. Partial explicit policy, a missing client, active delegation, and other pause causes do not qualify. No answer means no run is created.
54
+
55
+ SKILLs currently covered by this exemption:
56
+
57
+ - `run-task`: may collect only the atomic model policy explicitly required by core
58
+
42
59
  ## No-Mid-Flow-Questions Clause (default behavior)
43
60
 
44
61
  For every SKILL execution context not covered by any exemption above, the default behavior is: