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

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 (297) hide show
  1. package/README.md +27 -388
  2. package/dist/reviewer-runtime-build.json +98 -34
  3. package/dist/src/alpha6/adoption.d.ts +3 -1
  4. package/dist/src/alpha6/adoption.js +48 -8
  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 +53 -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 +8 -21
  30. package/dist/src/alpha6/remediation.js +225 -474
  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/alpha7/autonomy.d.ts +9 -0
  36. package/dist/src/alpha7/autonomy.js +40 -1
  37. package/dist/src/alpha7/autonomy.js.map +1 -1
  38. package/dist/src/beta1/project-transaction.d.ts +3 -1
  39. package/dist/src/beta1/project-transaction.js +20 -6
  40. package/dist/src/beta1/project-transaction.js.map +1 -1
  41. package/dist/src/checks/runner.d.ts +26 -0
  42. package/dist/src/checks/runner.js +223 -0
  43. package/dist/src/checks/runner.js.map +1 -0
  44. package/dist/src/checks/task-sync.d.ts +10 -0
  45. package/dist/src/checks/task-sync.js +41 -0
  46. package/dist/src/checks/task-sync.js.map +1 -0
  47. package/dist/src/checks/worker.d.ts +1 -0
  48. package/dist/src/checks/worker.js +154 -0
  49. package/dist/src/checks/worker.js.map +1 -0
  50. package/dist/src/cli-actions.d.ts +3 -3
  51. package/dist/src/cli-actions.js +8 -15
  52. package/dist/src/cli-actions.js.map +1 -1
  53. package/dist/src/cli.js +43 -97
  54. package/dist/src/cli.js.map +1 -1
  55. package/dist/src/contracts.d.ts +54 -34
  56. package/dist/src/delegation.d.ts +5 -1
  57. package/dist/src/delegation.js +4 -0
  58. package/dist/src/delegation.js.map +1 -1
  59. package/dist/src/dependency-provenance.d.ts +2 -2
  60. package/dist/src/dependency-provenance.js +12 -69
  61. package/dist/src/dependency-provenance.js.map +1 -1
  62. package/dist/src/domain/base-sync-conflict.d.ts +13 -0
  63. package/dist/src/domain/base-sync-conflict.js +32 -0
  64. package/dist/src/domain/base-sync-conflict.js.map +1 -0
  65. package/dist/src/domain/step-start-admission.d.ts +4 -0
  66. package/dist/src/domain/step-start-admission.js +9 -0
  67. package/dist/src/domain/step-start-admission.js.map +1 -0
  68. package/dist/src/domain/virgin-registration.d.ts +3 -0
  69. package/dist/src/domain/virgin-registration.js +65 -0
  70. package/dist/src/domain/virgin-registration.js.map +1 -0
  71. package/dist/src/errors.d.ts +1 -1
  72. package/dist/src/errors.js.map +1 -1
  73. package/dist/src/failed-checkpoint-update.d.ts +69 -0
  74. package/dist/src/failed-checkpoint-update.js +171 -0
  75. package/dist/src/failed-checkpoint-update.js.map +1 -0
  76. package/dist/src/gateway-handshake.js +0 -8
  77. package/dist/src/gateway-handshake.js.map +1 -1
  78. package/dist/src/git.d.ts +3 -1
  79. package/dist/src/git.js +41 -14
  80. package/dist/src/git.js.map +1 -1
  81. package/dist/src/graph.js +25 -3
  82. package/dist/src/graph.js.map +1 -1
  83. package/dist/src/index.d.ts +1 -0
  84. package/dist/src/lifecycle/corrective-replan-credential-core.d.ts +2 -0
  85. package/dist/src/lifecycle/corrective-replan-credential-core.js +45 -9
  86. package/dist/src/lifecycle/corrective-replan-credential-core.js.map +1 -1
  87. package/dist/src/lifecycle/corrective-replan.js +12 -8
  88. package/dist/src/lifecycle/corrective-replan.js.map +1 -1
  89. package/dist/src/lifecycle/semantic-registry.js +4 -2
  90. package/dist/src/lifecycle/semantic-registry.js.map +1 -1
  91. package/dist/src/navigation-actions.d.ts +9 -0
  92. package/dist/src/navigation-actions.js +72 -0
  93. package/dist/src/navigation-actions.js.map +1 -0
  94. package/dist/src/navigation-update-artifact.d.ts +5 -0
  95. package/dist/src/navigation-update-artifact.js +227 -0
  96. package/dist/src/navigation-update-artifact.js.map +1 -0
  97. package/dist/src/navigation-update.d.ts +39 -0
  98. package/dist/src/navigation-update.js +82 -0
  99. package/dist/src/navigation-update.js.map +1 -0
  100. package/dist/src/observation.js +52 -29
  101. package/dist/src/observation.js.map +1 -1
  102. package/dist/src/observed-routes.js +10 -6
  103. package/dist/src/observed-routes.js.map +1 -1
  104. package/dist/src/pending-review-update.d.ts +0 -13
  105. package/dist/src/pending-review-update.js +1 -6
  106. package/dist/src/pending-review-update.js.map +1 -1
  107. package/dist/src/reviewer.d.ts +1 -1
  108. package/dist/src/reviewer.js +20 -17
  109. package/dist/src/reviewer.js.map +1 -1
  110. package/dist/src/runtime.d.ts +3 -0
  111. package/dist/src/runtime.js +6 -0
  112. package/dist/src/runtime.js.map +1 -0
  113. package/dist/src/state/corrective-replan-executor.d.ts +10 -0
  114. package/dist/src/state/corrective-replan-executor.js +38 -1
  115. package/dist/src/state/corrective-replan-executor.js.map +1 -1
  116. package/dist/src/state/corrective-replan-public-schema.js +15 -2
  117. package/dist/src/state/corrective-replan-public-schema.js.map +1 -1
  118. package/dist/src/state/corrective-replan-public.d.ts +9 -1
  119. package/dist/src/state/corrective-replan-public.js +50 -8
  120. package/dist/src/state/corrective-replan-public.js.map +1 -1
  121. package/dist/src/state/corrective-replan-transaction.d.ts +1 -0
  122. package/dist/src/state/corrective-replan-transaction.js +12 -11
  123. package/dist/src/state/corrective-replan-transaction.js.map +1 -1
  124. package/dist/src/state/corrective-yield-transaction.d.ts +1 -0
  125. package/dist/src/state/corrective-yield-transaction.js +11 -10
  126. package/dist/src/state/corrective-yield-transaction.js.map +1 -1
  127. package/dist/src/state/lock.d.ts +4 -0
  128. package/dist/src/state/lock.js +21 -0
  129. package/dist/src/state/lock.js.map +1 -1
  130. package/dist/src/version.d.ts +1 -1
  131. package/dist/src/version.js +1 -1
  132. package/dist/src/workflow-blocker-route.d.ts +8 -0
  133. package/dist/src/workflow-blocker-route.js +106 -0
  134. package/dist/src/workflow-blocker-route.js.map +1 -0
  135. package/dist/src/workflow.d.ts +88 -64
  136. package/dist/src/workflow.js +832 -1456
  137. package/dist/src/workflow.js.map +1 -1
  138. package/docs/autonomy-guardrails.md +26 -304
  139. package/docs/decisions.md +14 -112
  140. package/docs/development-flow.md +36 -237
  141. package/docs/project-memory.md +31 -50
  142. package/docs/release-app-evidence.md +190 -0
  143. package/docs/release.md +101 -388
  144. package/docs/updating-existing-project.md +65 -726
  145. package/package.json +11 -13
  146. package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +2 -2
  147. package/plugins/codex-workflow-gateway/references/chat-dispatch.md +88 -200
  148. package/plugins/codex-workflow-gateway/references/codebase-memory-routing.md +57 -0
  149. package/plugins/codex-workflow-gateway/references/protocol.md +51 -458
  150. package/plugins/codex-workflow-gateway/scripts/chat-dispatch.mjs +20 -4
  151. package/plugins/codex-workflow-gateway/scripts/chat-model-policy.mjs +21 -34
  152. package/plugins/codex-workflow-gateway/scripts/chat-registry.mjs +23 -5
  153. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +92 -778
  154. package/references/state-machine.md +7 -5
  155. package/roles/delivery-coordinator.md +31 -11
  156. package/roles/scope-lead.md +1 -1
  157. package/roles/technical-planner.md +5 -2
  158. package/schemas/adoption-posture-event.schema.json +11 -0
  159. package/schemas/authorization-event.schema.json +1 -1
  160. package/schemas/corrective-decision-event.schema.json +26 -4
  161. package/schemas/corrective-replan-credentials.private.schema.json +8 -5
  162. package/schemas/corrective-replan-execution-event.private.schema.json +9 -0
  163. package/schemas/corrective-replan-public.schema.json +2 -1
  164. package/schemas/delegation-grant.schema.json +1 -1
  165. package/schemas/project-knowledge-map.schema.json +3 -1
  166. package/schemas/remediation-event.schema.json +10 -1
  167. package/schemas/task.schema.json +64 -2
  168. package/schemas/transition-definition.schema.json +4 -0
  169. package/schemas/transition-payloads.schema.json +16 -1
  170. package/src/alpha6/adoption.ts +1146 -0
  171. package/src/alpha6/captured-check-evidence.ts +132 -0
  172. package/src/alpha6/check-support-anchor.ts +128 -0
  173. package/src/alpha6/component-owner.ts +168 -0
  174. package/src/alpha6/corrective-decision-boundary.ts +45 -0
  175. package/src/alpha6/downstream-proof.ts +520 -0
  176. package/src/alpha6/failed-step-planning-recovery.ts +88 -0
  177. package/src/alpha6/handoff.ts +1443 -0
  178. package/src/alpha6/journal.ts +473 -0
  179. package/src/alpha6/literal-test-invocation.ts +84 -0
  180. package/src/alpha6/mechanical-feasibility.ts +488 -0
  181. package/src/alpha6/milestone.ts +2192 -0
  182. package/src/alpha6/navigation-dirty-carryover.ts +154 -0
  183. package/src/alpha6/npm-check-contract.ts +47 -0
  184. package/src/alpha6/plan-integrity.ts +298 -0
  185. package/src/alpha6/plan-risk.ts +1480 -0
  186. package/src/alpha6/preexecution-replan.ts +187 -0
  187. package/src/alpha6/remediation-cause.ts +98 -0
  188. package/src/alpha6/remediation.ts +2505 -0
  189. package/src/alpha6/review.ts +1198 -0
  190. package/src/alpha6/root-cause-replan-carryover.ts +491 -0
  191. package/src/alpha6/store-sidecars.ts +335 -0
  192. package/src/alpha7/autonomy.ts +449 -0
  193. package/src/alpha7/corrective-recovery.ts +1332 -0
  194. package/src/artifacts.ts +130 -0
  195. package/src/beta1/project-transaction.ts +364 -0
  196. package/src/change-explanation.ts +153 -0
  197. package/src/checks/runner.ts +245 -0
  198. package/src/checks/task-sync.ts +41 -0
  199. package/src/checks/worker.ts +149 -0
  200. package/src/cli-actions.ts +112 -0
  201. package/src/cli.ts +1490 -0
  202. package/src/contracts.ts +1512 -0
  203. package/src/credential-output.ts +89 -0
  204. package/src/credential-transport.ts +215 -0
  205. package/src/delegation.ts +194 -0
  206. package/src/dependency-provenance.ts +472 -0
  207. package/src/diagnostics.ts +93 -0
  208. package/src/domain/base-sync-conflict.ts +35 -0
  209. package/src/domain/completed-step-carryover.ts +76 -0
  210. package/src/domain/discovery.ts +27 -0
  211. package/src/domain/plan-semantics.ts +58 -0
  212. package/src/domain/step-start-admission.ts +10 -0
  213. package/src/domain/validation.ts +177 -0
  214. package/src/domain/virgin-registration.ts +46 -0
  215. package/src/errors.ts +24 -0
  216. package/src/failed-checkpoint-update.ts +203 -0
  217. package/src/fs-utils.ts +61 -0
  218. package/src/gateway-handshake.ts +95 -0
  219. package/src/git.ts +183 -0
  220. package/src/graph.ts +342 -0
  221. package/src/historical-step-provenance.ts +136 -0
  222. package/src/index.ts +23 -0
  223. package/src/lifecycle/canonical-hash.ts +28 -0
  224. package/src/lifecycle/catalog.ts +202 -0
  225. package/src/lifecycle/compiler-inspection.ts +29 -0
  226. package/src/lifecycle/core-static-readiness.ts +132 -0
  227. package/src/lifecycle/corrective-replan-authority.ts +136 -0
  228. package/src/lifecycle/corrective-replan-binding-manifest.ts +51 -0
  229. package/src/lifecycle/corrective-replan-credential-core.ts +437 -0
  230. package/src/lifecycle/corrective-replan-credential-schema.ts +54 -0
  231. package/src/lifecycle/corrective-replan-credentials.ts +48 -0
  232. package/src/lifecycle/corrective-replan.ts +847 -0
  233. package/src/lifecycle/evaluator.ts +48 -0
  234. package/src/lifecycle/fingerprint.ts +488 -0
  235. package/src/lifecycle/immutable.ts +8 -0
  236. package/src/lifecycle/implementation-table.ts +118 -0
  237. package/src/lifecycle/index.ts +8 -0
  238. package/src/lifecycle/schema-artifact.ts +263 -0
  239. package/src/lifecycle/semantic-registry.ts +574 -0
  240. package/src/lifecycle/types.ts +838 -0
  241. package/src/memory.ts +273 -0
  242. package/src/migration.ts +161 -0
  243. package/src/navigation-actions.ts +70 -0
  244. package/src/navigation-update-artifact.ts +198 -0
  245. package/src/navigation-update.ts +121 -0
  246. package/src/observation.ts +225 -0
  247. package/src/observed-routes.ts +665 -0
  248. package/src/operational-contract.ts +125 -0
  249. package/src/pending-review-update.ts +175 -0
  250. package/src/repository.ts +99 -0
  251. package/src/reviewer.ts +1879 -0
  252. package/src/runtime.ts +6 -0
  253. package/src/state/corrective-replan-executor.ts +819 -0
  254. package/src/state/corrective-replan-public-schema.ts +83 -0
  255. package/src/state/corrective-replan-public.ts +952 -0
  256. package/src/state/corrective-replan-transaction.ts +949 -0
  257. package/src/state/corrective-yield-executor.ts +327 -0
  258. package/src/state/corrective-yield-transaction.ts +730 -0
  259. package/src/state/lock.ts +902 -0
  260. package/src/state/store.ts +567 -0
  261. package/src/transition-core.ts +330 -0
  262. package/src/ulid.ts +24 -0
  263. package/src/version.ts +2 -0
  264. package/src/workflow-blocker-route.ts +109 -0
  265. package/src/workflow.ts +10342 -0
  266. package/docs/alpha7.1-implementation-brief.md +0 -268
  267. package/docs/alpha7.2-corrective-context-refresh-brief.md +0 -484
  268. package/docs/alpha7.2.1-remediation-recovery-brief.md +0 -86
  269. package/docs/beta1-stabilization-brief.md +0 -165
  270. package/docs/beta11-plan-integrity-recovery-brief.md +0 -38
  271. package/docs/beta13.2-signal-review-recovery.md +0 -38
  272. package/docs/beta2-initial-assembly-navigation-brief.md +0 -616
  273. package/docs/change-model.md +0 -118
  274. package/docs/delegated-approval.md +0 -254
  275. package/docs/lifecycle/state-machine-stabilization.md +0 -641
  276. package/docs/pdf/README.md +0 -24
  277. package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
  278. package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
  279. package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
  280. package/docs/pdf/requirements.txt +0 -1
  281. package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +0 -478
  282. package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +0 -506
  283. package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +0 -778
  284. package/docs/pending-review-update.md +0 -15
  285. package/docs/problem-briefs/01-pre-implementation-integrity.md +0 -482
  286. package/docs/problem-briefs/02-minimal-step-integrity.md +0 -411
  287. package/docs/problem-briefs/03-minimal-agent-context-integrity.md +0 -358
  288. package/docs/problem-briefs/04-task-dependency-and-structural-replacement-integrity.md +0 -573
  289. package/docs/problem-briefs/BRIEF-TEMPLATE.md +0 -56
  290. package/docs/problem-briefs/README.md +0 -120
  291. package/docs/problem-briefs/evidence/p01-mechanical-feasibility-corpus.md +0 -90
  292. package/docs/problem-briefs/evidence/signal-v4-pre-m3-replay.md +0 -246
  293. package/docs/split-required-recovery.md +0 -47
  294. package/docs/stable-release-defect-register.md +0 -730
  295. package/docs/validation-report.md +0 -182
  296. package/scripts/generate-pdf-docs.py +0 -524
  297. package/scripts/run-pdf-docs.mjs +0 -62
