codex-workflow-v2 2.0.0-beta.1 → 2.0.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/README.md +94 -12
  2. package/dist/src/alpha6/adoption.js +13 -3
  3. package/dist/src/alpha6/adoption.js.map +1 -1
  4. package/dist/src/alpha6/handoff.d.ts +26 -2
  5. package/dist/src/alpha6/handoff.js +277 -29
  6. package/dist/src/alpha6/handoff.js.map +1 -1
  7. package/dist/src/alpha6/mechanical-feasibility.d.ts +7 -0
  8. package/dist/src/alpha6/mechanical-feasibility.js +303 -0
  9. package/dist/src/alpha6/mechanical-feasibility.js.map +1 -0
  10. package/dist/src/alpha6/milestone.d.ts +37 -2
  11. package/dist/src/alpha6/milestone.js +472 -33
  12. package/dist/src/alpha6/milestone.js.map +1 -1
  13. package/dist/src/alpha6/plan-integrity.d.ts +14 -0
  14. package/dist/src/alpha6/plan-integrity.js +127 -0
  15. package/dist/src/alpha6/plan-integrity.js.map +1 -0
  16. package/dist/src/alpha6/plan-risk.d.ts +1 -0
  17. package/dist/src/alpha6/plan-risk.js +15 -7
  18. package/dist/src/alpha6/plan-risk.js.map +1 -1
  19. package/dist/src/alpha6/remediation.d.ts +2 -1
  20. package/dist/src/alpha6/remediation.js +186 -9
  21. package/dist/src/alpha6/remediation.js.map +1 -1
  22. package/dist/src/alpha6/review.d.ts +3 -0
  23. package/dist/src/alpha6/review.js +24 -0
  24. package/dist/src/alpha6/review.js.map +1 -1
  25. package/dist/src/cli.js +486 -46
  26. package/dist/src/cli.js.map +1 -1
  27. package/dist/src/contracts.d.ts +238 -6
  28. package/dist/src/contracts.js +1 -1
  29. package/dist/src/credential-output.d.ts +10 -0
  30. package/dist/src/credential-output.js +73 -0
  31. package/dist/src/credential-output.js.map +1 -0
  32. package/dist/src/dependency-provenance.d.ts +19 -0
  33. package/dist/src/dependency-provenance.js +185 -0
  34. package/dist/src/dependency-provenance.js.map +1 -0
  35. package/dist/src/errors.d.ts +1 -1
  36. package/dist/src/errors.js.map +1 -1
  37. package/dist/src/git.d.ts +1 -1
  38. package/dist/src/git.js +13 -5
  39. package/dist/src/git.js.map +1 -1
  40. package/dist/src/index.d.ts +2 -1
  41. package/dist/src/index.js +2 -1
  42. package/dist/src/index.js.map +1 -1
  43. package/dist/src/lifecycle/canonical-hash.d.ts +6 -0
  44. package/dist/src/lifecycle/canonical-hash.js +24 -0
  45. package/dist/src/lifecycle/canonical-hash.js.map +1 -0
  46. package/dist/src/lifecycle/catalog.d.ts +26 -0
  47. package/dist/src/lifecycle/catalog.js +208 -0
  48. package/dist/src/lifecycle/catalog.js.map +1 -0
  49. package/dist/src/lifecycle/compiler-inspection.d.ts +48 -0
  50. package/dist/src/lifecycle/compiler-inspection.js +29 -0
  51. package/dist/src/lifecycle/compiler-inspection.js.map +1 -0
  52. package/dist/src/lifecycle/core-static-readiness.d.ts +6 -0
  53. package/dist/src/lifecycle/core-static-readiness.js +130 -0
  54. package/dist/src/lifecycle/core-static-readiness.js.map +1 -0
  55. package/dist/src/lifecycle/corrective-replan-authority.d.ts +53 -0
  56. package/dist/src/lifecycle/corrective-replan-authority.js +139 -0
  57. package/dist/src/lifecycle/corrective-replan-authority.js.map +1 -0
  58. package/dist/src/lifecycle/corrective-replan-binding-manifest.d.ts +21 -0
  59. package/dist/src/lifecycle/corrective-replan-binding-manifest.js +35 -0
  60. package/dist/src/lifecycle/corrective-replan-binding-manifest.js.map +1 -0
  61. package/dist/src/lifecycle/corrective-replan-credential-core.d.ts +86 -0
  62. package/dist/src/lifecycle/corrective-replan-credential-core.js +563 -0
  63. package/dist/src/lifecycle/corrective-replan-credential-core.js.map +1 -0
  64. package/dist/src/lifecycle/corrective-replan-credential-schema.d.ts +17 -0
  65. package/dist/src/lifecycle/corrective-replan-credential-schema.js +44 -0
  66. package/dist/src/lifecycle/corrective-replan-credential-schema.js.map +1 -0
  67. package/dist/src/lifecycle/corrective-replan-credentials.d.ts +47 -0
  68. package/dist/src/lifecycle/corrective-replan-credentials.js +103 -0
  69. package/dist/src/lifecycle/corrective-replan-credentials.js.map +1 -0
  70. package/dist/src/lifecycle/corrective-replan.d.ts +64 -0
  71. package/dist/src/lifecycle/corrective-replan.js +553 -0
  72. package/dist/src/lifecycle/corrective-replan.js.map +1 -0
  73. package/dist/src/lifecycle/evaluator.d.ts +2 -0
  74. package/dist/src/lifecycle/evaluator.js +35 -0
  75. package/dist/src/lifecycle/evaluator.js.map +1 -0
  76. package/dist/src/lifecycle/fingerprint.d.ts +31 -0
  77. package/dist/src/lifecycle/fingerprint.js +388 -0
  78. package/dist/src/lifecycle/fingerprint.js.map +1 -0
  79. package/dist/src/lifecycle/immutable.d.ts +1 -0
  80. package/dist/src/lifecycle/immutable.js +10 -0
  81. package/dist/src/lifecycle/immutable.js.map +1 -0
  82. package/dist/src/lifecycle/implementation-table.d.ts +29 -0
  83. package/dist/src/lifecycle/implementation-table.js +87 -0
  84. package/dist/src/lifecycle/implementation-table.js.map +1 -0
  85. package/dist/src/lifecycle/index.d.ts +4 -0
  86. package/dist/src/lifecycle/index.js +5 -0
  87. package/dist/src/lifecycle/index.js.map +1 -0
  88. package/dist/src/lifecycle/schema-artifact.d.ts +12 -0
  89. package/dist/src/lifecycle/schema-artifact.js +214 -0
  90. package/dist/src/lifecycle/schema-artifact.js.map +1 -0
  91. package/dist/src/lifecycle/semantic-registry.d.ts +6 -0
  92. package/dist/src/lifecycle/semantic-registry.js +489 -0
  93. package/dist/src/lifecycle/semantic-registry.js.map +1 -0
  94. package/dist/src/lifecycle/types.d.ts +718 -0
  95. package/dist/src/lifecycle/types.js +4 -0
  96. package/dist/src/lifecycle/types.js.map +1 -0
  97. package/dist/src/observation.d.ts +20 -0
  98. package/dist/src/observation.js +171 -0
  99. package/dist/src/observation.js.map +1 -0
  100. package/dist/src/reviewer.d.ts +43 -1
  101. package/dist/src/reviewer.js +203 -50
  102. package/dist/src/reviewer.js.map +1 -1
  103. package/dist/src/state/corrective-replan-executor.d.ts +64 -0
  104. package/dist/src/state/corrective-replan-executor.js +608 -0
  105. package/dist/src/state/corrective-replan-executor.js.map +1 -0
  106. package/dist/src/state/corrective-replan-public-schema.d.ts +3 -0
  107. package/dist/src/state/corrective-replan-public-schema.js +43 -0
  108. package/dist/src/state/corrective-replan-public-schema.js.map +1 -0
  109. package/dist/src/state/corrective-replan-public.d.ts +95 -0
  110. package/dist/src/state/corrective-replan-public.js +665 -0
  111. package/dist/src/state/corrective-replan-public.js.map +1 -0
  112. package/dist/src/state/corrective-replan-transaction.d.ts +160 -0
  113. package/dist/src/state/corrective-replan-transaction.js +730 -0
  114. package/dist/src/state/corrective-replan-transaction.js.map +1 -0
  115. package/dist/src/state/corrective-yield-executor.d.ts +31 -0
  116. package/dist/src/state/corrective-yield-executor.js +236 -0
  117. package/dist/src/state/corrective-yield-executor.js.map +1 -0
  118. package/dist/src/state/corrective-yield-transaction.d.ts +97 -0
  119. package/dist/src/state/corrective-yield-transaction.js +591 -0
  120. package/dist/src/state/corrective-yield-transaction.js.map +1 -0
  121. package/dist/src/state/lock.d.ts +76 -3
  122. package/dist/src/state/lock.js +611 -30
  123. package/dist/src/state/lock.js.map +1 -1
  124. package/dist/src/state/store.d.ts +3 -0
  125. package/dist/src/state/store.js +65 -12
  126. package/dist/src/state/store.js.map +1 -1
  127. package/dist/src/transition-core.d.ts +67 -0
  128. package/dist/src/transition-core.js +318 -0
  129. package/dist/src/transition-core.js.map +1 -0
  130. package/dist/src/version.d.ts +1 -1
  131. package/dist/src/version.js +1 -1
  132. package/dist/src/version.js.map +1 -1
  133. package/dist/src/workflow.d.ts +88 -24
  134. package/dist/src/workflow.js +1647 -270
  135. package/dist/src/workflow.js.map +1 -1
  136. package/docs/autonomy-guardrails.md +61 -1
  137. package/docs/beta11-plan-integrity-recovery-brief.md +38 -0
  138. package/docs/beta2-initial-assembly-navigation-brief.md +616 -0
  139. package/docs/delegated-approval.md +26 -1
  140. package/docs/development-flow.md +63 -8
  141. package/docs/lifecycle/state-machine-stabilization.md +641 -0
  142. package/docs/pdf/README.md +24 -0
  143. package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
  144. package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
  145. package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
  146. package/docs/pdf/requirements.txt +1 -0
  147. package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +234 -0
  148. package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +334 -0
  149. package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +413 -0
  150. package/docs/problem-briefs/01-pre-implementation-integrity.md +478 -0
  151. package/docs/problem-briefs/02-minimal-step-integrity.md +411 -0
  152. package/docs/problem-briefs/03-minimal-agent-context-integrity.md +358 -0
  153. package/docs/problem-briefs/04-task-dependency-and-structural-replacement-integrity.md +566 -0
  154. package/docs/problem-briefs/BRIEF-TEMPLATE.md +56 -0
  155. package/docs/problem-briefs/README.md +120 -0
  156. package/docs/problem-briefs/evidence/p01-mechanical-feasibility-corpus.md +90 -0
  157. package/docs/problem-briefs/evidence/signal-v4-pre-m3-replay.md +246 -0
  158. package/docs/release.md +30 -6
  159. package/docs/split-required-recovery.md +19 -25
  160. package/docs/stable-release-defect-register.md +465 -3
  161. package/docs/updating-existing-project.md +59 -4
  162. package/docs/validation-report.md +124 -56
  163. package/package.json +9 -1
  164. package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +10 -3
  165. package/plugins/codex-workflow-gateway/references/protocol.md +92 -4
  166. package/plugins/codex-workflow-gateway/scripts/chat-registry.mjs +376 -0
  167. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +263 -4
  168. package/references/state-machine.md +13 -6
  169. package/roles/delivery-coordinator.md +39 -0
  170. package/schemas/adoption-posture-event.schema.json +1 -1
  171. package/schemas/authorization-event.schema.json +64 -1
  172. package/schemas/context-envelope.schema.json +1 -1
  173. package/schemas/corrective-decision-event.schema.json +48 -3
  174. package/schemas/corrective-replan-credentials.private.schema.json +98 -0
  175. package/schemas/corrective-replan-execution-event.private.schema.json +53 -0
  176. package/schemas/corrective-replan-public.schema.json +142 -0
  177. package/schemas/corrective-replan-task-transaction.private.schema.json +151 -0
  178. package/schemas/corrective-yield-task-transaction.private.schema.json +98 -0
  179. package/schemas/milestone-scope-change-event.schema.json +6 -1
  180. package/schemas/milestone.schema.json +6 -1
  181. package/schemas/remediation-event.schema.json +11 -1
  182. package/schemas/task-handoff-event.schema.json +19 -3
  183. package/schemas/task.schema.json +24 -1
  184. package/schemas/transition-definition.schema.json +2609 -0
  185. package/schemas/transition-payloads.schema.json +140 -0
  186. package/scripts/generate-pdf-docs.py +512 -0
  187. package/scripts/run-pdf-docs.mjs +62 -0
