codex-workflow-v2 2.0.0-beta.1 → 2.0.0-beta.10

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 (156) hide show
  1. package/README.md +52 -4
  2. package/dist/src/alpha6/adoption.js +13 -3
  3. package/dist/src/alpha6/adoption.js.map +1 -1
  4. package/dist/src/alpha6/handoff.d.ts +23 -0
  5. package/dist/src/alpha6/handoff.js +221 -28
  6. package/dist/src/alpha6/handoff.js.map +1 -1
  7. package/dist/src/alpha6/milestone.d.ts +12 -0
  8. package/dist/src/alpha6/milestone.js +113 -1
  9. package/dist/src/alpha6/milestone.js.map +1 -1
  10. package/dist/src/alpha6/plan-risk.d.ts +1 -0
  11. package/dist/src/alpha6/plan-risk.js +15 -7
  12. package/dist/src/alpha6/plan-risk.js.map +1 -1
  13. package/dist/src/alpha6/remediation.js +18 -6
  14. package/dist/src/alpha6/remediation.js.map +1 -1
  15. package/dist/src/alpha6/review.d.ts +3 -0
  16. package/dist/src/alpha6/review.js +24 -0
  17. package/dist/src/alpha6/review.js.map +1 -1
  18. package/dist/src/cli.js +473 -45
  19. package/dist/src/cli.js.map +1 -1
  20. package/dist/src/contracts.d.ts +169 -5
  21. package/dist/src/contracts.js +1 -1
  22. package/dist/src/credential-output.d.ts +10 -0
  23. package/dist/src/credential-output.js +73 -0
  24. package/dist/src/credential-output.js.map +1 -0
  25. package/dist/src/dependency-provenance.d.ts +19 -0
  26. package/dist/src/dependency-provenance.js +185 -0
  27. package/dist/src/dependency-provenance.js.map +1 -0
  28. package/dist/src/errors.d.ts +1 -1
  29. package/dist/src/errors.js.map +1 -1
  30. package/dist/src/git.js +5 -4
  31. package/dist/src/git.js.map +1 -1
  32. package/dist/src/index.d.ts +1 -1
  33. package/dist/src/index.js +1 -1
  34. package/dist/src/index.js.map +1 -1
  35. package/dist/src/lifecycle/canonical-hash.d.ts +6 -0
  36. package/dist/src/lifecycle/canonical-hash.js +24 -0
  37. package/dist/src/lifecycle/canonical-hash.js.map +1 -0
  38. package/dist/src/lifecycle/catalog.d.ts +26 -0
  39. package/dist/src/lifecycle/catalog.js +208 -0
  40. package/dist/src/lifecycle/catalog.js.map +1 -0
  41. package/dist/src/lifecycle/compiler-inspection.d.ts +48 -0
  42. package/dist/src/lifecycle/compiler-inspection.js +29 -0
  43. package/dist/src/lifecycle/compiler-inspection.js.map +1 -0
  44. package/dist/src/lifecycle/core-static-readiness.d.ts +6 -0
  45. package/dist/src/lifecycle/core-static-readiness.js +130 -0
  46. package/dist/src/lifecycle/core-static-readiness.js.map +1 -0
  47. package/dist/src/lifecycle/corrective-replan-authority.d.ts +53 -0
  48. package/dist/src/lifecycle/corrective-replan-authority.js +139 -0
  49. package/dist/src/lifecycle/corrective-replan-authority.js.map +1 -0
  50. package/dist/src/lifecycle/corrective-replan-binding-manifest.d.ts +21 -0
  51. package/dist/src/lifecycle/corrective-replan-binding-manifest.js +35 -0
  52. package/dist/src/lifecycle/corrective-replan-binding-manifest.js.map +1 -0
  53. package/dist/src/lifecycle/corrective-replan-credential-core.d.ts +86 -0
  54. package/dist/src/lifecycle/corrective-replan-credential-core.js +563 -0
  55. package/dist/src/lifecycle/corrective-replan-credential-core.js.map +1 -0
  56. package/dist/src/lifecycle/corrective-replan-credential-schema.d.ts +17 -0
  57. package/dist/src/lifecycle/corrective-replan-credential-schema.js +44 -0
  58. package/dist/src/lifecycle/corrective-replan-credential-schema.js.map +1 -0
  59. package/dist/src/lifecycle/corrective-replan-credentials.d.ts +47 -0
  60. package/dist/src/lifecycle/corrective-replan-credentials.js +103 -0
  61. package/dist/src/lifecycle/corrective-replan-credentials.js.map +1 -0
  62. package/dist/src/lifecycle/corrective-replan.d.ts +64 -0
  63. package/dist/src/lifecycle/corrective-replan.js +548 -0
  64. package/dist/src/lifecycle/corrective-replan.js.map +1 -0
  65. package/dist/src/lifecycle/evaluator.d.ts +2 -0
  66. package/dist/src/lifecycle/evaluator.js +35 -0
  67. package/dist/src/lifecycle/evaluator.js.map +1 -0
  68. package/dist/src/lifecycle/fingerprint.d.ts +31 -0
  69. package/dist/src/lifecycle/fingerprint.js +388 -0
  70. package/dist/src/lifecycle/fingerprint.js.map +1 -0
  71. package/dist/src/lifecycle/immutable.d.ts +1 -0
  72. package/dist/src/lifecycle/immutable.js +10 -0
  73. package/dist/src/lifecycle/immutable.js.map +1 -0
  74. package/dist/src/lifecycle/implementation-table.d.ts +29 -0
  75. package/dist/src/lifecycle/implementation-table.js +87 -0
  76. package/dist/src/lifecycle/implementation-table.js.map +1 -0
  77. package/dist/src/lifecycle/index.d.ts +4 -0
  78. package/dist/src/lifecycle/index.js +5 -0
  79. package/dist/src/lifecycle/index.js.map +1 -0
  80. package/dist/src/lifecycle/schema-artifact.d.ts +12 -0
  81. package/dist/src/lifecycle/schema-artifact.js +214 -0
  82. package/dist/src/lifecycle/schema-artifact.js.map +1 -0
  83. package/dist/src/lifecycle/semantic-registry.d.ts +6 -0
  84. package/dist/src/lifecycle/semantic-registry.js +489 -0
  85. package/dist/src/lifecycle/semantic-registry.js.map +1 -0
  86. package/dist/src/lifecycle/types.d.ts +718 -0
  87. package/dist/src/lifecycle/types.js +4 -0
  88. package/dist/src/lifecycle/types.js.map +1 -0
  89. package/dist/src/observation.d.ts +20 -0
  90. package/dist/src/observation.js +171 -0
  91. package/dist/src/observation.js.map +1 -0
  92. package/dist/src/reviewer.d.ts +43 -1
  93. package/dist/src/reviewer.js +203 -50
  94. package/dist/src/reviewer.js.map +1 -1
  95. package/dist/src/state/corrective-replan-executor.d.ts +64 -0
  96. package/dist/src/state/corrective-replan-executor.js +608 -0
  97. package/dist/src/state/corrective-replan-executor.js.map +1 -0
  98. package/dist/src/state/corrective-replan-public-schema.d.ts +3 -0
  99. package/dist/src/state/corrective-replan-public-schema.js +43 -0
  100. package/dist/src/state/corrective-replan-public-schema.js.map +1 -0
  101. package/dist/src/state/corrective-replan-public.d.ts +95 -0
  102. package/dist/src/state/corrective-replan-public.js +665 -0
  103. package/dist/src/state/corrective-replan-public.js.map +1 -0
  104. package/dist/src/state/corrective-replan-transaction.d.ts +160 -0
  105. package/dist/src/state/corrective-replan-transaction.js +730 -0
  106. package/dist/src/state/corrective-replan-transaction.js.map +1 -0
  107. package/dist/src/state/corrective-yield-executor.d.ts +31 -0
  108. package/dist/src/state/corrective-yield-executor.js +236 -0
  109. package/dist/src/state/corrective-yield-executor.js.map +1 -0
  110. package/dist/src/state/corrective-yield-transaction.d.ts +97 -0
  111. package/dist/src/state/corrective-yield-transaction.js +591 -0
  112. package/dist/src/state/corrective-yield-transaction.js.map +1 -0
  113. package/dist/src/state/lock.d.ts +76 -3
  114. package/dist/src/state/lock.js +611 -30
  115. package/dist/src/state/lock.js.map +1 -1
  116. package/dist/src/state/store.d.ts +3 -0
  117. package/dist/src/state/store.js +65 -12
  118. package/dist/src/state/store.js.map +1 -1
  119. package/dist/src/transition-core.d.ts +67 -0
  120. package/dist/src/transition-core.js +318 -0
  121. package/dist/src/transition-core.js.map +1 -0
  122. package/dist/src/version.d.ts +1 -1
  123. package/dist/src/version.js +1 -1
  124. package/dist/src/version.js.map +1 -1
  125. package/dist/src/workflow.d.ts +83 -24
  126. package/dist/src/workflow.js +1255 -187
  127. package/dist/src/workflow.js.map +1 -1
  128. package/docs/autonomy-guardrails.md +40 -1
  129. package/docs/beta2-initial-assembly-navigation-brief.md +616 -0
  130. package/docs/delegated-approval.md +26 -1
  131. package/docs/development-flow.md +32 -2
  132. package/docs/lifecycle/state-machine-stabilization.md +641 -0
  133. package/docs/release.md +17 -2
  134. package/docs/split-required-recovery.md +5 -4
  135. package/docs/stable-release-defect-register.md +465 -3
  136. package/docs/updating-existing-project.md +59 -4
  137. package/docs/validation-report.md +85 -56
  138. package/package.json +5 -1
  139. package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +10 -3
  140. package/plugins/codex-workflow-gateway/references/protocol.md +74 -3
  141. package/plugins/codex-workflow-gateway/scripts/chat-registry.mjs +376 -0
  142. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +246 -1
  143. package/references/state-machine.md +4 -1
  144. package/roles/delivery-coordinator.md +39 -0
  145. package/schemas/adoption-posture-event.schema.json +1 -1
  146. package/schemas/context-envelope.schema.json +1 -1
  147. package/schemas/corrective-replan-credentials.private.schema.json +98 -0
  148. package/schemas/corrective-replan-execution-event.private.schema.json +53 -0
  149. package/schemas/corrective-replan-public.schema.json +142 -0
  150. package/schemas/corrective-replan-task-transaction.private.schema.json +151 -0
  151. package/schemas/corrective-yield-task-transaction.private.schema.json +98 -0
  152. package/schemas/remediation-event.schema.json +11 -1
  153. package/schemas/task-handoff-event.schema.json +1 -1
  154. package/schemas/task.schema.json +24 -1
  155. package/schemas/transition-definition.schema.json +2609 -0
  156. package/schemas/transition-payloads.schema.json +140 -0
