codex-workflow-v2 2.0.0-beta.13.9 → 2.0.0-beta.14

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 (271) hide show
  1. package/README.md +27 -388
  2. package/dist/reviewer-runtime-build.json +89 -29
  3. package/dist/src/alpha6/adoption.d.ts +2 -0
  4. package/dist/src/alpha6/adoption.js +22 -0
  5. package/dist/src/alpha6/adoption.js.map +1 -1
  6. package/dist/src/alpha6/captured-check-evidence.d.ts +51 -0
  7. package/dist/src/alpha6/captured-check-evidence.js +152 -0
  8. package/dist/src/alpha6/captured-check-evidence.js.map +1 -0
  9. package/dist/src/alpha6/component-owner.d.ts +15 -1
  10. package/dist/src/alpha6/component-owner.js +44 -2
  11. package/dist/src/alpha6/component-owner.js.map +1 -1
  12. package/dist/src/alpha6/corrective-decision-boundary.d.ts +4 -0
  13. package/dist/src/alpha6/corrective-decision-boundary.js +47 -0
  14. package/dist/src/alpha6/corrective-decision-boundary.js.map +1 -0
  15. package/dist/src/alpha6/downstream-proof.d.ts +1 -25
  16. package/dist/src/alpha6/downstream-proof.js +0 -171
  17. package/dist/src/alpha6/downstream-proof.js.map +1 -1
  18. package/dist/src/alpha6/literal-test-invocation.d.ts +2 -0
  19. package/dist/src/alpha6/literal-test-invocation.js +106 -0
  20. package/dist/src/alpha6/literal-test-invocation.js.map +1 -0
  21. package/dist/src/alpha6/milestone.d.ts +2 -0
  22. package/dist/src/alpha6/milestone.js +10 -1
  23. package/dist/src/alpha6/milestone.js.map +1 -1
  24. package/dist/src/alpha6/navigation-dirty-carryover.d.ts +11 -0
  25. package/dist/src/alpha6/navigation-dirty-carryover.js +130 -0
  26. package/dist/src/alpha6/navigation-dirty-carryover.js.map +1 -0
  27. package/dist/src/alpha6/plan-integrity.js +7 -5
  28. package/dist/src/alpha6/plan-integrity.js.map +1 -1
  29. package/dist/src/alpha6/remediation.d.ts +6 -21
  30. package/dist/src/alpha6/remediation.js +161 -476
  31. package/dist/src/alpha6/remediation.js.map +1 -1
  32. package/dist/src/alpha6/root-cause-replan-carryover.d.ts +4 -1
  33. package/dist/src/alpha6/root-cause-replan-carryover.js +29 -5
  34. package/dist/src/alpha6/root-cause-replan-carryover.js.map +1 -1
  35. package/dist/src/beta1/project-transaction.d.ts +3 -1
  36. package/dist/src/beta1/project-transaction.js +6 -2
  37. package/dist/src/beta1/project-transaction.js.map +1 -1
  38. package/dist/src/checks/runner.d.ts +26 -0
  39. package/dist/src/checks/runner.js +223 -0
  40. package/dist/src/checks/runner.js.map +1 -0
  41. package/dist/src/checks/task-sync.d.ts +10 -0
  42. package/dist/src/checks/task-sync.js +41 -0
  43. package/dist/src/checks/task-sync.js.map +1 -0
  44. package/dist/src/checks/worker.d.ts +1 -0
  45. package/dist/src/checks/worker.js +154 -0
  46. package/dist/src/checks/worker.js.map +1 -0
  47. package/dist/src/cli-actions.d.ts +2 -2
  48. package/dist/src/cli-actions.js +3 -15
  49. package/dist/src/cli-actions.js.map +1 -1
  50. package/dist/src/cli.js +14 -98
  51. package/dist/src/cli.js.map +1 -1
  52. package/dist/src/contracts.d.ts +35 -32
  53. package/dist/src/dependency-provenance.d.ts +2 -2
  54. package/dist/src/dependency-provenance.js +12 -69
  55. package/dist/src/dependency-provenance.js.map +1 -1
  56. package/dist/src/domain/base-sync-conflict.d.ts +13 -0
  57. package/dist/src/domain/base-sync-conflict.js +32 -0
  58. package/dist/src/domain/base-sync-conflict.js.map +1 -0
  59. package/dist/src/domain/step-start-admission.d.ts +4 -0
  60. package/dist/src/domain/step-start-admission.js +9 -0
  61. package/dist/src/domain/step-start-admission.js.map +1 -0
  62. package/dist/src/domain/virgin-registration.d.ts +3 -0
  63. package/dist/src/domain/virgin-registration.js +65 -0
  64. package/dist/src/domain/virgin-registration.js.map +1 -0
  65. package/dist/src/errors.d.ts +1 -1
  66. package/dist/src/errors.js.map +1 -1
  67. package/dist/src/gateway-handshake.js +0 -8
  68. package/dist/src/gateway-handshake.js.map +1 -1
  69. package/dist/src/git.d.ts +3 -1
  70. package/dist/src/git.js +41 -14
  71. package/dist/src/git.js.map +1 -1
  72. package/dist/src/graph.js +25 -3
  73. package/dist/src/graph.js.map +1 -1
  74. package/dist/src/index.d.ts +1 -0
  75. package/dist/src/navigation-actions.d.ts +9 -0
  76. package/dist/src/navigation-actions.js +72 -0
  77. package/dist/src/navigation-actions.js.map +1 -0
  78. package/dist/src/navigation-update-artifact.d.ts +5 -0
  79. package/dist/src/navigation-update-artifact.js +227 -0
  80. package/dist/src/navigation-update-artifact.js.map +1 -0
  81. package/dist/src/navigation-update.d.ts +39 -0
  82. package/dist/src/navigation-update.js +82 -0
  83. package/dist/src/navigation-update.js.map +1 -0
  84. package/dist/src/observation.js +52 -29
  85. package/dist/src/observation.js.map +1 -1
  86. package/dist/src/observed-routes.js +5 -6
  87. package/dist/src/observed-routes.js.map +1 -1
  88. package/dist/src/pending-review-update.d.ts +0 -13
  89. package/dist/src/pending-review-update.js +1 -6
  90. package/dist/src/pending-review-update.js.map +1 -1
  91. package/dist/src/reviewer.d.ts +1 -1
  92. package/dist/src/reviewer.js +20 -17
  93. package/dist/src/reviewer.js.map +1 -1
  94. package/dist/src/runtime.d.ts +3 -0
  95. package/dist/src/runtime.js +6 -0
  96. package/dist/src/runtime.js.map +1 -0
  97. package/dist/src/state/corrective-replan-executor.d.ts +10 -0
  98. package/dist/src/state/corrective-replan-executor.js +37 -1
  99. package/dist/src/state/corrective-replan-executor.js.map +1 -1
  100. package/dist/src/state/corrective-replan-public-schema.js +15 -2
  101. package/dist/src/state/corrective-replan-public-schema.js.map +1 -1
  102. package/dist/src/state/corrective-replan-public.js +1 -1
  103. package/dist/src/state/corrective-replan-public.js.map +1 -1
  104. package/dist/src/state/corrective-replan-transaction.d.ts +1 -0
  105. package/dist/src/state/corrective-replan-transaction.js +12 -11
  106. package/dist/src/state/corrective-replan-transaction.js.map +1 -1
  107. package/dist/src/state/corrective-yield-transaction.d.ts +1 -0
  108. package/dist/src/state/corrective-yield-transaction.js +11 -10
  109. package/dist/src/state/corrective-yield-transaction.js.map +1 -1
  110. package/dist/src/state/lock.d.ts +4 -0
  111. package/dist/src/state/lock.js +21 -0
  112. package/dist/src/state/lock.js.map +1 -1
  113. package/dist/src/version.d.ts +1 -1
  114. package/dist/src/version.js +1 -1
  115. package/dist/src/version.js.map +1 -1
  116. package/dist/src/workflow-blocker-route.d.ts +8 -0
  117. package/dist/src/workflow-blocker-route.js +106 -0
  118. package/dist/src/workflow-blocker-route.js.map +1 -0
  119. package/dist/src/workflow.d.ts +48 -63
  120. package/dist/src/workflow.js +666 -1460
  121. package/dist/src/workflow.js.map +1 -1
  122. package/docs/autonomy-guardrails.md +26 -304
  123. package/docs/decisions.md +14 -112
  124. package/docs/development-flow.md +35 -238
  125. package/docs/project-memory.md +31 -50
  126. package/docs/release-app-evidence.md +190 -0
  127. package/docs/release.md +95 -388
  128. package/docs/updating-existing-project.md +19 -717
  129. package/package.json +11 -13
  130. package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +2 -2
  131. package/plugins/codex-workflow-gateway/references/chat-dispatch.md +73 -197
  132. package/plugins/codex-workflow-gateway/references/codebase-memory-routing.md +57 -0
  133. package/plugins/codex-workflow-gateway/references/protocol.md +42 -445
  134. package/plugins/codex-workflow-gateway/scripts/chat-dispatch.mjs +7 -1
  135. package/plugins/codex-workflow-gateway/scripts/chat-model-policy.mjs +10 -8
  136. package/plugins/codex-workflow-gateway/scripts/chat-registry.mjs +23 -5
  137. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +66 -757
  138. package/references/state-machine.md +4 -4
  139. package/roles/technical-planner.md +1 -1
  140. package/schemas/corrective-decision-event.schema.json +3 -1
  141. package/schemas/project-knowledge-map.schema.json +3 -1
  142. package/schemas/remediation-event.schema.json +10 -1
  143. package/schemas/task.schema.json +46 -2
  144. package/schemas/transition-payloads.schema.json +16 -1
  145. package/src/alpha6/adoption.ts +1123 -0
  146. package/src/alpha6/captured-check-evidence.ts +132 -0
  147. package/src/alpha6/check-support-anchor.ts +128 -0
  148. package/src/alpha6/component-owner.ts +168 -0
  149. package/src/alpha6/corrective-decision-boundary.ts +39 -0
  150. package/src/alpha6/downstream-proof.ts +520 -0
  151. package/src/alpha6/failed-step-planning-recovery.ts +88 -0
  152. package/src/alpha6/handoff.ts +1443 -0
  153. package/src/alpha6/journal.ts +473 -0
  154. package/src/alpha6/literal-test-invocation.ts +84 -0
  155. package/src/alpha6/mechanical-feasibility.ts +488 -0
  156. package/src/alpha6/milestone.ts +2192 -0
  157. package/src/alpha6/navigation-dirty-carryover.ts +154 -0
  158. package/src/alpha6/npm-check-contract.ts +47 -0
  159. package/src/alpha6/plan-integrity.ts +298 -0
  160. package/src/alpha6/plan-risk.ts +1480 -0
  161. package/src/alpha6/preexecution-replan.ts +187 -0
  162. package/src/alpha6/remediation-cause.ts +98 -0
  163. package/src/alpha6/remediation.ts +2438 -0
  164. package/src/alpha6/review.ts +1198 -0
  165. package/src/alpha6/root-cause-replan-carryover.ts +491 -0
  166. package/src/alpha6/store-sidecars.ts +335 -0
  167. package/src/alpha7/autonomy.ts +411 -0
  168. package/src/alpha7/corrective-recovery.ts +1332 -0
  169. package/src/artifacts.ts +130 -0
  170. package/src/beta1/project-transaction.ts +355 -0
  171. package/src/change-explanation.ts +153 -0
  172. package/src/checks/runner.ts +245 -0
  173. package/src/checks/task-sync.ts +41 -0
  174. package/src/checks/worker.ts +149 -0
  175. package/src/cli-actions.ts +107 -0
  176. package/src/cli.ts +1457 -0
  177. package/src/contracts.ts +1494 -0
  178. package/src/credential-output.ts +89 -0
  179. package/src/credential-transport.ts +215 -0
  180. package/src/delegation.ts +190 -0
  181. package/src/dependency-provenance.ts +472 -0
  182. package/src/diagnostics.ts +93 -0
  183. package/src/domain/base-sync-conflict.ts +35 -0
  184. package/src/domain/completed-step-carryover.ts +76 -0
  185. package/src/domain/discovery.ts +27 -0
  186. package/src/domain/plan-semantics.ts +58 -0
  187. package/src/domain/step-start-admission.ts +10 -0
  188. package/src/domain/validation.ts +177 -0
  189. package/src/domain/virgin-registration.ts +46 -0
  190. package/src/errors.ts +24 -0
  191. package/src/fs-utils.ts +61 -0
  192. package/src/gateway-handshake.ts +95 -0
  193. package/src/git.ts +183 -0
  194. package/src/graph.ts +342 -0
  195. package/src/historical-step-provenance.ts +136 -0
  196. package/src/index.ts +23 -0
  197. package/src/lifecycle/canonical-hash.ts +28 -0
  198. package/src/lifecycle/catalog.ts +202 -0
  199. package/src/lifecycle/compiler-inspection.ts +29 -0
  200. package/src/lifecycle/core-static-readiness.ts +132 -0
  201. package/src/lifecycle/corrective-replan-authority.ts +136 -0
  202. package/src/lifecycle/corrective-replan-binding-manifest.ts +51 -0
  203. package/src/lifecycle/corrective-replan-credential-core.ts +408 -0
  204. package/src/lifecycle/corrective-replan-credential-schema.ts +54 -0
  205. package/src/lifecycle/corrective-replan-credentials.ts +48 -0
  206. package/src/lifecycle/corrective-replan.ts +843 -0
  207. package/src/lifecycle/evaluator.ts +48 -0
  208. package/src/lifecycle/fingerprint.ts +488 -0
  209. package/src/lifecycle/immutable.ts +8 -0
  210. package/src/lifecycle/implementation-table.ts +118 -0
  211. package/src/lifecycle/index.ts +8 -0
  212. package/src/lifecycle/schema-artifact.ts +263 -0
  213. package/src/lifecycle/semantic-registry.ts +572 -0
  214. package/src/lifecycle/types.ts +838 -0
  215. package/src/memory.ts +273 -0
  216. package/src/migration.ts +161 -0
  217. package/src/navigation-actions.ts +70 -0
  218. package/src/navigation-update-artifact.ts +198 -0
  219. package/src/navigation-update.ts +121 -0
  220. package/src/observation.ts +225 -0
  221. package/src/observed-routes.ts +660 -0
  222. package/src/operational-contract.ts +125 -0
  223. package/src/pending-review-update.ts +175 -0
  224. package/src/repository.ts +99 -0
  225. package/src/reviewer.ts +1879 -0
  226. package/src/runtime.ts +6 -0
  227. package/src/state/corrective-replan-executor.ts +818 -0
  228. package/src/state/corrective-replan-public-schema.ts +83 -0
  229. package/src/state/corrective-replan-public.ts +908 -0
  230. package/src/state/corrective-replan-transaction.ts +949 -0
  231. package/src/state/corrective-yield-executor.ts +327 -0
  232. package/src/state/corrective-yield-transaction.ts +730 -0
  233. package/src/state/lock.ts +902 -0
  234. package/src/state/store.ts +567 -0
  235. package/src/transition-core.ts +330 -0
  236. package/src/ulid.ts +24 -0
  237. package/src/version.ts +2 -0
  238. package/src/workflow-blocker-route.ts +109 -0
  239. package/src/workflow.ts +10172 -0
  240. package/docs/alpha7.1-implementation-brief.md +0 -268
  241. package/docs/alpha7.2-corrective-context-refresh-brief.md +0 -484
  242. package/docs/alpha7.2.1-remediation-recovery-brief.md +0 -86
  243. package/docs/beta1-stabilization-brief.md +0 -165
  244. package/docs/beta11-plan-integrity-recovery-brief.md +0 -38
  245. package/docs/beta13.2-signal-review-recovery.md +0 -38
  246. package/docs/beta2-initial-assembly-navigation-brief.md +0 -616
  247. package/docs/change-model.md +0 -118
  248. package/docs/delegated-approval.md +0 -254
  249. package/docs/lifecycle/state-machine-stabilization.md +0 -641
  250. package/docs/pdf/README.md +0 -24
  251. package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
  252. package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
  253. package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
  254. package/docs/pdf/requirements.txt +0 -1
  255. package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +0 -478
  256. package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +0 -506
  257. package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +0 -778
  258. package/docs/pending-review-update.md +0 -15
  259. package/docs/problem-briefs/01-pre-implementation-integrity.md +0 -482
  260. package/docs/problem-briefs/02-minimal-step-integrity.md +0 -411
  261. package/docs/problem-briefs/03-minimal-agent-context-integrity.md +0 -358
  262. package/docs/problem-briefs/04-task-dependency-and-structural-replacement-integrity.md +0 -573
  263. package/docs/problem-briefs/BRIEF-TEMPLATE.md +0 -56
  264. package/docs/problem-briefs/README.md +0 -120
  265. package/docs/problem-briefs/evidence/p01-mechanical-feasibility-corpus.md +0 -90
  266. package/docs/problem-briefs/evidence/signal-v4-pre-m3-replay.md +0 -246
  267. package/docs/split-required-recovery.md +0 -47
  268. package/docs/stable-release-defect-register.md +0 -730
  269. package/docs/validation-report.md +0 -182
  270. package/scripts/generate-pdf-docs.py +0 -524
  271. package/scripts/run-pdf-docs.mjs +0 -62
