@fitlab-ai/agent-infra 0.9.9 → 0.9.11

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 (309) hide show
  1. package/README.md +13 -3
  2. package/README.zh-CN.md +13 -3
  3. package/bin/cli.ts +17 -4
  4. package/dist/bin/cli.js +19 -4
  5. package/dist/bin/internal-cli.js +55 -4
  6. package/dist/lib/agent-client.js +0 -1
  7. package/dist/lib/agent-clients/adapters/codex-lifecycle/build-identity.js +17 -10
  8. package/dist/lib/agent-clients/adapters/codex-lifecycle/controller-context.js +11 -31
  9. package/dist/lib/agent-clients/adapters/codex-lifecycle/sandbox-controller.js +15 -33
  10. package/dist/lib/agent-clients/adapters/codex-sandbox.js +72 -11
  11. package/dist/lib/agent-clients/adapters/index.js +3 -1
  12. package/dist/lib/agent-clients/adapters/opencode-sandbox.js +0 -4
  13. package/dist/lib/agent-clients/adapters/traecli.js +65 -0
  14. package/dist/lib/agent-clients/config.js +14 -99
  15. package/dist/lib/agent-clients/reconcile.js +1 -11
  16. package/dist/lib/agent-clients/schema.js +5 -4
  17. package/dist/lib/agent-clients/tokens.js +7 -17
  18. package/dist/lib/agent-clients/types.js +2 -1
  19. package/dist/lib/decide.js +14 -30
  20. package/dist/lib/defaults.json +9 -0
  21. package/dist/lib/init.js +2 -2
  22. package/dist/lib/internal/codex-lifecycle.js +2 -2
  23. package/dist/lib/internal/codex-sandbox-controller.js +4 -3
  24. package/dist/lib/internal/release-workflow.js +0 -1
  25. package/dist/lib/internal/sandbox-control.js +2 -2
  26. package/dist/lib/internal/task-finalization.js +19 -9
  27. package/dist/lib/internal/task-ledger.js +8 -2
  28. package/dist/lib/internal/task-lifecycle.js +17 -93
  29. package/dist/lib/internal/task-orchestration.js +30 -216
  30. package/dist/lib/{task/commands/validate.js → internal/task-validate.js} +77 -43
  31. package/dist/lib/merge.js +205 -103
  32. package/dist/lib/process-data/normalize.js +2 -9
  33. package/dist/lib/run/host.js +46 -16
  34. package/dist/lib/run/tui.js +5 -2
  35. package/dist/lib/sandbox/agent-client-reconciler.js +4 -12
  36. package/dist/lib/sandbox/commands/create.js +3 -3
  37. package/dist/lib/sandbox/commands/enter.js +18 -4
  38. package/dist/lib/sandbox/config.js +3 -12
  39. package/dist/lib/sandbox/control/controller-registration.js +4 -2
  40. package/dist/lib/sandbox/control/executor.js +135 -40
  41. package/dist/lib/sandbox/control/lifecycle.js +29 -20
  42. package/dist/lib/sandbox/control/server.js +18 -16
  43. package/dist/lib/sandbox/mounts.js +3 -2
  44. package/dist/lib/sandbox/recovery.js +123 -22
  45. package/dist/lib/sandbox/workspace-identity.js +14 -0
  46. package/dist/lib/sandbox/workspace-view.js +8 -9
  47. package/dist/lib/self-update.js +278 -0
  48. package/dist/lib/server/protocol.js +5 -5
  49. package/dist/lib/task/activity-log.js +4 -1
  50. package/dist/lib/task/artifact-lifecycle.js +4 -2
  51. package/dist/lib/task/codex-orchestration.js +32 -35
  52. package/dist/lib/task/command-options.js +1 -3
  53. package/dist/lib/task/commands/cat.js +0 -5
  54. package/dist/lib/task/commands/decisions.js +76 -92
  55. package/dist/lib/task/commands/files.js +6 -6
  56. package/dist/lib/task/commands/grep.js +25 -61
  57. package/dist/lib/task/commands/issue-body.js +6 -6
  58. package/dist/lib/task/commands/log.js +25 -10
  59. package/dist/lib/task/commands/show.js +5 -6
  60. package/dist/lib/task/commands/status.js +8 -8
  61. package/dist/lib/task/commit-operation.js +21 -25
  62. package/dist/lib/task/commit-policy.js +1 -1
  63. package/dist/lib/task/control-authority.js +431 -0
  64. package/dist/lib/task/create.js +6 -1
  65. package/dist/lib/task/current-contract.js +35 -0
  66. package/dist/lib/task/decision-details.js +263 -0
  67. package/dist/lib/task/decision-intents.js +5 -2
  68. package/dist/lib/task/delegation-receipts.js +8 -7
  69. package/dist/lib/task/events.js +11 -5
  70. package/dist/lib/task/finalization.js +72 -46
  71. package/dist/lib/task/index.js +19 -29
  72. package/dist/lib/task/ledger-intents.js +8 -9
  73. package/dist/lib/task/ledger.js +13 -6
  74. package/dist/lib/task/lifecycle.js +16 -0
  75. package/dist/lib/task/orchestration.js +51 -14
  76. package/dist/lib/task/review-artifacts.js +31 -12
  77. package/dist/lib/task/review-finalization.js +19 -6
  78. package/dist/lib/task/verification-engine.js +38 -18
  79. package/dist/lib/task/verification-review.js +1 -1
  80. package/dist/lib/task/workspace-snapshot.js +5 -11
  81. package/dist/lib/task/write.js +11 -1
  82. package/dist/lib/update.js +6 -37
  83. package/dist/lib/version.js +5 -1
  84. package/dist/lifecycle-build-manifest.json +3 -3
  85. package/lib/agent-client.ts +0 -1
  86. package/lib/agent-clients/adapters/codex-lifecycle/build-identity.ts +25 -10
  87. package/lib/agent-clients/adapters/codex-lifecycle/controller-context.ts +16 -33
  88. package/lib/agent-clients/adapters/codex-lifecycle/sandbox-controller.ts +16 -35
  89. package/lib/agent-clients/adapters/codex-sandbox.ts +89 -14
  90. package/lib/agent-clients/adapters/index.ts +3 -1
  91. package/lib/agent-clients/adapters/opencode-sandbox.ts +0 -5
  92. package/lib/agent-clients/adapters/traecli.ts +66 -0
  93. package/lib/agent-clients/config.ts +14 -144
  94. package/lib/agent-clients/reconcile.ts +1 -12
  95. package/lib/agent-clients/schema.ts +5 -4
  96. package/lib/agent-clients/tokens.ts +7 -20
  97. package/lib/agent-clients/types.ts +2 -1
  98. package/lib/decide.ts +12 -22
  99. package/lib/defaults.json +9 -0
  100. package/lib/init.ts +2 -2
  101. package/lib/internal/codex-lifecycle.ts +2 -2
  102. package/lib/internal/codex-sandbox-controller.ts +4 -3
  103. package/lib/internal/release-workflow.ts +0 -1
  104. package/lib/internal/sandbox-control.ts +2 -2
  105. package/lib/internal/task-finalization.ts +27 -13
  106. package/lib/internal/task-ledger.ts +8 -2
  107. package/lib/internal/task-lifecycle.ts +33 -76
  108. package/lib/internal/task-orchestration.ts +33 -190
  109. package/lib/{task/commands/validate.ts → internal/task-validate.ts} +77 -41
  110. package/lib/merge.ts +236 -120
  111. package/lib/process-data/normalize.ts +2 -8
  112. package/lib/run/host.ts +63 -14
  113. package/lib/run/tui.ts +5 -3
  114. package/lib/sandbox/agent-client-reconciler.ts +5 -15
  115. package/lib/sandbox/commands/create.ts +4 -4
  116. package/lib/sandbox/commands/enter.ts +24 -4
  117. package/lib/sandbox/config.ts +2 -14
  118. package/lib/sandbox/control/container-identity.ts +2 -2
  119. package/lib/sandbox/control/controller-registration.ts +8 -3
  120. package/lib/sandbox/control/executor.ts +156 -53
  121. package/lib/sandbox/control/lifecycle.ts +34 -28
  122. package/lib/sandbox/control/protocol.ts +1 -3
  123. package/lib/sandbox/control/server.ts +15 -12
  124. package/lib/sandbox/control/state.ts +7 -7
  125. package/lib/sandbox/mounts.ts +4 -3
  126. package/lib/sandbox/recovery.ts +162 -34
  127. package/lib/sandbox/tools.ts +1 -1
  128. package/lib/sandbox/workspace-identity.ts +28 -0
  129. package/lib/sandbox/workspace-view.ts +14 -10
  130. package/lib/self-update.ts +341 -0
  131. package/lib/server/protocol.ts +5 -5
  132. package/lib/task/activity-log.ts +6 -1
  133. package/lib/task/artifact-lifecycle.ts +5 -3
  134. package/lib/task/codex-orchestration.ts +40 -45
  135. package/lib/task/command-options.ts +1 -2
  136. package/lib/task/commands/cat.ts +0 -4
  137. package/lib/task/commands/decisions.ts +80 -75
  138. package/lib/task/commands/files.ts +6 -6
  139. package/lib/task/commands/grep.ts +23 -51
  140. package/lib/task/commands/issue-body.ts +6 -6
  141. package/lib/task/commands/log.ts +22 -10
  142. package/lib/task/commands/show.ts +5 -6
  143. package/lib/task/commands/status.ts +8 -8
  144. package/lib/task/commit-operation.ts +25 -30
  145. package/lib/task/commit-policy.ts +1 -2
  146. package/lib/task/control-authority.ts +563 -0
  147. package/lib/task/create.ts +6 -1
  148. package/lib/task/current-contract.ts +49 -0
  149. package/lib/task/decision-details.ts +340 -0
  150. package/lib/task/decision-intents.ts +7 -2
  151. package/lib/task/delegation-receipts.ts +8 -6
  152. package/lib/task/events.ts +10 -5
  153. package/lib/task/finalization.ts +84 -42
  154. package/lib/task/index.ts +19 -28
  155. package/lib/task/ledger-intents.ts +6 -8
  156. package/lib/task/ledger.ts +17 -7
  157. package/lib/task/lifecycle.ts +20 -0
  158. package/lib/task/orchestration.ts +42 -16
  159. package/lib/task/review-artifacts.ts +53 -15
  160. package/lib/task/review-finalization.ts +33 -7
  161. package/lib/task/verification-engine.ts +33 -21
  162. package/lib/task/verification-review.ts +1 -1
  163. package/lib/task/workspace-snapshot.ts +4 -13
  164. package/lib/task/write.ts +20 -1
  165. package/lib/update.ts +6 -40
  166. package/lib/version.ts +6 -1
  167. package/package.json +1 -1
  168. package/templates/.agents/QUICKSTART.en.md +2 -3
  169. package/templates/.agents/QUICKSTART.zh-CN.md +2 -3
  170. package/templates/.agents/README.en.md +5 -3
  171. package/templates/.agents/README.zh-CN.md +5 -3
  172. package/templates/.agents/rules/README.en.md +1 -0
  173. package/templates/.agents/rules/README.zh-CN.md +1 -0
  174. package/templates/.agents/rules/compatibility-policy.en.md +40 -0
  175. package/templates/.agents/rules/compatibility-policy.zh-CN.md +40 -0
  176. package/templates/.agents/rules/create-issue.github.en.md +1 -1
  177. package/templates/.agents/rules/create-issue.github.zh-CN.md +1 -1
  178. package/templates/.agents/rules/human-decision-context.en.md +9 -7
  179. package/templates/.agents/rules/human-decision-context.zh-CN.md +9 -7
  180. package/templates/.agents/rules/issue-fields.github.en.md +1 -1
  181. package/templates/.agents/rules/issue-fields.github.zh-CN.md +1 -1
  182. package/templates/.agents/rules/issue-pr-commands.en.md +1 -1
  183. package/templates/.agents/rules/issue-pr-commands.github.en.md +1 -1
  184. package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +1 -1
  185. package/templates/.agents/rules/issue-pr-commands.zh-CN.md +1 -1
  186. package/templates/.agents/rules/issue-sync.github.en.md +1 -1
  187. package/templates/.agents/rules/issue-sync.github.zh-CN.md +2 -2
  188. package/templates/.agents/rules/lifecycle-orchestration.en.md +4 -4
  189. package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +4 -4
  190. package/templates/.agents/rules/milestone-inference.github.en.md +1 -1
  191. package/templates/.agents/rules/milestone-inference.github.zh-CN.md +1 -1
  192. package/templates/.agents/rules/next-step-output.en.md +3 -3
  193. package/templates/.agents/rules/next-step-output.zh-CN.md +3 -3
  194. package/templates/.agents/rules/no-mid-flow-questions.en.md +1 -1
  195. package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +1 -1
  196. package/templates/.agents/rules/pr-sync.en.md +2 -2
  197. package/templates/.agents/rules/pr-sync.github.en.md +3 -2
  198. package/templates/.agents/rules/pr-sync.github.zh-CN.md +3 -1
  199. package/templates/.agents/rules/pr-sync.zh-CN.md +2 -1
  200. package/templates/.agents/rules/release-commands.github.en.md +6 -0
  201. package/templates/.agents/rules/release-commands.github.zh-CN.md +6 -0
  202. package/templates/.agents/rules/review-handshake.en.md +1 -1
  203. package/templates/.agents/rules/review-handshake.zh-CN.md +1 -1
  204. package/templates/.agents/rules/review-method.en.md +1 -0
  205. package/templates/.agents/rules/review-method.zh-CN.md +1 -0
  206. package/templates/.agents/rules/task-management.en.md +1 -2
  207. package/templates/.agents/rules/task-management.zh-CN.md +1 -2
  208. package/templates/.agents/skills/analyze-task/SKILL.en.md +4 -3
  209. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +4 -3
  210. package/templates/.agents/skills/block-task/SKILL.en.md +2 -2
  211. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +2 -2
  212. package/templates/.agents/skills/cancel-task/SKILL.en.md +2 -2
  213. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +2 -2
  214. package/templates/.agents/skills/check-task/SKILL.en.md +2 -2
  215. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +2 -2
  216. package/templates/.agents/skills/close-codescan/SKILL.en.md +1 -1
  217. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +1 -1
  218. package/templates/.agents/skills/close-dependabot/SKILL.en.md +1 -1
  219. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +1 -1
  220. package/templates/.agents/skills/code-task/SKILL.en.md +4 -3
  221. package/templates/.agents/skills/code-task/SKILL.zh-CN.md +5 -3
  222. package/templates/.agents/skills/commit/SKILL.en.md +27 -7
  223. package/templates/.agents/skills/commit/SKILL.zh-CN.md +3 -4
  224. package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +5 -5
  225. package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +5 -5
  226. package/templates/.agents/skills/complete-task/SKILL.en.md +3 -3
  227. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +3 -3
  228. package/templates/.agents/skills/create-pr/SKILL.en.md +15 -11
  229. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +15 -11
  230. package/templates/.agents/skills/create-pr/reference/change-report.en.md +46 -0
  231. package/templates/.agents/skills/create-pr/reference/change-report.zh-CN.md +46 -0
  232. package/templates/.agents/skills/create-pr/scripts/change-report.mjs +203 -0
  233. package/templates/.agents/skills/create-release-note/SKILL.en.md +5 -6
  234. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +5 -6
  235. package/templates/.agents/skills/create-task/SKILL.en.md +1 -1
  236. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +1 -1
  237. package/templates/.agents/skills/import-issue/SKILL.en.md +1 -1
  238. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +1 -1
  239. package/templates/.agents/skills/plan-task/SKILL.en.md +5 -4
  240. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +5 -4
  241. package/templates/.agents/skills/restore-task/SKILL.en.md +1 -1
  242. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +1 -1
  243. package/templates/.agents/skills/review-analysis/SKILL.en.md +5 -3
  244. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +5 -3
  245. package/templates/.agents/skills/review-analysis/config/verify.en.json +1 -0
  246. package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +1 -0
  247. package/templates/.agents/skills/review-code/SKILL.en.md +5 -3
  248. package/templates/.agents/skills/review-code/SKILL.zh-CN.md +5 -3
  249. package/templates/.agents/skills/review-code/config/verify.en.json +1 -0
  250. package/templates/.agents/skills/review-code/config/verify.zh-CN.json +1 -0
  251. package/templates/.agents/skills/review-code/reference/migration-risks.en.md +9 -6
  252. package/templates/.agents/skills/review-code/reference/migration-risks.zh-CN.md +9 -6
  253. package/templates/.agents/skills/review-plan/SKILL.en.md +5 -3
  254. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +5 -3
  255. package/templates/.agents/skills/review-plan/config/verify.en.json +1 -0
  256. package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +1 -0
  257. package/templates/.agents/skills/run-manual-validation/SKILL.en.md +7 -3
  258. package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +7 -3
  259. package/templates/.agents/skills/run-manual-validation/reference/discovery-and-execution.en.md +1 -1
  260. package/templates/.agents/skills/run-manual-validation/reference/discovery-and-execution.zh-CN.md +1 -1
  261. package/templates/.agents/skills/run-manual-validation/reference/report-template.en.md +2 -2
  262. package/templates/.agents/skills/run-manual-validation/reference/report-template.zh-CN.md +2 -2
  263. package/templates/.agents/skills/run-task/SKILL.en.md +6 -2
  264. package/templates/.agents/skills/run-task/SKILL.zh-CN.md +6 -2
  265. package/templates/.agents/skills/run-task/reference/host-validation.en.md +2 -2
  266. package/templates/.agents/skills/run-task/reference/host-validation.zh-CN.md +2 -2
  267. package/templates/.agents/skills/update-agent-infra/SKILL.en.md +2 -2
  268. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +2 -2
  269. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +159 -104
  270. package/templates/.agents/skills/watch-pr/SKILL.en.md +2 -2
  271. package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +2 -2
  272. package/templates/.agents/templates/task.en.md +1 -1
  273. package/templates/.agents/templates/task.zh-CN.md +1 -1
  274. package/templates/.claude/commands/analyze-task.en.md +1 -1
  275. package/templates/.claude/commands/analyze-task.zh-CN.md +1 -1
  276. package/templates/.claude/commands/block-task.en.md +1 -1
  277. package/templates/.claude/commands/block-task.zh-CN.md +1 -1
  278. package/templates/.claude/commands/cancel-task.en.md +1 -1
  279. package/templates/.claude/commands/cancel-task.zh-CN.md +1 -1
  280. package/templates/.claude/commands/check-task.en.md +1 -1
  281. package/templates/.claude/commands/check-task.zh-CN.md +1 -1
  282. package/templates/.claude/commands/code-task.en.md +1 -1
  283. package/templates/.claude/commands/code-task.zh-CN.md +1 -1
  284. package/templates/.claude/commands/commit.en.md +1 -1
  285. package/templates/.claude/commands/commit.zh-CN.md +1 -1
  286. package/templates/.claude/commands/complete-manual-validation.en.md +1 -1
  287. package/templates/.claude/commands/complete-manual-validation.zh-CN.md +1 -1
  288. package/templates/.claude/commands/complete-task.en.md +1 -1
  289. package/templates/.claude/commands/complete-task.zh-CN.md +1 -1
  290. package/templates/.claude/commands/create-pr.en.md +1 -1
  291. package/templates/.claude/commands/create-pr.zh-CN.md +1 -1
  292. package/templates/.claude/commands/plan-task.en.md +1 -1
  293. package/templates/.claude/commands/plan-task.zh-CN.md +1 -1
  294. package/templates/.claude/commands/review-analysis.en.md +1 -1
  295. package/templates/.claude/commands/review-analysis.zh-CN.md +1 -1
  296. package/templates/.claude/commands/review-code.en.md +1 -1
  297. package/templates/.claude/commands/review-code.zh-CN.md +1 -1
  298. package/templates/.claude/commands/review-plan.en.md +1 -1
  299. package/templates/.claude/commands/review-plan.zh-CN.md +1 -1
  300. package/templates/.claude/commands/run-manual-validation.en.md +1 -1
  301. package/templates/.claude/commands/run-manual-validation.zh-CN.md +1 -1
  302. package/templates/.claude/commands/run-task.en.md +1 -1
  303. package/templates/.claude/commands/run-task.zh-CN.md +1 -1
  304. package/templates/.claude/commands/watch-pr.en.md +1 -1
  305. package/templates/.claude/commands/watch-pr.zh-CN.md +1 -1
  306. package/templates/.traecli/commands/update-agent-infra.en.md +7 -0
  307. package/templates/.traecli/commands/update-agent-infra.zh-CN.md +7 -0
  308. package/dist/lib/builtin-tuis.js +0 -40
  309. package/lib/builtin-tuis.ts +0 -56
