codex-workflow-v2 2.0.0-beta.12 → 2.0.0-beta.12.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 (62) hide show
  1. package/README.md +65 -5
  2. package/dist/src/alpha6/downstream-proof.d.ts +68 -0
  3. package/dist/src/alpha6/downstream-proof.js +604 -0
  4. package/dist/src/alpha6/downstream-proof.js.map +1 -0
  5. package/dist/src/alpha6/milestone.d.ts +6 -2
  6. package/dist/src/alpha6/milestone.js +164 -10
  7. package/dist/src/alpha6/milestone.js.map +1 -1
  8. package/dist/src/alpha6/plan-risk.js +2 -2
  9. package/dist/src/alpha6/plan-risk.js.map +1 -1
  10. package/dist/src/alpha6/remediation.d.ts +8 -3
  11. package/dist/src/alpha6/remediation.js +374 -9
  12. package/dist/src/alpha6/remediation.js.map +1 -1
  13. package/dist/src/alpha6/review.d.ts +6 -0
  14. package/dist/src/alpha6/review.js +12 -0
  15. package/dist/src/alpha6/review.js.map +1 -1
  16. package/dist/src/alpha7/corrective-recovery.d.ts +8 -1
  17. package/dist/src/alpha7/corrective-recovery.js +406 -26
  18. package/dist/src/alpha7/corrective-recovery.js.map +1 -1
  19. package/dist/src/cli.js +135 -5
  20. package/dist/src/cli.js.map +1 -1
  21. package/dist/src/contracts.d.ts +154 -3
  22. package/dist/src/dependency-provenance.d.ts +9 -2
  23. package/dist/src/dependency-provenance.js +70 -8
  24. package/dist/src/dependency-provenance.js.map +1 -1
  25. package/dist/src/git.d.ts +1 -1
  26. package/dist/src/git.js +6 -2
  27. package/dist/src/git.js.map +1 -1
  28. package/dist/src/historical-step-provenance.d.ts +20 -0
  29. package/dist/src/historical-step-provenance.js +111 -0
  30. package/dist/src/historical-step-provenance.js.map +1 -0
  31. package/dist/src/state/corrective-replan-executor.js +5 -0
  32. package/dist/src/state/corrective-replan-executor.js.map +1 -1
  33. package/dist/src/version.d.ts +1 -1
  34. package/dist/src/version.js +1 -1
  35. package/dist/src/version.js.map +1 -1
  36. package/dist/src/workflow.d.ts +40 -2
  37. package/dist/src/workflow.js +1440 -65
  38. package/dist/src/workflow.js.map +1 -1
  39. package/docs/autonomy-guardrails.md +91 -1
  40. package/docs/decisions.md +14 -0
  41. package/docs/delegated-approval.md +6 -1
  42. package/docs/development-flow.md +60 -5
  43. package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
  44. package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
  45. package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
  46. package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +97 -7
  47. package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +68 -9
  48. package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +150 -33
  49. package/docs/release.md +51 -8
  50. package/docs/updating-existing-project.md +155 -2
  51. package/docs/validation-report.md +101 -94
  52. package/package.json +7 -2
  53. package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +1 -1
  54. package/plugins/codex-workflow-gateway/references/protocol.md +69 -1
  55. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +156 -1
  56. package/schemas/authorization-event.schema.json +8 -1
  57. package/schemas/downstream-proof-invalidation-event.schema.json +71 -0
  58. package/schemas/downstream-proof-replan-recovery-event.schema.json +61 -0
  59. package/schemas/milestone-scope-change-event.schema.json +25 -1
  60. package/schemas/stop-escalate-override-event.schema.json +45 -0
  61. package/schemas/task.schema.json +104 -0
  62. package/scripts/generate-pdf-docs.py +13 -2
@@ -1,98 +1,105 @@
1
- # V2 beta.12 Validation Report
1
+ # V2 beta.12.10 Validation Report
2
2
 
3
- Release candidate `2.0.0-beta.12` was validated on 2026-08-27 with Node.js 24.17.0.
3
+ Release candidate `2.0.0-beta.12.10` was validated on 2026-08-31 (Europe/Moscow) with
4
+ Node.js 24.17.0.
4
5
 
5
6
  ## Automated release evidence
6
7
 
