codex-workflow-v2 2.0.0-alpha.7.2.1 → 2.0.0-beta.2
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 +24 -5
- package/dist/src/alpha6/milestone.d.ts +27 -0
- package/dist/src/alpha6/milestone.js +152 -1
- package/dist/src/alpha6/milestone.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 +239 -4
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +20 -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/git.js +2 -5
- package/dist/src/git.js.map +1 -1
- package/dist/src/reviewer.d.ts +4 -0
- package/dist/src/reviewer.js +24 -7
- package/dist/src/reviewer.js.map +1 -1
- 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 +28 -1
- package/dist/src/workflow.js +658 -54
- package/dist/src/workflow.js.map +1 -1
- package/docs/autonomy-guardrails.md +11 -3
- package/docs/beta1-stabilization-brief.md +165 -0
- package/docs/beta2-initial-assembly-navigation-brief.md +616 -0
- package/docs/delegated-approval.md +4 -3
- package/docs/development-flow.md +23 -6
- package/docs/project-memory.md +7 -5
- package/docs/release.md +16 -2
- package/docs/split-required-recovery.md +54 -0
- package/docs/stable-release-defect-register.md +597 -0
- package/docs/updating-existing-project.md +2 -0
- package/package.json +2 -2
- package/plugins/codex-workflow-gateway/references/protocol.md +62 -3
- package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +53 -2
- package/references/state-machine.md +4 -1
- package/schemas/task.schema.json +3 -1
package/docs/development-flow.md
CHANGED
|
@@ -40,6 +40,11 @@ failed checks, or any manual/unrecorded Worker commit block completion.
|
|
|
40
40
|
If the current Plan Risk Audit marks the Step for strict review, the atomic commit is still
|
|
41
41
|
created by core, but the Step remains non-terminal and `next` routes to `task step-review`
|
|
42
42
|
until commit-bound strict review and reviewer attestation pass.
|
|
43
|
+
Use the exact claimant or required actor from `next` as `--actor`; the independent reviewer
|
|
44
|
+
runs inside Core and is not supplied as the CLI actor.
|
|
45
|
+
When `next` includes `gitMutationPolicy`, obtain bounded permission for that exact Git-writing
|
|
46
|
+
transition before the first call instead of probing and retrying after a `.git/index.lock`
|
|
47
|
+
failure. For `task start`, this applies only when invoking `--workspace-owner local`.
|
|
43
48
|
|
|
44
49
|
After a Step changes approved project knowledge, the Delivery Coordinator reconciles and
|
|
45
50
|
reapproves the Project Knowledge Map, then runs `task knowledge-rebind` between Steps. The
|
|
@@ -50,13 +55,17 @@ active Worker Step, a no-op binding, an invalid knowledge target, or a modified
|
|
|
50
55
|
artifact. After the user authorizes the rebound Plan, execution resumes in the existing
|
|
51
56
|
workspace; if all Steps are complete, the next action is submission.
|
|
52
57
|
|
|
53
|
-
When `next
|
|
54
|
-
`task context-refresh`
|
|
55
|
-
execution reauthorization. Core validates both approval
|
|
56
|
-
|
|
58
|
+
When `next` returns top-level `action: task context-refresh` with an eligible grant,
|
|
59
|
+
`task context-refresh` composes reconcile, delegated map approval, rebind, and delegated
|
|
60
|
+
execution reauthorization. Do not run standalone reconcile first. Core validates both approval
|
|
61
|
+
transitions before writing. It permits content-only drift and exact Plan-declared supporting-source
|
|
62
|
+
additions under Milestone autonomy; every unsafe source-set, category, scope, authority, gap, or
|
|
63
|
+
conflict change is rejected.
|
|
57
64
|
|
|
58
65
|
Submission requires a clean, auditable Task history and records evidence for the exact
|
|
59
|
-
Task head. `task review-launch` starts a separate read-only reviewer
|
|
66
|
+
Task head. `task review-launch` starts a separate read-only reviewer and atomically records its
|
|
67
|
+
result. If C1 handoff is active, keep `--actor` equal to the current claimant or required actor
|
|
68
|
+
from `next`; the reviewer identity remains internal to the compound route. A passing fresh review
|
|
60
69
|
permits Result creation. Human final acceptance binds Brief, Plan, Result, evidence, and
|
|
61
70
|
the accepted head. Base advancement forces synchronization, checks, review, and acceptance
|
|
62
71
|
to be repeated before merge.
|
|
@@ -95,7 +104,12 @@ may finish while an amendment awaits authorization.
|
|
|
95
104
|
|
|
96
105
|
During initial planning, all linked Tasks may be materialized before one complete
|
|
97
106
|
`milestone plan-set`; no execution is available until the Plan classifies every reverse
|
|
98
|
-
membership.
|
|
107
|
+
membership. Repository `next` returns `milestone initial-assembly` both before Task 1 and between
|
|
108
|
+
linked Tasks. Its `linked-task-assembly` option explicitly permits `discovery start` and
|
|
109
|
+
`discovery materialize`; after the first linked Task exists, its closing option permits one
|
|
110
|
+
complete `milestone plan-set`. A failed
|
|
111
|
+
`status` or `next` is not permission to call the closing command directly. After that boundary,
|
|
112
|
+
semantic changes use human-only
|
|
99
113
|
`milestone scope-change-prepare` and `milestone scope-change-apply`. A previously issued
|
|
100
114
|
Milestone Autonomy Contract may instead use `milestone autonomy-evolve` for membership-only
|
|
101
115
|
changes while the outcome, success signal, acceptance, checks, discovery, and base branch
|
|
@@ -126,6 +140,9 @@ With an eligible `milestone.final_accept` grant, `next` additionally returns
|
|
|
126
140
|
`delegatedApprovalOptions`. The delegate may then use the current `MSA-*` code in the same
|
|
127
141
|
turn because the earlier grant-issuance turn is the controlling user decision. Without such
|
|
128
142
|
an option, the ordinary later-message human gate remains mandatory.
|
|
143
|
+
Pass `--delegation-grant` only when the same `next` response exposes an exact eligible
|
|
144
|
+
`delegatedApprovalOptions` entry for that transition. Ordinary C1 handoff, claim, run,
|
|
145
|
+
step-complete, step-review, merge, and sync-base do not consume a Milestone approval grant.
|
|
129
146
|
|
|
130
147
|
The Milestone coordinator keeps implementation out of its long-lived context: every required
|
|
131
148
|
Task runs in a dedicated user-visible Task chat. The Milestone chat owns ordering, exact
|
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,33 @@ 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.2, the release gate also relies on `npm run release:check` to fail if:
|
|
24
26
|
|
|
25
27
|
- canonical entity schema 2 shapes drift;
|
|
26
28
|
- protocol 1 compatibility is no longer additive;
|
|
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
|
+
|
|
37
|
+
The separate lifecycle transcript validator fails if the real-agent log contains a mutation that
|
|
38
|
+
bypasses failed `status`/`next`, an unadvertised or failed mutation, an unresolved syntax-only
|
|
39
|
+
retry, or missing post-mutation checkpoints.
|
|
40
|
+
|
|
41
|
+
Full `npm test` and `npm run validate` invocations share destructive build outputs and are therefore
|
|
42
|
+
single-owner operations. A concurrent invocation fails immediately with
|
|
43
|
+
`VALIDATION_ALREADY_RUNNING`; retry it after the owner exits. Stale process locks are recovered
|
|
44
|
+
automatically.
|
|
31
45
|
|
|
32
46
|
Tag releases as `v<package-version>`. The tag workflow verifies the tag/package match and
|
|
33
47
|
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.
|