@@ -6,7 +6,7 @@ description: >
6
6
  ---
7
7
 
8
8
  # 还原任务
9
- > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
9
+ > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
10
10
 
11
11
 
12
12
  从带有 sync 标记的平台 Issue 评论中恢复本地任务工作区文件。
@@ -7,7 +7,7 @@ description: >
7
7
  ---
8
8
 
9
9
  # Requirement Analysis Review
10
- > `--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.
10
+ > `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
11
11
 
12
12
  If the entry operands contain `--orchestrated`, bind `{execution-flag}` to `--orchestrated` and forward it unchanged to both the summary finalizer and completed event; otherwise bind it to an empty value. Never infer it from `orchestration.json`, environment variables, or prior artifacts.
13
13
 
@@ -24,7 +24,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
24
24
 
25
25
  After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first.
26
26
 
27
- Run these commands and paste the raw output into both the user-facing reply and this round's `## State Check` section:
27
+ Run these commands and paste the raw output into this round's `## State Check` section:
28
28
 
29
29
  ```bash
30
30
  agent-infra-internal task-snapshot {task-id} --format text
@@ -32,7 +32,7 @@ agent-infra-internal task-snapshot {task-id} --format text
32
32
 
33
33
  ## Task Context Resolution
34
34
 
35
- > The entry point may omit the task ref and also accepts a legacy positional ref or `--task <ref>` / `-t <ref>`. Separate task scope from the full arguments while preserving every business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty, one positional ref, or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to that full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
35
+ > The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
36
36
 
37
37
  > Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
38
38
 
@@ -85,6 +85,8 @@ The intent atomically finalizes the report summary and returns the same ledger s
85
85
 
86
86
  If task.md has a valid `issue_number`, run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`, then `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {review-artifact} --agent {standard-agent-token}`.