@@ -1,56 +1,124 @@
1
- # V2 Alpha Validation Report
2
-
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.
50
-
51
- Not claimed here:
52
-
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.
1
+ # V2 beta.11 Validation Report
2
+
3
+ Release candidate `2.0.0-beta.11` was validated on 2026-08-24 with Node.js 24.17.0.
4
+
5
+ ## Automated release evidence
6
+
7
+ - `npm ci` completed from the committed lockfile with 0 reported vulnerabilities.
8
+ - The final `npm run validate` passed `319/319` sequential tests with no failures, skips,
9
+ cancellations, or todos. The focused Signal recovery suite passed independently (`5/5`).
10
+ - `npm run pack:check` passed. The beta.11 tarball contains 269 files; package size is approximately
11
+ 951 kB and unpacked size is 3.7 MB.
12
+ - `npm run smoke:downstream` packed and installed the actual beta.11 tarball in an empty temporary
13
+ project, then passed the packaged CLI handshake. The first sandboxed attempt was network-blocked
14
+ while fetching `ajv`; the authorized network retry and the final post-`npm ci` run passed.
15
+ - `npm run plugin:check`, the plugin-creator structural validator, the skill validator,
16
+ `npm run docs:pdf:check`, `npm run release:check`, and `git diff --check` passed. The bundled
17
+ gateway cachebuster is `0.1.0+codex.20260824113210`.
18
+
19
+ ## Bounded Plan-integrity recovery evidence
20
+
21
+ - Recovery becomes applicable only after the first ordinary `checks-failed` remediation for a
22
+ guarded failed Step when at least one Plan check is an exact root `npm run[-script] <name>`
23
+ command whose named script is absent from the root `package.json`, and that manifest is outside
24
+ the Step's exact `allowedWrites` boundary.
25
+ - Fresh evidence binds the Task revision, first remediation event ID/hash, current Plan and Step
26
+ definition, root manifest path/hash, Git HEAD, exact check commands, missing script names, and
27
+ current dirty-file set into one canonical conflict hash.
28
+ - An eligible `next` advertises only `task plan-integrity-recover`. The mutation appends one
29
+ schema-validated `replan-required` corrective decision and does not modify the worktree or invent
30
+ a second failed execution attempt.
31
+ - Existing C1 ownership remains authoritative. A claimed Worker must execute the advertised
32
+ recovery and then yield its claim before the existing journaled, Human-gated corrective-replan
33
+ transition can prepare replacement Plan authority.
34
+ - The route fails closed when `package.json` is writable by the Step, no missing-script check
35
+ matches the bounded npm-script grammar, unrelated dirty files exist, bindings drift, or
36
+ persisted evidence is malformed or tampered.
37
+
38
+ ## Regression coverage
39
+
40
+ - Four dedicated beta.11 regressions cover the exact happy path, the in-scope-manifest exclusion,
41
+ dirty-worktree rejection, and sidecar evidence tampering.
42
+ - Existing remediation-mode recovery retains higher navigation priority than the new assessment;
43
+ the legacy malformed-third-attempt regression passes unchanged.
44
+ - The corrective-replan serialized definition SHA moved to
45
+ `c601cc100790a19e6ece2a1d60fb46d1e1d52e6922e6104d84f4b6ffe7ba0225` because the decision event
46
+ schema now admits the bounded ordinal-2 recovery record. Its runtime semantic fingerprint remains
47
+ `bd4e7a0ddfcb6abc0c5eb107775e6aea7e08c4606dda4d945d77af8a4520710d`, and the runtime catalog hash
48
+ remains `fa1d11860d4f07978c3b8e85d1f91cd3d15b17284b05f41e05d462d3bb092aed`.
49
+ - The beta.10 dependency-provenance and exact Signal T04 revision-26 regressions remain green.
50
+ - The read-only Milestone projection still preserves `T03 cancelled → T08 replacement`, and the
51
+ monotonic chat registry/title fallback regressions remain green.
52
+
53
+ ## Trusted-harness release replay
54
+
55
+ - A fresh disposable project installed the actual current beta.11 tarball, declared the exact
56
+ `2.0.0-beta.11` dependency, and passed package handshake plus `doctor` with protocol 2 and state
57
+ schema 2. Its Git checkout remained clean.
58
+ - The automatic trusted harness invoked the real packaged CLI and append-only recorded Discovery
59
+ bootstrap, sequential `status → next` checkpoints, Project Knowledge scan/approval, and
60
+ Discovery-to-Task materialization through the resulting `task plan-set` boundary.
61
+ - The semantic lifecycle log validated `24/24` events with no failed or unadvertised mutation and
62
+ no missing checkpoint. Its SHA-256 is
63
+ `5c1d666aa3bc27c4b6687b836a565823a1f567227e93f76b2c3285217fb9a0b7`.
64
+ - The matched raw result log contains 12 successful CLI results, no C1 credential fields, and has
65
+ SHA-256 `a51bae7221fa0ff30bd571ca3800bf8ac44911d7746f68e5e86987b6c357ccf6`.
66
+ The exercised tarball SHA-256 is
67
+ `3b7ed19961ba8394625d3a481fafb196dd80be5b138635a0bd1ce084a47fc06e`.
68
+ - This targeted real-agent replay validates release navigation discipline and package integration;
69
+ it does not claim a second full product Milestone. Deeper P01/P04 lifecycle behavior is covered
70
+ by the deterministic and integration suites listed below.
71
+
72
+ ## Not claimed
73
+
74
+ - Validation itself performs no npm publication, Git tag, push, Signal Workflow mutation, or local
75
+ plugin reinstall.
76
+ - The implementation and package gates prove the bounded route. A real blocked project must still
77
+ install the published beta.11 package and follow its fresh project-local `handshake → doctor →
78
+ status → next → advertised recovery` navigation.
79
+
80
+ ## Post-beta.11 combined P04-A/P01-A candidate evidence
81
+
82
+ This later evidence was recorded on 2026-08-24 on branch `codex/p04-task-dependencies` and was
83
+ incorporated into the final beta.11 candidate.
84
+
85
+ - P04-A adds the canonical Milestone dependency DAG, atomic initial Plan transaction/recovery,
86
+ dependency-bound handoff/claim/start, legacy fail-closed policy, and unconditional pre-write
87
+ structural replacement shutdown.
88
+ - P01-A adds three versioned read-only analyzers, canonical in-event evidence/hash binding,
89
+ exact pre-start and corrective source selection, and phase-aware freshness before claim/start/run.
90
+ - After final source review added a pre-Git-mutation start race guard, `npm test` passed the exact
91
+ final sequential `319/319` suite with zero failures, skips, cancellations, or todos. The 13/13
92
+ focused P01-A suite, 84/84 affected P01/P04/Task lifecycle selection, and 4/4 beta.11
93
+ late-recovery compatibility tests also passed.
94
+ - `npm run typecheck`, `npm run plugin:check`, `npm run release:check`, schema validation inside
95
+ the full suite, the focused packaged-handshake capability test, and `git diff --check` passed.
96
+ - The changed bundled gateway uses cachebuster `0.1.0+codex.20260824113210`; it was validated but
97
+ not reinstalled.
98
+ - No merge, package install, tag, publication, plugin reinstall, Signal mutation, or brief status
99
+ transition to `implemented` is claimed by this candidate evidence.
100
+
101
+ ## beta.11 PDF release documentation evidence
102
+
103
+ The Russian PDF set was regenerated and revalidated on 2026-08-24 against the combined beta.11
104
+ candidate described above.
105
+
106
+ - The three tracked PDF binaries now have reviewable Markdown authorities under
107
+ `docs/pdf/sources/` and one deterministic ReportLab generator. `npm run docs:pdf:check`
108
+ regenerated all outputs and reported an empty stale set.
109
+ - All 24 pages were rendered and visually inspected: architecture is 6 pages, the delegated
110
+ chat-only guide is 8 pages, and the technical reference is 10 pages. Text extraction found no
111
+ empty pages. The architecture orphan-page defect found during inspection was removed, and the
112
+ complete delegated Discovery prompt no longer splits its readiness checklist across pages.
113
+ - The content documents beta.11 delegated Discovery, the Milestone Autonomy Contract, explicit
114
+ `dependsOnTaskIds`, P04-A runnable routing and structural-replacement stop, P01-A mechanical
115
+ feasibility, C1 credential boundaries, external-sealed review, Plan-integrity recovery, and the
116
+ limited derived-graph role of `codebase-memory-mcp`.
117
+ - `npm run pack:check` passed with an isolated writable npm cache. The 269-file dry-run tarball
118
+ contains all three PDFs, all three Markdown sources, the PDF README and pinned requirement, and
119
+ both generator/check scripts.
120
+ - On the same beta.11 code tree, `npm run validate` passed `319/319`; `npm run typecheck`,
121
+ `npm run plugin:check`, `npm run release:check`, and `git diff --check` also passed.
122
+
123
+ This evidence makes the documentation package-ready for beta.11. The release action remains a
124
+ separate Git/tag operation after all final gates pass on the exact candidate tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflow-v2",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.11",
4
4
  "description": "Requirements-first Codex development workflow with local state and explicit Git ownership.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,6 +34,8 @@