@@ -1,784 +1,93 @@
1
1
  ---
2
2
  name: codex-workflow-gateway
3
- description: Resolve and drive the exact codex-workflow-v2 package installed in the active repository, including derived codebase-memory graph refresh and fallback evidence.
3
+ description: Operate the exact installed codex-workflow-v2 package or investigate its source, using current Core contracts and workflow codebase-memory evidence.
4
4
  ---
5
5
 
6
6
  # Codex Workflow Gateway
7
7
 
8
- ## Boundary
8
+ ## Resolve authority
9
9
 
10
- This is a thin personal integration. It does not define workflow states, role
11
- semantics, requirements, approvals, or project knowledge. Those come from the
12
- exact `codex-workflow-v2` package and ordinary files in the active Git
13
- repository.
10
+ Read once per chat/package revision. Core and repository evidence define workflow state;
11
+ this skill routes work and does not grant scope, approvals, credentials or filesystem access.
14
12
 
15
- Never use a global workflow package, a mutable npm range, `latest`, V1 overlay
16
- files, or MCP ADR storage as a fallback.
13
+ For installed use, resolve the Git root and require its exact `devDependencies.codex-workflow-v2`
14
+ version to match the locally resolved `node_modules/codex-workflow-v2/package.json`.
15
+ Invoke only that package's `dist/src/cli.js --repo <git-root>`; first run `gateway handshake`.
16
+ Stop on missing/ranged/mismatched versions or an incompatible handshake. Do not substitute a
17
+ global package, mutable tag, external runner or MCP ADR memory.
17
18
 
18
- ## Resolve The Active Package
19
+ For an explicitly requested blocked navigation update, the exact target may run only the read-only
20
+ `update navigation-source-preflight`; read `docs/updating-existing-project.md` from that exact target package.
21
+ Only an eligible source receipt permits its two dependency transports; recovery uses the newly installed local target.
19
22
 