@@ -6,11 +6,11 @@ to the task commit and Brief, Plan, and evidence hashes. Final acceptance is a s
6
6
  human event bound to Result, evidence, and commit. Locks expire only diagnostically;
7
7
  removing a stale lock is always an explicit repair operation.
8
8
 
9
- Alpha.7 keeps canonical entity JSON unchanged at `stateSchemaVersion: 2` and adds lifecycle
10
- evidence through sidecars. `protocolVersion: 1` remains valid only because the alpha.7
11
- surface is additive and capability-advertised.
9
+ The current execution contract uses `stateSchemaVersion: 2` and protocol 2.
10
+ Existing sidecar evidence is verified by its bound history; it does not enable
11
+ execution through an older package or protocol.
12
12
 
13
- Before execution authorization, every alpha.7 Task must have a current Plan Risk Audit bound
13
+ Before execution authorization, every Task must have a current Plan Risk Audit bound
14
14
  to the current Brief, Plan, Knowledge Map, and exact Step set. The audit is required even when
15
15
  all Steps are unguarded, must name distinct planner/auditor actors, and must bind guarded
16
16
  failure modes to exact Step checks. Each newly recorded guarded failure mode also requires one
@@ -68,7 +68,9 @@ During initial planning, all linked Tasks may be materialized before one complet
68
68
  materialization, with explicit `discovery start` and `discovery materialize` commands. After at