7
- - `npm ci` completed from the committed lockfile with 0 reported vulnerabilities.
8
- - The final `npm run validate` passed `321/321` sequential tests with no failures, skips,
9
- cancellations, or todos. The focused Signal T04 recovery suite passed independently (`5/5`).
10
- - `npm run pack:check` passed outside the filesystem-restricted sandbox. The beta.12 tarball
11
- contains 269 files; package size is 955.6 kB and unpacked size is 3.7 MB.
12
- - `npm run smoke:downstream` packed and installed the actual beta.12 tarball in an empty temporary
13
- project, then passed the packaged CLI handshake. The first sandboxed attempt was network-blocked
14
- while fetching pinned `ajv`; the authorized network retry passed.
15
- - `npm run plugin:check`, the official Codex plugin validator, `npm run docs:pdf:check`, exact
16
- `RELEASE_TAG=v2.0.0-beta.12 npm run release:check`, and `git diff --check` passed. The bundled
17
- gateway cachebuster is `0.1.0+codex.20260827003726`.
18
-
19
- The first full post-version-bump validation exposed three failures before the Signal T04 runtime
20
- scenario began: a historical read-only snapshot truthfully targeted beta.11, while its replay
21
- assertion incorrectly required the current package version. The fix keeps the snapshot immutable at
22
- `2.0.0-beta.11`, binds the synthetic replay dependency to current `PACKAGE_VERSION`, and makes the
23
- release check verify both identities separately. The focused suite then passed `5/5`, and the final
24
- complete suite passed `321/321`.
25
-
26
- ## Continuable remediation and review-routing evidence
27
-
28
- - A guarded Task remains in the same Task/Step and reaches a passing strict review after five
29
- consecutive failed review cycles. Attempts 1–2 are ordinary; attempts 3+ are corrective
30
- diagnostics but remain executable and review-gated.
31
- - Attempt count no longer selects a terminal lifecycle transition. It is retained as diagnostic
32
- history only; explicit `split-required` and `stop-escalate` remain the stop authorities.
33
- - A failed review defaults to `route=fix` (or an omitted route) and continues the same Task/Step.
34
- `route=replan` is valid only with exact `planClause`, `whyFixCannotFit`, and `minimalPlanChange`
35
- evidence.
36
- - Replan returns to ordinary `task plan-set`; objective, requirements, and acceptance remain
37
- immutable, while only implementation Steps may change. The replacement Plan still passes the
38
- normal Plan Risk Audit and execution-authorization gates.
39
- - Failed-review routing evidence is hash-chained in the public Step Review event schema. Drift,
40
- malformed evidence, unrelated Knowledge changes, forged actors, and corrupt chains remain
41
- fail-closed.
42
-
43
- ## Retained dependency, feasibility, and recovery evidence
44
-
45
- - P04-A retains the canonical Milestone dependency DAG, atomic initial Plan transaction/recovery,
46
- dependency-bound handoff/claim/start, legacy fail-closed policy, and unconditional structural
47
- replacement shutdown.
48
- - P01-A retains three versioned read-only analyzers, canonical in-event evidence/hash binding,
49
- exact pre-start and corrective source selection, and phase-aware freshness before claim/start/run.
50
- - The exact Signal T04 revision-26 fixture still proves that only a verified historical Step Review
51
- can retain its completion commit across corrective replan. Pending review is never trusted, and a
52
- corrupt strict-review hash chain is rejected.
53
- - Bounded beta.11 `task plan-integrity-recover` compatibility remains green for its exact first
54
- ordinary checks-failed case. It does not edit the Plan, package manifest, or worktree and still
55
- fails closed for writable-manifest scope, unrelated dirty files, binding drift, or tampering.
56
- - Read-only Milestone progress still preserves `T03 cancelled → T08 replacement`; project-monotonic
57
- chat allocation and deterministic long-title fallback/readback remain green.
58
-
59
- ## Packaged real-agent lifecycle replay
60
-
61
- - A fresh disposable Git project installed the locally packed beta.12 tarball, declared the exact
62
- `2.0.0-beta.12` dependency, and passed packaged `gateway handshake` plus `doctor` with protocol 2,
63
- state schema 2, current dependency identity, and a clean checkout.
64
- - The trusted harness invoked the real packaged CLI sequentially for handshake, doctor, direct first
65
- Discovery bootstrap, `status`, and fresh `next`. The resulting navigation advertised
66
- `project-memory scan`.
67
- - `node scripts/validate-lifecycle-transcript.mjs` accepted all `10/10` post-provenance events with
68
- no failed invocation, unadvertised mutation, or missing checkpoint. The semantic log SHA-256 is
69
- `ab4ef10ad00e2fd9f54810ec5d0bbfb4106e1b211b3a185869d8a46787a5062d`; the raw packaged-result
70
- log SHA-256 is `e693a839604c7ba2055f99e43c49c5ab63ac0cf6e790adc901db5dd8eb0ffae9`.
71
- - Credential-marker inspection found no writer, claim, delegation, bearer, or secret material, and
72
- the disposable product checkout remained clean. Logs and external workflow state stayed outside
73
- this repository.
74
-
75
- This replay validates package resolution, clean bootstrap, one real mutation, and mandatory
76
- post-mutation navigation discipline. It does not claim a second full product Milestone replay;
77
- deeper remediation, P01-A, and P04-A behavior is covered by deterministic and integration tests.
78
-
79
- ## beta.12 PDF release documentation evidence
80
-
81
- - Three tracked Russian PDFs were deterministically regenerated from reviewable Markdown sources
82
- under `docs/pdf/sources/`; `npm run docs:pdf:check` reported an empty stale set.
83
- - All 24 pages were rendered and visually inspected: architecture is 6 pages, the delegated
84
- chat-only guide is 8 pages, and the technical reference is 10 pages. No blank, clipped, or orphaned
85
- page was found.
86
- - Visible titles, headers, package commands, and release gates identify beta.12. The content covers
87
- continuable remediation, evidence-bound fix/replan routing, Milestone dependency authority,
88
- P01-A mechanical feasibility, C1 credentials, external-sealed review, Plan-integrity compatibility,
89
- structural-replacement shutdown, and the limited derived-graph role of `codebase-memory-mcp`.
90
-
91
- ## Not claimed
92
-
93
- - Validation itself performs no npm publication, Git tag, push, Signal Workflow mutation, or local
94
- plugin reinstall. Tagging and remote push are separate actions after the exact candidate gates.
95
- - Structural replacement remains intentionally disabled; beta.12 does not claim P04-B replacement
96
- materialization or completed-Step adoption.
97
- - A real project must install the published exact beta.12 package, update/reinstall the bundled
98
- gateway, and follow fresh project-local `handshake → doctor → status → next` navigation.
8
+ - `npm ci` completed from the exact lockfile with 0 reported vulnerabilities.
9
+ - `npm run validate` passed typecheck and `344/344` sequential tests with no failures, skips,
10
+ cancellations, or todos in 2,087,253.659208 ms.
11
+ - `npm run test:signal-remediation-e2e` passed the focused Signal-shaped end-to-end scenario.
12
+ The test starts from an active Milestone whose required Task has a current `stop-escalate` Plan
13
+ Risk Audit, materializes one audited upstream remediation Task, completes its Plan/audit/C1/Step/
14
+ review/accept/merge lifecycle, replans the original Task, and completes a later Step there.
15
+ - Negative coverage rejects a non-exact predecessor frontier, duplicate remediation, stale revisions,
16
+ non-required or non-active Milestone posture, topology drift, reused audit evidence, and ordinary
17
+ standalone/post-execution `stop-escalate` cases that must keep the existing `task plan-set` route.
18
+ - The complete lifecycle inventory names `milestone remediation-materialize` and
19
+ `WorkflowService.materializeAuditedRemediationTask`; read-only purity, transaction rollback/
20
+ roll-forward, concurrent writers, credentials, Core receipts and prior Signal compatibility tests
21
+ all passed.
22
+ - Package dry-run produced `codex-workflow-v2-2.0.0-beta.12.10.tgz` with 278 files, 1,050,219 bytes
23
+ packed and 4,196,113 bytes unpacked. The broad `docs` package allowlist was narrowed so the
24
+ repository-local `docs/quality` observation journal cannot enter the tarball. The first invocation
25
+ encountered a root-owned user npm cache (`EPERM`); the exact retry used an isolated temporary cache.
26
+ - `npm run smoke:downstream` built and installed the tarball in a disposable consumer project and
27
+ returned `ok=true`. The sandboxed attempt could not resolve npm (`ENOTFOUND`); the same command
28
+ passed with network access.
29
+ - `npm run plugin:check` passed for bundled gateway
30
+ `0.1.0+codex.20260830183000`.
31
+ - `npm run docs:pdf:check` reported an empty stale set and exact beta.12.10 package binding.
32
+ - `RELEASE_TAG=v2.0.0-beta.12.10 npm run release:check` and `git diff --check` passed after this
33
+ report and the exact package allowlist were recorded.
34
+
35
+ ## Root cause corrected by beta.12.10
36
+
37
+ An active Milestone could reach a genuine pre-execution dead end when a required Task's current Plan
38
+ Risk Audit truthfully returned `stop-escalate` because an upstream capability did not exist. The old
39
+ choices were insufficient: replanning the same Task could not manufacture the missing capability,
40
+ while the generic scope-change path required a separate human approval and permitted a much wider
41
+ semantic change than the evidence justified.
42
+
43
+ The problem was missing bounded topology authority, not an insufficient number of implementation or
44
+ review attempts. Repeating the blocked Task could only reproduce the same unmet prerequisite.
45
+
46
+ ## Implemented lifecycle contract
47
+
48
+ - Fresh `next` advertises audited remediation only for an `awaiting_execution_authorization`
49
+ required Task of an active Milestone with a current `stop-escalate` Plan Risk Audit. Standalone,
50
+ post-execution, `split-required`, and other stop postures preserve their existing routes.
51
+ - Coordinator first records a normal capability Discovery. `milestone remediation-materialize`
52
+ then performs one project transaction that appends exactly one required remediation Task and adds
53
+ exactly one dependency edge from the blocked Task to it.
54
+ - The new Task must inherit the blocked Task's exact direct predecessor frontier, and every predecessor
55
+ must already be merged. Milestone outcome, success signal, acceptance, checks, base, old memberships
56
+ and all unrelated dependency edges remain byte-semantically unchanged.
57
+ - The scope-change event binds Milestone revision, blocked Task revision, Brief/Plan hashes, exact Plan
58
+ Risk Audit event/hash, remediation Discovery revision, new Task identity and predecessor frontier.
59
+ Reuse or topology drift fails closed.
60
+ - A `corrective-derived` authorization, bound to the audited evidence and exact actor
61
+ `agent:milestone-remediation:<MS-ID>`, replaces the superseded Milestone execution authorization.
62
+ It authorizes only current required Task execution acceptance transitions; it is neither a general
63
+ delegation grant nor human impersonation.
64
+ - The remediation route requires no human approval. After its Task merges, the original Task returns
65
+ to `task plan-set`, must receive a semantically new Plan and fresh Plan Risk Audit, and then proceeds
66
+ through the ordinary C1, checks, commits and reviews.
67
+ - Public handshake capabilities include `audited-remediation-topology-v1` and
68
+ `corrective-derived-task-authority-v1`.
69
+
70
+ ## Signal-shaped evidence
71
+
72
+ The release E2E mirrors the observed Signal deadlock: four already merged provider Tasks, one blocked
73
+ required consumer Task, a current pre-execution `stop-escalate` audit, and a missing upstream
74
+ capability. It proves the entire recovery cycle rather than only the new materialization command.
75
+
76
+ Live Signal installation and mutation are intentionally separate post-publication actions. They must
77
+ use exact repository-local beta.12.10, a clean/idle update boundary, fresh `status -> next`, and the
78
+ advertised compatibility/recovery route if the dependency update advances active Milestone base
79
+ state. No manual state edit, Git history rewrite, Task cancellation, or duplicate Milestone is part of
80
+ the release mechanism.
81
+
82
+ ## PDF release documentation evidence
83
+
84
+ - All three tracked Russian PDFs were regenerated from beta.12.10 Markdown sources.
85
+ - Architecture is 8 pages, the delegated chat-only guide is 10 pages, and the technical reference is
86
+ 12 pages. All 30 pages were rendered and visually inspected; the changed recovery sections were
87
+ checked at full-page resolution.
88
+ - Titles, package bindings, Cyrillic text, tables, code blocks, margins, footers and section transitions
89
+ have no visible clipping, overlap or unreadable content.
90
+
91
+ ## Existing boundaries and non-claims
92
+
93
+ - The new route does not permit arbitrary Task insertion, task removal, semantic Milestone scope
94
+ change, arbitrary dependency rewiring, completed-Step adoption or `split-required` replacement.
95
+ - Human approval is removed only from this exact evidence-derived corrective topology transition.
96
+ Final Milestone acceptance and generic semantic scope changes retain their existing authority model.
97
+ - Protocol version remains 2 and state schema remains 2; older projects remain readable without a
98
+ state migration.
99
+ - No Git commit, tag, remote push, npm publication or live Signal recovery is claimed by this
100
+ pre-publication report.
101
+
102
+ Confidence is high for the package implementation, topology invariants, no-human corrective authority,
103
+ regression compatibility, tarball composition, downstream installation, plugin and documentation.
104
+ Live Signal confidence remains conditional on successful publication, exact dependency installation,
105
+ fresh Core readback and Coordinator completion of the advertised remediation route.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflow-v2",
3
- "version": "2.0.0-beta.12",
3
+ "version": "2.0.0-beta.12.10",
4
4
  "description": "Requirements-first Codex development workflow with local state and explicit Git ownership.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,7 +33,10 @@