20
- 1. Resolve the active Git root with `git rev-parse --show-toplevel`.
21
- 2. Read its `package.json` and require an exact version string for
22
- `codex-workflow-v2` in `devDependencies`.
23
- 3. Resolve `node_modules/codex-workflow-v2/package.json` from that root.
24
- 4. Require the installed version to equal the declared exact version.
25
- 5. Invoke only that package's `dist/src/cli.js` with the current Git root as
26
- `--repo`.
27
- 6. Run `gateway handshake` before other actions. Stop on package, protocol, or
28
- state-schema incompatibility.
23
+ For workflow source development, use the requested source checkout and record its Git revision
24
+ and dirty state. Do not require a self-install or invoke a consumer's lifecycle to inspect source.
29
25
 
30
- The sole exception is the alpha.7 `update rescue-preflight` compatibility profile. An exact
31
- external alpha.7 runner may inspect a project still pinned to alpha.6 only when this read-only
32
- command reports `eligible=true`. Execute only its returned stale-lock repair and strict-review
33
- actions; do not use the external runner for any other transition or dependency mutation.
26
+ ## Orient before code discovery
34
27
 
35
- The beta.10 bounded dependency-provenance route is narrower than ordinary Git recovery. Use it only
36
- when fresh `next` advertises `update dependency-provenance-recover`. First run the read-only
37
- `update dependency-provenance-preflight --id <TASK-ID>` and require `eligible=true`, the same
38
- Task/revision/HEAD, and no blockers. The candidate must be the single unregistered HEAD after the
39
- recorded Task history, change exactly `package.json` and `package-lock.json`, and leave every
40
- declared, locked, installed, current-branch, and active Milestone-base version equal to the running
41
- package. A historical product commit whose current corrective Plan no longer carries Step evidence
42
- is admissible only when Core derives it from a complete, hash-valid `pending → review-recorded →
43
- attestation-verified` chain with `passed` decision and verified reviewer isolation. Raw evidence,
44
- pending review, a failed decision, or a damaged sidecar never establishes provenance. Recovery
45
- records the candidate dependency HEAD as a Workflow system commit and records admissible reviewed
46
- product commits separately as `retainedHistoricalCommits`; it does not relabel product work as a
47
- system commit and does not create, amend, reset, or merge Git history. Never use it for unknown
48
- product changes, multiple extra commits, a dirty checkout, any lease, an in-progress Step, or a
49
- pending/corrupt transaction. After success run sequential `status` then `next` and follow the exact
50
- returned lifecycle action; Knowledge reconciliation or atomic Task context refresh may legitimately
51
- be next because the dependency files changed.
28
+ Use `codebase-memory-mcp` before filesystem code search. Knowledge Map approval is not an MCP index.
29
+ Read [graph routing](../../references/codebase-memory-routing.md) for the exact `sourceRoot`
30
+ selection, readiness and evidence-binding procedure. Index workflow code only; Product graph is inactive and must not be refreshed or used as a lifecycle/Knowledge gate. Record a failed operation and reason before filesystem fallback.
52
31
 
53
- When beta.12.9 fresh `next` advertises `task historical-step-provenance-recover`, Core has found
54
- exactly one product commit that a corrective Plan omitted from current Step evidence even though the
55
- commit still has a complete hash-valid passed strict Step Review chain and a matching prior final
56
- acceptance. First run the advertised read-only `task historical-step-provenance-preflight --id
57
- <TASK-ID>` and require `eligible=true`, the exact Task revision/Plan/Brief/HEAD, the advertised
58
- commit SHA, no lease/transaction/Core operation, and dirty files confined to the one active Step's
59
- `allowedWrites`. Invoke recovery with that exact commit, actor, and a substantive reason. The
60
- transition records the commit as invalidated historical Step authority plus an audit record; it does
61
- not adopt the completed Step into the current Plan and does not create, remove, amend, reset, rebase,
62
- or merge Git commits. Reject multiple or arbitrary unexpected commits, pending/failed review,
63
- mismatched final acceptance, unrelated dirty files, or damaged sidecars. After success run
64
- sequential `status` then `next`; the active corrective Step should resume through its ordinary
65
- credential and `task step-complete` route.
32
+ ## Follow the current route
66
33
 
67
- When beta.12.9 must itself be installed while this exact historical Step blocker is active, preserve
68
- the Task worktree and create only two dependency transport commits: one on the active Milestone base
69
- and one at Task-branch HEAD, each changing exactly `package.json` and `package-lock.json` to the exact
70
- beta.12.9 package. Do not switch the dirty Task checkout to update the base; use a separate temporary
71
- worktree. Install the repository-local target package, then require fresh `next` to advertise
72
- `update historical-step-dependency-recover`. Run the matching read-only preflight and require the
73
- exact dependency HEAD/parent, Task revision, active Step/Plan, retained historical SHA, dirty-file
74
- set and dirty-worktree hash, with no lease or pending operation. The matching recover registers both
75
- authorities without modifying product bytes or Git. After recovery run sequential `status` and
76
- `next`; do not substitute ordinary dependency recovery, manual state edits, rebase, reset, or amend.
34
+ Read the current package's relevant role instruction once. At each lifecycle checkpoint, finish
35
+ `status` successfully, then finish `next`; never run that pair concurrently. A Task chat may use
36
+ `next --task <exact Task ID>` and must stop if another Task is returned.
77
37
 
78
- Beta.12.1 permits product-owned manifest/lock fields already present in the exact recorded Task
79
- history to differ from the Milestone base. Core compares candidate parent to candidate HEAD after
80
- removing only the Workflow dependency entries, so the dependency commit must preserve every such
81
- field exactly. Do not rebase, copy the base manifest over Task-local scripts, or interpret this as
82
- permission for product payload in the candidate commit.
38
+ Execute only a fresh advertised eligible action with its exact entity, revision, actor, scope,
39
+ evidence and credential bindings. Help describes syntax, not eligibility: obtain missing options
40
+ from `<noun> [action] --help` and schemas; if its contract is incomplete, inspect the exact
41
+ current implementation or report the missing contract. Never guess or replay an uncertain mutation.
42
+ After help, a mutation or changed binding, repeat `status` then `next` before any mutation.
83
43
 
84
- The beta.11 bounded Plan-integrity route prevents a known impossible check from consuming a second
85
- ordinary remediation attempt. Use `task plan-integrity-recover` only when fresh `next` advertises
86
- it for the exact failed Task/Step/revision. Require `state=eligible`, no blockers, one first
87
- `checks-failed` remediation, an exact missing root npm script, `package.json` outside the Step's
88
- `allowedWrites`, and a dirty-file set confined to that Step. Pass the exact returned actor and the
89
- active writer token when the C1 contract requires it. The recovery records only a bound early
90
- `replan-required` decision: it does not edit the Plan or worktree. Then follow fresh `next` through
91
- `task corrective-yield` and the existing Human-confirmed corrective-replan flow. Never repeat
92
- `task run` merely to manufacture the second failure, and never invoke this recovery for a generic
93
- test failure, a writable manifest, or unconfined changes.
44
+ For planning, review or context refresh, read [current action inputs](../../references/protocol.md).
45
+ Use `taskPlanContract` and the advertised atomic refresh; do not reconstruct Core's eligibility rules.
46
+ A blocked option, absent contract or contradictory route requires diagnosis, not a bypass.
47
+ Report repeated unchanged states without progress as an incident; they do not authorize a new release.
94
48
 
95
- When fresh `next` includes `preExecutionReplanOption.state=eligible`, an independent Plan auditor
96
- may stop a `ready` Task before its next Step because the current implementation Plan is obstructed.
97
- Use only `task preexecution-replan` with the exact advertised Task revision, Brief hash, Plan hash,
98
- current Plan Risk Audit event hash, and HEAD. The audit file must be a genuine independent
99
- `stop-escalate` replacement audit: its planner remains the original planner, its auditor is the
100
- transition actor, and it retains current guarded categories, review requirements, failure modes,
101
- evidence commands, and proof bindings while recording the obstruction. This transition requires a
102
- clean checkout with no Step in progress, C1 posture, or writer lease. It appends immutable audit and
103
- provenance records, supersedes only current execution authorization, preserves completed Step
104
- authority and existing delegation scope, and does not require a new approval. After success, run
105
- sequential `status` then `next`; Core must advertise ordinary `task plan-set`, not audited-remediation
106
- topology. Submit a semantically changed Plan with the exact Task objective, requirements, and
107
- acceptance, preserve completed Steps and prior safety boundaries, attach a fresh Plan Risk Audit,
108
- then obtain fresh execution authorization. Never append an approved audit to the unchanged Plan,
109
- rebind context around the marker, invent a failure/corrective cause, or invoke the command when the
110
- option is absent or blocked.
49
+ ## Respect human decisions
111
50
 
112
- For this route, Core treats each `(Step ID, failureMode, evidence)` tuple as the immutable proof
113
- binding. It does not claim to understand whether revised `counterexample` or `expectedResult` prose
114
- is semantically stronger. Changing that prose therefore requires an independent
115
- `approved-with-rationale` audit, a changed substantive summary, and an explicit rationale; the
116
- earlier audit remains immutable history for human review.
51
+ A `requiredHumanGate` ends the turn after presenting its complete bound decision and confirmation
52
+ code. Execute only after a later explicit approval of that same code; changed bindings need a new
53
+ decision. Generic instructions to continue are not acceptance. An exact currently eligible
54
+ `delegatedApprovalOptions` entry permits its named delegate and grant for that transition only;
55
+ retain any required current confirmation code. Existing authorization must not be requested again.
117
56
 
118
- When the exact beta.13.6 package reports validated root-cause corrective-replan dirty
119
- carryover, the retained work belongs to a previously failed execution of the same Task.
120
- Use the fresh advertised `task run` only with the current writer credential and exact
121
- Task/Step bindings. Core must verify the repeated mechanical cause, historical Plan,
122
- replacement Plan and independent PRA, authorization, completed evidence, HEAD, dirty
123
- paths and content hash. Every retained path must already be allowed by the new Step
124
- and remain outside forbidden scope. A changed binding or blocked assessment is a hard
125
- stop; never clean, stash, reset, manually commit, or edit state to make it eligible.
57
+ Issuing, broadening, renewing or replacing delegation requires the human's bound decision;
58
+ never infer it from a policy file or another grant. Semantic scope changes remain human decisions.
59
+ Core eligibility does not replace permission for external operations or access to protected files.
126
60
 