87
87
 
88
+ Before writing the summary, the finalization intent checks decision-detail ids; it auto-removes a duplicate only when exactly one formal `[needs-human-decision]` block remains and every other same-id block is clearly short and informal, then reruns the read-only check. Ambiguous duplicates fail closed. If this check or repair fails, stop before the completion event.
89
+
88
90
  ### 7. Run Completion Gate
89
91
 
90
92
  ```bash
@@ -7,7 +7,7 @@ description: >
7
7
  ---
8
8
 
9
9
  # 需求分析审查
10
- > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
10
+ > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
11
11
 
12
12
  若入口业务操作数包含 `--orchestrated`,绑定 `{execution-flag}` = `--orchestrated` 并原样转发给 summary finalizer 与 completed 事件;否则绑定为空。不得从 `orchestration.json`、环境变量或历史产物推断该标记。
13
13
 
@@ -24,7 +24,7 @@ description: >
24
24
 
25
25
  在加载 workflow / skill / rules 指令之后、做任何任务状态判断或用户可见结论之前,必须先执行状态核对。指令类文件读取不算对外动作或结论。
26
26
 
27
- 运行以下命令,并把原文粘贴到回复正文和本轮产物的 `## 状态核对` 段:
27
+ 运行以下命令,并把原文粘贴到本轮产物的 `## 状态核对` 段:
28
28
 
29
29
  ```bash
30
30
  agent-infra-internal task-snapshot {task-id} --format text
@@ -34,7 +34,7 @@ agent-infra-internal task-snapshot {task-id} --format text
34
34
 
35
35
  ## 任务上下文解析
36
36
 
37
- > 入口允许省略 task ref,也接受旧位置 task ref 或 `--task <ref>` / `-t <ref>`。先从完整参数中分离 task scope 并原样保留其他业务操作数,再调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空、位置 ref 或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为该完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
37
+ > 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
38
38
 
39
39
  > 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
40
40
 
@@ -88,6 +88,8 @@ agent-infra-internal task-snapshot {task-id} --format text
88
88
 
89
89
  如果 task.md 中存在有效的 `issue_number`,调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`,再调用 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {review-artifact} --agent {standard-agent-token}`;失败按 `.agents/rules/issue-sync.md` 记录 warning。
90
90
 
91
+ 最终化 intent 会在写入摘要前检查详情块 ID;只有“一个正式 `[needs-human-decision]` 块 + 明确的简短非正式重复块”才会自动删除重复块并重新做只读检查,无法唯一判断时失败关闭。该检查或自动修复失败时,停止在完成事件之前。
92
+
91
93
  ### 7. 完成校验
92
94
 
93
95
  ```bash