33
33
  "roles",
34
34
  "references",
35
35
  "plugins",
36
- "docs",
36
+ "docs/*.md",
37
+ "docs/lifecycle",
38
+ "docs/pdf",
39
+ "docs/problem-briefs",
37
40
  "scripts/generate-pdf-docs.py",
38
41
  "scripts/run-pdf-docs.mjs",
39
42
  "README.md"
@@ -44,6 +47,8 @@
44
47
  "typecheck": "tsc -p tsconfig.json --noEmit",
45
48
  "test": "node scripts/with-validation-lock.mjs test",
46
49
  "test:signal-t04-recovery": "node scripts/with-validation-lock.mjs test-signal-t04",
50
+ "test:signal-t03-replan-e2e": "node scripts/with-validation-lock.mjs test-signal-t03-replan",
51
+ "test:signal-remediation-e2e": "node scripts/with-validation-lock.mjs test-signal-remediation-topology",
47
52
  "validate": "npm run typecheck && npm test",
48
53
  "pack:check": "npm run build && npm pack --dry-run",
49
54
  "smoke:downstream": "npm run build && node scripts/downstream-smoke.mjs",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflow-gateway",
3
- "version": "0.1.0+codex.20260827003726",
3
+ "version": "0.1.0+codex.20260830183000",
4
4
  "description": "Thin personal Codex gateway for exact project-local Codex Workflow V2 packages and codebase-memory-mcp.",