127
- The beta.13.8 consumed-carryover compatibility profile also permits the exact
128
- published external beta.13.8 runner to execute only the read-only
129
- `update corrective-carryover-preflight --id <TASK-ID>` against a coherent beta.13.6
130
- repository. A completed, verified Step's carryover remains historical evidence;
131
- it must not override a later Step's repeated-cause recovery route.
61
+ ## Keep execution and review separate
132
62
 
133
- When `sourceRecovery.eligible=true`, execute only its exact `action` with the
134
- repository-installed beta.13.6 CLI. This narrow compatibility response, not the
135
- old source `next`, authorizes the source navigation repair. It may expose only
136
- `task plan-set`, `task handoff-prepare`, or `task claim`, bound to the current
137
- Task revision, Plan, completed history, terminal failure HEAD/dirty hash and
138
- corrective-yield actor. For Plan replacement, prepare the exact candidate Plan
139
- and independent PRA files, then pass them as `--file` and `--risk-audit-file`
140
- to this read-only preflight. Without both inputs no source mutation is authorized.
141
- Require the returned candidate Plan and input hashes; execute source `task plan-set`
142
- with those same unchanged files and verify its resulting Plan hash. Core rejects
143
- candidate inputs that omit or alter any completed Step before source mutation.
144
- Source execution
145
- authorization retains its ordinary human or exact eligible delegation gate.
146
- Use only the returned original Worker for handoff and claim. After every source
147
- mutation run source `status` then `next`, and repeat the target preflight before
148
- another compatibility action. `sourceRecovery` never authorizes transport or
149
- `task run`; top-level `eligible` remains false until transport itself is proved.
63
+ Use only public `writerCredentialReference` and `claimCredentialReference` values through
64
+ `--writer-credential-ref` and `--claim-credential-ref`. Check actor, action and reference expiry
65
+ before use; a renewed lease does not renew the reference. Missing, expired or consumed references
66
+ require the advertised credential recovery followed by fresh `status` and `next`. Never read,
67
+ print or alter vault secrets, or include credentials and confirmation codes in dispatch evidence.
150
68
 
151
- Once the replacement Plan is authorized and that same Worker has claimed it,
152
- the preflight may expose the exact expired-lease repair described below. Never
153
- force-release a live lease. Require a fresh top-level `eligible=true` before
154
- dependency transport. beta.13.8 accepts one dependency-only commit on each of
155
- the Task and Milestone base, with the same exact source beta.13.6 and target
156
- beta.13.8. After installing the target, use its ordinary advertised
157
- dependency provenance recovery, atomic context refresh and original-Worker
158
- credential recovery. This profile permits no external state mutation, installed
159
- code patch, wider product commit, changed dirty bytes, or approval substitution.
69
+ Workers leave product changes uncommitted; Core owns the advertised completion/check/commit
70
+ operation. Follow `gitMutationPolicy` under actual permissions. Scope, lease and review failures
71
+ are distinct from infrastructure denial; report the observed cause without manufacturing retries.
160
72
 
161
- The exact beta.13.9 runner supports the same bounded consumed-carryover profile
162
- with beta.13.6 as its source and beta.13.9 as its pinned target. Require the
163
- returned version bindings and all the same source-recovery and transport proofs.
164
- Historical beta.13.8 evidence is not proof for a beta.13.9 invocation.
73
+ Independent reviewers/auditors verify immutable packet, commit and seal bindings without product,
74
+ Git or workflow mutations. Under `external-sealed`, use a separate reviewer chat and record its
75
+ closed result only through the advertised action. Neither Worker nor Coordinator authors that review.
165
76
 
166
- The historical beta.13.7 runner retains its own exact beta.13.6-to-beta.13.7 profile.
167
- The current beta.13.8 profile does not admit a beta.13.7 source or an in-progress
168
- Step and cannot be used to bypass the ordinary safe update boundary.
77
+ A user prohibition on all writes also covers caches and reports: `next` may prepare runtime caches.
78
+ Reuse unchanged bound receipts and inspect immutable evidence; disclose any unverified freshness
79
+ instead of calling write-capable diagnostics under that prohibition.
169
80
 
170
- The historical beta.13.6 corrective-carryover update compatibility profile permits its exact
171
- external runner to execute only the read-only
172
- `update corrective-carryover-preflight --id <TASK-ID>` against a repository coherently
173
- pinned to beta.13.5. This is an explicit compatibility inspection, not permission to
174
- run ordinary transitions with an external or unpublished package. An active writer
175
- lease blocks transport. Wait for natural expiry. The target compatibility preflight
176
- may then return only an exact source-package stale-lease repair, after validating the
177
- sole expired Task lease, its original claimant, Task/Plan/PRA/authorization/HEAD and
178
- dirty-work bindings. This narrowly scoped preflight action is the authority for that
179
- source-package repair; do not describe it as an action advertised by the old source
180
- `next`. An active lease, another lease or any other blocker forbids the repair and
181
- transport. Never force-release a live lease. Preserve the original C1 claimant and
182
- hash-bound ownership event, log the preflight and exact repair, then run sequential
183
- source `status` and `next` and repeat the target preflight.
81
+ ## Dispatch and supervise within authorization
184
82
 
185
- After repair, require a fresh preflight with `eligible=true`, no blockers, and exact
186
- Task revision, source HEAD, replacement Plan/PRA/authorization, dirty paths/hash and
187
- original C1 ownership. Transport only the exact target dependency in `package.json`
188
- and `package-lock.json`: one commit on the Milestone base in a separate worktree and
189
- one at Task HEAD, leaving every product byte unchanged. Install the repository-local
190
- target, then follow fresh navigation through the existing
191
- `update dependency-provenance-recover` only when it advertises the matching carryover
192
- binding. Use current bounded credential recovery for the original Worker, and obtain
193
- fresh validated carryover before `task run`. Unknown history, wider commits, version
194
- misalignment, changed product bytes, different ownership, pending operations or missing
195
- bindings stop the update. This profile creates no scope or approval authority and does
196
- not authorize editing the installed package or Workflow state files.
83
+ Before authorized App dispatch, read [chat dispatch](../../references/chat-dispatch.md).
84
+ Create required Task/reviewer chats as fresh `create_thread` tasks with closed role packets;
85
+ never use `fork_thread` to carry parent history into them. The packaged registry owns allocation,
86
+ creation permits, exact title/context readback and binding. An ambiguous result is not permission
87
+ to create a duplicate. Model selection requires user authorization and the destination tool contract.
197
88
 
