codex-workflow-v2 2.0.0-beta.1 → 2.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -12
- package/dist/src/alpha6/adoption.js +13 -3
- package/dist/src/alpha6/adoption.js.map +1 -1
- package/dist/src/alpha6/handoff.d.ts +26 -2
- package/dist/src/alpha6/handoff.js +277 -29
- package/dist/src/alpha6/handoff.js.map +1 -1
- package/dist/src/alpha6/mechanical-feasibility.d.ts +7 -0
- package/dist/src/alpha6/mechanical-feasibility.js +303 -0
- package/dist/src/alpha6/mechanical-feasibility.js.map +1 -0
- package/dist/src/alpha6/milestone.d.ts +37 -2
- package/dist/src/alpha6/milestone.js +472 -33
- package/dist/src/alpha6/milestone.js.map +1 -1
- package/dist/src/alpha6/plan-integrity.d.ts +14 -0
- package/dist/src/alpha6/plan-integrity.js +127 -0
- package/dist/src/alpha6/plan-integrity.js.map +1 -0
- package/dist/src/alpha6/plan-risk.d.ts +1 -0
- package/dist/src/alpha6/plan-risk.js +15 -7
- package/dist/src/alpha6/plan-risk.js.map +1 -1
- package/dist/src/alpha6/remediation.d.ts +2 -1
- package/dist/src/alpha6/remediation.js +186 -9
- package/dist/src/alpha6/remediation.js.map +1 -1
- package/dist/src/alpha6/review.d.ts +3 -0
- package/dist/src/alpha6/review.js +24 -0
- package/dist/src/alpha6/review.js.map +1 -1
- package/dist/src/cli.js +486 -46
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +238 -6
- package/dist/src/contracts.js +1 -1
- package/dist/src/credential-output.d.ts +10 -0
- package/dist/src/credential-output.js +73 -0
- package/dist/src/credential-output.js.map +1 -0
- package/dist/src/dependency-provenance.d.ts +19 -0
- package/dist/src/dependency-provenance.js +185 -0
- package/dist/src/dependency-provenance.js.map +1 -0
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/errors.js.map +1 -1
- package/dist/src/git.d.ts +1 -1
- package/dist/src/git.js +13 -5
- package/dist/src/git.js.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +2 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/lifecycle/canonical-hash.d.ts +6 -0
- package/dist/src/lifecycle/canonical-hash.js +24 -0
- package/dist/src/lifecycle/canonical-hash.js.map +1 -0
- package/dist/src/lifecycle/catalog.d.ts +26 -0
- package/dist/src/lifecycle/catalog.js +208 -0
- package/dist/src/lifecycle/catalog.js.map +1 -0
- package/dist/src/lifecycle/compiler-inspection.d.ts +48 -0
- package/dist/src/lifecycle/compiler-inspection.js +29 -0
- package/dist/src/lifecycle/compiler-inspection.js.map +1 -0
- package/dist/src/lifecycle/core-static-readiness.d.ts +6 -0
- package/dist/src/lifecycle/core-static-readiness.js +130 -0
- package/dist/src/lifecycle/core-static-readiness.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-authority.d.ts +53 -0
- package/dist/src/lifecycle/corrective-replan-authority.js +139 -0
- package/dist/src/lifecycle/corrective-replan-authority.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-binding-manifest.d.ts +21 -0
- package/dist/src/lifecycle/corrective-replan-binding-manifest.js +35 -0
- package/dist/src/lifecycle/corrective-replan-binding-manifest.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-credential-core.d.ts +86 -0
- package/dist/src/lifecycle/corrective-replan-credential-core.js +563 -0
- package/dist/src/lifecycle/corrective-replan-credential-core.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-credential-schema.d.ts +17 -0
- package/dist/src/lifecycle/corrective-replan-credential-schema.js +44 -0
- package/dist/src/lifecycle/corrective-replan-credential-schema.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-credentials.d.ts +47 -0
- package/dist/src/lifecycle/corrective-replan-credentials.js +103 -0
- package/dist/src/lifecycle/corrective-replan-credentials.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan.d.ts +64 -0
- package/dist/src/lifecycle/corrective-replan.js +553 -0
- package/dist/src/lifecycle/corrective-replan.js.map +1 -0
- package/dist/src/lifecycle/evaluator.d.ts +2 -0
- package/dist/src/lifecycle/evaluator.js +35 -0
- package/dist/src/lifecycle/evaluator.js.map +1 -0
- package/dist/src/lifecycle/fingerprint.d.ts +31 -0
- package/dist/src/lifecycle/fingerprint.js +388 -0
- package/dist/src/lifecycle/fingerprint.js.map +1 -0
- package/dist/src/lifecycle/immutable.d.ts +1 -0
- package/dist/src/lifecycle/immutable.js +10 -0
- package/dist/src/lifecycle/immutable.js.map +1 -0
- package/dist/src/lifecycle/implementation-table.d.ts +29 -0
- package/dist/src/lifecycle/implementation-table.js +87 -0
- package/dist/src/lifecycle/implementation-table.js.map +1 -0
- package/dist/src/lifecycle/index.d.ts +4 -0
- package/dist/src/lifecycle/index.js +5 -0
- package/dist/src/lifecycle/index.js.map +1 -0
- package/dist/src/lifecycle/schema-artifact.d.ts +12 -0
- package/dist/src/lifecycle/schema-artifact.js +214 -0
- package/dist/src/lifecycle/schema-artifact.js.map +1 -0
- package/dist/src/lifecycle/semantic-registry.d.ts +6 -0
- package/dist/src/lifecycle/semantic-registry.js +489 -0
- package/dist/src/lifecycle/semantic-registry.js.map +1 -0
- package/dist/src/lifecycle/types.d.ts +718 -0
- package/dist/src/lifecycle/types.js +4 -0
- package/dist/src/lifecycle/types.js.map +1 -0
- package/dist/src/observation.d.ts +20 -0
- package/dist/src/observation.js +171 -0
- package/dist/src/observation.js.map +1 -0
- package/dist/src/reviewer.d.ts +43 -1
- package/dist/src/reviewer.js +203 -50
- package/dist/src/reviewer.js.map +1 -1
- package/dist/src/state/corrective-replan-executor.d.ts +64 -0
- package/dist/src/state/corrective-replan-executor.js +608 -0
- package/dist/src/state/corrective-replan-executor.js.map +1 -0
- package/dist/src/state/corrective-replan-public-schema.d.ts +3 -0
- package/dist/src/state/corrective-replan-public-schema.js +43 -0
- package/dist/src/state/corrective-replan-public-schema.js.map +1 -0
- package/dist/src/state/corrective-replan-public.d.ts +95 -0
- package/dist/src/state/corrective-replan-public.js +665 -0
- package/dist/src/state/corrective-replan-public.js.map +1 -0
- package/dist/src/state/corrective-replan-transaction.d.ts +160 -0
- package/dist/src/state/corrective-replan-transaction.js +730 -0
- package/dist/src/state/corrective-replan-transaction.js.map +1 -0
- package/dist/src/state/corrective-yield-executor.d.ts +31 -0
- package/dist/src/state/corrective-yield-executor.js +236 -0
- package/dist/src/state/corrective-yield-executor.js.map +1 -0
- package/dist/src/state/corrective-yield-transaction.d.ts +97 -0
- package/dist/src/state/corrective-yield-transaction.js +591 -0
- package/dist/src/state/corrective-yield-transaction.js.map +1 -0
- package/dist/src/state/lock.d.ts +76 -3
- package/dist/src/state/lock.js +611 -30
- package/dist/src/state/lock.js.map +1 -1
- package/dist/src/state/store.d.ts +3 -0
- package/dist/src/state/store.js +65 -12
- package/dist/src/state/store.js.map +1 -1
- package/dist/src/transition-core.d.ts +67 -0
- package/dist/src/transition-core.js +318 -0
- package/dist/src/transition-core.js.map +1 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/src/workflow.d.ts +88 -24
- package/dist/src/workflow.js +1647 -270
- package/dist/src/workflow.js.map +1 -1
- package/docs/autonomy-guardrails.md +61 -1
- package/docs/beta11-plan-integrity-recovery-brief.md +38 -0
- package/docs/beta2-initial-assembly-navigation-brief.md +616 -0
- package/docs/delegated-approval.md +26 -1
- package/docs/development-flow.md +63 -8
- package/docs/lifecycle/state-machine-stabilization.md +641 -0
- package/docs/pdf/README.md +24 -0
- package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
- package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
- package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
- package/docs/pdf/requirements.txt +1 -0
- package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +234 -0
- package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +334 -0
- package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +413 -0
- package/docs/problem-briefs/01-pre-implementation-integrity.md +478 -0
- package/docs/problem-briefs/02-minimal-step-integrity.md +411 -0
- package/docs/problem-briefs/03-minimal-agent-context-integrity.md +358 -0
- package/docs/problem-briefs/04-task-dependency-and-structural-replacement-integrity.md +566 -0
- package/docs/problem-briefs/BRIEF-TEMPLATE.md +56 -0
- package/docs/problem-briefs/README.md +120 -0
- package/docs/problem-briefs/evidence/p01-mechanical-feasibility-corpus.md +90 -0
- package/docs/problem-briefs/evidence/signal-v4-pre-m3-replay.md +246 -0
- package/docs/release.md +30 -6
- package/docs/split-required-recovery.md +19 -25
- package/docs/stable-release-defect-register.md +465 -3
- package/docs/updating-existing-project.md +59 -4
- package/docs/validation-report.md +124 -56
- package/package.json +9 -1
- package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +10 -3
- package/plugins/codex-workflow-gateway/references/protocol.md +92 -4
- package/plugins/codex-workflow-gateway/scripts/chat-registry.mjs +376 -0
- package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +263 -4
- package/references/state-machine.md +13 -6
- package/roles/delivery-coordinator.md +39 -0
- package/schemas/adoption-posture-event.schema.json +1 -1
- package/schemas/authorization-event.schema.json +64 -1
- package/schemas/context-envelope.schema.json +1 -1
- package/schemas/corrective-decision-event.schema.json +48 -3
- package/schemas/corrective-replan-credentials.private.schema.json +98 -0
- package/schemas/corrective-replan-execution-event.private.schema.json +53 -0
- package/schemas/corrective-replan-public.schema.json +142 -0
- package/schemas/corrective-replan-task-transaction.private.schema.json +151 -0
- package/schemas/corrective-yield-task-transaction.private.schema.json +98 -0
- package/schemas/milestone-scope-change-event.schema.json +6 -1
- package/schemas/milestone.schema.json +6 -1
- package/schemas/remediation-event.schema.json +11 -1
- package/schemas/task-handoff-event.schema.json +19 -3
- package/schemas/task.schema.json +24 -1
- package/schemas/transition-definition.schema.json +2609 -0
- package/schemas/transition-payloads.schema.json +140 -0
- package/scripts/generate-pdf-docs.py +512 -0
- package/scripts/run-pdf-docs.mjs +62 -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.
|
|
@@ -86,6 +89,27 @@ and only `split-required` or `stop-escalate` may be recorded. At the corrective
|
|
|
86
89
|
`next` derives a distinct `agent:corrective-auditor:<task-id>` actor; selecting that actor is
|
|
87
90
|
not a human approval, while auditor independence remains mandatory.
|
|
88
91
|
|
|
92
|
+
### First-failure Plan-integrity recovery
|
|
93
|
+
|
|
94
|
+
A mechanically impossible Plan check must not consume the second ordinary remediation attempt
|
|
95
|
+
only to unlock corrective replan. After the first guarded `checks-failed` event, Core performs a
|
|
96
|
+
read-only bounded assessment. `next` advertises `task plan-integrity-recover` only when all of the
|
|
97
|
+
following are true:
|
|
98
|
+
|
|
99
|
+
- the failed Step contains an exact root `npm run <script>` or `npm run-script <script>` check;
|
|
100
|
+
- the named script is absent from the current root `package.json`;
|
|
101
|
+
- `package.json` is outside the failed Step's `allowedWrites`;
|
|
102
|
+
- exactly one ordinary `checks-failed` remediation event exists for the Step;
|
|
103
|
+
- no corrective decision exists for its second-attempt binding;
|
|
104
|
+
- every dirty file remains inside the Step's current `allowedWrites` and outside its
|
|
105
|
+
`forbiddenScope`.
|
|
106
|
+
|
|
107
|
+
The recovery appends one hash-bound `replan-required` decision for attempt ordinal 2. It preserves
|
|
108
|
+
the worktree and does not edit the Plan. A claimed C1 Task must present its current writer token and
|
|
109
|
+
then follow `task corrective-yield`; the replacement Plan still requires the existing independent
|
|
110
|
+
validation, Risk Audit, Human confirmation, journaled execution, readback, and renewed execution
|
|
111
|
+
authorization. Other check failures retain the ordinary two-attempt breaker.
|
|
112
|
+
|
|
89
113
|
## Atomic context refresh
|
|
90
114
|
|
|
91
115
|
When `next` returns top-level `action: task context-refresh` with an exact option, a
|
|
@@ -124,6 +148,38 @@ dedicated user-visible Task chat. A Task chat may use internal Worker and Review
|
|
|
124
148
|
but only its delegate coordinator uses the grant. This prevents one long Milestone context
|
|
125
149
|
from accumulating every implementation and review loop.
|
|
126
150
|
|
|
151
|
+
The context boundary is literal: a Task chat is a new standalone Codex task created with an
|
|
152
|
+
explicit Task-only prompt, never a fork or handoff of the Milestone chat. Its prompt contains the
|
|
153
|
+
exact repository/Milestone/Task identifiers and fresh Task contract, but no parent transcript,
|
|
154
|
+
sibling Task details, recovery narrative, reasoning trace, or bearer credential. Creation failure
|
|
155
|
+
is a dispatch blocker, not permission to fork. The coordinator verifies one unique mapping from
|
|
156
|
+
each Task ID to its thread and title before work begins.
|
|
157
|
+
|
|
158
|
+
A host-generated `codex_delegation` envelope containing routing provenance such as
|
|
159
|
+
`source_thread_id` is allowed; it must contain the TaskContextPacket as its complete input and must
|
|
160
|
+
not carry completed parent turns. The coordinator reads the title back after creation and explicitly
|
|
161
|
+
renames it when the supplied title was omitted or normalized.
|
|
162
|
+
|
|
163
|
+
Chat titles are allocated atomically by the project registry; sidebar counts and `count + 1` are
|
|
164
|
+
not valid numbering sources. Primary forms are:
|
|
165
|
+
|
|
166
|
+
```text
|
|
167
|
+
#NNN · M<NN> · Coord · <Milestone title> · <MS-ID>
|
|
168
|
+
#NNN · M<NN>/T<NN> · Task · <Task title> · <TASK-ID>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
The sequence and membership ordinal come first; the full ID prevents ambiguous identity. Exact
|
|
172
|
+
readback is mandatory and only registry-supplied deterministic fallbacks may be used.
|
|
173
|
+
|
|
174
|
+
Autonomy also requires active supervision. After just-in-time dispatch, the Milestone coordinator
|
|
175
|
+
keeps a bounded `wait_threads` loop for the routed Task, inspects completion/attention, and verifies
|
|
176
|
+
fresh Workflow `status -> next` before deciding what happened. It resumes a recoverable
|
|
177
|
+
nonterminal Task in the same chat with `send_message_to_thread`; it does not shift ordinary
|
|
178
|
+
implementation questions to the user. The coordinator may stop only for an exact human/semantic
|
|
179
|
+
gate, exhausted infrastructure retry, unrecoverable integrity conflict, a user-requested
|
|
180
|
+
checkpoint, or terminal Milestone closure. A finished chat is not proof of a terminal Task, and a
|
|
181
|
+
child result does not automatically wake a coordinator turn that has already ended.
|
|
182
|
+
|
|
127
183
|
## Update boundary
|
|
128
184
|
|
|
129
185
|
Before changing the exact npm version, run `update preflight`. A compatible update is safe
|
|
@@ -151,7 +207,11 @@ current `MSA-*` code. Without that option the ordinary later-message human gate
|
|
|
151
207
|
## Bounded Milestone autonomy and C1 handoff
|
|
152
208
|
|
|
153
209
|
Initial assembly may materialize every linked Task before one complete `milestone plan-set`;
|
|
154
|
-
the Milestone cannot execute until all reverse memberships are classified.
|
|
210
|
+
the Milestone cannot execute until all reverse memberships are classified. During that exact
|
|
211
|
+
window `next` returns non-executable `milestone initial-assembly` navigation with explicit
|
|
212
|
+
linked-Task Discovery/materialization options; the closing Plan option appears after the first
|
|
213
|
+
linked Task exists. A failed navigation call must not
|
|
214
|
+
be bypassed with a direct Plan command. Ordinary semantic
|
|
155
215
|
scope change remains explicit and human-only through `milestone scope-change-prepare` and
|
|
156
216
|
`milestone scope-change-apply`.
|
|
157
217
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# V2 beta.11 bounded Plan-integrity recovery
|
|
2
|
+
|
|
3
|
+
## Problem
|
|
4
|
+
|
|
5
|
+
A guarded Step may fail its first Core-owned completion because the approved Plan requires an
|
|
6
|
+
exact root `npm run <script>` command, the script is absent, and the same Step cannot modify
|
|
7
|
+
`package.json`. Re-advertising `task run` cannot succeed and consumes a second ordinary remediation
|
|
8
|
+
attempt only to reach corrective replan.
|
|
9
|
+
|
|
10
|
+
P01-A now rejects this contradiction before a fresh execution authorization when it is already
|
|
11
|
+
provable at the selected evaluation HEAD. The beta.11 route remains necessary for pre-P01-A
|
|
12
|
+
authorizations and contradictions that genuinely become observable only after execution starts.
|
|
13
|
+
|
|
14
|
+
## Decision
|
|
15
|
+
|
|
16
|
+
Add `task plan-integrity-recover` as a narrow explicit repair. Its read-side assessment proves one
|
|
17
|
+
first `checks-failed` event, an absent root npm script, a manifest outside `allowedWrites`, and a
|
|
18
|
+
worktree confined to the guarded Step. The mutation appends a hash-bound `replan-required`
|
|
19
|
+
corrective decision for attempt ordinal 2. Existing C1 yield, corrective-replan Human gate,
|
|
20
|
+
journal, recovery, readback, Plan validation, Risk Audit, and authorization supersession remain
|
|
21
|
+
the only way to publish the replacement Plan.
|
|
22
|
+
|
|
23
|
+
## Non-goals
|
|
24
|
+
|
|
25
|
+
- No generic shell-command diagnosis.
|
|
26
|
+
- No automatic Plan editing or inferred replacement command.
|
|
27
|
+
- No `allowedWrites` expansion.
|
|
28
|
+
- No second synthetic failure.
|
|
29
|
+
- No bypass of C1 ownership, writer credentials, Human confirmation, independent validation, or
|
|
30
|
+
Risk Audit.
|
|
31
|
+
- No recovery when dirty files escape the current Step boundary.
|
|
32
|
+
|
|
33
|
+
## Required evidence
|
|
34
|
+
|
|
35
|
+
The recovery event binds Task revision, Plan hash, failed remediation ID/hash, Step-definition
|
|
36
|
+
hash, Git HEAD, root manifest hash, missing scripts, exact check commands, complete changed-file
|
|
37
|
+
set, and a canonical conflict hash. Legacy corrective-decision events remain valid and retain the
|
|
38
|
+
ordinary minimum of two failed attempts.
|