@@ -63,7 +63,10 @@ human turn boundary.
63
63
 
64
64
  During initial planning, all linked Tasks may be materialized before one complete
65
65
  `milestone plan-set`; execution remains blocked until every reverse membership is classified.
66
- After that boundary, semantic updates use human-only `milestone scope-change-prepare` and
66
+ `next` returns `milestone initial-assembly` before Task 1 and after every safe linked-Task
67
+ materialization, with explicit `discovery start` and `discovery materialize` commands. After at
68
+ 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
69
+ expected assembly signal. After that boundary, semantic updates use human-only `milestone scope-change-prepare` and
67
70
  `milestone scope-change-apply`. A human-confirmed, expiring Milestone Autonomy Contract may
68
71
  use `milestone autonomy-evolve` only for membership changes while outcome, success signal,
69
72
  acceptance, checks, discovery, and base branch remain fixed. It may also approve Project Memory
@@ -24,6 +24,45 @@ Own state transitions, dispatch envelopes, evidence collection, and recovery gui
24
24
  - A Milestone coordinator creates one dedicated user-visible Codex Task chat for each required
25
25
  Task. The Milestone chat owns ordering, exact delegated approvals, merge observation,
26
26
  validation, and final acceptance; it does not accumulate implementation for every Task.
27
+ - Create that Task chat as a new standalone Codex task, never by forking, handing off, or continuing
28
+ the Milestone chat. Supply only the exact Task context packet from current Workflow state. Parent
29
+ history, sibling Tasks, recovery narrative, reasoning traces, confirmation codes, handoff
30
+ credentials, and writer tokens are forbidden in the Task prompt. A chat-creation failure blocks
31
+ dispatch; it is never permission to fall back to a fork.
32
+ - Allocate every Coordinator, Task, Step/Final Review, Corrective Audit, and Plan Audit title with
33
+ the project chat registry. It owns the monotonic `#NNN`, compact format, exact readback, and
34
+ deterministic fallback; never use `count + 1`. Primary Coordinator/Task forms are
35
+ `#NNN · M<NN> · Coord · <Milestone title> · <MS-ID>` and
36
+ `#NNN · M<NN>/T<NN> · Task · <Task title> · <TASK-ID>`. Verify the
37
+ Task-only input after creation, and keep one unique Task-ID-to-thread mapping. A host-generated
38
+ routing envelope with `source_thread_id` is allowed; copied parent turns are not. Always read the
39
+ title through registry readback, then use only its returned fallback when omitted or normalized;
40
+ do not create a duplicate chat for the same Task.
41
+ Derive `T<NN>` from approved membership order and create the chat just before dispatch, not as an
42
+ inherited or empty placeholder. During `AUTO` Discovery use `M<NN> · Coordinator · Discovery`,
43
+ then rename it to the exact Milestone title and ID immediately after materialization.
44
+ - Emit a Task progress table after every significant Step/review boundary. Emit the read-only
45
+ `milestone progress` projection at resume, Task boundaries, and membership changes; keep
46
+ cancelled/replacement Tasks as distinct rows such as `T03 cancelled → T08 replacement`.
47
+ - Treat Task-chat creation as dispatch, not completion. Keep the Milestone coordinator turn active
48
+ and supervise the exact dispatched Task with bounded `wait_threads` calls, preserving the latest
49
+ cursor. On completion or attention, inspect the Task chat, then run repository `status` followed
50
+ by fresh `next`; Task output is evidence, never lifecycle authority.
51
+ - Require each Task chat to return a closed non-secret CoordinatorReport at terminal or attention
52
+ boundaries. `wait_threads` is only the wakeup signal; always use `read_thread` for the full report
53
+ before comparing it with Workflow state.
54
+ - 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.
57
+ Do not create another Task chat merely because the existing one is idle or finished.
58
+ - Do not end the Milestone coordinator turn with a dispatched nonterminal Task except at a requested
59
+ checkpoint or genuine blocker. Record the Task/thread/host/title/cursor mapping and fresh
60
+ lifecycle status so a later turn can reconcile through `list_threads`, `read_thread`, `status`,
61
+ and `next` without duplicate dispatch. A Task chat completion does not automatically wake its
62
+ coordinator.
63
+ - Dispatch the next required Task only after Core confirms the prior Task terminal and merged. Each
64
+ Task chat supervises its own external Reviewer chats; after every required Task is merged, the
65
+ Milestone coordinator performs validation and the exact final-acceptance transition.
27
66
  - Before authorizing a high-risk Plan, require the Technical Planner's migration/concurrency/