@@ -36,6 +36,7 @@
36
36
  "^\\$ "
37
37
  ]
38
38
  },
39
+ "decision-details": {},
39
40
  "review-summary": {
40
41
  "stage": "analysis"
41
42
  },
@@ -36,6 +36,7 @@
36
36
  "^\\$ "
37
37
  ]
38
38
  },
39
+ "decision-details": {},
39
40
  "review-summary": {
40
41
  "stage": "analysis"
41
42
  },
@@ -7,7 +7,7 @@ description: >
7
7
  ---
8
8
 
9
9
  # Code Review
10
- > `--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.
10
+ > `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
11
11
 
12
12
  If the entry operands contain `--orchestrated`, bind `{execution-flag}` to `--orchestrated` and forward it unchanged to both the summary finalizer and completed event; otherwise bind it to an empty value. Never infer it from `orchestration.json`, environment variables, or prior artifacts.
13
13
 
@@ -33,7 +33,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
33
33
 
34
34
  After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first. Reading instruction files does not count as an external-state action or conclusion.
35
35
 
36
- Run these commands and paste the raw output into both the user-facing reply and this round's `## State Check` section:
36
+ Run these commands and paste the raw output into this round's `## State Check` section:
37
37
 
38
38
  ```bash
39
39
  agent-infra-internal task-snapshot {task-id} --format text
@@ -43,7 +43,7 @@ Before the state check is complete, do not make external-state assertions such a
43
43
 
44
44
  ## Task Context Resolution
45
45
 
46
- > The entry point may omit the task ref and also accepts a legacy positional ref or `--task <ref>` / `-t <ref>`. Separate task scope from the full arguments while preserving every business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty, one positional ref, or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to that full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
46
+ > The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
47
47
 
48
48
  > Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
49
49
 
@@ -121,6 +121,8 @@ If task.md contains a valid `issue_number`, perform these sync actions (skip and
121
121
  - Run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
122
122
  - Run `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {review-artifact} --agent {standard-agent-token}`
123
123
 
124
+ Before writing the summary, the finalization intent checks decision-detail ids; it auto-removes a duplicate only when exactly one formal `[needs-human-decision]` block remains and every other same-id block is clearly short and informal, then reruns the read-only check. Ambiguous duplicates fail closed. If this check or repair fails, stop before the completion event.
125
+
124
126
  ### 7. Verification Gate
125
127
 
126
128
  Run the verification gate to confirm the task artifact and sync state are valid:
@@ -7,7 +7,7 @@ description: >
7
7
  ---
8
8
 
9
9
  # 代码审查
10
- > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
10
+ > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
11
11
 
12
12
  若入口业务操作数包含 `--orchestrated`,绑定 `{execution-flag}` = `--orchestrated` 并原样转发给 summary finalizer 与 completed 事件;否则绑定为空。不得从 `orchestration.json`、环境变量或历史产物推断该标记。
13
13
 
@@ -33,7 +33,7 @@ description: >
33
33
 
34
34
  在加载 workflow / skill / rules 指令之后、做任何任务状态判断或用户可见结论之前,必须先执行状态核对。指令类文件读取不算对外动作或结论。
35
35
 
36
- 运行以下命令,并把原文粘贴到回复正文和本轮产物的 `## 状态核对` 段:
36
+ 运行以下命令,并把原文粘贴到本轮产物的 `## 状态核对` 段:
37
37
 
38
38
  ```bash
39
39
  agent-infra-internal task-snapshot {task-id} --format text
@@ -43,7 +43,7 @@ agent-infra-internal task-snapshot {task-id} --format text
43
43
 
44
44
  ## 任务上下文解析
45
45
 
46
- > 入口允许省略 task ref,也接受旧位置 task ref 或 `--task <ref>` / `-t <ref>`。先从完整参数中分离 task scope 并原样保留其他业务操作数,再调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空、位置 ref 或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为该完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
46
+ > 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
47
47
 
48
48
  > 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
49
49
 
@@ -119,6 +119,8 @@ agent-infra-internal task-snapshot {task-id} --format text
119
119
  - 调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
120
120
  - 调用 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {review-artifact} --agent {standard-agent-token}`
121
121
 
122
+ 最终化 intent 会在写入摘要前检查详情块 ID;只有“一个正式 `[needs-human-decision]` 块 + 明确的简短非正式重复块”才会自动删除重复块并重新做只读检查,无法唯一判断时失败关闭。该检查或自动修复失败时,停止在完成事件之前。
123
+
122
124
  ### 7. 完成校验
123
125
 
124
126
  运行完成校验,确认任务产物和同步状态符合规范:
@@ -41,6 +41,7 @@
41
41
  "^- \\*\\*Reviewed Snapshot Tree\\*\\*[::]\\s*[0-9a-f]{40,64}\\s*$"
42
42
  ]
43
43
  },
44
+ "decision-details": {},
44
45
  "review-summary": {
45
46
  "stage": "code"
46
47
  },
@@ -41,6 +41,7 @@
41
41
  "^- \\*\\*审查快照树\\*\\*[::]\\s*[0-9a-f]{40,64}\\s*$"
42
42
  ]
43
43
  },
44
+ "decision-details": {},
44
45
  "review-summary": {
45
46
  "stage": "code"
46
47
  },
@@ -6,20 +6,23 @@ Use when changes touch persistent formats, schemas, configuration/frontmatter, c
6
6
 
7
7
  ## Review Questions
8
8
 
9
- - Can old data or configuration be read safely, and is the post-write version boundary explicit?
10
- - Is migration repeatable, and can execution recover or continue after partial failure?
11
- - Does the rollback path match the compatibility window between old and new formats?
9
+ - Does compatibility pass the subject, necessity, window, and exit gate in `.agents/rules/compatibility-policy.md`? If not, should the change be current-only?
10
+ - Is an approved conversion concentrated at one boundary and followed by current-format-only writes, rather than teaching business logic multiple versions?
11
+ - Does temporarily retained compatibility include a co-located `TODO(compat): Remove ... once ...` at its single boundary, naming the removal target and a verifiable condition? A task or issue does not replace this TODO.
12
+ - If migration is required, is it repeatable, and can partial failure recover or stop safely?
13
+ - When an old format is removed, are its branches, fixtures, tests, and documentation removed in the same change?
12
14
 
13
15
  ## Evidence Requirements
14
16
 
15
- Record the transition from old input to new state, version decisions, and failure states. Prefer migration tests, fixtures, state transitions, or specification conflicts.
17
+ Record compatibility admission evidence first. For approved compatibility, record the single conversion from old input to current state, version decisions, co-located `TODO(compat)`, exit condition, and failure states. Prefer consumer or stored-data evidence, migration tests, fixtures, state transitions, or specification conflicts.
16
18
 
17
19
  ## Common Counterexamples
18
20
 
19
- - Testing only fresh installation and ignoring existing state.
21
+ - Retaining an old read path “just in case” without real consumers or stored data.
22
+ - Dual-writing formats or maintaining several state machines in the normal path.
20
23
  - Assuming migration succeeds once while ignoring retries and partial writes.
21
24
  - Replacing data-semantic validation with format-existence checks.
22
25
 
23
26
  ## When Closure Is Not Possible
24
27
 
25
- Record reproducible corruption or compatibility failures as findings, checks requiring real historical data as manual-validation, and missing samples or rollback evidence as a gap.
28
+ Record unauthorized compatibility, dual writes, and shims without an exit condition as findings. For approved migrations, record reproducible corruption as a finding and checks requiring real historical data as manual-validation. Missing compatibility admission evidence cannot be treated as a harmless gap while approving the change.
@@ -6,20 +6,23 @@
6
6
 
7
7
  ## 检视问题
8
8
 