69
69
  least one linked Task exists, it also exposes the closing `milestone plan-set` command. Failed navigation is fail-closed and cannot be treated as an
70
70
  expected assembly signal. After that boundary, semantic updates use human-only `milestone scope-change-prepare` and
71
- `milestone scope-change-apply`. A human-confirmed, expiring Milestone Autonomy Contract may
71
+ `milestone scope-change-apply`; in delegate mode a product-intent change returns to Discovery.
72
+ An expiring Milestone Autonomy Contract can be bound mechanically by `milestone autonomy-bind`
73
+ from an existing sufficient grant, without issuing new authority or another Human confirmation. It may
72
74
  use `milestone autonomy-evolve` only for membership changes while outcome, success signal,
73
75
  acceptance, checks, discovery, and base branch remain fixed. It may also approve Project Memory
74
76
  only within an atomic context refresh for a Task in that Milestone; standalone map approval
@@ -3,21 +3,22 @@
3
3
  Own state transitions, dispatch envelopes, evidence collection, and recovery guidance.
4
4
 
5
5
  - Verify Project Knowledge Map freshness before Plan authorization and role dispatch.
6
- - After an approved knowledge change between Steps, reconcile and approve the map, perform
7
- the mechanical Task knowledge rebind, and request fresh user authorization.
6
+ - After a knowledge change between Steps, use the advertised atomic delegated context-refresh
7
+ without separately reconciling/approving the map first. For other changes use the eligible
8
+ Knowledge approval route; do not request authorization already covered by the grant.
8
9
  - Own derived map revisions and context selection, but never edit the meaning of canonical project files.
9
10
  - Treat CLI `status`, `next`, revision, and lock state as authoritative machine state.
10
11
  - Never bypass authorization, scope checks, failed validation, or stale review.
