codex-workflow-v2 2.0.0-alpha.7.2.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.
- package/README.md +63 -7
- package/dist/src/alpha6/adoption.js +13 -3
- package/dist/src/alpha6/adoption.js.map +1 -1
- package/dist/src/alpha6/handoff.d.ts +23 -0
- package/dist/src/alpha6/handoff.js +221 -28
- package/dist/src/alpha6/handoff.js.map +1 -1
- package/dist/src/alpha6/milestone.d.ts +29 -0
- package/dist/src/alpha6/milestone.js +167 -1
- package/dist/src/alpha6/milestone.js.map +1 -1
- 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.js +18 -6
- 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/beta1/project-transaction.d.ts +52 -0
- package/dist/src/beta1/project-transaction.js +297 -0
- package/dist/src/beta1/project-transaction.js.map +1 -0
- package/dist/src/cli.js +478 -32
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +189 -5
- 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/diagnostics.d.ts +11 -0
- package/dist/src/diagnostics.js +54 -0
- package/dist/src/diagnostics.js.map +1 -1
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/errors.js.map +1 -1
- package/dist/src/git.js +7 -9
- package/dist/src/git.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -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 +548 -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 +93 -25
- package/dist/src/workflow.js +1712 -218
- package/dist/src/workflow.js.map +1 -1
- package/docs/autonomy-guardrails.md +43 -3
- package/docs/beta1-stabilization-brief.md +165 -0
- package/docs/beta2-initial-assembly-navigation-brief.md +616 -0
- package/docs/delegated-approval.md +30 -4
- package/docs/development-flow.md +38 -6
- package/docs/lifecycle/state-machine-stabilization.md +641 -0
- package/docs/project-memory.md +7 -5
- package/docs/release.md +25 -3
- package/docs/split-required-recovery.md +54 -0
- package/docs/stable-release-defect-register.md +730 -0
- package/docs/updating-existing-project.md +59 -4
- package/docs/validation-report.md +85 -56
- package/package.json +6 -2
- package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +10 -3
- package/plugins/codex-workflow-gateway/references/protocol.md +80 -5
- package/plugins/codex-workflow-gateway/scripts/chat-registry.mjs +376 -0
- package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +255 -3
- package/references/state-machine.md +4 -1
- package/roles/delivery-coordinator.md +39 -0
- package/schemas/adoption-posture-event.schema.json +1 -1
- package/schemas/context-envelope.schema.json +1 -1
- 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/remediation-event.schema.json +11 -1
- package/schemas/task-handoff-event.schema.json +1 -1
- package/schemas/task.schema.json +25 -0
- package/schemas/transition-definition.schema.json +2609 -0
- package/schemas/transition-payloads.schema.json +140 -0
package/docs/project-memory.md
CHANGED
|
@@ -30,12 +30,14 @@ definition, status, and evidence record, records the old/new binding, supersedes
|
|
|
30
30
|
authorization, and cannot run while a Step is in progress. If local state is lost, the map
|
|
31
31
|
is rebuilt from repository files.
|
|
32
32
|
|
|
33
|
-
For delegated autonomy, repository `next`
|
|
34
|
-
active and inspection proves
|
|
33
|
+
For delegated autonomy, repository `next` returns top-level `action: task context-refresh` and an
|
|
34
|
+
exact `contextRefresh` option when the stored map was active and inspection proves eligible drift.
|
|
35
|
+
Do not run standalone reconcile first. `task context-refresh` then performs
|
|
35
36
|
reconcile, delegated map approval, Task rebind, and delegated execution authorization while
|
|
36
|
-
preserving the ordinary audit events.
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
preserving the ordinary audit events. In addition to content-only drift, a Milestone Autonomy Grant
|
|
38
|
+
may admit one or more exact Plan-declared supporting sources. The command rejects removed,
|
|
39
|
+
undeclared, canonical, category/scope/authority-changing, gap-changing, and conflicting sources.
|
|
40
|
+
Those changes remain visible for normal classification and approval.
|
|
39
41
|
|
|
40
42
|
## Codebase graph
|
|
41
43
|
|
package/docs/release.md
CHANGED
|
@@ -15,19 +15,41 @@ Before tagging a release:
|
|
|
15
15
|
5. `npm run plugin:check`
|
|
16
16
|
6. `npm run release:check`
|
|
17
17
|
7. validate `plugins/codex-workflow-gateway` with the Codex plugin validator
|
|
18
|
+
8. validate the append-only real-agent log with
|
|
19
|
+
`node scripts/validate-lifecycle-transcript.mjs --file <lifecycle-log.jsonl>`
|
|
18
20
|
|
|
19
21
|
The downstream smoke packs the actual tarball, installs it into an empty temporary project,
|
|
20
22
|
runs the packaged CLI handshake, and proves installation created none of `.codex`, `.tasks`,
|
|
21
23
|
`.increments`, or `.memory-bank` in that project.
|
|
22
24
|
|
|
23
|
-
For
|
|
25
|
+
For beta.10, the release gate also relies on `npm run release:check` to fail if:
|
|
24
26
|
|
|
25
27
|
- canonical entity schema 2 shapes drift;
|
|
26
|
-
- protocol 1
|
|
28
|
+
- protocol 2 is not the active public contract, or intact protocol-1 adoption evidence stops being readable through the bounded compatibility window;
|
|
27
29
|
- the delegated transition allow-list expands;
|
|
28
30
|
- schema-2 adoption is presented as `state migrate` instead of posture sidecars;
|
|
29
31
|
- alpha.7 rescue, Milestone autonomy (including guarded content refresh), derived actor, or
|
|
30
|
-
proof-obligation capabilities and schemas are absent from the packaged surface
|
|
32
|
+
proof-obligation capabilities and schemas are absent from the packaged surface;
|
|
33
|
+
- terminal Task replacement, project-level transaction recovery, secret-safe lock diagnostics,
|
|
34
|
+
version/base diagnostics, or serialized maintainer validation are missing.
|
|
35
|
+
- truthful initial-assembly navigation capability is absent from the packaged surface.
|
|
36
|
+
- corrective-yield/replan protocol-v2 commands, closed schemas, Human gate, retained journals,
|
|
37
|
+
explicit recovery, or dual-readback capabilities are absent from the packaged surface.
|
|
38
|
+
- scoped Task navigation, credential replacement recovery, or sealed external Task/Step review
|
|
39
|
+
commands are absent from the packaged surface.
|
|
40
|
+
- bounded dependency-provenance recovery, retained passed-review provenance, the exact Signal T04
|
|
41
|
+
revision-26 fixture, or pending/corrupt-review rejection regressions are absent.
|
|
42
|
+
- the read-only Milestone progress projection, replacement regression, project-monotonic chat
|
|
43
|
+
registry, title fallback/readback, or long-Cyrillic multi-attempt E2E evidence is absent.
|
|
44
|
+
|
|
45
|
+
The separate lifecycle transcript validator fails if the real-agent log contains a mutation that
|
|
46
|
+
bypasses failed `status`/`next`, an unadvertised or failed mutation, an unresolved syntax-only
|
|
47
|
+
retry, or missing post-mutation checkpoints.
|
|
48
|
+
|
|
49
|
+
Full `npm test` and `npm run validate` invocations share destructive build outputs and are therefore
|
|
50
|
+
single-owner operations. A concurrent invocation fails immediately with
|
|
51
|
+
`VALIDATION_ALREADY_RUNNING`; retry it after the owner exits. Stale process locks are recovered
|
|
52
|
+
automatically.
|
|
31
53
|
|
|
32
54
|
Tag releases as `v<package-version>`. The tag workflow verifies the tag/package match and
|
|
33
55
|
uses npm trusted publishing with public access. For a public GitHub repository and public
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Canonical `split-required` recovery
|
|
2
|
+
|
|
3
|
+
Use this procedure only when the exact package-local `next` response identifies a terminal
|
|
4
|
+
`split-required` decision. Never rebind, refresh, replan, authorize, or resume the historical Task.
|
|
5
|
+
|
|
6
|
+
## Delegate prompt
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
Continue the active Milestone through the package-local codex-workflow-v2 Core only.
|
|
10
|
+
|
|
11
|
+
1. Run `codex-workflow status --repo .` and `codex-workflow next --repo .`. Treat every returned
|
|
12
|
+
revision and action as authoritative. Stop on corruption, stop-escalate, version divergence, or
|
|
13
|
+
an unexpected action. Do not edit workflow state or sidecars.
|
|
14
|
+
2. Confirm that `next` reports the historical Task as `split-required`. Do not run
|
|
15
|
+
`task knowledge-rebind`, `task context-refresh`, `task plan-set`, `task authorize`, or `task run`
|
|
16
|
+
for that Task.
|
|
17
|
+
3. If `next` says `discovery start`, create one thin replacement Discovery containing only the
|
|
18
|
+
failed Step's remaining outcome, exact acceptance, constraints, and explicit out-of-scope. Make
|
|
19
|
+
it `ready_to_materialize`, then run `status` and `next` again.
|
|
20
|
+
4. When `next` returns `task replacement-materialize`, run that exact command with its old Task,
|
|
21
|
+
Discovery, and Milestone revisions, a precise replacement title, and the current authorized
|
|
22
|
+
actor. This single transaction must consume the Discovery, cancel/link the historical Task,
|
|
23
|
+
create/link the replacement Task, change both memberships, supersede Milestone execution
|
|
24
|
+
authorization, and leave the Milestone awaiting reauthorization. Do not perform a separate
|
|
25
|
+
scope change for these effects.
|
|
26
|
+
5. Run `status`, wait for terminal success, then run `next`; never issue the pair in parallel.
|
|
27
|
+
Verify: old Task `cancelled`; old membership `cancelled`; new Task
|
|
28
|
+
`planning` and `replacementForTaskId` points to the old Task; new membership `required`;
|
|
29
|
+
Milestone `awaiting_execution_authorization`. If any relation is missing, stop and run `doctor`.
|
|
30
|
+
6. Follow the exact `next` transition to reauthorize the changed Milestone. Run `status` to
|
|
31
|
+
terminal success and then `next` again. Do not reuse the historical Task's Plan or authorization.
|
|
32
|
+
7. Plan the replacement Task from its own Brief, record the required Plan Risk Audit, authorize it,
|
|
33
|
+
prepare and claim its C1 handoff, and execute only the exact Step returned by `next`. Run
|
|
34
|
+
sequential `status` then `next` checkpoints after every state boundary.
|
|
35
|
+
8. Complete review, final acceptance, merge, remaining required Tasks, Milestone validation, and
|
|
36
|
+
Milestone final acceptance through exact Core transitions. Never create a fourth remediation
|
|
37
|
+
attempt for the historical Task.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Exact replacement command shape
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
codex-workflow task replacement-materialize --repo . \
|
|
44
|
+
--id TASK-OLD \
|
|
45
|
+
--expected-revision OLD_TASK_REVISION \
|
|
46
|
+
--discovery DISC-REPLACEMENT \
|
|
47
|
+
--expected-discovery-revision DISCOVERY_REVISION \
|
|
48
|
+
--expected-milestone-revision MILESTONE_REVISION \
|
|
49
|
+
--title "Thin replacement title" \
|
|
50
|
+
--actor agent:milestone-coordinator
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Copy revisions from the same `next` response. If multiple ready Discoveries exist, Core refuses to
|
|
54
|
+
guess; choose the intended Discovery explicitly after reviewing its raw content.
|