9
- - 旧数据或旧配置能否被安全读取,写入后的版本边界是否明确。
10
- - 迁移是否可重复执行,部分失败后能否恢复或继续。
11
- - 回滚路径是否与新旧格式的兼容窗口一致。
9
+ - 兼容是否通过 `.agents/rules/compatibility-policy.md` 的对象、必要性、期限和退出条件准入;未准入时是否应直接 current-only。
10
+ - 获准转换是否集中在一个边界,转换后只写当前格式,而不是让业务核心理解多个版本。
11
+ - 暂时保留的兼容是否在唯一边界就地包含 `TODO(compat): Remove ... once ...`,并写明删除对象和可验证条件;任务或 Issue 不替代该 TODO。
12
+ - 若确需迁移,是否可重复执行,部分失败后能否恢复或安全停止。
13
+ - 删除旧格式时,专属分支、fixture、测试和文档是否同轮删除。
12
14
 
13
15
  ## 证据要求
14
16
 
15
- 记录旧输入到新状态的转换、版本判定和失败状态;优先使用迁移测试、fixture、状态转换或规范冲突。
17
+ 先记录兼容准入证据;获准兼容时再记录旧输入到当前状态的唯一转换、版本判定、就地 `TODO(compat)`、退出条件和失败状态。优先使用消费者/存量数据证据、迁移测试、fixture、状态转换或规范冲突。
16
18
 
17
19
  ## 常见反例
18
20
 
19
- - 只验证全新安装,不验证已有状态。
21
+ - 没有真实消费者或存量数据,只因“可能需要”就保留旧读取。
22
+ - 同时写新旧格式,或在主路径里维护多套状态机。
20
23
  - 假设迁移一次成功,忽略重试和部分写入。
21
24
  - 用格式存在性测试替代数据语义验证。
22
25
 
23
26
  ## 无法闭环时
24
27
 
25
- 可复现的数据损坏或兼容失败形成 finding;需要真实历史数据的验证进入 manual-validation;缺少样本或回滚证据时记录 gap。
28
+ 未经授权的兼容层、双写或无退出条件 shim 形成 finding。已获准迁移中的可复现数据损坏形成 finding;需要真实历史数据的验证进入 manual-validation;缺少兼容准入证据时不能仅记录 gap 后放行。
@@ -7,7 +7,7 @@ description: >
7
7
  ---
8
8
 
9
9
  # Technical Plan Review
10
- > `--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.
10
+ > `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
11
11
 
12
12
  If the entry operands contain `--orchestrated`, bind `{execution-flag}` to `--orchestrated` and forward it unchanged to both the summary finalizer and completed event; otherwise bind it to an empty value. Never infer it from `orchestration.json`, environment variables, or prior artifacts.
13
13
 
@@ -24,7 +24,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
24
24
 
25
25
  After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first.
26
26
 
27
- Run these commands and paste the raw output into both the user-facing reply and this round's `## State Check` section:
27
+ Run these commands and paste the raw output into this round's `## State Check` section:
28
28
 
29
29
  ```bash
30
30
  agent-infra-internal task-snapshot {task-id} --format text
@@ -32,7 +32,7 @@ agent-infra-internal task-snapshot {task-id} --format text
32
32
 
33
33
  ## Task Context Resolution
34
34
 
35
- > The entry point may omit the task ref and also accepts a legacy positional ref or `--task <ref>` / `-t <ref>`. Separate task scope from the full arguments while preserving every business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty, one positional ref, or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to that full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
35
+ > The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
36
36
 
37
37
  > Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
38
38
 
@@ -85,6 +85,8 @@ The intent atomically finalizes the report summary and returns the same ledger s
85
85
 
86
86
  If task.md has a valid `issue_number`, run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`, then `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {review-artifact} --agent {standard-agent-token}`.
87
87
 
88
+ Before writing the summary, the finalization intent checks decision-detail ids; it auto-removes a duplicate only when exactly one formal `[needs-human-decision]` block remains and every other same-id block is clearly short and informal, then reruns the read-only check. Ambiguous duplicates fail closed. If this check or repair fails, stop before the completion event.
89
+
88
90
  ### 7. Run Completion Gate
89
91
 
90
92
  ```bash
@@ -7,7 +7,7 @@ description: >
7
7
  ---
8
8
 
9
9
  # 技术方案审查
10
- > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
10
+ > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
11
11
 
12
12
  若入口业务操作数包含 `--orchestrated`,绑定 `{execution-flag}` = `--orchestrated` 并原样转发给 summary finalizer 与 completed 事件;否则绑定为空。不得从 `orchestration.json`、环境变量或历史产物推断该标记。
13
13
 
@@ -24,7 +24,7 @@ description: >
24
24
 
25
25
  在加载 workflow / skill / rules 指令之后、做任何任务状态判断或用户可见结论之前,必须先执行状态核对。指令类文件读取不算对外动作或结论。
26
26
 
27
- 运行以下命令,并把原文粘贴到回复正文和本轮产物的 `## 状态核对` 段:
27
+ 运行以下命令,并把原文粘贴到本轮产物的 `## 状态核对` 段:
28
28
 
29
29
  ```bash
30
30
  agent-infra-internal task-snapshot {task-id} --format text
@@ -34,7 +34,7 @@ agent-infra-internal task-snapshot {task-id} --format text
34
34
 
35
35
  ## 任务上下文解析
36
36
 
37
- > 入口允许省略 task ref,也接受旧位置 task ref 或 `--task <ref>` / `-t <ref>`。先从完整参数中分离 task scope 并原样保留其他业务操作数,再调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空、位置 ref 或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为该完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
37
+ > 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
38
38
 
39
39
  > 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
40
40
 
@@ -88,6 +88,8 @@ agent-infra-internal task-snapshot {task-id} --format text
88
88
 
89
89
  如果 task.md 中存在有效的 `issue_number`,调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`,再调用 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {review-artifact} --agent {standard-agent-token}`;失败按 `.agents/rules/issue-sync.md` 记录 warning。
90
90
 
91
+ 最终化 intent 会在写入摘要前检查详情块 ID;只有“一个正式 `[needs-human-decision]` 块 + 明确的简短非正式重复块”才会自动删除重复块并重新做只读检查,无法唯一判断时失败关闭。该检查或自动修复失败时,停止在完成事件之前。
92
+
91
93
  ### 7. 完成校验
92
94
 
93
95
  ```bash
@@ -36,6 +36,7 @@
36
36
  "^\\$ "
37
37
  ]
38
38
  },
39
+ "decision-details": {},
39
40
  "review-summary": {
40
41
  "stage": "plan"
41
42
  },
@@ -36,6 +36,7 @@
36
36
  "^\\$ "
37
37
  ]
38
38
  },
39
+ "decision-details": {},
39
40
  "review-summary": {
40
41
  "stage": "plan"
41
42
  },
@@ -8,11 +8,15 @@ description: >
8
8
 
9
9
  # Run Manual Validation
10
10
 
11
+ ## Task Context Resolution
12
+
13
+ The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Parse `--scope`, `--timeout`, and `--format` before `--`, preserve the user command after `--` verbatim, then call `agent-infra-internal task-context resolve {task-scope}`. Pass through resolution failures without scanning tasks locally. The internal `task-validate` protocol continues to use a positional task ref.
14
+
11
15
  ## Boundary
12
16
 
13
17
  - Select the validation mode, call the sole mechanical entry point, and record evidence; do not mark PR manual validation complete.
14
18
  - `complete-manual-validation` remains the maintainer's final registration after coverage is judged sufficient.
15
- - Never manipulate temporary worktrees, leases, or containers directly; only call `ai task validate`.
19
+ - Never manipulate temporary worktrees, leases, or containers directly; only call `agent-infra-internal task-validate`.
16
20
  - Never record tokens, environment variables, full argv, absolute user paths, or raw transcripts in the artifact.
17
21
 
18
22
  ## Step 0: State Check (pre-execution hard gate)
@@ -28,7 +32,7 @@ agent-infra-internal task-snapshot {task-id} --format text
28
32
  1. Read `reference/discovery-and-execution.md` and parse the input mode. Stop before started without an artifact for invalid or partial input.