11
- - When `next.requiredHumanGate` is present, show every bound field and confirmation code,
12
- request the user's explicit decision, and end the turn. Never call the acceptance command
13
- in the same turn that produced or displayed the gate.
14
- - Accept a Milestone only after a later user message explicitly approves that exact
15
- confirmation code, or through the exact active Milestone Autonomy Contract option. Do not
16
- infer approval from a request to validate, finish, or continue.
12
+ - In delegate mode human decisions are limited to forming/editing Discovery and issuing/expanding
13
+ grant. Use current eligible delegated approval options for operational gates; retain exact evidence
14
+ and confirmation-code bindings where Core uses them as machine input. Missing authority returns
15
+ to grant issuance/expansion, never an invented Human confirmation or principal identity.
16
+ - Accept a Milestone through its exact eligible delegated option after all independent checks pass.
17
+ Outside delegate mode retain the explicit bound Human gate and later confirmation.
17
18
  - During initial Milestone planning, materialize the complete linked Task set and record one
18
19
  full membership Plan. When a Milestone Autonomy Contract is active, evolve only membership;
19
20
  any outcome, success-signal, acceptance, check, discovery, or base-branch change returns to
20
- the human scope-change gate.
21
+ Discovery editing; never weaken acceptance to claim success.
21
22
  - Use the Milestone contract for Project Memory approval only through the exact atomic
22
23
  content-only Task context-refresh route; never use it for standalone map approval.
23
24
  - Dispatch one Worker at a time for a concrete Step.
@@ -52,8 +53,9 @@ Own state transitions, dispatch envelopes, evidence collection, and recovery gui
52
53
  boundaries. `wait_threads` is only the wakeup signal; always use `read_thread` for the full report
53
54
  before comparing it with Workflow state.
54
55
  - When the same Task remains nonterminal and fresh navigation provides a non-human continuation,
55
- resume that same chat with `send_message_to_thread`. Ask the user only for a real human/semantic
56
- gate, external permission, unrecoverable integrity conflict, or exhausted infrastructure retry.
56
+ resume that same chat with `send_message_to_thread`. Ask the user only to edit Discovery or
57
+ issue/expand grant. A genuine integrity/infrastructure/App blocker requires evidence, not a new
58
+ category of repeated operational approval.
57
59
  Do not create another Task chat merely because the existing one is idle or finished.
58
60
  - Do not end the Milestone coordinator turn with a dispatched nonterminal Task except at a requested
59
61
  checkpoint or genuine blocker. Record the Task/thread/host/title/cursor mapping and fresh
@@ -74,3 +76,21 @@ Own state transitions, dispatch envelopes, evidence collection, and recovery gui
74
76
  content-only option. Classification, authority, source-set, gap, or conflict changes still
75
77
  require the ordinary visible Knowledge Map flow.
76
78
  - Do not make product-scope decisions or implement production changes.
79
+
80
+ ## Delegate operating boundary
81
+
82
+ The scoped delegation decision covers required role chats and their minimum startup/review/report
83
+ packets, intended public one-time claim references, approved Plan checks (including their declared
84
+ local files/containers), Core completion, and credential recovery for the same actor/Task/scope.
85
+ Do not request these decisions again merely because revision, commit, seal or chat changed.
86
+ Use destination model defaults unless the user explicitly selected an override. Never send vault
87
+ secrets or claim references to unrelated recipients. Actual App/sandbox refusals remain enforceable;
88
+ record the precise failed action and authorization mismatch, without disguising a retry or bypass.
89
+
90
+ For same-scope corrective replan use the eligible `task corrective-replan-authorize` option and
91
+ independent candidate validation/audit; it consumes the existing `task.execution_authorize` grant.
92
+ For technical adoption use an eligible project `project.adopt` grant. Bind Milestone autonomy from
93
+ an existing sufficient grant with `milestone autonomy-bind`; do not issue another grant implicitly.
94
+ Preserve claims/leases, dirty bytes, completed evidence, acceptance and current receipt bindings.
95
+ If success is unattainable, show evidence and return to Discovery. Never delete a required check,
96
+ weaken an acceptance criterion or relabel a failed outcome as success to close work.
@@ -3,7 +3,7 @@
3
3
  Own requirements discovery before any Task, branch, or execution artifact exists.
4
4
 
5
5
  - Scan existing repository files and propose a Project Knowledge Map before code-aware discovery.
6
- - Classify candidate sources and explicit gaps; never appoint a canonical source without user approval.
6
+ - Classify candidate sources and explicit gaps; canonical source selection follows Discovery and the eligible Knowledge approval contract; do not add a separate human gate inside an existing grant.
7
7
  - Read broad approved project knowledge, treating the local map as derived metadata rather than content.
8
8
  - Separate facts, decisions, assumptions, and unknowns.
9
9
  - Ask only for missing information that changes scope, outcome, constraints, or acceptance.
@@ -3,7 +3,7 @@
3
3
  Translate an approved Brief into an execution-ready Plan.
4
4
 
5
5
  - Read the approved knowledge sources relevant to the Task and bind the Plan to the active map revision/hash.
6
- - Declare `knowledgeImpact`, its reason, targets, and `graphUse`; do not hide missing knowledge as an implementation choice.
6
+ - Declare `knowledgeImpact`, its reason, targets, and `graphUse: not-applicable` (Product graph is inactive); do not hide missing knowledge as an implementation choice.
7
7
  - Every requirement must be covered by at least one `STEP-*`.
8
8
  - Each Step declares dependencies, outputs, allowed writes, forbidden scope, and checks.
9
9
  - Perform a risk review before `plan-set`. A Plan that touches migrations, concurrent state,
@@ -17,4 +17,7 @@ Translate an approved Brief into an execution-ready Plan.
17
17
  recovery orchestration, and executable composition. Do not use arbitrary line/file limits;
18
18
  split on independently verifiable failure boundaries.
19
19
  - Do not edit production files or silently expand the Brief.
20
- - Return unresolved semantic choices to the user through the Delivery Coordinator.
20
+ - Return unresolved product-intent choices to Discovery through the Delivery Coordinator.
21
+ - Technical corrective replanning inside the approved objective and grant requires independent
22
+ validation/audit, not another Human confirmation. Never weaken acceptance, hide a required
23
+ failure-specific check, or change Discovery to make the candidate pass.
@@ -25,6 +25,17 @@
25
25
  "eventHash"
26
26
  ],
