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
@@ -48,6 +48,9 @@ If the current Plan Risk Audit marks a Step for strict review, `task step-comple
48
48
  creates the workflow-owned commit, but the Step stays non-terminal and `next` routes to
49
49
  `task step-review`. Canonical completion is recorded only after the strict review and the
50
50
  reviewer attestation both bind to that exact completion commit.
51
+ When `next` advertises `task step-review`, pass the exact claimant or required actor as
52
+ `--actor`; the isolated reviewer identity is created inside Core and must not be substituted
53
+ into the mutation actor slot.
51
54
 
52
55
  Invalid or stale review sidecars fail closed. The workflow blocks downstream acceptance and
53
56
  normal continuation when review evidence is malformed, unverified, or commit-mismatched.
@@ -124,6 +127,38 @@ dedicated user-visible Task chat. A Task chat may use internal Worker and Review
124
127
  but only its delegate coordinator uses the grant. This prevents one long Milestone context
125
128
  from accumulating every implementation and review loop.
126
129
 
130
+ The context boundary is literal: a Task chat is a new standalone Codex task created with an
131
+ explicit Task-only prompt, never a fork or handoff of the Milestone chat. Its prompt contains the
132
+ exact repository/Milestone/Task identifiers and fresh Task contract, but no parent transcript,
133
+ sibling Task details, recovery narrative, reasoning trace, or bearer credential. Creation failure
134
+ is a dispatch blocker, not permission to fork. The coordinator verifies one unique mapping from
135
+ each Task ID to its thread and title before work begins.
136
+
137
+ A host-generated `codex_delegation` envelope containing routing provenance such as
138
+ `source_thread_id` is allowed; it must contain the TaskContextPacket as its complete input and must
139
+ not carry completed parent turns. The coordinator reads the title back after creation and explicitly
140
+ renames it when the supplied title was omitted or normalized.
141
+
142
+ Chat titles are allocated atomically by the project registry; sidebar counts and `count + 1` are
143
+ not valid numbering sources. Primary forms are:
144
+
145
+ ```text
146
+ #NNN · M<NN> · Coord · <Milestone title> · <MS-ID>
147
+ #NNN · M<NN>/T<NN> · Task · <Task title> · <TASK-ID>
148
+ ```
149
+
150
+ The sequence and membership ordinal come first; the full ID prevents ambiguous identity. Exact
151
+ readback is mandatory and only registry-supplied deterministic fallbacks may be used.
152
+
153
+ Autonomy also requires active supervision. After just-in-time dispatch, the Milestone coordinator
154
+ keeps a bounded `wait_threads` loop for the routed Task, inspects completion/attention, and verifies
155
+ fresh Workflow `status -> next` before deciding what happened. It resumes a recoverable
156
+ nonterminal Task in the same chat with `send_message_to_thread`; it does not shift ordinary
157
+ implementation questions to the user. The coordinator may stop only for an exact human/semantic
158
+ gate, exhausted infrastructure retry, unrecoverable integrity conflict, a user-requested
159
+ checkpoint, or terminal Milestone closure. A finished chat is not proof of a terminal Task, and a
160
+ child result does not automatically wake a coordinator turn that has already ended.
161
+
127
162
  ## Update boundary
128
163
 
129
164
  Before changing the exact npm version, run `update preflight`. A compatible update is safe
@@ -151,7 +186,11 @@ current `MSA-*` code. Without that option the ordinary later-message human gate
151
186
  ## Bounded Milestone autonomy and C1 handoff
152
187
 
153
188
  Initial assembly may materialize every linked Task before one complete `milestone plan-set`;
154
- the Milestone cannot execute until all reverse memberships are classified. Ordinary semantic
189
+ the Milestone cannot execute until all reverse memberships are classified. During that exact
190
+ window `next` returns non-executable `milestone initial-assembly` navigation with explicit
191
+ linked-Task Discovery/materialization options; the closing Plan option appears after the first
192
+ linked Task exists. A failed navigation call must not
193
+ be bypassed with a direct Plan command. Ordinary semantic
155
194
  scope change remains explicit and human-only through `milestone scope-change-prepare` and
156
195
  `milestone scope-change-apply`.
157
196