28
67
  restart/crash/provider risk review and failure-specific checks.
29
68
  - After a second failed independent Task review, require a separate corrective Plan Auditor
@@ -30,7 +30,7 @@
30
30
  "eventType": { "enum": ["project-registration", "adoption-apply"] },
31
31
  "actor": { "type": ["string", "null"], "minLength": 1 },
32
32
  "packageVersion": { "type": "string", "minLength": 1 },
33
- "protocolVersion": { "const": 1 },
33
+ "protocolVersion": { "enum": [1, 2] },
34
34
  "stateSchemaVersion": { "const": 2 },
35
35
  "adoptionBoundaryAt": { "type": "string", "format": "date-time" },
36
36
  "baselineDigestHash": { "$ref": "#/$defs/hash64" },
@@ -25,7 +25,7 @@
25
25
  "knowledgeSources"
26
26
  ],
27
27
  "properties": {
28
- "protocolVersion": { "const": 1 },
28
+ "protocolVersion": { "const": 2 },
29
29
  "packageVersion": { "type": "string" },
30
30
  "role": {
31
31
  "enum": ["scope-lead", "technical-planner", "delivery-coordinator", "worker", "independent-reviewer"]
@@ -0,0 +1,98 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "codex-workflow://schemas/private/corrective-replan-credentials/v1",
4
+ "$defs": {
5
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
6
+ "id": { "type": "string", "minLength": 1, "maxLength": 256 },
7
+ "time": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
8
+ "ref": {
9
+ "type": "object", "additionalProperties": false,
10
+ "required": ["id", "version"],
11
+ "properties": { "id": { "$ref": "#/$defs/id" }, "version": { "const": 1 } }
12
+ },
13
+ "bindingValues": {
14
+ "type": "object", "additionalProperties": false,
15
+ "required": ["transitionId", "runtimeFingerprint", "catalogHash", "lifecycleEpoch", "taskId", "revision", "currentPlanHash", "briefHash", "knowledgeRevision", "knowledgeHash", "gitHead", "guardedStepId", "correctiveDecisionEventId", "correctiveDecisionHash", "attemptCount", "remediationTailHash", "candidatePlanHash", "candidateStepSetHash", "planAuthorIdentityHash", "planValidationHash", "planValidatorIdentityHash", "riskAuditHash", "riskAuditorIdentityHash", "actorIdentityHash", "actorRole", "humanPrincipalIdentityHash", "capabilityId", "capabilityVersion"],
16
+ "properties": {
17
+ "transitionId": { "const": "task.plan.corrective-replan" },
18
+ "runtimeFingerprint": { "$ref": "#/$defs/hash" }, "catalogHash": { "$ref": "#/$defs/hash" },
19
+ "lifecycleEpoch": { "const": 2 }, "taskId": { "$ref": "#/$defs/id" },
20
+ "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "currentPlanHash": { "$ref": "#/$defs/hash" },
21
+ "briefHash": { "$ref": "#/$defs/hash" }, "knowledgeRevision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
22
+ "knowledgeHash": { "$ref": "#/$defs/hash" }, "gitHead": { "type": "string", "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$" },
23
+ "guardedStepId": { "$ref": "#/$defs/id" }, "correctiveDecisionEventId": { "$ref": "#/$defs/id" },
24
+ "correctiveDecisionHash": { "$ref": "#/$defs/hash" }, "attemptCount": { "type": "integer", "minimum": 2, "maximum": 9007199254740991 },
25
+ "remediationTailHash": { "$ref": "#/$defs/hash" }, "candidatePlanHash": { "$ref": "#/$defs/hash" },
26
+ "candidateStepSetHash": { "$ref": "#/$defs/hash" }, "planAuthorIdentityHash": { "$ref": "#/$defs/hash" },
27
+ "planValidationHash": { "$ref": "#/$defs/hash" }, "planValidatorIdentityHash": { "$ref": "#/$defs/hash" },
28
+ "riskAuditHash": { "$ref": "#/$defs/hash" }, "riskAuditorIdentityHash": { "$ref": "#/$defs/hash" },
29
+ "actorIdentityHash": { "$ref": "#/$defs/hash" }, "actorRole": { "enum": ["delivery-coordinator", "technical-planner"] },
30
+ "humanPrincipalIdentityHash": { "$ref": "#/$defs/hash" }, "capabilityId": { "const": "capability.task.corrective-replan" },
31
+ "capabilityVersion": { "const": 1 }
32
+ }
33
+ },
34
+ "correctiveReplanBindingV1": {
35
+ "type": "object", "additionalProperties": false,
36
+ "required": ["schemaVersion", "manifestRef", "manifestSha256", "values", "capability", "bindingSha256"],
37
+ "properties": {
38
+ "schemaVersion": { "const": 1 },
39
+ "manifestRef": { "$ref": "#/$defs/ref" }, "manifestSha256": { "$ref": "#/$defs/hash" },
40
+ "values": { "$ref": "#/$defs/bindingValues" },
41
+ "capability": {
42
+ "type": "object", "additionalProperties": false,
43
+ "required": ["id", "version", "issuer", "source", "scope", "delegation"],
44
+ "properties": {
45
+ "id": { "const": "capability.task.corrective-replan" }, "version": { "const": 1 },
46
+ "issuer": { "type": "object", "additionalProperties": false, "required": ["kind", "identityHash"], "properties": { "kind": { "const": "human" }, "identityHash": { "$ref": "#/$defs/hash" } } },
47
+ "source": { "const": "human-confirmation" },
48
+ "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" } } },
49
+ "delegation": { "const": "forbidden" }
50
+ }
51
+ },
52
+ "bindingSha256": { "$ref": "#/$defs/hash" }
53
+ }
54
+ },
55
+ "validationSource": {
56
+ "type": "object", "additionalProperties": false,
57
+ "required": ["taskId", "revision", "currentPlanHash", "briefHash", "knowledgeRevision", "knowledgeHash", "gitHead", "guardedStepId", "correctiveDecisionHash", "remediationTailHash"],
58
+ "properties": { "taskId": { "$ref": "#/$defs/id" }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "currentPlanHash": { "$ref": "#/$defs/hash" }, "briefHash": { "$ref": "#/$defs/hash" }, "knowledgeRevision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "knowledgeHash": { "$ref": "#/$defs/hash" }, "gitHead": { "type": "string", "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$" }, "guardedStepId": { "$ref": "#/$defs/id" }, "correctiveDecisionHash": { "$ref": "#/$defs/hash" }, "remediationTailHash": { "$ref": "#/$defs/hash" } }
59
+ },
60
+ "passedCoverage": { "type": "object", "additionalProperties": false, "required": ["sourceHash", "coverageHash", "passed"], "properties": { "sourceHash": { "$ref": "#/$defs/hash" }, "coverageHash": { "$ref": "#/$defs/hash" }, "passed": { "const": true } } },
61
+ "finding": { "type": "object", "additionalProperties": false, "required": ["findingId", "severity", "requirementRef", "evidenceHash"], "properties": { "findingId": { "$ref": "#/$defs/id" }, "severity": { "enum": ["low", "medium", "high"] }, "requirementRef": { "$ref": "#/$defs/id" }, "evidenceHash": { "$ref": "#/$defs/hash" } } },
62
+ "disposition": { "type": "object", "additionalProperties": false, "required": ["findingId", "decision", "evidenceHash"], "properties": { "findingId": { "$ref": "#/$defs/id" }, "decision": { "enum": ["resolved", "accepted-documented-limitation"] }, "evidenceHash": { "$ref": "#/$defs/hash" } } },
63
+ "planValidationAttestationV1": {
64
+ "type": "object", "additionalProperties": false,
65
+ "required": ["schemaVersion", "attestationId", "bindingSha256", "source", "candidate", "requirements", "acceptance", "architecture", "planAuthor", "plannerContext", "validator", "validatorContext", "freshContext", "passed", "findings", "dispositions", "validatedAtMs", "expiresAtMs", "attestationHash"],
66
+ "properties": {
67
+ "schemaVersion": { "const": 1 }, "attestationId": { "$ref": "#/$defs/id" }, "bindingSha256": { "$ref": "#/$defs/hash" }, "source": { "$ref": "#/$defs/validationSource" },
68
+ "candidate": { "type": "object", "additionalProperties": false, "required": ["planHash", "stepSetHash"], "properties": { "planHash": { "$ref": "#/$defs/hash" }, "stepSetHash": { "$ref": "#/$defs/hash" } } },
69
+ "requirements": { "$ref": "#/$defs/passedCoverage" }, "acceptance": { "$ref": "#/$defs/passedCoverage" },
70
+ "architecture": { "type": "object", "additionalProperties": false, "required": ["sourceHash", "compatibilityHash", "passed"], "properties": { "sourceHash": { "$ref": "#/$defs/hash" }, "compatibilityHash": { "$ref": "#/$defs/hash" }, "passed": { "const": true } } },
71
+ "planAuthor": { "type": "object", "additionalProperties": false, "required": ["identityHash"], "properties": { "identityHash": { "$ref": "#/$defs/hash" } } },
72
+ "plannerContext": { "$ref": "#/$defs/context" }, "validator": { "type": "object", "additionalProperties": false, "required": ["identityHash"], "properties": { "identityHash": { "$ref": "#/$defs/hash" } } }, "validatorContext": { "$ref": "#/$defs/context" },
73
+ "freshContext": { "type": "object", "additionalProperties": false, "required": ["sourceSnapshotHash", "plannerContextHash", "validatorContextHash", "passed"], "properties": { "sourceSnapshotHash": { "$ref": "#/$defs/hash" }, "plannerContextHash": { "$ref": "#/$defs/hash" }, "validatorContextHash": { "$ref": "#/$defs/hash" }, "passed": { "const": true } } },
74
+ "passed": { "const": true }, "findings": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/finding" } }, "dispositions": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/disposition" } },
75
+ "validatedAtMs": { "$ref": "#/$defs/time" }, "expiresAtMs": { "$ref": "#/$defs/time" }, "attestationHash": { "$ref": "#/$defs/hash" }
76
+ }
77
+ },
78
+ "context": { "type": "object", "additionalProperties": false, "required": ["contextHash", "capturedAtMs"], "properties": { "contextHash": { "$ref": "#/$defs/hash" }, "capturedAtMs": { "$ref": "#/$defs/time" } } },
79
+ "humanConfirmationInputV1": { "type": "object", "additionalProperties": false, "required": ["kind", "version", "challengeId", "confirmationCode"], "properties": { "kind": { "const": "corrective-replan-human-confirmation" }, "version": { "const": 1 }, "challengeId": { "$ref": "#/$defs/id" }, "confirmationCode": { "type": "string", "pattern": "^[0-9]{6}$" } } },
80
+ "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" } } },
81
+ "correctiveReplanReceiptV1": {
82
+ "type": "object", "additionalProperties": false,
83
+ "required": ["schemaVersion", "receiptId", "domain", "binding", "validation", "audit", "human", "supersession", "issuedAtMs", "expiresAtMs", "domainHash", "receiptHash"],
84
+ "properties": {
85
+ "schemaVersion": { "const": 1 }, "receiptId": { "$ref": "#/$defs/id" }, "domain": { "const": "codex-workflow/corrective-replan-receipt/v1" }, "binding": { "$ref": "#/$defs/correctiveReplanBindingV1" }, "validation": { "$ref": "#/$defs/receiptValidation" },
86
+ "audit": { "type": "object", "additionalProperties": false, "required": ["riskAuditHash", "riskAuditorIdentityHash"], "properties": { "riskAuditHash": { "$ref": "#/$defs/hash" }, "riskAuditorIdentityHash": { "$ref": "#/$defs/hash" } } },
87
+ "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" } } },
88
+ "supersession": { "type": "object", "additionalProperties": false, "required": ["priorGrantHash", "disposition"], "properties": { "priorGrantHash": { "$ref": "#/$defs/hash" }, "disposition": { "const": "superseded" } } },
89
+ "issuedAtMs": { "$ref": "#/$defs/time" }, "expiresAtMs": { "$ref": "#/$defs/time" }, "domainHash": { "$ref": "#/$defs/hash" }, "receiptHash": { "$ref": "#/$defs/hash" }
90
+ }
91
+ },
92
+ "storedPlanValidationEventV1": {
93
+ "type": "object", "additionalProperties": false,
94
+ "required": ["schemaVersion", "eventId", "previousEventHash", "taskId", "candidatePlanHash", "attestationId", "attestationHash", "receiptId", "receiptHash", "receiptDomainHash", "challengeId", "challengeHash", "recordedAt", "recordedAtMs", "eventHash"],
95
+ "properties": { "schemaVersion": { "const": 1 }, "eventId": { "$ref": "#/$defs/id" }, "previousEventHash": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/hash" }] }, "taskId": { "$ref": "#/$defs/id" }, "candidatePlanHash": { "$ref": "#/$defs/hash" }, "attestationId": { "$ref": "#/$defs/id" }, "attestationHash": { "$ref": "#/$defs/hash" }, "receiptId": { "$ref": "#/$defs/id" }, "receiptHash": { "$ref": "#/$defs/hash" }, "receiptDomainHash": { "$ref": "#/$defs/hash" }, "challengeId": { "$ref": "#/$defs/id" }, "challengeHash": { "$ref": "#/$defs/hash" }, "recordedAt": { "type": "string", "format": "date-time" }, "recordedAtMs": { "$ref": "#/$defs/time" }, "eventHash": { "$ref": "#/$defs/hash" } }
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "codex-workflow://schemas/private/corrective-replan-execution-event/v1",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "schemaVersion", "kind", "eventId", "previousEventHash", "recordedAt", "taskId", "taskRevision",
8
+ "taskStatus", "transitionId", "executionKeyHash", "runtimeFingerprint", "catalogHash", "lifecycleEpoch",
9
+ "bindingManifest", "bindingSha256", "receiptId", "receiptHash", "receiptDomainHash", "candidatePlanHash",
10
+ "planValidationEventHash", "planRiskAuditEventHash", "actorIdentityHash", "humanPrincipalIdentityHash",
11
+ "priorGrantHash", "taskStateSha256", "planBytesSha256", "eventHash"
12
+ ],
13
+ "properties": {
14
+ "schemaVersion": { "const": 1 },
15
+ "kind": { "const": "corrective-replan-execution-recorded" },
16
+ "eventId": { "type": "string", "pattern": "^CRE-[a-f0-9]{64}$" },
17
+ "previousEventHash": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/hash" }] },
18
+ "recordedAt": { "type": "string", "format": "date-time" },
19
+ "taskId": { "type": "string", "pattern": "^TASK-[0-9A-HJKMNP-TV-Z]{26}$" },
20
+ "taskRevision": { "type": "integer", "minimum": 2, "maximum": 9007199254740991 },
21
+ "taskStatus": { "const": "awaiting_execution_authorization" },
22
+ "transitionId": { "const": "task.plan.corrective-replan" },
23
+ "executionKeyHash": { "$ref": "#/$defs/hash" },
24
+ "runtimeFingerprint": { "$ref": "#/$defs/hash" },
25
+ "catalogHash": { "$ref": "#/$defs/hash" },
26
+ "lifecycleEpoch": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
27
+ "bindingManifest": {
28
+ "type": "object", "additionalProperties": false,
29
+ "required": ["id", "version", "manifestSha256"],
30
+ "properties": {
31
+ "id": { "const": "binding-manifest.corrective-replan.exact-v1" },
32
+ "version": { "const": 1 },
33
+ "manifestSha256": { "$ref": "#/$defs/hash" }
34
+ }
35
+ },
36
+ "bindingSha256": { "$ref": "#/$defs/hash" },
37
+ "receiptId": { "type": "string", "minLength": 1, "maxLength": 256 },
38
+ "receiptHash": { "$ref": "#/$defs/hash" },
39
+ "receiptDomainHash": { "$ref": "#/$defs/hash" },
40
+ "candidatePlanHash": { "$ref": "#/$defs/hash" },
41
+ "planValidationEventHash": { "$ref": "#/$defs/hash" },
42
+ "planRiskAuditEventHash": { "$ref": "#/$defs/hash" },
43
+ "actorIdentityHash": { "$ref": "#/$defs/hash" },
44
+ "humanPrincipalIdentityHash": { "$ref": "#/$defs/hash" },
45
+ "priorGrantHash": { "$ref": "#/$defs/hash" },
46
+ "taskStateSha256": { "$ref": "#/$defs/hash" },
47
+ "planBytesSha256": { "$ref": "#/$defs/hash" },
48
+ "eventHash": { "$ref": "#/$defs/hash" }
49
+ },
50
+ "$defs": {
51
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
52
+ }
53
+ }
@@ -0,0 +1,142 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "codex-workflow://schemas/public/corrective-replan/v2",
4
+ "$defs": {
5
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
6
+ "id": { "type": "string", "minLength": 1, "maxLength": 256 },
7
+ "time": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
8
+ "candidateV1": {
9
+ "type": "object",
10
+ "additionalProperties": false,
11
+ "required": ["plan", "validation", "riskAudit", "authority"],
12
+ "properties": {
13
+ "plan": { "$ref": "https://codex-workflow.local/schemas/transition-payloads.schema.json#/$defs/taskPlanInput" },
14
+ "validation": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["validatorContextHash", "findings", "dispositions"],
18
+ "properties": {
19
+ "validatorContextHash": { "$ref": "#/$defs/hash" },
20
+ "findings": {
21
+ "type": "array",
22
+ "maxItems": 128,
23
+ "items": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "required": ["findingId", "severity", "requirementRef", "evidenceHash"],
27
+ "properties": {
28
+ "findingId": { "$ref": "#/$defs/id" },
29
+ "severity": { "enum": ["low", "medium", "high"] },
30
+ "requirementRef": { "$ref": "#/$defs/id" },
31
+ "evidenceHash": { "$ref": "#/$defs/hash" }
32
+ }
33
+ }
34
+ },
35
+ "dispositions": {
36
+ "type": "array",
37
+ "maxItems": 128,
38
+ "items": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["findingId", "decision", "evidenceHash"],
42
+ "properties": {
43
+ "findingId": { "$ref": "#/$defs/id" },
44
+ "decision": { "enum": ["resolved", "accepted-documented-limitation"] },
45
+ "evidenceHash": { "$ref": "#/$defs/hash" }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ },
51
+ "riskAudit": { "$ref": "https://codex-workflow.local/schemas/transition-payloads.schema.json#/$defs/planRiskAuditInput" },
52
+ "authority": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": ["planAuthorIdentityHash", "planValidatorIdentityHash", "riskAuditorIdentityHash", "actorIdentityHash", "actorRole", "humanPrincipalIdentityHash"],
56
+ "properties": {
57
+ "planAuthorIdentityHash": { "$ref": "#/$defs/hash" },
58
+ "planValidatorIdentityHash": { "$ref": "#/$defs/hash" },
59
+ "riskAuditorIdentityHash": { "$ref": "#/$defs/hash" },
60
+ "actorIdentityHash": { "$ref": "#/$defs/hash" },
61
+ "actorRole": { "enum": ["delivery-coordinator", "technical-planner"] },
62
+ "humanPrincipalIdentityHash": { "$ref": "#/$defs/hash" }
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "humanGateV1": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": ["kind", "version", "taskId", "preparedAtMs", "expiresAtMs", "candidatePlanHash", "bindingSha256", "attestationId", "attestationHash", "challengeId", "runtimeFingerprint", "catalogHash", "lifecycleEpoch", "preparationSha256"],
71
+ "properties": {
72
+ "kind": { "const": "corrective-replan-human-gate" },
73
+ "version": { "const": 1 },
74
+ "taskId": { "$ref": "#/$defs/id" },
75
+ "preparedAtMs": { "$ref": "#/$defs/time" },
76
+ "expiresAtMs": { "$ref": "#/$defs/time" },
77
+ "candidatePlanHash": { "$ref": "#/$defs/hash" },
78
+ "bindingSha256": { "$ref": "#/$defs/hash" },
79
+ "attestationId": { "$ref": "#/$defs/id" },
80
+ "attestationHash": { "$ref": "#/$defs/hash" },
81
+ "challengeId": { "$ref": "#/$defs/id" },
82
+ "runtimeFingerprint": { "$ref": "#/$defs/hash" },
83
+ "catalogHash": { "$ref": "#/$defs/hash" },
84
+ "lifecycleEpoch": { "const": 2 },
85
+ "preparationSha256": { "$ref": "#/$defs/hash" }
86
+ }
87
+ },
88
+ "humanGateResultV1": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": ["kind", "gate", "delivery"],
92
+ "properties": {
93
+ "kind": { "const": "corrective-replan-human-gate-result" },
94
+ "gate": { "$ref": "#/$defs/humanGateV1" },
95
+ "delivery": {
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "required": ["kind", "version", "challengeId", "confirmationCode", "expiresAtMs"],
99
+ "properties": {
100
+ "kind": { "const": "corrective-replan-human-challenge-delivery" },
101
+ "version": { "const": 1 },
102
+ "challengeId": { "$ref": "#/$defs/id" },
103
+ "confirmationCode": { "type": "string", "pattern": "^[0-9]{6}$" },
104
+ "expiresAtMs": { "$ref": "#/$defs/time" }
105
+ }
106
+ }
107
+ }
108
+ },
109
+ "credentialV1": {
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": ["kind", "version", "gate", "receipt", "planValidationEvent"],
113
+ "properties": {
114
+ "kind": { "const": "corrective-replan-public-credential" },
115
+ "version": { "const": 1 },
116
+ "gate": { "$ref": "#/$defs/humanGateV1" },
117
+ "receipt": { "$ref": "codex-workflow://schemas/private/corrective-replan-credentials/v1#/$defs/correctiveReplanReceiptV1" },
118
+ "planValidationEvent": { "$ref": "codex-workflow://schemas/private/corrective-replan-credentials/v1#/$defs/storedPlanValidationEventV1" }
119
+ }
120
+ },
121
+ "executionResultV1": {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": ["kind", "disposition", "taskId", "transactionId", "resultSha256"],
125
+ "properties": {
126
+ "kind": { "const": "corrective-replan-execution-result" },
127
+ "disposition": { "enum": ["executed", "recovered", "replayed"] },
128
+ "taskId": { "$ref": "#/$defs/id" },
129
+ "transactionId": { "$ref": "#/$defs/hash" },
130
+ "resultSha256": { "$ref": "#/$defs/hash" }
131
+ }
132
+ },
133
+ "responseV2": {
134
+ "oneOf": [
135
+ { "$ref": "#/$defs/humanGateResultV1" },
136
+ { "$ref": "#/$defs/credentialV1" },
137
+ { "$ref": "#/$defs/executionResultV1" }
138
+ ]
139
+ }
140
+ },
141
+ "$ref": "#/$defs/responseV2"
142
+ }
@@ -0,0 +1,151 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "codex-workflow://schemas/private/corrective-replan-task-transaction/v1",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "schemaVersion", "kind", "transactionId", "projectId", "taskId", "transitionId",
8
+ "executionKeyHash", "runtimeFingerprint", "catalogHash", "lifecycleEpoch", "bindingManifest",
9
+ "bindingSha256", "receiptHash", "actorIdentityHash", "humanPrincipalIdentityHash", "admittedAt",
10
+ "intentSha256", "phase", "phaseRevision", "nextTargetOrdinal", "targets", "phaseHistory", "completedResult",
11
+ "updatedAt"
12
+ ],
13
+ "properties": {
14
+ "schemaVersion": { "const": 1 },
15
+ "kind": { "const": "corrective-replan-task-transaction" },
16
+ "transactionId": { "$ref": "#/$defs/hash" },
17
+ "projectId": { "type": "string", "pattern": "^[a-f0-9]{24}$" },
18
+ "taskId": { "type": "string", "pattern": "^TASK-[0-9A-HJKMNP-TV-Z]{26}$" },
19
+ "transitionId": { "const": "task.plan.corrective-replan" },
20
+ "executionKeyHash": { "$ref": "#/$defs/hash" },
21
+ "runtimeFingerprint": { "$ref": "#/$defs/hash" },
22
+ "catalogHash": { "$ref": "#/$defs/hash" },
23
+ "lifecycleEpoch": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
24
+ "bindingManifest": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": ["id", "version", "manifestSha256"],
28
+ "properties": {
29
+ "id": { "const": "binding-manifest.corrective-replan.exact-v1" },
30
+ "version": { "const": 1 },
31
+ "manifestSha256": { "$ref": "#/$defs/hash" }
32
+ }
33
+ },
34
+ "bindingSha256": { "$ref": "#/$defs/hash" },
35
+ "receiptHash": { "$ref": "#/$defs/hash" },
36
+ "actorIdentityHash": { "$ref": "#/$defs/hash" },
37
+ "humanPrincipalIdentityHash": { "$ref": "#/$defs/hash" },
38
+ "admittedAt": { "$ref": "#/$defs/time" },
39
+ "intentSha256": { "$ref": "#/$defs/hash" },
40
+ "phase": { "enum": ["intent", "applying", "published-pending-readback", "completed"] },
41
+ "phaseRevision": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
42
+ "nextTargetOrdinal": { "type": "integer", "minimum": 0, "maximum": 5 },
43
+ "targets": {
44
+ "type": "array",
45
+ "minItems": 5,
46
+ "maxItems": 5,
47
+ "items": { "$ref": "#/$defs/target" }
48
+ },
49
+ "phaseHistory": {
50
+ "type": "array",
51
+ "minItems": 1,
52
+ "maxItems": 64,
53
+ "items": { "$ref": "#/$defs/phaseEntry" }
54
+ },
55
+ "completedResult": {
56
+ "oneOf": [
57
+ { "type": "null" },
58
+ {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "required": ["resultSha256"],
62
+ "properties": { "resultSha256": { "$ref": "#/$defs/hash" } }
63
+ }
64
+ ]
65
+ },
66
+ "updatedAt": { "$ref": "#/$defs/time" }
67
+ },
68
+ "$defs": {
69
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
70
+ "time": { "type": "string", "format": "date-time" },
71
+ "snapshot": {
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": ["exists", "contentSha256", "byteLength", "contentPath"],
75
+ "properties": {
76
+ "exists": { "type": "boolean" },
77
+ "contentSha256": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/hash" }] },
78
+ "byteLength": { "type": "integer", "minimum": 0, "maximum": 268435456 },
79
+ "contentPath": { "oneOf": [{ "type": "null" }, { "type": "string", "pattern": "^preimages/[0-4]\\.bin$" }] }
80
+ }
81
+ },
82
+ "postimage": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": ["contentSha256", "byteLength", "contentPath"],
86
+ "properties": {
87
+ "contentSha256": { "$ref": "#/$defs/hash" },
88
+ "byteLength": { "type": "integer", "minimum": 1, "maximum": 268435456 },
89
+ "contentPath": { "type": "string", "pattern": "^targets/[0-4]\\.bin$" }
90
+ }
91
+ },
92
+ "sidecarAnchors": {
93
+ "oneOf": [
94
+ { "type": "null" },
95
+ {
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "required": ["previousEventHash", "resultEventHash", "previousLineCount", "resultLineCount"],
99
+ "properties": {
100
+ "previousEventHash": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/hash" }] },
101
+ "resultEventHash": { "$ref": "#/$defs/hash" },
102
+ "previousLineCount": { "type": "integer", "minimum": 0 },
103
+ "resultLineCount": { "type": "integer", "minimum": 1 }
104
+ }
105
+ }
106
+ ]
107
+ },
108
+ "taskCas": {
109
+ "oneOf": [
110
+ { "type": "null" },
111
+ {
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": ["expectedRevision", "resultRevision"],
115
+ "properties": {
116
+ "expectedRevision": { "type": "integer", "minimum": 1 },
117
+ "resultRevision": { "type": "integer", "minimum": 2 }
118
+ }
119
+ }
120
+ ]
121
+ },
122
+ "target": {
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": ["targetId", "ordinal", "relativePath", "writeMode", "preimage", "postimage", "sidecarAnchors", "taskCas"],
126
+ "properties": {
127
+ "targetId": { "enum": ["task-state", "plan", "plan-validation", "plan-risk-audit", "execution-evidence"] },
128
+ "ordinal": { "type": "integer", "minimum": 0, "maximum": 4 },
129
+ "relativePath": { "enum": ["state.json", "plan.md", "plan-validations.jsonl", "plan-risk-audits.jsonl", "corrective-replan-executions.jsonl"] },
130
+ "writeMode": { "enum": ["replace-exact", "append-exact"] },
131
+ "preimage": { "$ref": "#/$defs/snapshot" },
132
+ "postimage": { "$ref": "#/$defs/postimage" },
133
+ "sidecarAnchors": { "$ref": "#/$defs/sidecarAnchors" },
134
+ "taskCas": { "$ref": "#/$defs/taskCas" }
135
+ }
136
+ },
137
+ "phaseEntry": {
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "required": ["sequence", "phase", "nextTargetOrdinal", "recordedAt", "previousEntryHash", "entryHash"],
141
+ "properties": {
142
+ "sequence": { "type": "integer", "minimum": 0, "maximum": 63 },
143
+ "phase": { "enum": ["intent", "applying", "published-pending-readback", "completed"] },
144
+ "nextTargetOrdinal": { "type": "integer", "minimum": 0, "maximum": 5 },
145
+ "recordedAt": { "$ref": "#/$defs/time" },
146
+ "previousEntryHash": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/hash" }] },
147
+ "entryHash": { "$ref": "#/$defs/hash" }
148
+ }
149
+ }
150
+ }
151
+ }