27
27
  "properties": {
28
+ "delegatedAuthorization": {
29
+ "type": "object", "additionalProperties": false,
30
+ "required": ["grantId", "policyHash", "principal", "delegate", "transition"],
31
+ "properties": {
32
+ "grantId": { "type": "string", "pattern": "^DGR-[0-9A-HJKMNP-TV-Z]{26}$" },
33
+ "policyHash": { "$ref": "#/$defs/hash64" },
34
+ "principal": { "type": "string", "minLength": 1 },
35
+ "delegate": { "type": "string", "pattern": "^agent:.+" },
36
+ "transition": { "const": "project.adopt" }
37
+ }
38
+ },
28
39
  "eventId": { "type": "string", "minLength": 1 },
29
40
  "projectId": { "type": "string", "pattern": "^[a-f0-9]{24}$" },
30
41
  "eventType": { "enum": ["project-registration", "adoption-apply"] },
@@ -52,7 +52,7 @@
52
52
  "delegate": { "type": "string", "minLength": 1 },
53
53
  "transition": {
54
54
  "enum": [
55
- "project_memory.approve",
55
+ "project.adopt", "project_memory.approve",
56
56
  "task.execution_authorize", "task.final_accept",
57
57
  "milestone.execution_authorize", "milestone.final_accept"
58
58
  ]
@@ -38,8 +38,9 @@
38
38
  "items": { "type": "string", "minLength": 1 }
39
39
  },
40
40
  "planHash": { "$ref": "#/$defs/hash64" },
41
- "recoveryBasis": { "const": "plan-integrity" },
41
+ "recoveryBasis": { "enum": ["plan-integrity", "planning-obstruction"] },
42
42
  "planIntegrityEvidence": { "$ref": "#/$defs/planIntegrityEvidence" },
43
+ "planningObstructionEvidence": { "$ref": "#/$defs/planningObstructionEvidence" },
43
44
  "previousEventHash": { "$ref": "#/$defs/nullableHash64" },
44
45
  "recordedAt": { "type": "string", "format": "date-time" },
45
46
  "eventHash": { "$ref": "#/$defs/hash64" }
@@ -48,17 +49,22 @@
48
49
  {
49
50
  "if": { "properties": { "triggeringAttemptCount": { "const": 2 } }, "required": ["triggeringAttemptCount"] },
50
51
  "then": {
51
- "required": ["recoveryBasis", "planIntegrityEvidence"],
52
+ "required": ["recoveryBasis"],
52
53
  "properties": { "decision": { "enum": ["continue-fix", "replan-required"] } }
53
54
  }
54
55
  },
55
56
  {
56
- "if": { "required": ["recoveryBasis"] },
57
+ "if": { "properties": { "recoveryBasis": { "const": "plan-integrity" } }, "required": ["recoveryBasis"] },
57
58
  "then": {
58
59
  "required": ["planIntegrityEvidence"]
59
60
  },
60
61
  "else": { "not": { "required": ["planIntegrityEvidence"] } }
61
62
  },
63
+ {
64
+ "if": { "properties": { "recoveryBasis": { "const": "planning-obstruction" } }, "required": ["recoveryBasis"] },
65
+ "then": { "required": ["planningObstructionEvidence"], "properties": { "triggeringAttemptCount": { "const": 2 }, "decision": { "const": "replan-required" } } },
66
+ "else": { "not": { "required": ["planningObstructionEvidence"] } }
67
+ },
62
68
  {
63
69
  "if": {
64
70
  "properties": {
@@ -83,6 +89,20 @@
83
89
  }
84
90
  ],
85
91
  "$defs": {
92
+ "planningObstructionEvidence": {
93
+ "type": "object", "additionalProperties": false,
94
+ "required": ["kind", "taskRevision", "sourcePlanHash", "baselinePlanHash", "baselineAuditEventId", "baselineAuditEventHash", "obstructionAuditEventId", "obstructionAuditEventHash", "priorAuthorizationHash", "remediationEventId", "remediationEventHash", "knowledgeRebindCount", "knowledgeRebindHash"],
95
+ "properties": {
96
+ "kind": { "const": "first-failure-rebound-planning-obstruction" },
97
+ "taskRevision": { "type": "integer", "minimum": 1 },
98
+ "sourcePlanHash": { "$ref": "#/$defs/hash64" }, "baselinePlanHash": { "$ref": "#/$defs/hash64" },
99
+ "baselineAuditEventId": { "type": "string", "minLength": 1 }, "baselineAuditEventHash": { "$ref": "#/$defs/hash64" },
100
+ "obstructionAuditEventId": { "type": "string", "minLength": 1 }, "obstructionAuditEventHash": { "$ref": "#/$defs/hash64" },
101
+ "priorAuthorizationHash": { "$ref": "#/$defs/hash64" },
102
+ "remediationEventId": { "type": "string", "minLength": 1 }, "remediationEventHash": { "$ref": "#/$defs/hash64" },
103
+ "knowledgeRebindCount": { "type": "integer", "minimum": 1 }, "knowledgeRebindHash": { "$ref": "#/$defs/hash64" }
104
+ }
105
+ },
86
106
  "taskId": { "type": "string", "pattern": "^TASK-[0-9A-HJKMNP-TV-Z]{26}$" },
87
107
  "stepId": { "type": "string", "pattern": "^STEP-[0-9]{3}(?:-[A-Z0-9-]+)?$" },
88
108
  "hash64": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
@@ -234,13 +254,15 @@
234
254
  "items": {
235
255
  "type": "object", "additionalProperties": false,
236
256
  "required": ["reasonCode", "command", "runnerPath", "ownerPath", "ownerHash", "importChain", "diagnosticPath", "componentRoot"],
257
+ "allOf": [{ "if": { "required": ["testInvocation"] }, "then": { "properties": { "importChain": { "maxItems": 1 } } }, "else": { "properties": { "importChain": { "minItems": 2 } } } }],
237
258
  "properties": {
238
259
  "reasonCode": { "const": "FAILED_CHECK_COMPONENT_OWNER_OUTSIDE_ALLOWED_WRITES" },
239
260
  "command": { "type": "string", "minLength": 1 },
240
261
  "runnerPath": { "type": "string", "minLength": 1 },
241
262
  "ownerPath": { "type": "string", "minLength": 1 },
242
263
  "ownerHash": { "$ref": "#/$defs/hash64" },
243
- "importChain": { "$ref": "#/$defs/stringList", "minItems": 2 },
264
+ "importChain": { "$ref": "#/$defs/stringList", "minItems": 1 },
265
+ "testInvocation": {"type": "object", "additionalProperties": false, "required": ["kind", "runnerHash", "argv", "migrationOutputs", "catalogNames"], "properties": {"kind": {"const": "literal-vitest-catalog"}, "runnerHash": {"type": "string", "pattern": "^[a-f0-9]{64}$"}, "argv": {"type": "array", "items": {"type": "string"}, "minItems": 3}, "migrationOutputs": {"type": "array", "items": {"type": "string"}, "minItems": 1, "uniqueItems": true}, "catalogNames": {"type": "array", "items": {"type": "string", "pattern": "^[0-9]{4}_[a-z0-9_]+\\.sql$"}, "minItems": 1, "uniqueItems": true}}},
244
266
  "diagnosticPath": { "type": "string", "minLength": 1 },
245
267
  "componentRoot": { "type": "string", "minLength": 1 }
246
268
  }
@@ -10,6 +10,7 @@
10
10
  "required": ["id", "version"],
11
11
  "properties": { "id": { "$ref": "#/$defs/id" }, "version": { "const": 1 } }
12
12
  },
13
+ "delegatedAuthority": {"type": "object", "additionalProperties": false, "required": ["grantId", "policyHash", "principal", "delegate", "transition", "expiresAt"], "properties": {"grantId": {"$ref": "#/$defs/id"}, "policyHash": {"$ref": "#/$defs/hash"}, "principal": {"$ref": "#/$defs/id"}, "delegate": {"$ref": "#/$defs/id"}, "transition": {"const": "task.execution_authorize"}, "expiresAt": {"type": "string", "format": "date-time"}}},
13
14
  "bindingValues": {
14
15
  "type": "object", "additionalProperties": false,
15
16
  "required": ["transitionId", "runtimeFingerprint", "catalogHash", "lifecycleEpoch", "taskId", "revision", "currentPlanHash", "briefHash", "knowledgeRevision", "knowledgeHash", "targetKnowledgeRevision", "targetKnowledgeHash", "gitHead", "guardedStepId", "correctiveDecisionEventId", "correctiveDecisionHash", "attemptCount", "remediationTailHash", "candidatePlanHash", "candidateStepSetHash", "planAuthorIdentityHash", "planValidationHash", "planValidatorIdentityHash", "riskAuditHash", "riskAuditorIdentityHash", "actorIdentityHash", "actorRole", "humanPrincipalIdentityHash", "capabilityId", "capabilityVersion"],
@@ -23,7 +24,7 @@
23
24
  "targetKnowledgeRevision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
24
25
  "targetKnowledgeHash": { "$ref": "#/$defs/hash" }, "gitHead": { "type": "string", "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$" },
25
26
  "guardedStepId": { "$ref": "#/$defs/id" }, "correctiveDecisionEventId": { "$ref": "#/$defs/id" },
26
- "correctiveDecisionHash": { "$ref": "#/$defs/hash" }, "attemptCount": { "type": "integer", "minimum": 2, "maximum": 9007199254740991 },
27
+ "correctiveDecisionHash": { "$ref": "#/$defs/hash" }, "attemptCount": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
27
28
  "remediationTailHash": { "$ref": "#/$defs/hash" }, "candidatePlanHash": { "$ref": "#/$defs/hash" },
28
29
  "candidateStepSetHash": { "$ref": "#/$defs/hash" }, "planAuthorIdentityHash": { "$ref": "#/$defs/hash" },
29
30
  "planValidationHash": { "$ref": "#/$defs/hash" }, "planValidatorIdentityHash": { "$ref": "#/$defs/hash" },
@@ -45,10 +46,10 @@
45
46
  "required": ["id", "version", "issuer", "source", "scope", "delegation"],
46
47
  "properties": {
47
48
  "id": { "const": "capability.task.corrective-replan" }, "version": { "const": 1 },
48
- "issuer": { "type": "object", "additionalProperties": false, "required": ["kind", "identityHash"], "properties": { "kind": { "const": "human" }, "identityHash": { "$ref": "#/$defs/hash" } } },
49
- "source": { "const": "human-confirmation" },
49
+ "issuer": { "type": "object", "additionalProperties": false, "required": ["kind", "identityHash"], "properties": { "kind": { "enum": ["human", "delegate"] }, "identityHash": { "$ref": "#/$defs/hash" } } },
50
+ "source": { "enum": ["human-confirmation", "delegation-grant"] },
50
51
  "scope": { "type": "object", "additionalProperties": false, "required": ["transitionId", "taskId", "candidatePlanHash", "manifestSha256"], "properties": { "transitionId": { "const": "task.plan.corrective-replan" }, "taskId": { "$ref": "#/$defs/id" }, "candidatePlanHash": { "$ref": "#/$defs/hash" }, "manifestSha256": { "$ref": "#/$defs/hash" } } },
51
- "delegation": { "const": "forbidden" }
52
+ "delegation": { "oneOf": [{ "const": "forbidden" }, { "$ref": "#/$defs/delegatedAuthority" }] }
52
53
  }
53
54
  },
54
55
  "bindingSha256": { "$ref": "#/$defs/hash" }
@@ -82,10 +83,12 @@
82
83
  "receiptValidation": { "type": "object", "additionalProperties": false, "required": ["attestationId", "attestationHash", "planValidationHash", "snapshotBindingHash", "planAuthorIdentityHash", "planValidatorIdentityHash", "findingsHash", "dispositionsHash", "validatedAtMs", "expiresAtMs"], "properties": { "attestationId": { "$ref": "#/$defs/id" }, "attestationHash": { "$ref": "#/$defs/hash" }, "planValidationHash": { "$ref": "#/$defs/hash" }, "snapshotBindingHash": { "$ref": "#/$defs/hash" }, "planAuthorIdentityHash": { "$ref": "#/$defs/hash" }, "planValidatorIdentityHash": { "$ref": "#/$defs/hash" }, "findingsHash": { "$ref": "#/$defs/hash" }, "dispositionsHash": { "$ref": "#/$defs/hash" }, "validatedAtMs": { "$ref": "#/$defs/time" }, "expiresAtMs": { "$ref": "#/$defs/time" } } },
83
84
  "correctiveReplanReceiptV1": {
84
85
  "type": "object", "additionalProperties": false,
85
- "required": ["schemaVersion", "receiptId", "domain", "binding", "validation", "audit", "human", "supersession", "issuedAtMs", "expiresAtMs", "domainHash", "receiptHash"],
86
+ "oneOf": [{ "required": ["human"], "properties": { "human": {}, "delegated": false } }, { "required": ["delegated"], "properties": { "delegated": {}, "human": false } }],
87
+ "required": ["schemaVersion", "receiptId", "domain", "binding", "validation", "audit", "supersession", "issuedAtMs", "expiresAtMs", "domainHash", "receiptHash"],
86
88
  "properties": {
87
89
  "schemaVersion": { "const": 1 }, "receiptId": { "$ref": "#/$defs/id" }, "domain": { "const": "codex-workflow/corrective-replan-receipt/v1" }, "binding": { "$ref": "#/$defs/correctiveReplanBindingV1" }, "validation": { "$ref": "#/$defs/receiptValidation" },
88
90
  "audit": { "type": "object", "additionalProperties": false, "required": ["riskAuditHash", "riskAuditorIdentityHash"], "properties": { "riskAuditHash": { "$ref": "#/$defs/hash" }, "riskAuditorIdentityHash": { "$ref": "#/$defs/hash" } } },
91
+ "delegated": { "type": "object", "additionalProperties": false, "required": ["authority", "authorizedAtMs"], "properties": { "authority": { "$ref": "#/$defs/delegatedAuthority" }, "authorizedAtMs": { "$ref": "#/$defs/time" } } },
89
92
  "human": { "type": "object", "additionalProperties": false, "required": ["challengeId", "challengeHash", "humanPrincipalIdentityHash", "confirmedAtMs"], "properties": { "challengeId": { "$ref": "#/$defs/id" }, "challengeHash": { "$ref": "#/$defs/hash" }, "humanPrincipalIdentityHash": { "$ref": "#/$defs/hash" }, "confirmedAtMs": { "$ref": "#/$defs/time" } } },
90
93
  "supersession": { "type": "object", "additionalProperties": false, "required": ["priorGrantHash", "disposition"], "properties": { "priorGrantHash": { "$ref": "#/$defs/hash" }, "disposition": { "const": "superseded" } } },
91
94
  "issuedAtMs": { "$ref": "#/$defs/time" }, "expiresAtMs": { "$ref": "#/$defs/time" }, "domainHash": { "$ref": "#/$defs/hash" }, "receiptHash": { "$ref": "#/$defs/hash" }
@@ -42,6 +42,15 @@
42
42
  "planRiskAuditEventHash": { "$ref": "#/$defs/hash" },
43
43
  "actorIdentityHash": { "$ref": "#/$defs/hash" },
44
44
  "humanPrincipalIdentityHash": { "$ref": "#/$defs/hash" },
45
+ "delegatedAuthority": {
46
+ "type": "object", "additionalProperties": false,
47
+ "required": ["grantId", "policyHash", "principal", "delegate", "transition", "expiresAt"],
48
+ "properties": {
49
+ "grantId": { "type": "string", "minLength": 1 }, "policyHash": { "$ref": "#/$defs/hash" },
50
+ "principal": { "type": "string", "minLength": 1 }, "delegate": { "type": "string", "minLength": 1 },
51
+ "transition": { "const": "task.execution_authorize" }, "expiresAt": { "type": "string", "format": "date-time" }
52
+ }
53
+ },
45
54
  "priorGrantHash": { "$ref": "#/$defs/hash" },
46
55
  "taskStateSha256": { "$ref": "#/$defs/hash" },
47
56
  "planBytesSha256": { "$ref": "#/$defs/hash" },
@@ -10,6 +10,7 @@
10
10
  "additionalProperties": false,
11
11
  "required": ["plan", "validation", "riskAudit", "authority"],
12
12
  "properties": {
13
+ "delegation": { "type": "object", "additionalProperties": false, "required": ["grantId", "actor"], "properties": { "grantId": { "$ref": "#/$defs/id" }, "actor": { "$ref": "#/$defs/id" } } },
13
14
  "plan": { "$ref": "https://codex-workflow.local/schemas/transition-payloads.schema.json#/$defs/taskPlanInput" },
14
15
  "validation": {
15
16
  "type": "object",
@@ -69,7 +70,7 @@
69
70
  "additionalProperties": false,
70
71
  "required": ["kind", "version", "taskId", "preparedAtMs", "expiresAtMs", "candidatePlanHash", "bindingSha256", "attestationId", "attestationHash", "challengeId", "runtimeFingerprint", "catalogHash", "lifecycleEpoch", "preparationSha256"],
71
72
  "properties": {
72
- "kind": { "const": "corrective-replan-human-gate" },
73
+ "kind": { "enum": ["corrective-replan-human-gate", "corrective-replan-delegated-binding"] },
73
74
  "version": { "const": 1 },
74
75
  "taskId": { "$ref": "#/$defs/id" },
75
76
  "preparedAtMs": { "$ref": "#/$defs/time" },
@@ -54,7 +54,7 @@
54
54
  "uniqueItems": true,
55
55
  "items": {
56
56
  "enum": [
57
- "project_memory.approve",
57
+ "project.adopt", "project_memory.approve",
58
58
  "task.execution_authorize", "task.final_accept",
59
59
  "milestone.execution_authorize", "milestone.final_accept"
60
60
  ]
@@ -4,12 +4,14 @@
4
4
  "title": "Codex Workflow V2 Project Knowledge Map",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
- "required": ["schemaVersion", "revision", "id", "projectId", "kind", "status", "entries", "gaps", "conflicts", "approval"],
7
+ "required": ["schemaVersion", "revision", "id", "projectId", "createdAt", "updatedAt", "kind", "status", "entries", "gaps", "conflicts", "approval"],
8
8
  "properties": {
9
9
  "schemaVersion": { "const": 2 },
10
10
  "revision": { "type": "integer", "minimum": 1 },
11
11
  "id": { "const": "PROJECT-KNOWLEDGE-MAP" },
12
12
  "projectId": { "type": "string", "pattern": "^[a-f0-9]{24}$" },
13
+ "createdAt": { "type": "string", "format": "date-time" },
14
+ "updatedAt": { "type": "string", "format": "date-time" },
13
15
  "kind": { "const": "knowledge-map" },
14
16
  "status": { "enum": ["draft", "awaiting_approval", "active", "stale", "conflicted"] },
15
17
  "entries": {
@@ -33,7 +33,16 @@
33
33
  "reviewEventHash": { "$ref": "#/$defs/nullableHash64" },
34
34
  "reviewerAttestationHash": { "$ref": "#/$defs/nullableHash64" },
35
35
  "executionTaskRevision": { "type": "integer", "minimum": 1 },
36
- "dirtyWorktreeHash": { "$ref": "#/$defs/hash64" }
36
+ "dirtyWorktreeHash": { "$ref": "#/$defs/hash64" },
37
+ "unclaimedExecutionBoundary": {
38
+ "type": "object", "additionalProperties": false,
39
+ "required": ["kind", "actor", "priorHandoffEventHash"],
40
+ "properties": {
41
+ "kind": { "const": "native-unclaimed-check-failure" },
42
+ "actor": { "type": "string", "minLength": 1 },
43
+ "priorHandoffEventHash": { "$ref": "#/$defs/nullableHash64" }
44
+ }
45
+ }
37
46
  }
38
47
  },
39
48
  "attemptOrdinal": { "type": "integer", "minimum": 1 },
@@ -26,6 +26,17 @@
26
26
  "cancelled"
27
27
  ]
28
28
  },
29
+ "pendingBaseSyncValidation": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": ["baseCommit", "syncCommit", "checksHash", "headCommit"],
33
+ "properties": {
34
+ "baseCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
35
+ "syncCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
36
+ "headCommit": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
37
+ "checksHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
38
+ }
39
+ },
29
40
  "title": { "type": "string", "minLength": 1 },
30
41
  "planObjective": { "type": ["string", "null"] },
31
42
  "knowledgeImpact": { "enum": ["none", "update", "create", "retire", null] },
@@ -197,6 +208,12 @@
197
208
  "type": "object",
198
209
  "required": ["stepId", "planHash", "conflictHash", "dirtyFiles", "dirtyWorktreeHash", "remediationEventIds"],
199
210
  "properties": {
211
+ "mode": { "enum": ["failed-step-conflict", "post-rebind-scope-adoption", "post-rebind-dirty-carryover", "navigation-fix-dirty-carryover"] },
212
+ "scopeExtensions": {
213
+ "type": "array",
214
+ "uniqueItems": true,
215
+ "items": { "type": "string", "minLength": 1 }
216
+ },
200
217
  "stepId": { "type": "string", "pattern": "^STEP-[A-Z0-9][A-Z0-9-]{2,63}$" },
201
218
  "planHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
202
219
  "conflictHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
@@ -216,6 +233,24 @@
216
233
  },
217
234
  "additionalProperties": false
218
235
  },
236
+ "failedCheckpoint": {
237
+ "type": "object",
238
+ "required": ["protocol", "sourceHead", "sourcePlanHash", "stepId", "sourceDirtyHash", "targetDirtyHash", "dirtyFiles", "remediationEventId", "remediationEventHash", "sourceReceiptHash", "artifactHash"],
239
+ "properties": {
240
+ "protocol": { "const": "failed-checkpoint-update-v1" },
241
+ "sourceHead": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
242
+ "sourcePlanHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
243
+ "stepId": { "type": "string", "pattern": "^STEP-[A-Z0-9][A-Z0-9-]{2,63}$" },
244
+ "sourceDirtyHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
245
+ "targetDirtyHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
246
+ "dirtyFiles": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
247
+ "remediationEventId": { "type": "string", "pattern": "^RME-[0-9A-HJKMNP-TV-Z]{26}$" },
248
+ "remediationEventHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
249
+ "sourceReceiptHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
250
+ "artifactHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
251
+ },
252
+ "additionalProperties": false
253
+ },
219
254
  "rootCauseReplan": {
220
255
  "type": "object",
221
256
  "required": [
@@ -255,8 +290,17 @@
255
290
  "terminalRemediationEventHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
256
291
  "terminalExecutionTaskRevision": { "type": "integer", "minimum": 1 },
257
292
  "repeatedCauseFingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
258
- "correctiveYieldEventId": { "type": "string", "pattern": "^HOF-[a-f0-9]{64}$" },
259
- "correctiveYieldEventHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
293
+ "correctiveYieldEventId": { "type": ["string", "null"], "pattern": "^HOF-[a-f0-9]{64}$" },
294
+ "correctiveYieldEventHash": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" },
295
+ "unclaimedExecutionBoundary": {
296
+ "type": "object", "additionalProperties": false,
297
+ "required": ["kind", "actor", "priorHandoffEventHash"],
298
+ "properties": {
299
+ "kind": { "const": "native-unclaimed-check-failure" },
300
+ "actor": { "type": "string", "minLength": 1 },
301
+ "priorHandoffEventHash": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" }
302
+ }
303
+ },
260
304
  "dirtyFiles": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
261
305
  "dirtyWorktreeHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
262
306
  "replacementPlanRiskAuditEventId": { "type": "string", "pattern": "^PRA-[0-9A-HJKMNP-TV-Z]{26}$" },
@@ -269,6 +313,11 @@
269
313
  "claimant": { "type": "string", "minLength": 1 },
270
314
  "compatibilityHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
271
315
  },
316
+ "allOf": [{
317
+ "if": { "required": ["unclaimedExecutionBoundary"] },
318
+ "then": { "properties": { "correctiveYieldEventId": { "type": "null" }, "correctiveYieldEventHash": { "type": "null" } } },
319
+ "else": { "properties": { "correctiveYieldEventId": { "type": "string" }, "correctiveYieldEventHash": { "type": "string" } } }
320
+ }],
272
321
  "additionalProperties": false
273
322
  }
274
323
  },
@@ -277,6 +326,19 @@
277
326
  }
278
327
  },
279
328
  "allOf": [
329
+ {
330
+ "if": { "required": ["pendingBaseSyncValidation"] },
331
+ "then": {
332
+ "required": ["workspaceOwner", "evidenceHash", "resultHash", "review"],
333
+ "properties": {
334
+ "status": { "const": "validating" },
335
+ "workspaceOwner": { "const": "local" },
336
+ "evidenceHash": { "type": "null" },
337
+ "resultHash": { "type": "null" },
338
+ "review": { "properties": { "status": { "const": "pending" } } }
339
+ }
340
+ }
341
+ },
280
342
  {
281
343
  "if": {
282
344
  "properties": { "productionEdges": { "minItems": 1 } },
@@ -296,6 +296,7 @@
296
296
  "credential-verifier.corrective-replan.receipt@1"
297
297
  ],
298
298
  "delegationPolicies": [
299
+ "delegation.corrective-execution-exact@1",
299
300
  "delegation.forbidden@1"
300
301
  ],
301
302
  "effectAdapters": [
@@ -360,6 +361,7 @@
360
361
  "ownership.corrective-replan-clear@1"
361
362
  ],
362
363
  "principalBases": [
364
+ "principal-basis.bound-corrective-authority@1",
363
365
  "principal-basis.human-confirmation@1"
364
366
  ],
365
367
  "projections": [
@@ -763,6 +765,7 @@
763
765
  "properties": {
764
766
  "id": {
765
767
  "enum": [
768
+ "principal-basis.bound-corrective-authority",
766
769
  "principal-basis.human-confirmation"
767
770
  ]
768
771
  },
@@ -835,6 +838,7 @@
835
838
  "properties": {
836
839
  "id": {
837
840
  "enum": [
841
+ "delegation.corrective-execution-exact",
838
842
  "delegation.forbidden"
839
843
  ]
840
844
  },
@@ -20,7 +20,22 @@
20
20
  "knowledgeMapRevision": { "type": "integer", "minimum": 0 },
21
21
  "knowledgeMapHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
22
22
  "graphUse": { "enum": ["code-aware", "not-applicable"] },
23
- "steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/planStep" } }
23
+ "steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/planStep" } },
24
+ "requiresProductionEdges": { "type": "boolean" },
25
+ "productionEdges": {
26
+ "type": "array",
27
+ "uniqueItems": true,
28
+ "items": {
29
+ "type": "object",
30
+ "required": ["ownerStepId", "consumerStepId", "checkRef"],
31
+ "properties": {
32
+ "ownerStepId": { "type": "string", "pattern": "^STEP-[0-9]{3}(?:-[A-Z0-9-]+)?$" },
33
+ "consumerStepId": { "type": "string", "pattern": "^STEP-[0-9]{3}(?:-[A-Z0-9-]+)?$" },
34
+ "checkRef": { "type": "string", "minLength": 1 }
35
+ },
36
+ "additionalProperties": false
37
+ }
38
+ }
24
39
  },
25
40
  "additionalProperties": false
26
41
  },