34
34
  "references",
35
35
  "plugins",
36
36
  "docs",
37
+ "scripts/generate-pdf-docs.py",
38
+ "scripts/run-pdf-docs.mjs",
37
39
  "README.md"
38
40
  ],
39
41
  "scripts": {
@@ -41,13 +43,19 @@
41
43
  "build": "npm run clean && tsc -p tsconfig.build.json && node scripts/mark-cli-executable.mjs",
42
44
  "typecheck": "tsc -p tsconfig.json --noEmit",
43
45
  "test": "node scripts/with-validation-lock.mjs test",
46
+ "test:signal-t04-recovery": "node scripts/with-validation-lock.mjs test-signal-t04",
44
47
  "validate": "npm run typecheck && npm test",
45
48
  "pack:check": "npm run build && npm pack --dry-run",
46
49
  "smoke:downstream": "npm run build && node scripts/downstream-smoke.mjs",
47
50
  "plugin:check": "node scripts/validate-plugin.mjs",
51
+ "docs:pdf": "node scripts/run-pdf-docs.mjs",
52
+ "docs:pdf:check": "node scripts/run-pdf-docs.mjs --check",
48
53
  "release:check": "node scripts/release-check.mjs",
49
54
  "publish:release": "node scripts/publish.mjs"
50
55
  },