29
33
  2. Run `agent-infra-internal task-artifact {task-id} inspect --family validation-run` and read the latest review-code manual-validation items. Then run `agent-infra-internal platform-pr inspect {task-id}` and use the reference status matrix to discover, merge, and number items. Only automatic mode stops before started when reliable sources are empty or the sole possible source is unreadable; valid explicit mode always continues with the user command as effective work.
30
34
  3. Take the round and artifact name from the core result. After confirming valid explicit work or a non-empty discovered list, run `agent-infra-internal task-event {task-id} validation-run.started --agent {standard-agent-token}` and classify each item as `executable|unavailable|unknown|unsafe|unresolved`.
31
- 4. Invoke every executable item separately with `ai task validate {task-ref} --scope snapshot --format json -- {command...}`. Only make a second explicit inplace invocation for that item when evidence proves it is required. If no item is executable, run no fabricated command but still produce coverage-gap evidence.
35
+ 4. Invoke every executable item separately with `agent-infra-internal task-validate {task-ref} --scope snapshot --format json -- {command...}`. Only make a second explicit inplace invocation for that item when evidence proves it is required. If no item is executable, run no fabricated command but still produce coverage-gap evidence.
32
36
  5. Read `reference/report-template.md`, create `validation-run.md|validation-run-r{N}.md`, and record the input mode, discovered list, per-item results, CLI JSON allowlist, and sanitized summaries.
33
37
  6. Run `agent-infra-internal task-event {task-id} validation-run.completed --agent {standard-agent-token} --artifact {artifact}`. When an Issue exists, run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` and then `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {artifact} --agent {standard-agent-token}`.
34
38
  7. Run `agent-infra-internal task-verify {task-id} validation-run.completed --artifact {artifact} --format text`; fix failures and rerun it.
@@ -36,7 +40,7 @@ agent-infra-internal task-snapshot {task-id} --format text
36
40
 
37
41
  ## Completion Checklist
38
42
 
39
- - [ ] Used `ai task validate` for every executable item, or recorded that none were executable
43
+ - [ ] Used `agent-infra-internal task-validate` for every executable item, or recorded that none were executable
40
44
  - [ ] Recorded sanitized validation-run evidence
41
45
  - [ ] Did not change PR manual validation completion state
42
46
  - [ ] Updated task.md and passed completion verification
@@ -8,11 +8,15 @@ description: >
8
8
 
9
9
  # 运行人工校验
10
10
 
11
+ ## 任务上下文解析
12
+
13
+ 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。先解析 `--scope`、`--timeout`、`--format`,在 `--` 后原样保留用户命令,再调用 `agent-infra-internal task-context resolve {task-scope}`。解析失败时透传非零退出码,不自行扫描任务。内部 `task-validate` 协议仍使用位置 task ref。
14
+
11
15
  ## 行为边界
12
16
 
13
17
  - 本技能负责选择校验模式、调用唯一机械入口并记录证据;不把 PR 人工校验标为完成。
14
18
  - `complete-manual-validation` 仍是维护者确认覆盖充分后的最终登记入口。
15
- - 禁止直接操作临时 worktree、lease 或 container;只调用 `ai task validate`。
19
+ - 禁止直接操作临时 worktree、lease 或 container;只调用 `agent-infra-internal task-validate`。
16
20
  - 产物不得记录 token、环境变量、完整 argv、绝对用户路径或原始 transcript。
17
21
 
18
22
  ## 第 0 步:状态核对(执行前硬约束)
@@ -28,7 +32,7 @@ agent-infra-internal task-snapshot {task-id} --format text
28
32
  1. 读取 `reference/discovery-and-execution.md`,解析输入模式;非法或半截输入在 started 前停止,不写产物。
29
33
  2. 运行 `agent-infra-internal task-artifact {task-id} inspect --family validation-run`,读取最新 review-code 人工校验项;再运行 `agent-infra-internal platform-pr inspect {task-id}`,按 reference 的状态矩阵发现、归并并编号。仅在自动模式下,可靠来源无项或唯一可能来源不可读时才在 started 前停止;合法显式模式始终以用户命令作为有效工作继续。
30
34
  3. 从核心结果取得轮次和产物名;确认存在有效显式工作或非空发现清单后,运行 `agent-infra-internal task-event {task-id} validation-run.started --agent {standard-agent-token}`,并逐项分类为 `executable|unavailable|unknown|unsafe|unresolved`。
31
- 4. 每个可执行项分别调用 `ai task validate {task-ref} --scope snapshot --format json -- {command...}`;只有证据表明必须原位时才对该项进行第二次显式 inplace 调用。零项可执行时不运行伪造命令,但仍继续产出覆盖缺口证据。
35
+ 4. 每个可执行项分别调用 `agent-infra-internal task-validate {task-ref} --scope snapshot --format json -- {command...}`;只有证据表明必须原位时才对该项进行第二次显式 inplace 调用。零项可执行时不运行伪造命令,但仍继续产出覆盖缺口证据。
32
36
  5. 读取 `reference/report-template.md`,创建 `validation-run.md|validation-run-r{N}.md`;记录输入模式、发现清单、逐项结果、CLI JSON allowlist 与去敏摘要。
33
37
  6. 运行 `agent-infra-internal task-event {task-id} validation-run.completed --agent {standard-agent-token} --artifact {artifact}`。存在 Issue 时依次运行 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` 和 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {artifact} --agent {standard-agent-token}`。
34
38
  7. 运行 `agent-infra-internal task-verify {task-id} validation-run.completed --artifact {artifact} --format text`;未通过则修复后重跑。
@@ -36,7 +40,7 @@ agent-infra-internal task-snapshot {task-id} --format text
36
40
 
37
41
  ## 完成检查清单
38
42
 
39
- - [ ] 每个可执行项均已使用 `ai task validate`,或已记录零项可执行
43
+ - [ ] 每个可执行项均已使用 `agent-infra-internal task-validate`,或已记录零项可执行
40
44
  - [ ] 已记录去敏 validation-run 证据
41
45
  - [ ] 未修改 PR 人工验证完成状态
42
46
  - [ ] 已更新 task.md 并通过完成校验
@@ -58,7 +58,7 @@ Only `executable` items may run. Commands must not expose credentials, environme
58
58
  1. Invoke each executable item separately:
59
59
 
60
60
  ```bash
61
- ai task validate {task-ref} --scope snapshot --format json -- {command...}
61
+ agent-infra-internal task-validate {task-ref} --scope snapshot --format json -- {command...}
62
62
  ```
63
63
 
64
64
  2. Only when the item or first-run evidence proves a dependency on uncommitted content, original mounts, or in-place permissions, explicitly invoke that item a second time with `--scope inplace` and record the reason.
@@ -58,7 +58,7 @@
58
58
  1. 每个可执行项分别调用:
59
59
 
60
60
  ```bash
61
- ai task validate {task-ref} --scope snapshot --format json -- {command...}
61
+ agent-infra-internal task-validate {task-ref} --scope snapshot --format json -- {command...}
62
62
  ```
63
63
 
64
64
  2. 仅当项目要求或首次证据证明依赖未提交内容、原挂载或原位权限时,再为该项显式调用一次 `--scope inplace`,并记录升级理由。
@@ -37,7 +37,7 @@ $ agent-infra-internal task-snapshot {task-id} --format text
37
37
  ## Structured Evidence
38
38
 
39
39
  ```json
40
- {sanitized-ai-task-validate-json}
40
+ {sanitized-task-validate-json}
41
41
  ```
42
42
 
43
43
  ## Per-item Results
@@ -64,6 +64,6 @@ $ agent-infra-internal task-snapshot {task-id} --format text
64
64
  ## Raw Evidence
65
65
 
66
66
  ```text
67
- $ ai task validate {task-ref} --scope {scope} --format json -- {redacted-command}
67
+ $ agent-infra-internal task-validate {task-ref} --scope {scope} --format json -- {redacted-command}
68
68
  {sanitized-result}
69
69
  ```
@@ -37,7 +37,7 @@ $ agent-infra-internal task-snapshot {task-id} --format text
37
37
  ## 结构化证据
38
38
 
39
39
  ```json
40
- {sanitized-ai-task-validate-json}
40
+ {sanitized-task-validate-json}
41
41
  ```
42
42
 
43
43
  ## 逐项结果
@@ -64,6 +64,6 @@ $ agent-infra-internal task-snapshot {task-id} --format text
64
64
  ## 证据原文
65
65
 
66
66
  ```text