198
- When fresh `next` advertises `task downstream-proof-recover`, the active proof Step has produced
199
- uncommitted files inside its own `allowedWrites` and has also exposed required changes owned by one
200
- or more completed transitive predecessor Steps. Do not invoke `task step-complete`: its scope is
201
- known to be stale. Use only the exact returned Task revision, claimant/lease actor, writer-token
202
- contract, and a substantive reason. The atomic recovery preserves the worktree and HEAD, moves the
203
- predecessor completion commits into historical `invalidatedStepCommits`, clears only the invalidated
204
- completion evidence, blocks the active proof Step, supersedes execution authorization, appends
205
- `downstream-proof-invalidations.jsonl`, releases C1/lease authority, and returns the same Task to
206
- ordinary `task plan-set`. Build the replacement Plan from the full unfinished remainder, attach a
207
- fresh Plan Risk Audit, then obtain fresh execution authorization. Never use this route for an
208
- unrelated dirty file, a non-predecessor file, unregistered Git history, strict-review evidence, or
209
- without explicit fresh `next` eligibility. Do not reset, stash, commit, or recreate the Task or
210
- Milestone around this transition.
211
-
212
- If any step fails, report the concrete diagnostic. Do not load workflow
213
- semantics from this skill.
214
-
215
- ## Project Knowledge
216
-
217
- Use package commands `project-memory scan|show|status|approve|reconcile`.
218
- Project files are authoritative. The local map contains only paths,
219
- classifications, hashes, gaps, conflicts, and approval evidence.
220
-
221
- Do not create a memory directory or write project files during scan.
222
-
223
- Before `task plan-set`, the Technical Planner compares every exact `allowedWrites` and expected
224
- output path with the package scanner classifications. If the Plan will create a file that the
225
- scanner will treat as Project Knowledge (for example a test or documentation source), declare
226
- `knowledgeImpact: create` and one `knowledgeTargets` entry with that exact normalized path and
227
- scanner category. Do not replace the path with a wildcard or directory, do not infer or assign
228
- authority, and do not claim delegated-refresh eligibility; Core decides eligibility from the
229
- resulting repository diff and current authorization state.
230
-
231
- When `next.action` is `task plan-set` (including the corrective-audit variant), treat
232
- `next.taskPlanContract` as the exact transition precondition. Copy every
233
- `requiredRequirementIds` entry into Plan `requirements` and every `requiredAcceptanceIds` entry
234
- into Plan `acceptance` as exact array members; semantic prose may be added but cannot replace those
235
- IDs. Bind the Plan to the returned `briefHash` and active `knowledgeMap` revision/hash. Stop if the
236
- contract is absent or conflicts with the current Task/Knowledge state.
237
-
238
- When fresh repository `next` reports `planRiskAuditDecision.state=recorded-blocking`, decision
239
- `stop-escalate`, and an `auditedRemediation` object, do not retry authorization and do not invent a
240
- free-form Milestone scope change. Follow only the advertised route:
241
-
242
- 1. If action is `discovery start`, create one Discovery for the exact missing upstream capability
243
- proved by the audit. Preserve the current Milestone outcome, success signal, acceptance, checks,
244
- and original Task scope. Resolve factual unknowns from repository evidence; a genuine unresolved
245
- product decision remains a semantic blocker.
246
- 2. If action is `discovery update`, complete that same remediation Discovery until it is
247
- `ready_to_materialize`; do not reuse an unrelated Discovery.
248
- 3. If action is `milestone remediation-materialize`, use its exact Milestone/Task revisions and
249
- audit binding. The JSON input contains only `discoveryId`, `expectedDiscoveryRevision`, `title`,
250
- and `predecessorTaskIds`; the predecessor list must exactly equal
251
- `auditedRemediation.requiredPredecessorTaskIds`. No actor, confirmation code, delegation grant,
252
- replacement Milestone Plan, or human approval is accepted.
253
- 4. Run sequential `status` then repository `next`. Core must prioritize the new remediation Task.
254
- Plan, audit, hand off, implement, review, accept, and merge it normally. At Task execution
255
- authorization and final acceptance, use the exact `correctiveDerivedApproval.actor` returned by
256
- fresh `next`; `humanApprovalRequired` must be false. Do not pass a delegation grant.
257
- 5. After the remediation Task is `merged`, fresh `next` must return the original blocked Task to
258
- `task plan-set` with `auditedRemediation.state=merged-replan-required`. Replace its rejected Plan,
259
- record a fresh Risk Audit, use the same current derived approval only when advertised, and
260
- continue through at least the next ordinary Step boundary.
261
-
262
- An exact package update may make the approved Knowledge Map stale while this route is active. Continue
263
- without a Human approval only when fresh `next` includes
264
- `auditedRemediation.dependencyKnowledgeRefresh.eligible=true`. Core must prove that `package.json` is
265
- the sole changed Knowledge source, every version surface equals the repository-local runtime, and every
266
- Git commit that changed the approved manifest content altered only the exact Workflow dependency in
267
- `package.json`/`package-lock.json`. Do not run standalone reconcile first. The refresh is committed
268
- atomically by `milestone remediation-materialize` with corrective-derived evidence. Any other Knowledge
269
- path, classification, gap, conflict, dirty checkout, unaligned version or wider commit returns to the
270
- ordinary explicit Knowledge flow.
271
-
272
- This is an idempotent, additive topology transition bound to one exact Plan Risk Audit. Dirty Git,
273
- any lease/transaction/Core operation, a started blocked Task, stale Task/Milestone/audit bindings,
274
- non-merged or non-exact predecessors, duplicate use of the audit, or any changed Milestone semantic
275
- field is a hard stop. Generic `stop-escalate` shapes without `auditedRemediation` remain terminal
276
- user attention. Final Milestone acceptance remains an ordinary human/delegated gate.
277
-
278
- When `next` returns top-level `action: task context-refresh`, use only that atomic action for
279
- the returned Task/map revisions, actor, and grant. Do not run standalone `project-memory reconcile`
280
- first: Core rejects it because it would create a human-approval gap and strand the Task. A
281
- source-set change is eligible only when
282
- Core identifies it as a Plan-bounded supporting-source addition under the same Milestone
283
- Autonomy Grant. Never infer eligibility from the Plan yourself; if Core returns
284
- `contextRefreshBlocked.unsafeDifferences`, use the ordinary visible Knowledge Map flow.
285
-
286
- When `next` reports terminal `split-required`, follow `docs/split-required-recovery.md` from the
287
- installed package. P04-A returns `doctor` with blocked action `task replacement-materialize`,
288
- diagnostic `STRUCTURAL_REPLACEMENT_REQUIRED`, and
289
- `replacementGate.structuralReplacementAvailable=false`. Stop without invoking the retained
290
- command shape or consuming a replacement Discovery. Never rebind, refresh, replan, authorize,
291
- resume, cancel, or manually replace the historical Task. Continue only after a later P04-B/P05
292
- package explicitly advertises a topology-preserving replacement capability.
293
-
294
- When beta.12.6 `next` advertises `task stop-override-prepare`, the route is limited to the exact
295
- beta.11 attempt-four policy stop: two ordinary failures, one corrective failure, a matching
296
- attempt-3 `continue-fix`, and a matching attempt-4 `stop-escalate` under the unchanged Plan. Invoke
297
- prepare with the exact Task/Step/revision, explicit human actor, and user-supplied reason. It is
298
- read-only. Show the returned binding and `SOO-*` code, then stop. Only a later explicit user turn may
299
- invoke `task stop-override-apply` with the identical inputs and code. Never delegate the gate,
300
- override `split-required`, edit either journal, or reuse a code after Task revision, Plan, HEAD, or
301
- evidence changes. Successful apply preserves the original stop, appends
302
- `stop-escalate-overrides.jsonl`, and requires fresh sequential `status` then `next` before attempt
303
- four runs through the normal strict-review cycle.
304
-
305
- After an applied override, one or more ordinary delegated `task context-refresh` transitions may
306
- change only the Plan's canonical Knowledge Map binding. A package update may also advance HEAD, but
307
- only through the exact `update dependency-provenance-recover` route advertised by fresh `next`.
308
- Continue only when fresh `next` advertises `task run` with
309
- `stopOverrideContextRebind.state=validated` for the exact override and stop decision. Core verifies
310
- the complete source-to-current Plan/audit/rebind chain and, when HEAD changed, every intervening Git
311
- commit as registered dependency-only provenance. If C1 remains claimed but the lease was lost at
312
- the Human boundary, first use the simultaneously advertised `task writer-credential-replace`
313
- action for the exact claimant. A doctor route, semantic Plan drift, an unregistered or non-dependency
314
- commit, missing delegated authority, a broken chain, or damaged chronology is a hard stop.
315
- When advertised navigation records dependency provenance after the final context-refresh audit,
316
- Core may account for exactly one Task revision per ordered verified recovery. Never infer this
317
- compatibility from revision arithmetic alone: continue only when fresh `next` returns the validated
318
- `task run` route. An unrelated extra revision remains a hard stop.
319
-
320
- For the exact beta.12.6 active-downstream-proof update deadlock, do not apply the ordinary
321
- clean-boundary update recipe and do not stash/reset/commit product work. This exception is available
322
- only when a completed transitive predecessor and the active proof Step already own the complete dirty
323
- set, no writer lease/transaction/Core operation exists, and the active Milestone base can be updated
324
- in a separate worktree. Commit only exact `package.json`/`package-lock.json` dependency changes on
325
- that base, then commit only the same dependency files on the current Task branch while leaving all
326
- product bytes untouched. Install the exact beta.12.6 package and use only a fresh advertised
327
- `update downstream-proof-dependency-recover`. Run its read-only preflight first and require
328
- `eligible=true`, empty blockers, exact Task revision and non-null `activeDownstreamProof` binding.
329
- Require recorded Task history to validate at `HEAD^` and the exact dependency-only candidate to be
330
- `HEAD`; neither boundary may contain an unrelated or unregistered commit. The mutation registers
331
- only the dependency HEAD. Immediately run sequential `status` then `next`;
332
- continue only to the returned `task downstream-proof-recover` (including advertised writer-credential
333
- recovery when required). Any unrelated dirty path, unknown history, wider candidate commit, stale
334
- base, version mismatch, lease, transaction, or different route is a hard stop and never authorizes
335
- manual external-state edits.
336
-
337
- For the exact beta.12.6 post-recovery knowledge-rebind deadlock, an exact beta.12.7 external runner
338
- may execute only the read-only `update downstream-proof-replan-update-preflight` before dependency
339
- transport. Require `eligible=true`, source version beta.12.6 on declared/locked/installed/current/base
340
- surfaces, the exact Task revision/HEAD/dirty hash, no current audit for the rebound Plan, and no lease,
341
- transaction, or Core operation. Commit only `package.json` and `package-lock.json` on the active
342
- Milestone base, then only the same dependency files on the Task branch without touching product
343
- bytes. Install beta.12.7 and follow fresh `next` only through
344
- `update downstream-proof-replan-dependency-recover`, then
345
- `task downstream-proof-replan-recover`, and finally ordinary `task plan-set`. The recovery keeps the
346
- same Task, history, Knowledge binding, invalidated predecessor evidence, and dirty worktree. After
347
- the replacement Plan is audited and authorized, `task run` is valid only when fresh `next` reports
348
- `downstreamProofCarryover.state=validated` for one Step owning the complete hash-bound dirty set.
349
- Any wider dependency commit, dirty-byte change, current audit, extra Task revision, missing binding,
350
- or alternate route is a hard stop.
351
-
352
- When `next` returns `milestone initial-assembly`, execution is unavailable. Follow only the
353
- advertised `linked-task-assembly.commands` (`discovery start` and `discovery materialize`) until all
354
- intended linked Tasks exist. The closing `milestone plan-set` option appears only after at least one
355
- linked Task exists; use it once with the complete membership. After every boundary, run `status`,
356
- wait for its terminal success, and only then run `next`; never launch the checkpoint pair in
357
- parallel or in one parallel tool batch. If either fails, stop; do not
358
- describe the reverse-membership gap as expected and invoke a direct closing command.
359
-
360
- When `next` includes `milestoneCancellationOption`, treat it as an advertised alternative only
361
- when the user has explicitly requested cancellation or supersession of that exact Milestone.
362
- Use the returned Milestone ID and expected revision verbatim, require a substantive user-supplied
363
- reason, and preserve every historical Task and sidecar. Absence of this option means cancellation
364
- is not currently navigable; do not invoke `milestone cancel` directly.
365
-
366
- When `next` includes `gitMutationPolicy`, obtain bounded permission for that exact Git-writing
367
- transition before the first call. Do not probe and retry after a `.git/index.lock` failure.
368
- For `task start`, the policy applies only when choosing `--workspace-owner local`; for
369
- `task step-complete`, `task merge`, and `task sync-base`, the advertised transition itself
370
- writes Git metadata.
371
-
372
- Treat Docker access diagnostics before classifying an infrastructure failure. `EPERM`,
373
- `operation not permitted`, or `permission denied` while opening the Docker socket or invoking the
374
- Docker CLI from a sandbox means the proof is unavailable at the current execution boundary; it is
375
- not evidence that the daemon or image is broken. Re-run the exact read-only health probe or exact
376
- Plan check once with the required sandbox escalation. This escalation rerun does not consume a
377
- Workflow remediation attempt or a local infrastructure retry. Only an escalated probe that reaches
378
- Docker and reports an unavailable daemon may be classified as a Docker infrastructure failure.
379
- Never start, stop, or restart Docker Desktop, pull a substitute image, or mutate Docker state merely
380
- because the sandboxed call returned a permission error; those actions require their own explicit
381
- authorization and evidence.
382
-
383
- When `next` includes `writerTokenContract`, treat it as an exact first-call precondition. Retain
384
- the `writerCredentialReference` returned by `task run`, `task claim`, or
385
- `task writer-credential-replace`, including its public `credentialRef`, actor, allowed actions and
386
- `expiresAt`. Pass the reference using the advertised `--writer-credential-ref` option. The secret
387
- stays in the local vault: never read, print, copy, or edit vault records or substitute a redacted
388
- token. This input contract is independent from `gitMutationPolicy`; satisfy both when present.
389
-
390
- Before every credential-consuming mutation, especially after an independent review or a pause,
391
- compare the held reference's `expiresAt` with the current time and verify its actor/action binding.
392
- A live or renewed lease does not extend an existing reference's expiry; `reuse-reference` is not
393
- permission to reuse an expired reference. If the reference is expired, missing, consumed, or its
394
- validity cannot be established, use only the simultaneously advertised
395
- `next.writerCredentialRecovery` action with its exact Task, revision and `requiredActor` before
396
- attempting the blocked mutation. Follow successful replacement with `status` then `next`, retain
397
- the newly returned reference and expiry, and discard the prior reference. If recovery is not
398
- advertised, stop before mutation. Never extend expiry manually or retry with the old reference.
399
-
400
- Successful `task handoff-prepare` returns a one-time `claimCredentialReference`; use its
401
- `credentialRef` with the declared `--claim-credential-ref` option for `task claim` and the bound
402
- actor. Successful claim consumes that reference. A renewed claim/run may return
403
- `writerCredential.disposition=renewed` without a new reference; the held reference must still
404
- satisfy its own expiry and binding checks. Never search later payload fields for raw tokens and
405
- never copy credentials into evidence.
406
-
407
- When a passed final Task review routes to `task result-set`, pass the active writer credential and,
408
- for claimed C1 posture, the exact claimant as `--actor`. A successful `result-set` consumes that
409
- execution lease before entering `awaiting_final_acceptance`; never reuse the old reference and never
410
- leave or manufacture a lease while waiting for the Human decision. After `task accept`, follow fresh
411
- `next`: local merge or external merge confirmation normally advertises
412
- `task writer-credential-replace`, which acquires a new bounded lease for the exact recovery actor.
413
- If a Task created under beta.12.7 or earlier is already at the Human gate with a stale lease, use
414
- only the exact `locks repair` route returned by repository-level `next`, verify that Task revision,
415
- review, Result/Evidence hashes, and HEAD did not change, and stop before acceptance.
416
-
417
- Command discovery with `codex-workflow <noun> [action] --help` is read-only. Use it only when the
418
- exact invocation syntax is not already available from `next` and this protocol. Consume declared
419
- `requiredOptions` and `optionalOptions`; when `exactOptionContractAvailable=false`, consult the
420
- packaged protocol instead of guessing. Help never replaces a fresh `next` before mutation.
421
-
422
- When two or more Tasks are actionable, a dedicated Task chat may call `next --task <exact Task ID>`
423
- after the repository `status` checkpoint. The selector is read-only routing, not authorization: the
424
- response must name that same Task and all ordinary milestone, observation, adoption, Knowledge, and
425
- credential gates still apply. Omit `--task` for repository-level coordination. If Core reports that
426
- the selected Task is missing or not actionable, stop rather than falling back to another Task or
427
- invoking a direct mutation.
428
-
429
- ## Codex App Chat Boundary
430
-
431
- A Milestone chat and its Task chats are separate user-visible execution contexts, not forks of one
432
- conversation. Create every Task chat as a brand-new Codex task with `create_thread`, an explicit
433
- Task-only prompt, and an explicit title. Never use `fork_thread`, thread handoff, or a continuation
434
- of the Milestone chat to create a Task chat: those paths carry parent history into the child. A
435
- confirmed failure to create a new task is a routing blocker. A pending `clientThreadId`, timeout,
436
- lost response, or absence from `list_threads` does not establish failure and never permits a
437
- second creation. Persist the attempt before calling the App, resolve its actual ID and confirm
438
- it with `read_thread`; never fall back to a fork. Read and follow
439
- `../../references/chat-dispatch.md` for the executable dispatch/recovery and model-selection contract.
440
-
441
- Codex App may wrap the supplied prompt in a host-generated `codex_delegation` envelope containing
442
- only routing provenance such as `source_thread_id`. That envelope is permitted and is not parent
443
- conversation context. Verify that the envelope's `input` is exactly the TaskContextPacket and that
444
- the new thread contains no copied parent turns, transcript, or assistant output.
445
-
446
- Create or reuse the Task chat just before dispatching that exact Task; do not create forked or empty
447
- placeholder chats for the whole membership. Derive `T<NN>` from the approved Milestone membership
448
- order, never from creation order or sidebar order.
449
-
450
- Before creation, look up the exact Task in current Workflow state and construct one closed
451
- TaskContextPacket containing only:
452
-
453
- - repository root and exact repository-local workflow package requirement;
454
- - Milestone number and ID, Task membership ordinal, exact Task ID, revision, and current title;
455
- - the Task objective, requirements/acceptance identifiers, Brief hash, and current Plan hash when
456
- one exists;
457
- - the exact actor and grant ID only when the current routing requires them (never a confirmation
458
- code, handoff credential, writer token, or other bearer value);
459
- - the mandatory start sequence `AGENTS.md -> project-local gateway -> handshake -> status -> next
460
- --task <exact Task ID>`, with a requirement to stop if the response names another Task;
461
- - Task-local scope, checks, stop conditions, and the instruction to obtain all mutable facts from
462
- fresh Workflow state rather than from the parent chat.
463
- - an autonomous completion contract: continue through planning, execution, required external
464
- reviews, fix/review recovery, submission, final acceptance, and merge whenever fresh Workflow
465
- navigation authorizes those transitions; stop only at a mandatory human/semantic gate, an
466
- integrity or infrastructure blocker, or the terminal Task result.
467
- - a closed, non-secret CoordinatorReport requirement at a blocker or terminal boundary containing
468
- the exact Task ID, observed Task revision/status, outcome (`attention` or `terminal`), reported
469
- next action, whether a user decision is required, blocker class, commits/checks/review evidence,
470
- and no confirmation code, handoff credential, writer token, or other bearer value.
471
-
472
- Do not include or summarize the Milestone-chat transcript, recovery/approval narrative, sibling
473
- Task details, other Task Plans, unrelated repository analysis, reasoning traces, or historical
474
- credentials. The new Task chat may read repository files and its own Workflow Task/Brief/Plan; it
475
- must not rely on the parent conversation as evidence or authority.
476
-
477
- Every automatically created Coordinator, Task, Step Review, Final Review, Corrective Audit, and
478
- Plan Audit chat must use the project registry/title builder at
479
- `../../scripts/chat-registry.mjs`. Before `create_thread`, call `allocate` with exact `projectId`,
480
- chat type, Milestone/Task/Step membership ordinals, semantic title, authoritative entity ID, and
481
- review attempt. Use returned `requestedTitle` verbatim. Never derive its prefix from
482
- `list_threads`, sidebar order, a count, or `count + 1`: allocation atomically reserves the
483
- project-wide monotonically increasing `#NNN`, and an abandoned number is never reused.
484
- Allocation reuses an existing matching reservation. For a new dispatch, call `dispatch-begin`
485
- with the closed packet and explicit model request, then call the App exactly once only when
486
- `createAllowed=true`, using returned `createArgs` unchanged. Record the full result via
487
- `dispatch-result`, resolve/read back via `dispatch-discover` and `dispatch-observe`, and bind.
488
- After restart use `dispatch-status`; an unresolved creation cannot be abandoned to create another.
489
- For legacy reservations without a dispatch marker, first reconcile existing App/source evidence;
490
- absence of the new marker does not prove no earlier creation occurred.
491
-
492
- When the user authorizes model selection, use the versioned role/phase/complexity matrix rather
493
- than coordinator inheritance. Both `model` and App `thinking` must be explicit in create arguments.
494
- Use the destination host's current supported model/effort catalog; no guessed aliases or silent
495
- fallback. Before a materially different phase, `model-select` returns explicit follow-up settings
496
- for the same bound thread. Routine lifecycle work should not retain planning/review reasoning by
497
- accident; security-sensitive and complex work must not be classified as routine to save tokens.
498
- Without user authorization for model selection, do not manufacture it from a registry field;
499
- resolve that policy choice before starting a new dispatch.
500
-
501
- The builder owns these compact title families; callers must not hand-compose variants:
502
-
503
- ```text
504
- #NNN · M<NN> · Coord · <Milestone title> · <MS-ID>
505
- #NNN · M<NN>/T<NN> · Task · <Task title> · <TASK-ID>
506
- #NNN · M<NN>/T<NN>/S<NN> · Step Review A<N> · <Step title> · <TASK-ID>
507
- #NNN · M<NN>/T<NN> · Final Review A<N> · <Task title> · <TASK-ID>
508
- #NNN · M<NN>/T<NN>/S<NN> · Corrective A<N> · <Step title> · <TASK-ID>
509
- #NNN · M<NN>/T<NN> · Plan Audit A<N> · <Task title> · <TASK-ID>
510
- ```
511
-
512
- When the Milestone ID is known, allocate and bind the coordinator chat before dispatch. During
513
- `AUTO` Discovery reserve the Coordinator number once; after materialization retain that sequence
514
- with registry `retitle`, then complete exact readback with the new Milestone ID instead of
515
- allocating a second Coordinator number.
516
-
517
- Put `#NNN` and membership ordinals first so clipped sidebar titles remain distinguishable. Never
518
- inherit the parent title, use a generic title such as `Milestone recovery` / `Task execution`, or
519
- reuse one title for different entity IDs. Maintain the registry-backed
520
- `Task ID -> thread ID -> title` mapping in
521
- the Milestone chat. Before supervision, verify from actual `read_thread` evidence that the title contains the exact
522
- ordinal and entity ID, is unique, and the new chat input contains only its TaskContextPacket plus
523
- the permitted host routing envelope. Never trust the `create_thread` title argument without a
524
- readback: pass the observed title to registry `readback`. If it returns `renameRequired=true`,
525
- rename to exact `renameTitle` and repeat. Deterministic fallbacks remove the semantic segment and
526
- compact the role while preserving `#NNN`, membership ordinals, attempt, and the full entity ID.
527
- Never invent another fallback or abbreviate the ID. Bind the verified entry to `threadId` and
528
- `hostId`; if all candidates fail, mark it blocked and stop routing. Visual sidebar clipping is
529
- harmless only when exact API readback still matches. Do not dispatch while title/context is wrong.
530
- Persist the single supervisor, cursor and next action using `supervision-record`. Large tool/CLI
531
- JSON must be saved completely to a private local file and parsed there, with only bounded non-secret
532
- summaries printed. For an uncertain mutation outcome, run fresh `status -> next` before recovery;
533
- never replay a mutation merely because displayed output was truncated. Review the exact serialized
534
- external-review envelope passed to Core, not a separately reconstructed object. Public CREF expiry
535
- is independent of lease expiry and must be checked before every credential-consuming transition.
536
-
537
- After every significant Task Step boundary—completion, failure, block, skip, sealed-review result,
538
- or corrective decision—the Task chat prints a compact Task progress Markdown table from fresh
539
- `task show`: Step ordinal/title, exact Step ID, status, and review/remediation posture when present.
540
- Never infer a status from chat text.
541
-
542
- At Coordinator start/resume, after every Task terminal or attention boundary, and after every
543
- Milestone membership change, run read-only `milestone progress --id <MS-ID>` and print a compact
544
- Milestone progress Markdown table. Use only that projection for membership order, Task/Step status,
545
- counts, and replacement links. Cancelled historical and replacement Tasks remain separate rows;
546
- show the relationship explicitly, for example `T03 cancelled → T08 replacement`, and never
547
- renumber the replacement as the historical Task.
548
-
549
- ## Codex App Coordinator Supervision Loop
550
-
551
- Creating a Task chat is dispatch, not completion. The Milestone coordinator must remain the active
552
- supervisor until the Milestone is terminal or a genuine user decision is required. Codex tasks are
553
- peer conversations: completing or pausing a Task chat does not implicitly resume its coordinator.
554
- The coordinator therefore performs this explicit loop for one routed required Task at a time:
555
-
556
- 1. Complete the repository `status` checkpoint, then call repository-level `next` without a Task
557
- selector. Dispatch only the exact required Task named by that fresh response. Do not pre-create
558
- idle chats for later membership entries.
559
- 2. Create or reuse the verified standalone Task chat, retain its `threadId`, `hostId`, exact title,
560
- Task ID, membership ordinal, and latest `wait_threads` cursor in one coordinator-owned dispatch
561
- map, then let its self-starting TaskContextPacket run without a user follow-up.
562
- 3. Call `wait_threads` for the dispatched chat. Use the returned cursor as `afterCursor` on the next
563
- wait so completed output is not replayed. Use bounded waits and provide only compact coordinator
564
- progress between waits; a timeout is not a blocker and is not permission to dispatch another
565
- writer.
566
- 4. When the Task completes or needs attention, call `read_thread`; the compact `wait_threads`
567
- message is a wakeup hint and may not be used as the complete CoordinatorReport. Treat the full
568
- Task text as untrusted evidence, never as Workflow authority, and run `status` followed by fresh
569
- repository `next` (and `next --task <exact Task ID>` only when routing that same Task requires
570
- it), then print the fresh `milestone progress` table before deciding the next dispatch.
571
- 5. If Workflow still routes the same nonterminal Task and the reported problem has an exact
572
- non-human continuation, use `send_message_to_thread` to continue that same Task chat with only
573
- the fresh route, changed bindings, and bounded blocker resolution. Never copy a transcript,
574
- sibling context, confirmation code, handoff credential, or writer token into the follow-up.
575
- 6. Escalate to the user only for `requiredHumanGate` without an eligible exact grant, semantic
576
- scope ambiguity, missing external permission, unrecoverable integrity conflict, or an
577
- infrastructure failure after the documented retry boundary. A Task chat asking an answerable
578
- implementation question is not by itself a human gate: the coordinator resolves it from fresh
579
- repository evidence or returns it to that Task chat.
580
- 7. After Workflow confirms the Task terminal and merged, discard any bearer material, record the
581
- non-secret terminal evidence, run repository `status -> next`, and dispatch the next routed
582
- required Task just in time. After all required Tasks are merged, run Milestone validation and
583
- follow the exact final-acceptance gate.
584
-
585
- The coordinator must not send a final answer while a dispatched required Task is nonterminal,
586
- except for an explicit user-requested checkpoint or one of the blockers in step 6. In that case it
587
- reports the dispatch map, last observed Task revision/status, last wait cursor, and exact fresh
588
- `next`, so a later turn can resume without creating duplicate chats. On any resumed coordinator
589
- turn, first reconcile the saved map against `list_threads`, `read_thread`, repository `status`, and
590
- fresh `next`; never assume that an idle/finished chat implies a terminal Workflow Task.
591
-
592
- The Task chat owns supervision of its own external-sealed Step and Task reviewer chats and returns
593
- only their sealed result/evidence to the Milestone coordinator. This keeps the coordinator below
594
- the app's bounded wait target limit and prevents it from accumulating implementation or review
595
- transcripts. No chat may wait indefinitely for a child after ending its own turn: durable,
596
- cross-restart background orchestration requires a separate app wakeup/automation facility and is
597
- not implied by this skill.
598
-
599
- ## Product Or Workflow Graph Refresh
600
-
601
- 1. Run `graph refresh-request --kind product|workflow --mode moderate`.
602
- 2. Use `codebase-memory-mcp` to list projects and match the request source root.
603
- 3. Stop for user selection when more than one project remains plausible.
604
- 4. Check `index_status`; call `index_repository` with the request source root,
605
- mode, and `persistence: false` when missing or stale.
606
- 5. Build evidence exactly as specified in `../../references/protocol.md`.
607
- 6. Pipe `{ "request": ..., "evidence": ... }` to `graph bind --stdin`, passing
608
- the current binding revision when one exists.
609
-
610
- When MCP is unavailable, run `graph fallback --kind ... --reason ...`. Continue
611
- with Git, direct file reads, and configured tests unless another requirement
612
- independently blocks the workflow.
613
-
614
- ## Role Use
615
-
616
- - Scope Lead: architecture and broad search only.
617
- - Technical Planner: architecture, search, and trace evidence.
618
- - Worker: targeted search, trace, and snippets for its Step. It leaves all file changes
619
- uncommitted and never stages or mutates Git history; the coordinator invokes the exact
620
- `task step-complete` returned by `next`, and core owns checks, commit creation, and evidence.
621
- - Delivery Coordinator: list, status, index, detect, and bind lifecycle.
622
- - A Milestone Delivery Coordinator creates a dedicated user-visible Task chat for every
623
- required Task, using the Codex App Chat Boundary above, and keeps implementation out of the
624
- Milestone chat.
625
- - Independent Reviewer: receives recorded evidence and confirms critical
626
- claims against files, Git, and tests.
627
-
628
- ## Human Gates
629
-
630
- Treat `requiredHumanGate` from the project-local package as a mandatory turn boundary unless
631
- the same `next` response contains a currently eligible `delegatedApprovalOptions` entry for
632
- the exact transition and the agent is the entry's named delegate.
633
- For `milestone_final_acceptance`, show the user the Milestone ID, revision, Plan hash,
634
- Result hash, evidence hash, validated HEAD, and confirmation code. Ask whether the user
635
- accepts that exact result, then stop without invoking `milestone accept`.
636
-
637
- Only after a later user message explicitly approves and repeats the same confirmation code
638
- may you invoke `milestone accept` with explicit `--actor` and `--confirmation-code` values.
639
- A generic instruction such as “continue”, “finish”, or “bring it to final status” is not
640
- final acceptance. If `next` returns a different code or binding, discard the old response
641
- and ask again.
642
-
643
- ## Delegated Approval
644
-
645
- Delegation issuance is itself a mandatory human turn boundary. Run `delegation prepare` with
646
- the proposed policy, show the complete principal, delegate, scope, transitions, expiry,
647
- policy hash, and `DGA-*` confirmation code, then stop. Only after a later user message
648
- explicitly approves that exact code may `delegation grant` be invoked.
649
-
650
- Never create, broaden, renew, or replace a grant from an agent's own judgment. Never record
651
- the delegate as the user. When `next` exposes an eligible option, pass its grant ID through
652
- `--delegation-grant` and use the exact delegate string as `--actor`. The core remains the
653
- authority for status, expiry, scope, transition, and revocation checks.
654
- If the same `next` response does not expose an eligible option for that exact transition, do
655
- not pass `--delegation-grant`. Ordinary C1 handoff, claim, run, step-complete, step-review,
656
- merge, and sync-base do not inherit a Milestone approval grant.
657
-
658
- For delegated Milestone final acceptance, the current `MSA-*` code is still required, but a
659
- new user turn is not: the previously issued grant is the controlling decision. If no eligible
660
- option is returned, follow the ordinary human-gate rule above. Knowledge Map approval is
661
- delegable only through an explicit project-scoped `project_memory.approve` permission. Scope
662
- changes, grant issuance, and grant expansion are never delegated by `delegated-approval-v1`.
663
-
664
- For an entire Milestone, prefer one bounded `milestone autonomy-prepare` gate after the complete
665
- initial membership Plan exists. An explicitly human-requested full contract may also be prepared
666
- for an `active` Milestone, including after a previous contract expired or was revoked. This is
667
- new issuance, never automatic renewal. Fresh Task-first or repository `next` may expose
668
- `activeMilestoneAutonomyOptions`; these are optional preparation routes and do not replace the
669
- current Task action. Preparation still requires coherent state and active Project Knowledge.
670
- A generic grant does not become a full contract and is not automatically revoked. A still-valid
671
- full contract must first be explicitly revoked by its principal before a different one is issued.
672
- The new confirmation binds the current Milestone status, revision, Plan, semantic scope, policy,
673
- and previous contract/grant state; any change requires preparation and confirmation again.
674
- An exact successful retry returns the same grant; an old code cannot revive a revoked grant. Show principal, delegate, expiry, semantic-scope hash, policy
675
- hash, and `MAC-*` code, then stop. A later exact approval permits `milestone autonomy-grant`.
676
- Use the delegated path only when the same `next` response exposes
677
- `milestoneAuthorizationOptions[].action = "milestone autonomy-prepare"` or an
678
- `activeMilestoneAutonomyOptions` entry for that exact Milestone, and the user explicitly
679
- requested delegated Milestone operation; otherwise follow the ordinary `milestone authorize`
680
- human gate.
681
- The resulting grant covers the existing Task/Milestone approval transitions and the Project
682
- Memory approval portion of an atomic Task context refresh for the same Milestone. Besides
683
- content-only drift, Core may accept exact supporting-source additions predeclared by the current
684
- execution-authorized Task Plan; unsafe differences remain blocked. The contract never permits
685
- standalone Project Memory approval. It also permits `milestone autonomy-evolve`
686
- only for membership changes; any change to outcome, success signal, acceptance, checks,
687
- discovery, or base branch requires the ordinary human scope-change gate. Never self-renew or
688
- replace the contract.
689
-
690
- When fresh `next` advertises `task corrective-decision` with
691
- `planningRecovery.authority = "planning-only"`, a started failed Step has a current
692
- blocking audit after a Knowledge-only Plan rebind. Core proves the historical approved
693
- safety baseline; the stopped audit does not authorize execution. Obtain the independent
694
- corrective decision against the returned bindings and preserve the exact original Worker
695
- credential/yield prerequisites. Follow the existing human-confirmed corrective-replan
696
- route, then fresh replacement Plan authorization. Never approve the obstructed Plan merely
697
- to unlock navigation, use ordinary `plan-set` to bypass the corrective gate, or create an
698
- upstream remediation Task for this already-started posture. `continue-fix` is unavailable
699
- for this planning-only route. A package update can require another Knowledge rebind and
700
- fresh blocking audit; do not rewrite or silently reuse a stale audit.
701
-
702
- Repeated failed Task reviews remain on the same Task and do not require a separate corrective
703
- Plan audit based only on count. Follow fresh `next`: ordinary findings default to `route=fix`;
704
- `route=replan` is valid only with the exact Plan clause, obstruction, and minimal Plan change
705
- retained by Core. A remediation Plan may change implementation Steps but must preserve the Task
706
- objective, requirements, and acceptance. Explicit split or stop decisions still stop ordinary
707
- continuation; only an exact Core-advertised audited-remediation route may turn a pre-execution
708
- `stop-escalate` into additive upstream work.
709
-
710
- When `next.strictStepReview.recommendedMode` is `external-sealed`, do not launch the nested local
711
- reviewer from inside a Codex App sandbox. Run the advertised read-only `task step-review-packet`,
712
- create a separate user-visible reviewer chat for that exact packet, and require one closed
713
- `ReviewInput` JSON result bound to its reviewed commit. The reviewer must not modify repository or
714
- Workflow state. The `--file` passed to `task step-review-record` must be the full
715
- `ExternalStrictStepReviewInput` envelope: top-level `protocol`, `packetHash`,
716
- `repositorySealHash`, `reviewerThreadId`, and `reviewMode` (`ordinary` or `security`), plus the
717
- nested `review` object containing `status`, `reviewer`, `summary`, and `findings`. Copy both hashes
718
- and the mode from the packet; do not flatten `review`, and do not pass `--review-mode` to the record
719
- command because it reads the mode from the JSON file. Run `task step-review-record --help` for a
720
- complete minimal example. Then run only the advertised `task step-review-record` with the unchanged packet
721
- and repository-seal hashes, the separate reviewer thread ID, the lifecycle actor from `next`, and
722
- the active writer token when required. Never author the independent review in the Worker or
723
- Delivery Coordinator chat, never alter the packet, and never treat an unverified local reviewer
724
- launch as a semantic remediation failure. If Core reports the seal changed, discard the review and
725
- stop; do not regenerate evidence against a moving checkout.
726
-
727
- When `next.strictTaskReview.recommendedMode` is `external-sealed`, apply the same isolation rule to
728
- the final submitted-Task review. Run the advertised read-only `task review-packet`, send the exact
729
- packet to a separate user-visible Independent Reviewer chat, and accept only a closed `ReviewInput`
730
- bound to the unchanged packet and repository-seal hashes. Record it only through the advertised
731
- `task review-sealed-record`. Its `--file` must be the analogous full
732
- `ExternalStrictTaskReviewInput` envelope using protocol
733
- `codex-workflow-external-strict-task-review-v1`, the packet and repository-seal hashes,
734
- `reviewerThreadId`, top-level `reviewMode`, and nested `review`; its `--help` contains a minimal
735
- example. Use the lifecycle actor from `next` and the active writer token when
736
- required. Do not call `task review-launch` from inside a Codex App sandbox, do not use the Worker or
737
- Delivery Coordinator as reviewer, and discard the result if a fresh packet changes either hash.
738
-
739
- When `next` returns a derived C1 Worker or corrective Auditor actor, use that exact actor without
740
- asking the user to name one. Derivation removes a routing pause; handoff claim, writer lease,
741
- strict review, and auditor-independence checks remain mandatory.
742
-
743
- The beta.13.2 pending strict-review update exception is documented in
744
- `docs/pending-review-update.md` in the exact package. An exact external target runner may run
745
- only `update pending-review-source-preflight` against the known beta.13.1 source. Require its
746
- verified runtime build, exact Task/revision/Plan/HEAD/pending binding and no blockers. If it
747
- returns an exact stale Task lease repair, run that `locks repair` with the installed source and
748
- repeat preflight. Preserve the eligible receipt outside the checkout; transport only the two
749
- bound dependency commits on base and Task, then install the target locally. Fresh local `next`
750
- must advertise `update pending-review-dependency-recover`; run its matching read-only preflight
751
- with `--file <source-receipt>` before recovery. Recovery does not approve Knowledge or review.
752
- Use the original pending product SHA through the newly sealed external packet and record,
753
- then follow fresh credential/context-refresh/ordinary lifecycle actions. Never treat this as
754
- permission for other external-runner mutations, product transport, or manual state repair.
755
-
756
- Before an npm package update, run the project-local `update preflight` and stop unless it
757
- returns `safe=true` with a clean checkout, no running Step, and no active writer lease.
758
-
759
- ## Stop Conditions
760
-
761
- - Dependency version is missing, ranged, or differs from the installed package.
762
- - Gateway handshake is incompatible.
763
- - MCP project identity is ambiguous.
764
- - A request changes before evidence is bound.
765
- - An action would make MCP or the local map authoritative project memory.
766
- - A requested mutation is not authorized by the package CLI state.
767
- - A lifecycle `status` or `next` failed; do not continue with a different lifecycle mutation.
768
- - A human gate was emitted but the user has not approved its exact confirmation code in a
769
- later message and no exact eligible delegated approval option exists.
770
-
771
- ## Explain an implementation change before escalating
772
-
773
- Before a product write by a tracked Worker, run the packaged registry `dispatch-context-check`
774
- using fresh App readback, the actual write root and the branch from the current Task. Resolve
775
- checkout mismatch without duplicate dispatch or silent canonical-checkout writes. A matching
776
- context is not a filesystem permission or writer credential.
777
-
778
- When a fix needs additional files, the route is unclear, or an external operation was denied,
779
- use read-only `change explain --task <exact Task ID> --file <closed proposal JSON>` as documented
780
- in `docs/change-model.md`. Present all known blocking layers together. Never relabel an external
781
- permission refusal as a missing grant. `requiresUser: null` is unknown, not blanket approval.
782
- For an exact Core-derived check-support amendment, follow the existing advertised recovery and
783
- fresh next; do not manually widen allowedWrites or issue new authority. Membership, semantic
784
- scope and Knowledge refresh retain their separate existing routes and evidence requirements.
89
+ Maintain the Task-to-chat mapping and supervision cursor. A completed chat is evidence, not a
90
+ terminal Workflow Task: reconcile fresh Core state, continue the same chat when permitted, and
91
+ supervise until the assigned work is terminal or an explicit gate/blocker requires attention.
92
+ Use fresh `task show` / `milestone progress` for progress, preserving membership identities.
93
+ Scheduled continuation requires an authorized App automation; ending a turn does not create one.