codex-workflow-v2 2.0.0-alpha.6 → 2.0.0-alpha.7
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 +43 -15
- package/dist/src/alpha6/handoff.d.ts +1 -0
- package/dist/src/alpha6/handoff.js +6 -0
- package/dist/src/alpha6/handoff.js.map +1 -1
- package/dist/src/alpha6/milestone.d.ts +3 -0
- package/dist/src/alpha6/milestone.js +57 -3
- package/dist/src/alpha6/milestone.js.map +1 -1
- package/dist/src/alpha6/plan-risk.js +61 -0
- package/dist/src/alpha6/plan-risk.js.map +1 -1
- package/dist/src/alpha6/remediation.d.ts +1 -0
- package/dist/src/alpha6/remediation.js +6 -0
- package/dist/src/alpha6/remediation.js.map +1 -1
- package/dist/src/alpha7/autonomy.d.ts +61 -0
- package/dist/src/alpha7/autonomy.js +256 -0
- package/dist/src/alpha7/autonomy.js.map +1 -0
- package/dist/src/cli.js +24 -3
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +9 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/workflow.d.ts +35 -0
- package/dist/src/workflow.js +342 -23
- package/dist/src/workflow.js.map +1 -1
- package/docs/autonomy-guardrails.md +32 -11
- package/docs/decisions.md +16 -0
- package/docs/delegated-approval.md +12 -5
- package/docs/development-flow.md +12 -7
- package/docs/release.md +4 -2
- package/docs/updating-existing-project.md +10 -0
- package/docs/validation-report.md +51 -46
- package/package.json +1 -1
- package/plugins/codex-workflow-gateway/references/protocol.md +42 -10
- package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +19 -0
- package/references/state-machine.md +17 -10
- package/roles/delivery-coordinator.md +10 -1
- package/roles/technical-planner.md +3 -0
- package/schemas/milestone-autonomy-event.schema.json +45 -0
- package/schemas/milestone-scope-change-event.schema.json +3 -1
- package/schemas/plan-risk-audit-event.schema.json +21 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Autonomous Development Guardrails
|
|
2
2
|
|
|
3
3
|
These rules keep delegated execution autonomous without turning approval into a rubber stamp.
|
|
4
|
-
Alpha.
|
|
4
|
+
Alpha.7 adds no persistent canonical entity fields and keeps `stateSchemaVersion: 2`.
|
|
5
5
|
|
|
6
6
|
## Plan Risk Audit
|
|
7
7
|
|
|
8
|
-
Before execution authorization, every alpha.
|
|
8
|
+
Before execution authorization, every alpha.7 Task needs a current Plan Risk Audit sidecar
|
|
9
9
|
bound to the current Brief, Plan, and approved Knowledge Map. This is mandatory even when all
|
|
10
10
|
Steps are unguarded and the decision is `approved`.
|
|
11
11
|
|
|
@@ -15,6 +15,8 @@ The payload must classify every current Step exactly once and declare:
|
|
|
15
15
|
- `decision`: `approved`, `approved-with-rationale`, `split-required`, or `stop-escalate`
|
|
16
16
|
- per-Step guarded categories, concrete `failureModes`, and `reviewRequired`
|
|
17
17
|
- `requiredEvidence` entries that exactly match executable checks in that Step
|
|
18
|
+
- one proof obligation per guarded failure mode, with a hostile counterexample, expected safe
|
|
19
|
+
result, and evidence that exactly matches `requiredEvidence`
|
|
18
20
|
- `splitRationale` when migration is intentionally coupled to recovery or runtime composition
|
|
19
21
|
|
|
20
22
|
The workflow rejects omitted Steps, extra Steps, duplicate classifications, stale bindings,
|
|
@@ -70,13 +72,15 @@ path. The Auditor must differ from the failed-review author and cover every late
|
|
|
70
72
|
`replan-required`, `split-required`, and `stop-escalate` are stop decisions: Core does not
|
|
71
73
|
start another implementation loop.
|
|
72
74
|
|
|
73
|
-
For
|
|
75
|
+
For guarded Steps, remediation attempts are also tracked in
|
|
74
76
|
`remediation-events.jsonl`. Two ordinary remediation attempts are allowed. A third ordinary
|
|
75
77
|
retry is blocked until `task corrective-decision` records a current corrective decision in
|
|
76
78
|
`corrective-decisions.jsonl`. `continue-fix` allows bounded continuation; the other decisions
|
|
77
79
|
stop or redirect ordinary execution. If that third, corrective remediation review also fails,
|
|
78
80
|
Core enters a hard stop: a fourth run and another `continue-fix`/`replan-required` decision are
|
|
79
|
-
rejected. Only `split-required` or `stop-escalate` may be recorded.
|
|
81
|
+
rejected. Only `split-required` or `stop-escalate` may be recorded. At the corrective boundary,
|
|
82
|
+
`next` derives a distinct `agent:corrective-auditor:<task-id>` actor; selecting that actor is not
|
|
83
|
+
a human approval, while auditor independence remains mandatory.
|
|
80
84
|
|
|
81
85
|
## Content-only context refresh
|
|
82
86
|
|
|
@@ -113,7 +117,13 @@ An expired lease is also a blocker until the ordinary explicit stale-lock repair
|
|
|
113
117
|
The command is read-only and reports every blocker. It does not install a package or migrate
|
|
114
118
|
state. When `stateSchemaVersion` remains `2`, the external project state is reused unchanged.
|
|
115
119
|
Existing schema 2 projects then use `state adoption-prepare` and `state adoption-apply`; they
|
|
116
|
-
do not use `state migrate` for
|
|
120
|
+
do not use `state migrate` for schema-2 adoption.
|
|
121
|
+
|
|
122
|
+
Alpha.7 also exposes `update rescue-preflight` for one narrow alpha.6 deadlock: a pending strict
|
|
123
|
+
review whose completion commit changed canonical knowledge while Knowledge rebind is forbidden
|
|
124
|
+
by the still-in-progress Step. Eligibility requires an exact alpha.6 dependency, one pending
|
|
125
|
+
review, exact clean completion HEAD, valid history, and no active lease. The command is read-only
|
|
126
|
+
and returns only stale-lock repair plus strict-review actions.
|
|
117
127
|
|
|
118
128
|
## Milestone closure
|
|
119
129
|
|
|
@@ -123,15 +133,26 @@ compare Result, evidence, Plan hash, and validated HEAD. A delegate may accept o
|
|
|
123
133
|
exact `milestone.final_accept` option, must remain the recorded actor, and must pass the
|
|
124
134
|
current `MSA-*` code. Without that option the ordinary later-message human gate applies.
|
|
125
135
|
|
|
126
|
-
##
|
|
136
|
+
## Bounded Milestone autonomy and C1 handoff
|
|
137
|
+
|
|
138
|
+
Initial assembly may materialize every linked Task before one complete `milestone plan-set`;
|
|
139
|
+
the Milestone cannot execute until all reverse memberships are classified. Ordinary semantic
|
|
140
|
+
scope change remains explicit and human-only through `milestone scope-change-prepare` and
|
|
141
|
+
`milestone scope-change-apply`.
|
|
127
142
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
approval
|
|
143
|
+
After the initial Plan, one human may approve a time-bound (maximum 72 hours) Milestone
|
|
144
|
+
Autonomy Contract. It creates a milestone-scoped grant for Task/Milestone execution and final
|
|
145
|
+
acceptance plus Project Memory approval only inside an atomic content-only Task context refresh
|
|
146
|
+
for the same Milestone. Standalone Project Memory approval remains forbidden. The contract binds
|
|
147
|
+
the immutable outcome, success signal, acceptance, checks, discovery, and base branch.
|
|
148
|
+
`milestone autonomy-evolve` may only alter Task memberships; it records the
|
|
149
|
+
agent actor plus the autonomy-contract event hash in the journaled scope-change sidecar and
|
|
150
|
+
supersedes execution authorization. Any semantic drift, expiry, revocation, actor mismatch,
|
|
151
|
+
or contract hash mismatch fails closed.
|
|
132
152
|
|
|
133
153
|
`C1` handoff uses `task handoff-prepare`, `task claim --claim-token ...`, and terminal
|
|
134
|
-
`task handback-create`.
|
|
154
|
+
`task handback-create`. When target actor is omitted, Core derives
|
|
155
|
+
`agent:worker:<task-id>`. Preparation returns a one-time token and prompt bound to a stable
|
|
135
156
|
`handoffId`, revision, Brief/Plan/Knowledge hashes, Milestone and Task display numbers,
|
|
136
157
|
expected next action, delegate/grant, creation time, and expiry. Only the claim-token hash is
|
|
137
158
|
stored; `task handoff-show` cannot recover it. Claim fails closed on expiry, actor, token,
|
package/docs/decisions.md
CHANGED
|
@@ -80,3 +80,19 @@ This document closes the requirement gaps identified during the V2 design review
|
|
|
80
80
|
15. **Safe update preflight.** Dependency updates begin with a read-only preflight requiring
|
|
81
81
|
a clean checkout, no running Step, and no active writer lease. It does not install,
|
|
82
82
|
migrate, or mutate project state.
|
|
83
|
+
16. **Strict-review recovery precedes Knowledge rebind.** A pending strict review is bound to
|
|
84
|
+
its immutable completion commit, Plan, and historical knowledge binding. It therefore
|
|
85
|
+
runs before a current-map rebind; the rebind remains mandatory before the next Step. A
|
|
86
|
+
read-only alpha.6 rescue profile exposes only this exact recovery shape.
|
|
87
|
+
17. **Bounded Milestone autonomy.** Initial linked Tasks may be assembled before one complete
|
|
88
|
+
membership Plan. One human-confirmed, expiring Milestone contract may then authorize the
|
|
89
|
+
existing Task/Milestone approval transitions, guarded content-only Task context refresh,
|
|
90
|
+
and membership-only evolution. Standalone Project Memory approval remains forbidden.
|
|
91
|
+
Outcome, success signal, acceptance, checks, discovery, and base branch remain immutable;
|
|
92
|
+
semantic change stays human-only.
|
|
93
|
+
18. **Planning proof obligations.** Every newly recorded guarded audit maps each failure mode
|
|
94
|
+
to one hostile counterexample, expected safe result, and exact executable Step check.
|
|
95
|
+
Historical alpha.6 audit events remain readable only to preserve safe lifecycle recovery.
|
|
96
|
+
19. **Derived independent actors.** Core derives stable Task Worker and corrective Auditor
|
|
97
|
+
actors from Task identity. This removes name-selection pauses without weakening C1 claim,
|
|
98
|
+
lease, or auditor-independence checks.
|
|
@@ -52,12 +52,19 @@ delegation.transition
|
|
|
52
52
|
acceptance still requires the current `MSA-*` code, preserving the revision/hash/HEAD binding;
|
|
53
53
|
the pre-issued grant replaces only the later human-message requirement.
|
|
54
54
|
|
|
55
|
-
Alpha.
|
|
55
|
+
Alpha.7 does not widen the generic delegation allow-list. Generic delegated approval does not authorize:
|
|
56
56
|
|
|
57
57
|
- `state adoption-apply`
|
|
58
58
|
- `milestone scope-change-prepare`
|
|
59
59
|
- `milestone scope-change-apply`
|
|
60
|
-
-
|
|
60
|
+
- semantic Milestone scope changes
|
|
61
|
+
|
|
62
|
+
A separate `milestone autonomy-prepare` / `milestone autonomy-grant` contract issues one
|
|
63
|
+
milestone-scoped grant over the existing Task/Milestone approval transitions, adds
|
|
64
|
+
membership-only evolution authority, and permits Project Memory approval only as the guarded
|
|
65
|
+
half of an atomic content-only Task context refresh in that Milestone. Standalone Project Memory
|
|
66
|
+
approval remains project-scoped. The contract does not add a generic delegation transition:
|
|
67
|
+
outcome, success signal, acceptance, checks, discovery, and base branch remain immutable.
|
|
61
68
|
|
|
62
69
|
## Starting a delegate chat
|
|
63
70
|
|
|
@@ -81,9 +88,9 @@ scope changes are not approval transitions: the delegate stops and asks the user
|
|
|
81
88
|
Independent Reviewer roles may implement or review work, but the coordinating delegate alone
|
|
82
89
|
uses the grant and passes `--delegation-grant` to the Core transition.
|
|
83
90
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
91
|
+
Ordinary semantic Milestone scope changes remain journaled, human-only lifecycle actions. A
|
|
92
|
+
contract delegate may evolve only the membership graph inside the cryptographically bound
|
|
93
|
+
semantic scope.
|
|
87
94
|
|
|
88
95
|
### Milestone delegate prompt
|
|
89
96
|
|
package/docs/development-flow.md
CHANGED
|
@@ -21,9 +21,9 @@ Materialization requires an observable outcome, scope, acceptance criteria, and
|
|
|
21
21
|
blocking unknowns. No Task identifier or branch exists before this gate. Task authorization
|
|
22
22
|
is hash-bound to Brief and Plan. Later Plan changes supersede it.
|
|
23
23
|
|
|
24
|
-
In alpha.
|
|
24
|
+
In alpha.7, execution authorization also requires a current Plan Risk Audit bound to the same
|
|
25
25
|
Brief, Plan, Knowledge Map, and exact Step set. For existing schema 2 projects upgraded into
|
|
26
|
-
alpha.
|
|
26
|
+
alpha.7, execution additionally requires adoption posture first; remaining legacy scope then
|
|
27
27
|
uses a bootstrap audit over the preserved non-`completed`, non-`skipped` Steps only.
|
|
28
28
|
The audit names a Plan author and independent auditor, binds each guarded failure mode to
|
|
29
29
|
exact executable evidence, and blocks authorization on `split-required` or `stop-escalate`.
|
|
@@ -67,7 +67,7 @@ replay, and crash claims include restart/crash-window evidence; provider work in
|
|
|
67
67
|
failure injection and hidden-default verification. After two failed independent reviews,
|
|
68
68
|
another Plan requires a distinct corrective Auditor and `--corrective-audit-file`. Only a
|
|
69
69
|
`continue-fix` audit may continue; replan, split, and stop decisions return to coordination.
|
|
70
|
-
For guarded
|
|
70
|
+
For guarded remediation, a third ordinary retry is blocked until a current
|
|
71
71
|
`task corrective-decision` exists for the same Step and Plan binding. If that corrective
|
|
72
72
|
attempt fails review, the third failure is a hard stop and no fourth run is permitted.
|
|
73
73
|
|
|
@@ -93,10 +93,15 @@ and prevents new linked Tasks from starting. A Task that has started cannot be r
|
|
|
93
93
|
it can be retained as waived/cancelled with history and reason. Tasks already in progress
|
|
94
94
|
may finish while an amendment awaits authorization.
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
`scope-change-
|
|
96
|
+
During initial planning, all linked Tasks may be materialized before one complete
|
|
97
|
+
`milestone plan-set`; no execution is available until the Plan classifies every reverse
|
|
98
|
+
membership. After that boundary, semantic changes use human-only
|
|
99
|
+
`milestone scope-change-prepare` and `milestone scope-change-apply`. A previously issued
|
|
100
|
+
Milestone Autonomy Contract may instead use `milestone autonomy-evolve` for membership-only
|
|
101
|
+
changes while the outcome, success signal, acceptance, checks, discovery, and base branch
|
|
102
|
+
remain unchanged. The same contract may complete an atomic content-only Task context refresh
|
|
103
|
+
without a new human gate, but cannot approve Project Memory independently. Both paths retain
|
|
104
|
+
journaled recovery across `state.json`, `plan.json`, and `scope-change-events.jsonl`.
|
|
100
105
|
|
|
101
106
|
A Milestone has no integration branch. Validation requires all required Tasks to be
|
|
102
107
|
`merged`, checks the current clean base branch, and writes evidence plus Result. Final
|
package/docs/release.md
CHANGED
|
@@ -20,12 +20,14 @@ The downstream smoke packs the actual tarball, installs it into an empty tempora
|
|
|
20
20
|
runs the packaged CLI handshake, and proves installation created none of `.codex`, `.tasks`,
|
|
21
21
|
`.increments`, or `.memory-bank` in that project.
|
|
22
22
|
|
|
23
|
-
For alpha.
|
|
23
|
+
For alpha.7, the release gate also relies on `npm run release:check` to fail if:
|
|
24
24
|
|
|
25
25
|
- canonical entity schema 2 shapes drift;
|
|
26
26
|
- protocol 1 compatibility is no longer additive;
|
|
27
27
|
- the delegated transition allow-list expands;
|
|
28
|
-
-
|
|
28
|
+
- schema-2 adoption is presented as `state migrate` instead of posture sidecars;
|
|
29
|
+
- alpha.7 rescue, Milestone autonomy (including guarded content refresh), derived actor, or
|
|
30
|
+
proof-obligation capabilities and schemas are absent from the packaged surface.
|
|
29
31
|
|
|
30
32
|
Tag releases as `v<package-version>`. The tag workflow verifies the tag/package match and
|
|
31
33
|
uses npm trusted publishing with public access. For a public GitHub repository and public
|
|
@@ -22,6 +22,16 @@ state schema. Совпадение `stateSchemaVersion` до и после об
|
|
|
22
22
|
нужна. Для alpha.6 при `stateSchemaVersion: 2` применяется не migration, а sidecar-only
|
|
23
23
|
adoption posture.
|
|
24
24
|
|
|
25
|
+
### Исключение для lifecycle-дедлока alpha.6
|
|
26
|
+
|
|
27
|
+
Обычный `update preflight` намеренно блокирует обновление при `in_progress` Step. Если alpha.6
|
|
28
|
+
завис между completion commit, обязательным strict review и запрещённым Knowledge rebind,
|
|
29
|
+
используйте внешний точный runner alpha.7 только для `update rescue-preflight`. Продолжать
|
|
30
|
+
можно лишь при `eligible=true`; допустимы только перечисленные им `locks repair` и
|
|
31
|
+
`task step-review`. Этот путь не меняет dependency и не разрешает другие команды alpha.7.
|
|
32
|
+
После terminal review выполните обычный Knowledge reconcile/rebind, доведите Task до безопасной
|
|
33
|
+
границы и только затем обновляйте package/lock обычным способом.
|
|
34
|
+
|
|
25
35
|
## 1. Подготовьте отдельный чат обновления
|
|
26
36
|
|
|
27
37
|
Не обновляйте пакет во время выполняющегося Worker Step. Дождитесь завершения текущего ответа
|
|
@@ -1,51 +1,56 @@
|
|
|
1
1
|
# V2 Alpha Validation Report
|
|
2
2
|
|
|
3
|
-
Release candidate `2.0.0-alpha.
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
3
|
+
Release candidate `2.0.0-alpha.7` was validated on 2026-08-14 with Node.js 24.17.0.
|
|
4
|
+
|
|
5
|
+
- TypeScript typecheck and build passed.
|
|
6
|
+
- The authoritative sequential suite passed `86/86` with `--test-concurrency=1`. An earlier
|
|
7
|
+
ordinary parallel run also passed its then-current `85/85` suite, but CLI subprocess
|
|
8
|
+
contention made one test take 165 seconds; the final sequential exit is the release evidence.
|
|
9
|
+
- `npm run pack:check`, `npm run smoke:downstream`, `npm run release:check`,
|
|
10
|
+
`npm run plugin:check`, and `git diff --check` passed. Packaging and downstream smoke used
|
|
11
|
+
an isolated temporary npm cache because the user cache contains pre-existing root-owned
|
|
12
|
+
entries.
|
|
13
|
+
- The repository-level `tools/tests/codex-workflow-regression.mjs` update/install regression
|
|
14
|
+
completed with `status: PASS`.
|
|
15
|
+
- Dry-run packaging produced `codex-workflow-v2-2.0.0-alpha.7.tgz` with 139 files; downstream
|
|
16
|
+
installation and packaged CLI handshake passed.
|
|
17
|
+
|
|
18
|
+
Alpha.7 regression coverage includes:
|
|
19
|
+
|
|
20
|
+
- pending strict Step Review outranks Knowledge Map reconcile/rebind after a knowledge-changing
|
|
21
|
+
completion commit; review succeeds against the exact historical approved binding even while
|
|
22
|
+
the current map is stale, and rebind remains mandatory before the next Step;
|
|
23
|
+
- read-only alpha.6 rescue-preflight rejects active leases and accepts only one exact pending
|
|
24
|
+
strict-review candidate on the clean recorded completion HEAD;
|
|
25
|
+
- seven linked Tasks can be materialized during initial Milestone assembly and classified by
|
|
26
|
+
one complete initial Plan without repeated scope-change approvals;
|
|
27
|
+
- one maximum-72-hour Milestone Autonomy Contract issues the existing Task/Milestone approval
|
|
28
|
+
permissions, permits Project Memory approval only inside an atomic content-only Task context
|
|
29
|
+
refresh, permits journaled membership-only evolution, requires reauthorization, and rejects
|
|
30
|
+
both standalone Project Memory approval and semantic scope drift; a later human semantic
|
|
31
|
+
change invalidates future uses of the autonomy grant;
|
|
32
|
+
- C1 Worker and corrective Auditor actors are deterministically derived while claim, lease,
|
|
33
|
+
handoff, and reviewer/auditor independence checks remain fail-closed;
|
|
34
|
+
- every newly recorded guarded Plan Risk Audit requires an exact proof obligation per failure
|
|
35
|
+
mode: hostile counterexample, expected safe result, and executable evidence command;
|
|
36
|
+
historical alpha.6 audits remain readable for recovery only;
|
|
37
|
+
- existing Milestone journal recovery, reverse-membership integrity, delegation, adoption,
|
|
38
|
+
Knowledge Map, graph, strict reviewer, Git ownership, and remediation hard-stop tests remain
|
|
39
|
+
green.
|
|
40
|
+
|
|
41
|
+
Compatibility claims verified:
|
|
42
|
+
|
|
43
|
+
- `protocolVersion: 1` and `STATE_SCHEMA_VERSION: 2` remain unchanged;
|
|
44
|
+
- canonical Task and Milestone schemas remain byte-identical;
|
|
45
|
+
- the generic delegated transition allow-list remains unchanged;
|
|
46
|
+
- new evidence is additive through `autonomy-contract-events.jsonl`, optional autonomous
|
|
47
|
+
fields on scope-change events, and optional proof obligations on Plan Risk Audit events;
|
|
48
|
+
- the gateway handshake advertises alpha.7 rescue, initial assembly, autonomy, derived actor,
|
|
49
|
+
corrective routing, and proof-obligation capabilities.
|
|
45
50
|
|
|
46
51
|
Not claimed here:
|
|
47
52
|
|
|
48
|
-
- no
|
|
49
|
-
- no
|
|
50
|
-
-
|
|
51
|
-
|
|
53
|
+
- no npm publication, Git tag, push, or downstream project mutation was performed;
|
|
54
|
+
- no manual rewrite of external Workflow state is part of the recovery design;
|
|
55
|
+
- the local package cannot cryptographically prove a real human identity or a physically
|
|
56
|
+
separate Codex task beyond the existing actor, process-isolation, sidecar, and lease evidence.
|
package/package.json
CHANGED
|
@@ -40,8 +40,15 @@ Current capability set:
|
|
|
40
40
|
- `milestone-reverse-membership-integrity-v1`
|
|
41
41
|
- `task-c1-handoff-bundle-v2`
|
|
42
42
|
- `alpha6-adoption-posture-v1`
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
- `alpha6-strict-review-rescue-v1`
|
|
44
|
+
- `milestone-initial-assembly-v1`
|
|
45
|
+
- `milestone-autonomy-contract-v1`
|
|
46
|
+
- `milestone-autonomous-membership-evolution-v1`
|
|
47
|
+
- `task-c1-derived-worker-actor-v1`
|
|
48
|
+
- `guarded-corrective-auditor-routing-v1`
|
|
49
|
+
- `plan-proof-obligations-v1`
|
|
50
|
+
|
|
51
|
+
Protocol `1` and schema `2` remain valid only because alpha.7 is additive. The gateway must
|
|
45
52
|
not claim compatibility if canonical entity shapes or non-additive command semantics change.
|
|
46
53
|
|
|
47
54
|
## Alpha.6 adoption posture
|
|
@@ -86,7 +93,7 @@ workflow state manually; recovery remains coordinator-controlled.
|
|
|
86
93
|
|
|
87
94
|
## Plan Risk Audit and remediation breaker
|
|
88
95
|
|
|
89
|
-
Before `task authorize`, every new alpha.
|
|
96
|
+
Before `task authorize`, every new alpha.7 Task requires:
|
|
90
97
|
|
|
91
98
|
```text
|
|
92
99
|
codex-workflow task plan-risk-audit --repo <git-root> \
|
|
@@ -94,7 +101,8 @@ codex-workflow task plan-risk-audit --repo <git-root> \
|
|
|
94
101
|
```
|
|
95
102
|
|
|
96
103
|
The audit must classify every current Step exactly once, name distinct planner/auditor
|
|
97
|
-
actors,
|
|
104
|
+
actors, bind guarded failure modes to exact Step checks, and map each guarded failure mode to
|
|
105
|
+
one hostile counterexample, expected safe result, and exact executable evidence command. Use `decision=approved` for an
|
|
98
106
|
unguarded Plan. Missing, stale, `split-required`, or `stop-escalate` evidence blocks
|
|
99
107
|
authorization.
|
|
100
108
|
|
|
@@ -119,6 +127,9 @@ operation is restricted to content-hash-only drift and records the ordinary dele
|
|
|
119
127
|
Task authorization evidence. Any semantic map change remains on the normal visible path.
|
|
120
128
|
|
|
121
129
|
Before updating the installed package, run `update preflight`. Continue only for `safe=true`.
|
|
130
|
+
For an alpha.6 project trapped between a pending strict review and forbidden Knowledge rebind,
|
|
131
|
+
an exact external alpha.7 runner may run `update rescue-preflight`. Continue only for
|
|
132
|
+
`eligible=true` and only with the returned lock-repair and strict-review actions.
|
|
122
133
|
|
|
123
134
|
## C1 handoff
|
|
124
135
|
|
|
@@ -127,7 +138,7 @@ Before updating the installed package, run `update preflight`. Continue only for
|
|
|
127
138
|
```text
|
|
128
139
|
codex-workflow task handoff-prepare --repo <git-root> --id <TASK-ID> \
|
|
129
140
|
--expected-revision <REVISION> --actor <CURRENT-ACTOR> \
|
|
130
|
-
--target-actor <TARGET-ACTOR> --reason <TEXT> [--writer-token <TOKEN>] \
|
|
141
|
+
[--target-actor <TARGET-ACTOR>] --reason <TEXT> [--writer-token <TOKEN>] \
|
|
131
142
|
[--delegation-grant <GRANT>] [--expires-at <ISO-TIMESTAMP>]
|
|
132
143
|
codex-workflow task handoff-show --repo <git-root> --id <TASK-ID>
|
|
133
144
|
codex-workflow task claim --repo <git-root> --id <TASK-ID> \
|
|
@@ -141,9 +152,30 @@ codex-workflow task handback-create --repo <git-root> --id <TASK-ID> \
|
|
|
141
152
|
While a handoff is pending, `next` blocks the previous action behind `task claim`. While
|
|
142
153
|
claimed, only the claimant may mutate the Task, and lease-bound mutations must present the
|
|
143
154
|
bound writer token. Milestone-linked Tasks must be claimed before start, and handback is
|
|
144
|
-
terminal and evidence-bound.
|
|
155
|
+
terminal and evidence-bound. When target actor is omitted, Core derives
|
|
156
|
+
`agent:worker:<task-id>`. No thread id is required or accepted as authority.
|
|
157
|
+
|
|
158
|
+
## Milestone assembly, autonomy, and human gate
|
|
159
|
+
|
|
160
|
+
During initial planning, materialize every linked Task and then call `milestone plan-set` once
|
|
161
|
+
with the complete membership. Execution is blocked while reverse membership is incomplete.
|
|
162
|
+
|
|
163
|
+
After that Plan, one human may prepare and grant a maximum-72-hour Milestone Autonomy Contract:
|
|
164
|
+
|
|
165
|
+
```text
|
|
166
|
+
codex-workflow milestone autonomy-prepare --repo <git-root> --id <MS-ID> \
|
|
167
|
+
--expected-revision <REVISION> --principal <HUMAN> --delegate <AGENT> --expires-at <ISO>
|
|
168
|
+
codex-workflow milestone autonomy-grant --repo <git-root> --id <MS-ID> \
|
|
169
|
+
--expected-revision <REVISION> --principal <HUMAN> --delegate <AGENT> --expires-at <ISO> \
|
|
170
|
+
--confirmation-code <MAC-CODE>
|
|
171
|
+
```
|
|
145
172
|
|
|
146
|
-
|
|
173
|
+
The contract issues a milestone-scoped grant for the existing Task/Milestone approval transitions
|
|
174
|
+
and Project Memory approval only inside an atomic content-only Task context refresh for the same
|
|
175
|
+
Milestone. It cannot approve Project Memory independently. `milestone autonomy-evolve --file
|
|
176
|
+
<plan.json>` is permitted only when outcome, success signal, acceptance, checks, discovery, and
|
|
177
|
+
base branch still match the contract. It journals agent actor plus contract evidence and requires
|
|
178
|
+
reauthorization afterward.
|
|
147
179
|
|
|
148
180
|
After the initial empty planning posture, Milestone scope updates use:
|
|
149
181
|
|
|
@@ -155,7 +187,7 @@ codex-workflow milestone scope-change-apply --repo <git-root> \
|
|
|
155
187
|
--confirmation-code <MSC-CODE> --file <plan.json>
|
|
156
188
|
```
|
|
157
189
|
|
|
158
|
-
This path is human-only.
|
|
190
|
+
This ordinary semantic-change path is human-only. Generic delegated approval never authorizes it.
|
|
159
191
|
|
|
160
192
|
At `awaiting_final_acceptance`, `next` returns `requiredHumanGate` with kind
|
|
161
193
|
`milestone_final_acceptance`, Milestone ID, revision, Plan/Result/evidence hashes, validated
|
|
@@ -183,8 +215,8 @@ as `--delegation-grant`. The resulting authorization event records the grant and
|
|
|
183
215
|
For `milestone.final_accept`, also pass the current `MSA-*` code; the existing grant replaces
|
|
184
216
|
the later-message requirement, not the state binding.
|
|
185
217
|
|
|
186
|
-
Delegated approval does not cover adoption apply
|
|
187
|
-
|
|
218
|
+
Delegated approval does not cover adoption apply or the ordinary semantic Milestone scope-change
|
|
219
|
+
path. Membership-only evolution requires the separate Milestone Autonomy Contract.
|
|
188
220
|
|
|
189
221
|
## Graph Refresh Request
|
|
190
222
|
|
|
@@ -27,6 +27,11 @@ files, or MCP ADR storage as a fallback.
|
|
|
27
27
|
6. Run `gateway handshake` before other actions. Stop on package, protocol, or
|
|
28
28
|
state-schema incompatibility.
|
|
29
29
|
|
|
30
|
+
The sole exception is the alpha.7 `update rescue-preflight` compatibility profile. An exact
|
|
31
|
+
external alpha.7 runner may inspect a project still pinned to alpha.6 only when this read-only
|
|
32
|
+
command reports `eligible=true`. Execute only its returned stale-lock repair and strict-review
|
|
33
|
+
actions; do not use the external runner for any other transition or dependency mutation.
|
|
34
|
+
|
|
30
35
|
If any step fails, report the concrete diagnostic. Do not load workflow
|
|
31
36
|
semantics from this skill.
|
|
32
37
|
|
|
@@ -103,10 +108,24 @@ option is returned, follow the ordinary human-gate rule above. Knowledge Map app
|
|
|
103
108
|
delegable only through an explicit project-scoped `project_memory.approve` permission. Scope
|
|
104
109
|
changes, grant issuance, and grant expansion are never delegated by `delegated-approval-v1`.
|
|
105
110
|
|
|
111
|
+
For an entire Milestone, prefer one bounded `milestone autonomy-prepare` gate after the complete
|
|
112
|
+
initial membership Plan exists. Show principal, delegate, expiry, semantic-scope hash, policy
|
|
113
|
+
hash, and `MAC-*` code, then stop. A later exact approval permits `milestone autonomy-grant`.
|
|
114
|
+
The resulting grant covers the existing Task/Milestone approval transitions and the Project
|
|
115
|
+
Memory approval portion of an atomic content-only Task context refresh for the same Milestone;
|
|
116
|
+
it never permits standalone Project Memory approval. It also permits `milestone autonomy-evolve`
|
|
117
|
+
only for membership changes; any change to outcome, success signal, acceptance, checks,
|
|
118
|
+
discovery, or base branch requires the ordinary human scope-change gate. Never self-renew or
|
|
119
|
+
replace the contract.
|
|
120
|
+
|
|
106
121
|
After two failed Task reviews, follow `next.correctivePlanGate`: obtain a distinct read-only
|
|
107
122
|
corrective Auditor result and pass it through `--corrective-audit-file`. Do not continue for
|
|
108
123
|
replan, split, or stop decisions.
|
|
109
124
|
|
|
125
|
+
When `next` returns a derived C1 Worker or corrective Auditor actor, use that exact actor without
|
|
126
|
+
asking the user to name one. Derivation removes a routing pause; handoff claim, writer lease,
|
|
127
|
+
strict review, and auditor-independence checks remain mandatory.
|
|
128
|
+
|
|
110
129
|
Before an npm package update, run the project-local `update preflight` and stop unless it
|
|
111
130
|
returns `safe=true` with a clean checkout, no running Step, and no active writer lease.
|
|
112
131
|
|
|
@@ -6,14 +6,15 @@ to the task commit and Brief, Plan, and evidence hashes. Final acceptance is a s
|
|
|
6
6
|
human event bound to Result, evidence, and commit. Locks expire only diagnostically;
|
|
7
7
|
removing a stale lock is always an explicit repair operation.
|
|
8
8
|
|
|
9
|
-
Alpha.
|
|
10
|
-
evidence through sidecars. `protocolVersion: 1` remains valid only because the alpha.
|
|
9
|
+
Alpha.7 keeps canonical entity JSON unchanged at `stateSchemaVersion: 2` and adds lifecycle
|
|
10
|
+
evidence through sidecars. `protocolVersion: 1` remains valid only because the alpha.7
|
|
11
11
|
surface is additive and capability-advertised.
|
|
12
12
|
|
|
13
|
-
Before execution authorization, every alpha.
|
|
13
|
+
Before execution authorization, every alpha.7 Task must have a current Plan Risk Audit bound
|
|
14
14
|
to the current Brief, Plan, Knowledge Map, and exact Step set. The audit is required even when
|
|
15
15
|
all Steps are unguarded, must name distinct planner/auditor actors, and must bind guarded
|
|
16
|
-
failure modes to exact Step checks.
|
|
16
|
+
failure modes to exact Step checks. Each newly recorded guarded failure mode also requires one
|
|
17
|
+
hostile counterexample, expected safe result, and exact evidence command. Missing, stale, inconsistent, `split-required`, or
|
|
17
18
|
`stop-escalate` evidence blocks authorization.
|
|
18
19
|
|
|
19
20
|
If the current Plan Risk Audit marks a Step for strict review, `task step-complete` still
|
|
@@ -36,7 +37,7 @@ bindings, supersedes execution authorization, and returns the Task to
|
|
|
36
37
|
`awaiting_execution_authorization`. It cannot run while a Step is `in_progress` or while the
|
|
37
38
|
Task is `blocked`; unrelated blocks must be resolved through their owning transition.
|
|
38
39
|
|
|
39
|
-
For
|
|
40
|
+
For guarded remediation, two ordinary remediation attempts are allowed. A third
|
|
40
41
|
ordinary retry is blocked until a current corrective decision exists for the same Step and
|
|
41
42
|
Plan binding. `continue-fix` allows bounded continuation; `replan-required`,
|
|
42
43
|
`split-required`, and `stop-escalate` stop ordinary execution. A failed third corrective
|
|
@@ -55,10 +56,15 @@ but the acceptance command still requires the current `MSA-*` code so the use re
|
|
|
55
56
|
to the validated revision, hashes, and HEAD. Grant issuance itself always remains a prior
|
|
56
57
|
human turn boundary.
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
`milestone plan-set
|
|
60
|
-
`milestone scope-change-
|
|
61
|
-
`scope-change-
|
|
59
|
+
During initial planning, all linked Tasks may be materialized before one complete
|
|
60
|
+
`milestone plan-set`; execution remains blocked until every reverse membership is classified.
|
|
61
|
+
After that boundary, semantic updates use human-only `milestone scope-change-prepare` and
|
|
62
|
+
`milestone scope-change-apply`. A human-confirmed, expiring Milestone Autonomy Contract may
|
|
63
|
+
use `milestone autonomy-evolve` only for membership changes while outcome, success signal,
|
|
64
|
+
acceptance, checks, discovery, and base branch remain fixed. It may also approve Project Memory
|
|
65
|
+
only within an atomic content-only context refresh for a Task in that Milestone; standalone map
|
|
66
|
+
approval remains forbidden. Both update paths journal
|
|
67
|
+
`state.json`, `plan.json`, and `scope-change-events.jsonl` together. Membership integrity is validated
|
|
62
68
|
before scheduling, Task start, Milestone validation, scope change, and repository `next`.
|
|
63
69
|
The same guard scans in reverse and blocks every live Task whose `milestoneId` is absent from
|
|
64
70
|
the Milestone's required/waived/cancelled classification.
|
|
@@ -68,7 +74,8 @@ token and prompt bound to a stable handoff ID, revision, context hashes, Milesto
|
|
|
68
74
|
delegate/grant, expected next action, and expiry. `task claim` validates those bindings and
|
|
69
75
|
activates claimant-only mutation; terminal `task handback-create` returns result, evidence,
|
|
70
76
|
review, knowledge, limitation, and recommended-next bindings. Milestone Tasks must be claimed
|
|
71
|
-
before start.
|
|
77
|
+
before start. If no target is supplied, Core derives `agent:worker:<task-id>`. No part of this
|
|
78
|
+
contract requires or proves a physically separate Codex thread.
|
|
72
79
|
|
|
73
80
|
Repository-level scheduling respects current Milestone membership. An unstarted linked Task
|
|
74
81
|
is eligible only for an `active` Milestone with `required` disposition. Historical unstarted
|
|
@@ -12,7 +12,14 @@ Own state transitions, dispatch envelopes, evidence collection, and recovery gui
|
|
|
12
12
|
request the user's explicit decision, and end the turn. Never call the acceptance command
|
|
13
13
|
in the same turn that produced or displayed the gate.
|
|
14
14
|
- Accept a Milestone only after a later user message explicitly approves that exact
|
|
15
|
-
confirmation code
|
|
15
|
+
confirmation code, or through the exact active Milestone Autonomy Contract option. Do not
|
|
16
|
+
infer approval from a request to validate, finish, or continue.
|
|
17
|
+
- During initial Milestone planning, materialize the complete linked Task set and record one
|
|
18
|
+
full membership Plan. When a Milestone Autonomy Contract is active, evolve only membership;
|
|
19
|
+
any outcome, success-signal, acceptance, check, discovery, or base-branch change returns to
|
|
20
|
+
the human scope-change gate.
|
|
21
|
+
- Use the Milestone contract for Project Memory approval only through the exact atomic
|
|
22
|
+
content-only Task context-refresh route; never use it for standalone map approval.
|
|
16
23
|
- Dispatch one Worker at a time for a concrete Step.
|
|
17
24
|
- A Milestone coordinator creates one dedicated user-visible Codex Task chat for each required
|
|
18
25
|
Task. The Milestone chat owns ordering, exact delegated approvals, merge observation,
|
|
@@ -22,6 +29,8 @@ Own state transitions, dispatch envelopes, evidence collection, and recovery gui
|
|
|
22
29
|
- After a second failed independent Task review, require a separate corrective Plan Auditor
|
|
23
30
|
and pass its evidence through `--corrective-audit-file`. Continue only for
|
|
24
31
|
`decision=continue-fix`; replan/split/stop decisions return to the coordinator or user.
|
|
32
|
+
- Use the exact derived Worker and corrective Auditor actors returned by `next`; do not pause
|
|
33
|
+
for the user to invent routing identifiers.
|
|
25
34
|
- Use `task context-refresh` only when `next.contextRefresh` offers the exact delegated,
|
|
26
35
|
content-only option. Classification, authority, source-set, gap, or conflict changes still
|
|
27
36
|
require the ordinary visible Knowledge Map flow.
|
|
@@ -10,6 +10,9 @@ Translate an approved Brief into an execution-ready Plan.
|
|
|
10
10
|
restart/replay, crash recovery, or an external provider must include failure-specific checks
|
|
11
11
|
in the original Steps: populated forward upgrades, deterministic races, restart/crash
|
|
12
12
|
windows, and provider failure/default behavior as applicable.
|
|
13
|
+
- For every guarded failure mode, define one hostile counterexample, the expected safe result,
|
|
14
|
+
and the exact executable Step check that proves it. A happy-path check is not a proof
|
|
15
|
+
obligation for an adversarial or crash-window claim.
|
|
13
16
|
- Split a Task when one acceptance slice would otherwise combine persistence migration,
|
|
14
17
|
recovery orchestration, and executable composition. Do not use arbitrary line/file limits;
|
|
15
18
|
split on independently verifiable failure boundaries.
|