67
- $ ai task validate {task-ref} --scope {scope} --format json -- {redacted-command}
67
+ $ agent-infra-internal task-validate {task-ref} --scope {scope} --format json -- {redacted-command}
68
68
  {sanitized-result}
69
69
  ```
@@ -7,16 +7,20 @@ description: >
7
7
 
8
8
  # Run Task Lifecycle
9
9
 
10
+ ## Task Context Resolution
11
+
12
+ The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve the four policy options and their values, then call `agent-infra-internal task-context resolve {task-scope}`. Pass through resolution failures without scanning tasks locally. The internal orchestration protocol continues to use a positional task ref.
13
+
10
14
  The orchestrator delegates only and never executes a stage skill itself. First read `.agents/rules/no-mid-flow-questions.md`, `.agents/rules/lifecycle-orchestration.md`, and `reference/host-validation.md`.
11
15
 
12
16
  1. Resolve the canonical task ID, current Agent Client, and optional atomic policy flags, then run `task-snapshot`. If one explicit role field is present, all four are required.
13
- 2. Before `begin-or-resume`, Codex selects a host. Without `AGENT_INFRA_CONTROL_TOKEN`, use direct-host. With task-bound control authority but no `AGENT_INFRA_CODEX_CONTROLLER_CONTEXT`, only run `codex-sandbox-controller run` with the complete policy and wait; the outer loop must not create a run, baseline, or receipt. With a context, run `verify-context` first. Stop on any bootstrap, bundle, source/profile discovery, or context failure.
17
+ 2. Before `begin-or-resume`, Codex selects a host. Without `AGENT_INFRA_CONTROL_TOKEN`, use direct-host. With task-bound control authority but no `AGENT_INFRA_CODEX_CONTROLLER_CONTEXT`, only run `codex-sandbox-controller run` with the complete policy and wait; the outer loop must not create a run, baseline, or receipt. With a context, run `verify-context` first. Stop on protocol, task/controller/process, lease, or source/profile discovery failures. Package/build/contract or hook/profile content drift is delivered as a structured warning and tells the user to rebuild the sandbox.
14
18
  3. Run `task-orchestration {task-id} begin-or-resume --client {client}` with the complete explicit policy. With no explicit policy, core reads that client's configured policy; existing runs use persisted policy. Disk state outside the complete current structure fails closed without rewriting; finish or clear active runs before upgrading. Stop on paused/completed results.
15
19
  4. Run `route`. On `completed`, run `agent-infra-internal task-verify {task-id} run-task.completed --format text` and stop. Only a `running` result with non-null `next` supplies action, role, round, artifact, requested model, and requested effort.
16
20
  5. Codex runs `codex-lifecycle capability-arm --task-id {task-id}` once. The current loop's real PostToolUse must attest that ordinary tool response. Pass its marker token, the exact routed model, and the exact routed reasoning effort to `prepare --client {client} --requested-model {requestedModel} --requested-reasoning-effort {requestedReasoningEffort} --capability-token {token}`. Core first validates the exact routed model/effort, capability provenance, and controller binding, then captures a read-only snapshot, builds an in-memory prepared receipt, atomically consumes the token, and saves the prepared state with the capability session, turn, and tool-use origin. Activation then verifies that spawn belongs to the same session and turn and uses a distinct tool-use. Other clients use the same prepare without a token. Failure creates no baseline, receipt, or child.
17
21
  6. After prepare, run `task-orchestration <task-ref> dispatch` immediately before calling the fresh native child, then use route's exact model/effort and only the short task ref, skill, `--orchestrated`, and stage identity. The trusted hook-spawn first-observation time must fall between dispatch and the deadline. Its first provenance-sensitive command must be `await-activation --stage ... --round ... --artifact ... --role ...`; before `running`, it must not snapshot, emit stage-started, write business files, or start commit. Only explicit `recover-prepared` may clear an expired orphan when the task fingerprint is exact and no matching unconsumed active lifecycle evidence remains.
18
22
  7. Codex uses SubagentStart/Stop and App Server actual evidence to activate, consume, and seal one receipt; trusted parent fallback must produce the same complete provenance. Timed-out waits do nothing. Advance only a sealed receipt and repeat step 4 only while running.
19
- 8. Create a fresh child each round and never follow up with an old reviewer. Each requested/actual mismatch needs its own host fallback reason. Capability, hook, source, controller, build, identity, ledger, or fingerprint failure pauses and fails closed.
23
+ 8. Create a fresh child each round and never follow up with an old reviewer. Each requested/actual mismatch needs its own host fallback reason. Protocol, capability, receipt hook/evidence binding, source, controller, identity, ledger, or fingerprint failure pauses and fails closed; cross-root package/build/contract or hook/profile content drift is delivered as a warning instead of blocking natural evolution.
20
24
  9. On pause or completion, run the matching typed verification and report the structured endpoint.
21
25
 
22
26
  ## Stop
@@ -7,16 +7,20 @@ description: >
7
7
 
8
8
  # 运行任务生命周期
9
9
 
10
+ ## 任务上下文解析
11
+
12
+ 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留四个策略选项及其值,再调用 `agent-infra-internal task-context resolve {task-scope}`。解析失败时透传非零退出码,不自行扫描任务。内部 orchestration 协议仍使用位置 task ref。
13
+
10
14
  总控只编排,不直接执行任何阶段技能。执行前先读取 `.agents/rules/no-mid-flow-questions.md`、`.agents/rules/lifecycle-orchestration.md` 与 `reference/host-validation.md`。
11
15
 
12
16
  1. 解析规范任务 ID、当前 Agent Client,以及可选的原子策略 `--executor-model`、`--executor-reasoning-effort`、`--reviewer-model`、`--reviewer-reasoning-effort`,并执行 `agent-infra-internal task-snapshot {task-id} --format text`。任一显式策略字段出现时四个 role 字段必须完整,不得与配置拼接;两个角色可以使用同一模型。
13
- 2. Codex 在 `begin-or-resume` 前选择宿主:没有 `AGENT_INFRA_CONTROL_TOKEN` 时使用 direct-host;有 task-bound control authority 但没有 `AGENT_INFRA_CODEX_CONTROLLER_CONTEXT` 时,只调用 `agent-infra-internal codex-sandbox-controller run`(转发完整显式策略)并等待其终态,外层不得创建 run、baseline 或 receipt;已有 context 时先调用 `verify-context`。controller 的 bootstrap、bundle、source/profile discovery 或 context 任一校验失败即停止。
17
+ 2. Codex 在 `begin-or-resume` 前选择宿主:没有 `AGENT_INFRA_CONTROL_TOKEN` 时使用 direct-host;有 task-bound control authority 但没有 `AGENT_INFRA_CODEX_CONTROLLER_CONTEXT` 时,只调用 `agent-infra-internal codex-sandbox-controller run`(转发完整显式策略)并等待其终态,外层不得创建 run、baseline 或 receipt;已有 context 时先调用 `verify-context`。protocol、task/controller/process、lease 或 source/profile discovery 校验失败即停止;package/build/contract 或 hook/profile 内容漂移只输出结构化 warning,并提示用户重建 sandbox。
14
18
  3. 调用 `agent-infra-internal task-orchestration {task-id} begin-or-resume --client {client}` 并转发完整显式策略。完全没有显式策略时由核心读取当前 client 的 `agentClients[].orchestration`;existing run 使用持久化策略。磁盘状态不符合当前完整结构时核心失败关闭且不改写;升级前必须完成或清空 active run。仅当核心返回 `ORCHESTRATION_MODEL_POLICY_REQUIRED` 时,先用 `agent-client model-selection` 展示 complete/partial/interactive-only 来源,再一次收集完整策略;未回答则不创建 run。若为 paused/completed,按结构化结果停止。
15
19
  4. 调用 `route` 并读取结构化结果。若返回 `completed`,立即运行 `agent-infra-internal task-verify {task-id} run-task.completed --format text` 并停止;仅当返回 `running` 且 `next` 非空时读取唯一 action、role、round、artifact、`requestedModel` 和 `requestedReasoningEffort`,不得自行推断。
16
20
  5. Codex 先调用一次 `agent-infra-internal codex-lifecycle capability-arm --task-id {task-id}`。该普通工具调用必须由当前 loop 的真实 PostToolUse 回写 attestation;把 route 返回的精确 model、effort 和 marker 中 token 一并传给 `prepare --client {client} --requested-model {requestedModel} --requested-reasoning-effort {requestedReasoningEffort} --capability-token {token}`。核心先校验精确的 model/effort、capability provenance 与 controller binding,再只读捕获快照、构造内存中的 prepared receipt,最后原子消费 token 并保存 prepared 状态,同时持久化 capability 的 session、turn、tool-use 来源。activation 再校验 spawn 与该来源属于同一 session/turn,且 spawn 使用独立的 tool-use。其他客户端直接调用同一 prepare(无 token)。任一失败不得创建 baseline、receipt 或 child。
17
21
  6. prepare 成功后,在调用 fresh 原生子 Agent 的紧邻前一步执行 `task-orchestration <task-ref> dispatch`,再显式覆盖 route 返回的 model/effort;只传短任务引用、skill 名、`--orchestrated` 与 stage/round/artifact/role。可信 hook-spawn 首次观察时间必须位于 dispatch 与 deadline 之间。child 的第一条 provenance-sensitive 命令必须是 `await-activation --stage ... --round ... --artifact ... --role ...`;返回 running 前禁止 snapshot、阶段 started、业务写入或 commit。超时由核心暂停;崩溃遗留 prepared receipt 只能在 exact workspace fingerprint、无匹配的未消费 active lifecycle evidence 且 deadline 已过时显式 `recover-prepared`。
18
22
  7. Codex 用 SubagentStart/Stop 与 App Server actual evidence 激活、消费并封存唯一 receipt;受信 parent fallback 仍必须形成相同的完整 provenance。timed-out wait 无动作;只有 empty turns 或协议 `inProgress` 可等待,malformed、身份/传输错误或异常 terminal 均暂停。子 Agent 返回后只对 sealed receipt 调用 `advance`;只有 `running` 才重复步骤 4。
19
- 8. 每轮创建新 child;禁止 follow-up 复用 reviewer。actual model/effort 与 requested 不同时必须有各自的宿主降级理由。任何 capability、hook、source、controller、build、身份、账本或 fingerprint 异常都调用 `pause` 并失败关闭。
23
+ 8. 每轮创建新 child;禁止 follow-up 复用 reviewer。actual model/effort 与 requested 不同时必须有各自的宿主降级理由。protocol、capability、receipt 内 hook/evidence binding、source、controller、身份、账本或 fingerprint 异常都调用 `pause` 并失败关闭;跨根 package/build/contract 或 hook/profile 内容漂移按 warning 交付,不把自然演进差异当成硬失败。
20
24
  9. 完成或暂停后运行对应 typed verification,并把结构化 run 摘要、暂停原因、commit 终点或 clean completion evidence 告知用户。
21
25
 
22
26
  ## 停止
@@ -10,13 +10,13 @@ Before publishing support for a client, prove the lifecycle evidence chain with
10
10
  - Explicit requested model/effort reaches each executor/reviewer. A fallback of either field reports the corresponding actual value and its own non-empty reason.
11
11
  > claude-code exception: requested reasoning effort does not yet support per-role dispatch to executor/reviewer — `.claude/agents/{executor,reviewer}.md` is a repository-level shared singleton, and writing it per role would race across concurrent tasks. This client only needs to honestly record the actual model/actual reasoning effort observed in native Start/Stop host events (`delegationEvidence.actualReasoningEffort` is declared `spawn-ack`); when not observed it is recorded as missing, which is not treated as a fallback requiring its own reason and does not fail closed. This exception does not apply to any other client.
12
12
  - Candidate-checkout and packed-install behavior match, with model policy, receipts, and verification results auditable in `orchestration.json`.
13
- - Direct-host project/managed source and sandbox isolated-user source preserve the same build, contract, profile, and controller provenance through prepare/start/stop/consume.
13
+ - Direct-host and sandbox controller hooks/profiles must come from trusted sources. Cross-root build/contract/profile content drift emits an actionable warning, while controller/task/process/lease and the receipt's hook/evidence binding remain identical through prepare/start/stop/consume.
14
14
 
15
15
  ## Validation Sequence
16
16
 
17
17
  1. Record client version, feature state, and launch command in a clean temporary repository.
18
18
  2. Start a fresh executor and reviewer, retaining redacted raw stdin and the structured run. Validate both native start/stop and the parent PostTool fallback; timed-out waits must do nothing. Never synthesize a field the host did not emit.
19
- 3. Validate model/effort match paths, single and dual justified fallbacks, and fail-closed behavior for missing actual fields.
19
+ 3. Validate model/effort match paths, single and dual justified fallbacks, and fail-closed behavior for missing actual fields. Confirm package/build/contract or hook/profile content drift produces only an actionable warning telling the user to rebuild the sandbox.
20
20
  4. Validate the same commit from a candidate checkout and an `npm pack` install; record the tarball hash and results.
21
21
  5. Commit only redacted summaries and non-sensitive fixtures. Remove or replace tokens, user-specific absolute paths, transcript content, and credentials.
22
22
  6. For sandbox, run at least ten cold executor starts and ten cold reviewer starts. Record monotonic prepared, spawn-dispatch, SubagentStart, and activation-completed timestamps plus p50/p95/max. Enable only when max plus 20% fits the deadline and symlink/config/plugin/lease/context/build failure injection and terminal cleanup audits pass.
@@ -10,13 +10,13 @@
10
10
  - 显式 requested model/effort 能传给 executor/reviewer;宿主对任一字段回退时,事件能给出对应 actual 值与独立的非空 fallback reason。
11
11
  > claude-code 例外:requested reasoning effort 暂不支持按角色下发给 executor/reviewer——`.claude/agents/{executor,reviewer}.md` 是仓库级共享单例,动态写入存在跨任务竞态,解决该竞态超出本任务范围。该客户端只要求如实记录宿主原生 Start/Stop 事件中能观察到的 actual model/actual reasoning effort(`delegationEvidence.actualReasoningEffort` 声明为 `spawn-ack`);观察不到时记录为缺失,不视为需要独立 fallback reason 的回退场景,也不构成 fail-closed 阻断。此例外不适用于其他客户端。
12
12
  - candidate checkout 与打包安装后的行为一致,且模型策略、receipt 与验证结果可从 `orchestration.json` 复核。
13
- - direct-host 的 project/managed source 与 sandbox controller 的 isolated-user source、build/contract/profile/controller digest 必须在 prepare/start/stop/consume 全链路一致。
13
+ - direct-host 与 sandbox controller 使用的 hook/profile 必须来自受信来源;build/contract/profile 内容在跨根比较中允许漂移并输出可操作 warning,但 controller/task/process/lease 与 receipt 内 hook/evidence binding 仍须在 prepare/start/stop/consume 全链路一致。
14
14
 
15
15
  ## 验证顺序
16
16
 
17
17
  1. 在干净临时仓库记录客户端版本、feature 状态和启动命令。
18
18
  2. 分别启动 fresh executor 与 fresh reviewer,保存去敏后的原始 stdin 和结构化 run;同时验证原生 start/stop 与 parent PostTool fallback。timed-out wait 必须无动作;不得补写宿主未产生的字段。
19
- 3. 分别验证 model/effort 的 requested/actual 一致路径、单项与双项有理由 fallback 路径,并确认缺 actual 字段会失败关闭。
19
+ 3. 分别验证 model/effort 的 requested/actual 一致路径、单项与双项有理由 fallback 路径,并确认缺 actual 字段会失败关闭;对 package/build/contract 或 hook/profile 内容漂移确认只产生可操作 warning,并提示用户重建 sandbox。
20
20
  4. 对同一 commit 执行 candidate checkout 与 `npm pack` 安装验证,记录 tarball 哈希和结果。
21
21
  5. 仅把去敏摘要与非敏感 fixture 纳入版本库;token、绝对用户路径、transcript 内容和凭证必须删除或替换。
22
22
  6. sandbox backend 另做至少 10 次 executor 与 10 次 reviewer 冷启动,记录 prepared、spawn dispatch、SubagentStart、activation completed 的单调时钟及 p50/p95/max;仅当 max 加 20% 余量不超过 deadline,并通过 symlink/config/plugin/lease/context/build 失败注入和终态清理审计时启用。