5
5
  "author": {
6
6
  "name": "Codex Workflow Maintainers"
@@ -1,6 +1,6 @@
1
1
  # Gateway Protocol V2
2
2
 
3
- ## beta.12 continuable remediation, coordinator projections, and retained recovery compatibility
3
+ ## beta.12.6 compatibility transitions and continuable remediation
4
4
 
5
5
  - When fresh `next` advertises `task plan-integrity-recover`, consume its exact Task revision,
6
6
  Step, actor, and writer-token contract. This route is valid only for the Core-derived
@@ -8,12 +8,54 @@
8
8
  It records a replan posture without changing Plan or product files; corrective yield and the
9
9
  existing state-bound corrective-replan Human gate remain mandatory.
10
10
 
11
+ - When fresh `next` advertises `task downstream-proof-recover`, Core has proved that every dirty
12
+ file outside the active Step belongs to a completed transitive predecessor and that recorded Git
13
+ history is intact. Invoke the exact lease-bound transition once. It preserves product files and
14
+ HEAD, invalidates stale predecessor completion authority with an append-only event, yields C1,
15
+ and routes the same Task to ordinary `task plan-set`. The replacement Plan, risk audit, and
16
+ execution authorization are fresh authority; no Task or Milestone recreation is involved.
17
+
18
+ - When an older installed package cannot reach that recovery because its normal update preflight
19
+ requires a clean checkout, beta.12.6 permits one bounded dependency transport. The active
20
+ Milestone base and Task branch must first receive separate exact commits changing only
21
+ `package.json` and `package-lock.json`; product work remains dirty and uncommitted. Fresh beta.12.6
22
+ `next` must then advertise `update downstream-proof-dependency-recover`. Its preflight proves the
23
+ Task history at `HEAD^`, the dependency candidate at `HEAD`, aligned version surfaces, no lease or
24
+ transaction, exact predecessor ownership, and a content hash of the dirty set. Recovery registers
25
+ only the dependency commit. It does not mutate product files or Step state; fresh `next` must
26
+ proceed to `task downstream-proof-recover`, which outranks manifest-induced Knowledge staleness.
27
+
11
28
  - `update dependency-provenance-preflight --id <TASK-ID>` is read-only. The matching
12
29
  `update dependency-provenance-recover --id <TASK-ID> --expected-revision <N> --actor <ACTOR>
13
30
  --reason <TEXT>` is valid only when preflight and fresh `next` both advertise it. Historical
14
31
  product commits absent from the current corrective Step are recognized only through intact passed
15
32
  strict-review plus verified reviewer-attestation chains and remain separately auditable as
16
33
  `retainedHistoricalCommits`.
34
+ Task-local manifest/lock fields from recorded history may differ from the base, but the candidate
35
+ commit must preserve them exactly while changing only the Workflow dependency entries.
36
+ - `task historical-step-provenance-preflight --id <TASK-ID>` is read-only. The matching
37
+ `task historical-step-provenance-recover` is available only for one unexpected product commit
38
+ with an intact passed strict-review chain, matching prior final acceptance, no lease or pending
39
+ operation, and dirty files confined to the current active Step. It retains historical authority
40
+ without changing Git, worktree bytes, or the current Plan.
41
+ - `update historical-step-dependency-preflight/recover` handles the same proof when the beta.12.9
42
+ dependency-only commit is the unregistered HEAD. It binds the exact dependency candidate and the
43
+ reviewed historical Step commit in one recovery record, preserves active product bytes, and then
44
+ requires fresh `status` and `next`.
45
+ - `task stop-override-prepare` is a read-only Human gate for the exact beta.11 attempt-four stop
46
+ shape. `task stop-override-apply` requires the same Task revision, Step, actor, reason, Plan, HEAD,
47
+ evidence binding, and returned `SOO-*` code in a later user turn. It appends evidence without
48
+ deleting `stop-escalate`; it never applies to `split-required`.
49
+ - After an applied stop override, one or more ordinary delegated `task context-refresh` transitions
50
+ may rebind the Plan before attempt four. Fresh `next` returns `task run` only when Core validates
51
+ the complete contiguous Plan/rebind/audit chain, mechanical equivalence at every hop, shared
52
+ delegated authority, and append-only chronology. HEAD may differ from the override only when every
53
+ intervening commit is an exact registered dependency-provenance recovery changing only
54
+ `package.json` and `package-lock.json`. If C1 remains claimed but the lease was lost at the Human
55
+ boundary, use only the simultaneously advertised `task writer-credential-replace` action.
56
+ A provenance recovery recorded after the final context-refresh audit may explain exactly one
57
+ additional Task revision only when it belongs to that verified Git chain. Any unexplained
58
+ revision remains a `doctor` boundary.
17
59
  - `milestone progress --id <MS-ID>` is a read-only projection and the sole source for Coordinator
18
60
  progress tables. It preserves cancelled/replacement Tasks as distinct membership rows.
19
61
  - `scripts/chat-registry.mjs` atomically allocates project-monotonic `#NNN`, builds all six title
@@ -49,6 +91,11 @@ Current capability set:
49
91
  - `corrective-plan-audit-v1`
50
92
  - `safe-update-preflight-v1`
51
93
  - `bounded-dependency-provenance-recovery-v1`
94
+ - `task-local-dependency-provenance-recovery-v1`
95
+ - `legacy-stop-escalate-override-v1`
96
+ - `stop-override-context-rebind-v1`
97
+ - `stop-override-context-rebind-chain-v1`
98
+ - `stop-override-post-audit-dependency-revision-v1`
52
99
  - `retained-reviewed-history-recovery-v1`
53
100
  - `milestone-progress-projection-v1`
54
101
  - `strict-reviewer-v1`
@@ -79,6 +126,8 @@ Current capability set:
79
126
  - `remediation-mode-recovery-v1`
80
127
  - `plan-proof-obligations-v1`
81
128
  - `bounded-plan-integrity-recovery-v1`
129
+ - `downstream-proof-predecessor-recovery-v1`
130
+ - `active-downstream-proof-dependency-recovery-v1`
82
131
  - `corrective-yield-journal-v1`
83
132
  - `corrective-replan-journal-v1`
84
133
  - `corrective-replan-human-gate-v1`
@@ -154,6 +203,13 @@ actor through `--actor`; reviewer identity remains internal to the route.
154
203
  An unrecorded commit is Git history drift. Stop instead of adding another commit or editing
155
204
  workflow state manually; recovery remains coordinator-controlled.
156
205
 
206
+ If a Docker proof fails with `EPERM`, `operation not permitted`, or `permission denied` at the
207
+ Docker socket/CLI boundary, classify it as sandbox access, not daemon failure. Re-run the exact
208
+ read-only health probe or Plan command once with sandbox escalation; do not charge an infrastructure
209
+ retry. Restarting Docker Desktop or pulling another image is forbidden on this evidence alone. A
210
+ Docker infrastructure failure exists only when an escalated call reaches Docker and independently
211
+ proves the daemon unavailable.
212
+
157
213
  ## Plan Risk Audit and remediation breaker
158
214
 
159
215
  Before `task authorize`, every new alpha.7 Task requires:
@@ -187,6 +243,12 @@ explicit stop or redirection decisions. They are never inferred from attempt cou
187
243
  explicit decision, another failed strict review continues the same Task through its evidence-bound
188
244
  `fix`/`replan` route.
189
245
 
246
+ One append-only compatibility exception exists for a beta.11 policy-created attempt-four stop.
247
+ Fresh `next` must advertise `task stop-override-prepare`; run it with exact human inputs, present the
248
+ complete binding, and stop. A later explicit user turn may run `task stop-override-apply` with the
249
+ same inputs and confirmation code. Any split decision, Plan/revision/HEAD drift, missing attempt-3
250
+ continue authority, lease, transaction, or journal damage blocks the route.
251
+
190
252
  ## Context refresh
191
253
 
192
254
  Before `task plan-set`, compare exact Step `allowedWrites` and expected output paths with scanner
@@ -247,6 +309,12 @@ working memory. In claimed C1 posture, fresh `next` exposes `writerTokenContract
247
309
  pass the receipt token through its declared `--writer-token` option on the first run call. The
248
310
  successful run returns the refreshed writer receipt for later lease-bound transitions.
249
311
 
312
+ `task result-set` is also lease-bound. It requires the active `--writer-token` and the exact C1
313
+ claimant in `--actor` when the Task is claimed. Success releases the lease before the Task enters
314
+ `awaiting_final_acceptance`; the token is no longer valid. The Human gate must therefore remain
315
+ lease-free for an arbitrary amount of time. After acceptance, obtain the new merge credential only
316
+ through the `writerCredentialRecovery` action advertised by fresh `next`.
317
+
250
318
  ## Milestone assembly, autonomy, and human gate
251
319
 
252
320
  During initial planning, materialize every linked Task and then call `milestone plan-set` once
@@ -50,6 +50,37 @@ pending/corrupt transaction. After success run sequential `status` then `next` a
50
50
  returned lifecycle action; Knowledge reconciliation or atomic Task context refresh may legitimately
51
51
  be next because the dependency files changed.
52
52
 
53
+ When beta.12.9 fresh `next` advertises `task historical-step-provenance-recover`, Core has found
54
+ exactly one product commit that a corrective Plan omitted from current Step evidence even though the
55
+ commit still has a complete hash-valid passed strict Step Review chain and a matching prior final
56
+ acceptance. First run the advertised read-only `task historical-step-provenance-preflight --id
57
+ <TASK-ID>` and require `eligible=true`, the exact Task revision/Plan/Brief/HEAD, the advertised
58
+ commit SHA, no lease/transaction/Core operation, and dirty files confined to the one active Step's
59
+ `allowedWrites`. Invoke recovery with that exact commit, actor, and a substantive reason. The
60
+ transition records the commit as invalidated historical Step authority plus an audit record; it does
61
+ not adopt the completed Step into the current Plan and does not create, remove, amend, reset, rebase,
62
+ or merge Git commits. Reject multiple or arbitrary unexpected commits, pending/failed review,
63
+ mismatched final acceptance, unrelated dirty files, or damaged sidecars. After success run
64
+ sequential `status` then `next`; the active corrective Step should resume through its ordinary
65
+ credential and `task step-complete` route.
66
+
67
+ When beta.12.9 must itself be installed while this exact historical Step blocker is active, preserve
68
+ the Task worktree and create only two dependency transport commits: one on the active Milestone base
69
+ and one at Task-branch HEAD, each changing exactly `package.json` and `package-lock.json` to the exact
70
+ beta.12.9 package. Do not switch the dirty Task checkout to update the base; use a separate temporary
71
+ worktree. Install the repository-local target package, then require fresh `next` to advertise
72
+ `update historical-step-dependency-recover`. Run the matching read-only preflight and require the
73
+ exact dependency HEAD/parent, Task revision, active Step/Plan, retained historical SHA, dirty-file
74
+ set and dirty-worktree hash, with no lease or pending operation. The matching recover registers both
75
+ authorities without modifying product bytes or Git. After recovery run sequential `status` and
76
+ `next`; do not substitute ordinary dependency recovery, manual state edits, rebase, reset, or amend.
77
+
78
+ Beta.12.1 permits product-owned manifest/lock fields already present in the exact recorded Task
79
+ history to differ from the Milestone base. Core compares candidate parent to candidate HEAD after
80
+ removing only the Workflow dependency entries, so the dependency commit must preserve every such
81
+ field exactly. Do not rebase, copy the base manifest over Task-local scripts, or interpret this as
82
+ permission for product payload in the candidate commit.
83
+
53
84
  The beta.11 bounded Plan-integrity route prevents a known impossible check from consuming a second
54
85
  ordinary remediation attempt. Use `task plan-integrity-recover` only when fresh `next` advertises
55
86
  it for the exact failed Task/Step/revision. Require `state=eligible`, no blockers, one first
@@ -61,6 +92,20 @@ active writer token when the C1 contract requires it. The recovery records only
61
92
  `task run` merely to manufacture the second failure, and never invoke this recovery for a generic
62
93
  test failure, a writable manifest, or unconfined changes.
63
94
 
95
+ When fresh `next` advertises `task downstream-proof-recover`, the active proof Step has produced
96
+ uncommitted files inside its own `allowedWrites` and has also exposed required changes owned by one
97
+ or more completed transitive predecessor Steps. Do not invoke `task step-complete`: its scope is
98
+ known to be stale. Use only the exact returned Task revision, claimant/lease actor, writer-token
99
+ contract, and a substantive reason. The atomic recovery preserves the worktree and HEAD, moves the
100
+ predecessor completion commits into historical `invalidatedStepCommits`, clears only the invalidated
101
+ completion evidence, blocks the active proof Step, supersedes execution authorization, appends
102
+ `downstream-proof-invalidations.jsonl`, releases C1/lease authority, and returns the same Task to
103
+ ordinary `task plan-set`. Build the replacement Plan from the full unfinished remainder, attach a
104
+ fresh Plan Risk Audit, then obtain fresh execution authorization. Never use this route for an
105
+ unrelated dirty file, a non-predecessor file, unregistered Git history, strict-review evidence, or
106
+ without explicit fresh `next` eligibility. Do not reset, stash, commit, or recreate the Task or
107
+ Milestone around this transition.
108
+
64
109
  If any step fails, report the concrete diagnostic. Do not load workflow
65
110
  semantics from this skill.
66
111
 
@@ -87,6 +132,36 @@ into Plan `acceptance` as exact array members; semantic prose may be added but c
87
132
  IDs. Bind the Plan to the returned `briefHash` and active `knowledgeMap` revision/hash. Stop if the
88
133
  contract is absent or conflicts with the current Task/Knowledge state.
89
134
 
135
+ When fresh repository `next` reports `planRiskAuditDecision.state=recorded-blocking`, decision
136
+ `stop-escalate`, and an `auditedRemediation` object, do not retry authorization and do not invent a
137
+ free-form Milestone scope change. Follow only the advertised route:
138
+
139
+ 1. If action is `discovery start`, create one Discovery for the exact missing upstream capability
140
+ proved by the audit. Preserve the current Milestone outcome, success signal, acceptance, checks,
141
+ and original Task scope. Resolve factual unknowns from repository evidence; a genuine unresolved
142
+ product decision remains a semantic blocker.
143
+ 2. If action is `discovery update`, complete that same remediation Discovery until it is
144
+ `ready_to_materialize`; do not reuse an unrelated Discovery.
145
+ 3. If action is `milestone remediation-materialize`, use its exact Milestone/Task revisions and
146
+ audit binding. The JSON input contains only `discoveryId`, `expectedDiscoveryRevision`, `title`,
147
+ and `predecessorTaskIds`; the predecessor list must exactly equal
148
+ `auditedRemediation.requiredPredecessorTaskIds`. No actor, confirmation code, delegation grant,
149
+ replacement Milestone Plan, or human approval is accepted.
150
+ 4. Run sequential `status` then repository `next`. Core must prioritize the new remediation Task.
151
+ Plan, audit, hand off, implement, review, accept, and merge it normally. At Task execution
152
+ authorization and final acceptance, use the exact `correctiveDerivedApproval.actor` returned by
153
+ fresh `next`; `humanApprovalRequired` must be false. Do not pass a delegation grant.
154
+ 5. After the remediation Task is `merged`, fresh `next` must return the original blocked Task to
155
+ `task plan-set` with `auditedRemediation.state=merged-replan-required`. Replace its rejected Plan,
156
+ record a fresh Risk Audit, use the same current derived approval only when advertised, and
157
+ continue through at least the next ordinary Step boundary.
158
+
159
+ This is an idempotent, additive topology transition bound to one exact Plan Risk Audit. Dirty Git,
160
+ any lease/transaction/Core operation, a started blocked Task, stale Task/Milestone/audit bindings,
161
+ non-merged or non-exact predecessors, duplicate use of the audit, or any changed Milestone semantic
162
+ field is a hard stop. Generic `stop-escalate` shapes without `auditedRemediation` remain terminal
163
+ user attention. Final Milestone acceptance remains an ordinary human/delegated gate.
164
+
90
165
  When `next` returns top-level `action: task context-refresh`, use only that atomic action for
91
166
  the returned Task/map revisions, actor, and grant. Do not run standalone `project-memory reconcile`
92
167
  first: Core rejects it because it would create a human-approval gap and strand the Task. A
@@ -103,6 +178,64 @@ command shape or consuming a replacement Discovery. Never rebind, refresh, repla
103
178
  resume, cancel, or manually replace the historical Task. Continue only after a later P04-B/P05
104
179
  package explicitly advertises a topology-preserving replacement capability.
105
180
 
181
+ When beta.12.6 `next` advertises `task stop-override-prepare`, the route is limited to the exact
182
+ beta.11 attempt-four policy stop: two ordinary failures, one corrective failure, a matching
183
+ attempt-3 `continue-fix`, and a matching attempt-4 `stop-escalate` under the unchanged Plan. Invoke
184
+ prepare with the exact Task/Step/revision, explicit human actor, and user-supplied reason. It is
185
+ read-only. Show the returned binding and `SOO-*` code, then stop. Only a later explicit user turn may
186
+ invoke `task stop-override-apply` with the identical inputs and code. Never delegate the gate,
187
+ override `split-required`, edit either journal, or reuse a code after Task revision, Plan, HEAD, or
188
+ evidence changes. Successful apply preserves the original stop, appends
189
+ `stop-escalate-overrides.jsonl`, and requires fresh sequential `status` then `next` before attempt
190
+ four runs through the normal strict-review cycle.
191
+
192
+ After an applied override, one or more ordinary delegated `task context-refresh` transitions may
193
+ change only the Plan's canonical Knowledge Map binding. A package update may also advance HEAD, but
194
+ only through the exact `update dependency-provenance-recover` route advertised by fresh `next`.
195
+ Continue only when fresh `next` advertises `task run` with
196
+ `stopOverrideContextRebind.state=validated` for the exact override and stop decision. Core verifies
197
+ the complete source-to-current Plan/audit/rebind chain and, when HEAD changed, every intervening Git
198
+ commit as registered dependency-only provenance. If C1 remains claimed but the lease was lost at
199
+ the Human boundary, first use the simultaneously advertised `task writer-credential-replace`
200
+ action for the exact claimant. A doctor route, semantic Plan drift, an unregistered or non-dependency
201
+ commit, missing delegated authority, a broken chain, or damaged chronology is a hard stop.
202
+ When advertised navigation records dependency provenance after the final context-refresh audit,
203
+ Core may account for exactly one Task revision per ordered verified recovery. Never infer this
204
+ compatibility from revision arithmetic alone: continue only when fresh `next` returns the validated
205
+ `task run` route. An unrelated extra revision remains a hard stop.
206
+
207
+ For the exact beta.12.6 active-downstream-proof update deadlock, do not apply the ordinary
208
+ clean-boundary update recipe and do not stash/reset/commit product work. This exception is available
209
+ only when a completed transitive predecessor and the active proof Step already own the complete dirty
210
+ set, no writer lease/transaction/Core operation exists, and the active Milestone base can be updated
211
+ in a separate worktree. Commit only exact `package.json`/`package-lock.json` dependency changes on
212
+ that base, then commit only the same dependency files on the current Task branch while leaving all
213
+ product bytes untouched. Install the exact beta.12.6 package and use only a fresh advertised
214
+ `update downstream-proof-dependency-recover`. Run its read-only preflight first and require
215
+ `eligible=true`, empty blockers, exact Task revision and non-null `activeDownstreamProof` binding.
216
+ Require recorded Task history to validate at `HEAD^` and the exact dependency-only candidate to be
217
+ `HEAD`; neither boundary may contain an unrelated or unregistered commit. The mutation registers
218
+ only the dependency HEAD. Immediately run sequential `status` then `next`;
219
+ continue only to the returned `task downstream-proof-recover` (including advertised writer-credential
220
+ recovery when required). Any unrelated dirty path, unknown history, wider candidate commit, stale
221
+ base, version mismatch, lease, transaction, or different route is a hard stop and never authorizes
222
+ manual external-state edits.
223
+
224
+ For the exact beta.12.6 post-recovery knowledge-rebind deadlock, an exact beta.12.7 external runner
225
+ may execute only the read-only `update downstream-proof-replan-update-preflight` before dependency
226
+ transport. Require `eligible=true`, source version beta.12.6 on declared/locked/installed/current/base
227
+ surfaces, the exact Task revision/HEAD/dirty hash, no current audit for the rebound Plan, and no lease,
228
+ transaction, or Core operation. Commit only `package.json` and `package-lock.json` on the active
229
+ Milestone base, then only the same dependency files on the Task branch without touching product
230
+ bytes. Install beta.12.7 and follow fresh `next` only through
231
+ `update downstream-proof-replan-dependency-recover`, then
232
+ `task downstream-proof-replan-recover`, and finally ordinary `task plan-set`. The recovery keeps the
233
+ same Task, history, Knowledge binding, invalidated predecessor evidence, and dirty worktree. After
234
+ the replacement Plan is audited and authorized, `task run` is valid only when fresh `next` reports
235
+ `downstreamProofCarryover.state=validated` for one Step owning the complete hash-bound dirty set.
236
+ Any wider dependency commit, dirty-byte change, current audit, extra Task revision, missing binding,
237
+ or alternate route is a hard stop.
238
+
106
239
  When `next` returns `milestone initial-assembly`, execution is unavailable. Follow only the
107
240
  advertised `linked-task-assembly.commands` (`discovery start` and `discovery materialize`) until all
108
241
  intended linked Tasks exist. The closing `milestone plan-set` option appears only after at least one
@@ -123,6 +256,17 @@ For `task start`, the policy applies only when choosing `--workspace-owner local
123
256
  `task step-complete`, `task merge`, and `task sync-base`, the advertised transition itself
124
257
  writes Git metadata.
125
258
 
259
+ Treat Docker access diagnostics before classifying an infrastructure failure. `EPERM`,
260
+ `operation not permitted`, or `permission denied` while opening the Docker socket or invoking the
261
+ Docker CLI from a sandbox means the proof is unavailable at the current execution boundary; it is
262
+ not evidence that the daemon or image is broken. Re-run the exact read-only health probe or exact
263
+ Plan check once with the required sandbox escalation. This escalation rerun does not consume a
264
+ Workflow remediation attempt or a local infrastructure retry. Only an escalated probe that reaches
265
+ Docker and reports an unavailable daemon may be classified as a Docker infrastructure failure.
266
+ Never start, stop, or restart Docker Desktop, pull a substitute image, or mutate Docker state merely
267
+ because the sandboxed call returned a permission error; those actions require their own explicit
268
+ authorization and evidence.
269
+
126
270
  When `next` includes `writerTokenContract`, treat it as an exact first-call precondition. Retain
127
271
  the active writer lease from the first-field `writerLeaseReceipt` returned by `task run` and pass it using the advertised `option` for that
128
272
  transition. The token is sensitive: never print, summarize, persist, or substitute a redacted
@@ -137,6 +281,16 @@ the fresh `next.writerTokenContract` requires it. Successful `task run` returns
137
281
  `writerLeaseReceipt`; retain it only until Core releases that lease.
138
282
  Never search later payload fields for either credential and never copy credentials into evidence.
139
283
 
284
+ When a passed final Task review routes to `task result-set`, pass the active writer credential and,
285
+ for claimed C1 posture, the exact claimant as `--actor`. A successful `result-set` consumes that
286
+ execution lease before entering `awaiting_final_acceptance`; never reuse the old token and never
287
+ leave or manufacture a lease while waiting for the Human decision. After `task accept`, follow fresh
288
+ `next`: local merge or external merge confirmation normally advertises
289
+ `task writer-credential-replace`, which acquires a new bounded lease for the exact recovery actor.
290
+ If a Task created under beta.12.7 or earlier is already at the Human gate with a stale lease, use
291
+ only the exact `locks repair` route returned by repository-level `next`, verify that Task revision,
292
+ review, Result/Evidence hashes, and HEAD did not change, and stop before acceptance.
293
+
140
294
  Command discovery with `codex-workflow <noun> [action] --help` is read-only. Use it only when the
141
295
  exact invocation syntax is not already available from `next` and this protocol. Consume declared
142
296
  `requiredOptions` and `optionalOptions`; when `exactOptionContractAvailable=false`, consult the
@@ -381,7 +535,8 @@ Plan audit based only on count. Follow fresh `next`: ordinary findings default t
381
535
  `route=replan` is valid only with the exact Plan clause, obstruction, and minimal Plan change
382
536
  retained by Core. A remediation Plan may change implementation Steps but must preserve the Task
383
537
  objective, requirements, and acceptance. Explicit split or stop decisions still stop ordinary
384
- continuation.
538
+ continuation; only an exact Core-advertised audited-remediation route may turn a pre-execution
539
+ `stop-escalate` into additive upstream work.
385
540
 
386
541
  When `next.strictStepReview.recommendedMode` is `external-sealed`, do not launch the nested local
387
542
  reviewer from inside a Codex App sandbox. Run the advertised read-only `task step-review-packet`,
@@ -19,7 +19,7 @@
19
19
  "evidenceHash": { "$ref": "#/$defs/nullableHash" },
20
20
  "headCommit": { "$ref": "#/$defs/nullableHash" },
21
21
  "reason": { "type": "string" },
22
- "authorizationMode": { "enum": ["human", "delegated"] },
22
+ "authorizationMode": { "enum": ["human", "delegated", "corrective-derived"] },
23
23
  "delegation": { "$ref": "#/$defs/delegation" },
24
24
  "mechanicalFeasibility": { "$ref": "#/$defs/mechanicalFeasibility" }
25
25
  },
@@ -30,6 +30,13 @@
30
30
  "required": ["authorizationMode"]
31
31
  },
32
32
  "then": { "required": ["delegation"] }
33
+ },
34
+ {
35
+ "if": {
36
+ "properties": { "authorizationMode": { "const": "corrective-derived" } },
37
+ "required": ["authorizationMode"]
38
+ },
39
+ "then": { "not": { "required": ["delegation"] } }
33
40
  }
34
41
  ],
35
42
  "$defs": {