56
+ "dependencies": {
57
+ "ajv": "8.20.0"
58
+ },
51
59
  "devDependencies": {
52
60
  "@types/node": "24.10.1",
53
61
  "typescript": "5.9.3"
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "name": "codex-workflow-gateway",
3
- "version": "0.1.0",
3
+ "version": "0.1.0+codex.20260824113210",
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"
7
7
  },
8
8
  "license": "MIT",
9
- "keywords": ["codex", "workflow", "codebase-memory", "gateway"],
9
+ "keywords": [
10
+ "codex",
11
+ "workflow",
12
+ "codebase-memory",
13
+ "gateway"
14
+ ],
10
15
  "skills": "./skills/",
11
16
  "interface": {
12
17
  "displayName": "Codex Workflow Gateway",
@@ -14,7 +19,9 @@
14
19
  "longDescription": "Resolves the exact project-local Codex Workflow V2 package, delegates workflow semantics to its CLI, and maintains derived codebase-memory graph bindings with explicit fallback evidence.",
15
20
  "developerName": "Codex Workflow Maintainers",
16
21
  "category": "Productivity",
17
- "capabilities": ["Interactive"],
22
+ "capabilities": [
23
+ "Interactive"
24
+ ],
18
25
  "defaultPrompt": [
19
26
  "Show the next valid Codex Workflow V2 action.",
20
27
  "Refresh the project code graph for planning.",
@@ -1,4 +1,23 @@
1
- # Gateway Protocol V1
1
+ # Gateway Protocol V2
2
+
3
+ ## beta.11 coordinator projections, retained review provenance, chat registry, and Plan-integrity recovery
4
+
5
+ - When fresh `next` advertises `task plan-integrity-recover`, consume its exact Task revision,
6
+ Step, actor, and writer-token contract. This route is valid only for the Core-derived
7
+ first-failure missing-root-npm-script evidence and must be followed by fresh `status -> next`.
8
+ It records a replan posture without changing Plan or product files; corrective yield and the
9
+ existing state-bound corrective-replan Human gate remain mandatory.
10
+
11
+ - `update dependency-provenance-preflight --id <TASK-ID>` is read-only. The matching
12
+ `update dependency-provenance-recover --id <TASK-ID> --expected-revision <N> --actor <ACTOR>
13
+ --reason <TEXT>` is valid only when preflight and fresh `next` both advertise it. Historical
14
+ product commits absent from the current corrective Step are recognized only through intact passed
15
+ strict-review plus verified reviewer-attestation chains and remain separately auditable as
16
+ `retainedHistoricalCommits`.
17
+ - `milestone progress --id <MS-ID>` is a read-only projection and the sole source for Coordinator
18
+ progress tables. It preserves cancelled/replacement Tasks as distinct membership rows.
19
+ - `scripts/chat-registry.mjs` atomically allocates project-monotonic `#NNN`, builds all six title
20
+ families, verifies exact readback, supplies deterministic fallbacks, and binds the verified chat.
2
21
 
3
22
  ## Handshake
4
23
 
@@ -11,7 +30,7 @@ codex-workflow gateway handshake --repo <git-root>
11
30
  Require:
12
31
 
13
32
  - package name `codex-workflow-v2`
14
- - protocol version `1`
33
+ - protocol version `2`
15
34
  - state schema version `2`
16
35
  - the capabilities needed for the requested operation
17
36
 
@@ -25,10 +44,13 @@ Current capability set:
25
44
  - `delegated-approval-v1`
26
45
  - `task-knowledge-rebind-v1`
27
46
  - `task-context-refresh-v1`
28
- - `terminal-task-replacement-transaction-v1`
47
+ - `structural-task-replacement-disabled-v1`
29
48
  - `project-composite-transaction-journal-v1`
30
49
  - `corrective-plan-audit-v1`
31
50
  - `safe-update-preflight-v1`
51
+ - `bounded-dependency-provenance-recovery-v1`
52
+ - `retained-reviewed-history-recovery-v1`
53
+ - `milestone-progress-projection-v1`
32
54
  - `strict-reviewer-v1`
33
55
  - `legacy-snapshot-v1`
34
56
  - `plan-risk-audit-sidecar-v1`
@@ -36,7 +58,10 @@ Current capability set:
36
58
  - `step-remediation-circuit-breaker-sidecar-v1`
37
59
  - `milestone-scope-change-sidecar-v1`
38
60
  - `milestone-membership-integrity-v1`
61
+ - `milestone-task-dependency-dag-v1`
62
+ - `milestone-initial-plan-transaction-v1`
39
63
  - `task-c1-handoff-sidecar-v1`
64
+ - `task-mechanical-feasibility-v1`
40
65
  - `semantic-plan-risk-audit-v2`
41
66
  - `guarded-remediation-hard-stop-v1`
42
67
  - `milestone-reverse-membership-integrity-v1`
@@ -44,11 +69,20 @@ Current capability set:
44
69
  - `alpha6-adoption-posture-v1`
45
70
  - `alpha6-strict-review-rescue-v1`
46
71
  - `milestone-initial-assembly-v1`
72
+ - `milestone-initial-assembly-navigation-v2`
47
73
  - `milestone-autonomy-contract-v1`
74
+ - `milestone-autonomy-content-refresh-v1`
48
75
  - `milestone-autonomous-membership-evolution-v1`
49
76
  - `task-c1-derived-worker-actor-v1`
50
77
  - `guarded-corrective-auditor-routing-v1`
78
+ - `corrective-decision-context-recovery-v1`
79
+ - `remediation-mode-recovery-v1`
51
80
  - `plan-proof-obligations-v1`
81
+ - `bounded-plan-integrity-recovery-v1`
82
+ - `corrective-yield-journal-v1`
83
+ - `corrective-replan-journal-v1`
84
+ - `corrective-replan-human-gate-v1`
85
+ - `corrective-replan-protocol-v2`
52
86
 
53
87
  Protocol `1` and schema `2` remain valid only because alpha.7 is additive. The gateway must
54
88
  not claim compatibility if canonical entity shapes or non-additive command semantics change.
@@ -75,7 +109,9 @@ version, canonical entity summaries, and the current sidecar baseline hash. Adop
75
109
 
76
110
  ## Worker Step completion and strict Step Review
77
111
 
78
- `task run` dispatches one Step and returns its writer token and Worker envelope. The Worker
112
+ `task run` dispatches one Step and returns a first-field `writerLeaseReceipt`, followed by the
113
+ credential-free lease metadata, Task state, and Worker envelope. Consume the receipt before the
114
+ remaining payload and retain its token only in working memory. The Worker
79
115
  must leave all changes uncommitted and must not stage, commit, amend, reset, rebase, or
80
116
  modify Git history.
81
117
 
@@ -84,11 +120,36 @@ While that Step is `in_progress`, repository-level `next` normally returns
84
120
  `workflow-core` ownership. The coordinator invokes that transition with the current revision
85
121
  and writer token. Core then runs configured checks, validates `allowedWrites`, stages the
86
122
  changes, creates the atomic commit, and records evidence.
123
+ When `next` also includes `gitMutationPolicy`, obtain bounded permission for that exact
124
+ Git-writing transition before the first call; do not probe and retry after a
125
+ `.git/index.lock` failure. For `task start`, the policy applies only when the coordinator
126
+ chooses `--workspace-owner local`.
127
+
128
+ When `next` also includes `writerTokenContract`, the coordinator must retain the active writer
129
+ lease from `writerLeaseReceipt` and pass it with the advertised option on the first transition call.
130
+ The contract never contains the token value. Do not print, persist, reconstruct, or replace the
131
+ token with a redacted fingerprint; stop before mutation when the active lease is unavailable.
132
+ Satisfy this contract separately from any `gitMutationPolicy` on the same response.
133
+
134
+ `codex-workflow <noun> [action] --help` is a read-only command-discovery route. It exits without
135
+ constructing workflow state or validating lifecycle inputs. Use exact option lists only when the
136
+ response says `exactOptionContractAvailable=true`; otherwise consult this packaged protocol. After
137
+ help, obtain a fresh `next` before invoking the lifecycle transition.
87
138
 
88
139
  If the current Plan Risk Audit marks that Step for strict review, the commit is still
89
140
  workflow-owned, but `next` then returns `action: "task step-review"` with the same `stepId`
90
141
  and the exact `completionCommit`. Canonical Step completion remains blocked until the strict
91
142
  review and reviewer attestation sidecars verify against that exact commit.
143
+ Invoke `task step-review` with the same lifecycle actor advertised by `next`
144
+ (`c1Handoff.claimant` or `requiredActor` when present). The isolated reviewer is launched
145
+ inside Core; do not substitute the reviewer identity into `--actor`. In claimed C1 posture,
146
+ `next.writerTokenContract` is mandatory for both `task step-review` and the later
147
+ `task review-launch`; pass the retained active lease on the first call of each exact action.
148
+
149
+ After submission, a pending Task review is advertised as `action: "task review-launch"`, not
150
+ `task review-record`. That compound route launches the read-only reviewer and atomically
151
+ records the returned review. If claimant-bound mutation is active, pass the same lifecycle
152
+ actor through `--actor`; reviewer identity remains internal to the route.
92
153
 
93
154
  An unrecorded commit is Git history drift. Stop instead of adding another commit or editing
94
155
  workflow state manually; recovery remains coordinator-controlled.
@@ -129,6 +190,12 @@ classifications. A planned new scanner-visible Knowledge file must be declared w
129
190
  directories, and inferred authority are not declarations; only Core may decide whether the final
130
191
  diff is eligible for delegated refresh.
131
192
 
193
+ For every `task plan-set` navigation, consume `next.taskPlanContract` before building the Plan.
194
+ Its `requiredRequirementIds` and `requiredAcceptanceIds` are exact-membership preconditions, not
195
+ descriptive hints. Preserve each ID verbatim in the corresponding Plan array and use the returned
196
+ Brief hash plus Knowledge Map revision/hash as the planning binding. Missing or stale contract data
197
+ is a stop condition.
198
+
132
199
  Use `task context-refresh` only when the same `next` response returns it as the top-level action and
133
200
  exposes `contextRefresh` for the exact grant. Pass Task revision, map revision, delegate actor, and
134
201
  grant ID. Never run standalone `project-memory reconcile` first; Core blocks that non-atomic route
@@ -166,11 +233,28 @@ claimed, only the claimant may mutate the Task, and lease-bound mutations must p
166
233
  bound writer token. Milestone-linked Tasks must be claimed before start, and handback is
167
234
  terminal and evidence-bound. When target actor is omitted, Core derives
168
235
  `agent:worker:<task-id>`. No thread id is required or accepted as authority.
236
+ The successful prepare response begins with `credentialHandoff`. Consume that receipt before the
237
+ Task/event/bundle payload, retain its token only in working memory, and pass it exactly once to the
238
+ declared `task claim --claim-token` action for the declared target actor. The later bundle remains
239
+ contextual and intentionally contains no second copy of the claim token.
240
+ The successful claim response then begins with `writerLeaseReceipt`. Retain that token only in
241
+ working memory. In claimed C1 posture, fresh `next` exposes `writerTokenContract` on `task run`;
242
+ pass the receipt token through its declared `--writer-token` option on the first run call. The
243
+ successful run returns the refreshed writer receipt for later lease-bound transitions.
169
244
 
170
245
  ## Milestone assembly, autonomy, and human gate
171
246
 
172
247
  During initial planning, materialize every linked Task and then call `milestone plan-set` once
173
248
  with the complete membership. Execution is blocked while reverse membership is incomplete.
249
+ Before Task 1 and between linked Tasks, follow top-level `next.action = "milestone initial-assembly"`.
250
+ Its `linked-task-assembly.commands` permit `discovery start` and `discovery materialize`; after the
251
+ first linked Task exists, the separate closing option permits `milestone plan-set`. If `status` or `next` fails, stop: never label
252
+ the gap expected and invoke `milestone plan-set` directly.
253
+
254
+ Every required navigation checkpoint is strictly sequential: start `status`, wait until its
255
+ terminal result is recorded, then start `next` and wait for its terminal result. Never issue the
256
+ pair concurrently or through a parallel tool call. The trusted transcript validator treats a
257
+ second invocation before the first terminal result as indeterminate release evidence.
174
258
 
175
259
  After that Plan, one human may prepare and grant a maximum-72-hour Milestone Autonomy Contract:
176
260
 
@@ -227,6 +311,10 @@ transition matches the requested command, with the named delegate as actor and t
227
311
  as `--delegation-grant`. The resulting authorization event records the grant and both actors.
228
312
  For `milestone.final_accept`, also pass the current `MSA-*` code; the existing grant replaces
229
313
  the later-message requirement, not the state binding.
314
+ Do not pass `--delegation-grant` to ordinary C1 handoff, claim, run, step-complete,
315
+ step-review, merge, or sync-base calls. Those transitions are not authorized by a Milestone
316
+ approval grant unless the same `next` response explicitly advertises an eligible grant for the
317
+ exact transition.
230
318
 
231
319
  Delegated approval does not cover adoption apply or the ordinary semantic Milestone scope-change
232
320
  path. Membership-only evolution requires the separate Milestone Autonomy Contract.