codex-workflow-v2 2.0.0-beta.12.9 → 2.0.0-beta.13.1

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 (117) hide show
  1. package/README.md +58 -16
  2. package/dist/reviewer-runtime-build.json +1092 -0
  3. package/dist/src/alpha6/check-support-anchor.d.ts +24 -0
  4. package/dist/src/alpha6/check-support-anchor.js +102 -0
  5. package/dist/src/alpha6/check-support-anchor.js.map +1 -0
  6. package/dist/src/alpha6/component-owner.d.ts +28 -0
  7. package/dist/src/alpha6/component-owner.js +95 -0
  8. package/dist/src/alpha6/component-owner.js.map +1 -0
  9. package/dist/src/alpha6/downstream-proof.js +4 -2
  10. package/dist/src/alpha6/downstream-proof.js.map +1 -1
  11. package/dist/src/alpha6/mechanical-feasibility.js +42 -12
  12. package/dist/src/alpha6/mechanical-feasibility.js.map +1 -1
  13. package/dist/src/alpha6/milestone.d.ts +6 -2
  14. package/dist/src/alpha6/milestone.js +164 -10
  15. package/dist/src/alpha6/milestone.js.map +1 -1
  16. package/dist/src/alpha6/npm-check-contract.d.ts +11 -0
  17. package/dist/src/alpha6/npm-check-contract.js +36 -0
  18. package/dist/src/alpha6/npm-check-contract.js.map +1 -0
  19. package/dist/src/alpha6/plan-integrity.js +157 -27
  20. package/dist/src/alpha6/plan-integrity.js.map +1 -1
  21. package/dist/src/alpha6/plan-risk.d.ts +1 -0
  22. package/dist/src/alpha6/plan-risk.js +36 -7
  23. package/dist/src/alpha6/plan-risk.js.map +1 -1
  24. package/dist/src/alpha6/remediation-cause.d.ts +13 -0
  25. package/dist/src/alpha6/remediation-cause.js +77 -0
  26. package/dist/src/alpha6/remediation-cause.js.map +1 -0
  27. package/dist/src/alpha6/remediation.d.ts +15 -4
  28. package/dist/src/alpha6/remediation.js +430 -67
  29. package/dist/src/alpha6/remediation.js.map +1 -1
  30. package/dist/src/alpha6/review.js +34 -4
  31. package/dist/src/alpha6/review.js.map +1 -1
  32. package/dist/src/artifacts.js +6 -0
  33. package/dist/src/artifacts.js.map +1 -1
  34. package/dist/src/cli-actions.d.ts +25 -0
  35. package/dist/src/cli-actions.js +109 -0
  36. package/dist/src/cli-actions.js.map +1 -0
  37. package/dist/src/cli.js +216 -258
  38. package/dist/src/cli.js.map +1 -1
  39. package/dist/src/contracts.d.ts +168 -5
  40. package/dist/src/credential-transport.d.ts +38 -0
  41. package/dist/src/credential-transport.js +156 -0
  42. package/dist/src/credential-transport.js.map +1 -0
  43. package/dist/src/dependency-provenance.d.ts +23 -2
  44. package/dist/src/dependency-provenance.js +221 -34
  45. package/dist/src/dependency-provenance.js.map +1 -1
  46. package/dist/src/domain/completed-step-carryover.d.ts +13 -0
  47. package/dist/src/domain/completed-step-carryover.js +71 -0
  48. package/dist/src/domain/completed-step-carryover.js.map +1 -0
  49. package/dist/src/domain/validation.d.ts +9 -1
  50. package/dist/src/domain/validation.js +86 -0
  51. package/dist/src/domain/validation.js.map +1 -1
  52. package/dist/src/gateway-handshake.d.ts +11 -0
  53. package/dist/src/gateway-handshake.js +92 -0
  54. package/dist/src/gateway-handshake.js.map +1 -0
  55. package/dist/src/index.d.ts +2 -0
  56. package/dist/src/index.js +2 -0
  57. package/dist/src/index.js.map +1 -1
  58. package/dist/src/lifecycle/corrective-replan-binding-manifest.d.ts +5 -0
  59. package/dist/src/lifecycle/corrective-replan-binding-manifest.js +9 -0
  60. package/dist/src/lifecycle/corrective-replan-binding-manifest.js.map +1 -1
  61. package/dist/src/lifecycle/corrective-replan.js +1 -1
  62. package/dist/src/lifecycle/corrective-replan.js.map +1 -1
  63. package/dist/src/lifecycle/semantic-registry.js +1 -1
  64. package/dist/src/observation.js +1 -2
  65. package/dist/src/observation.js.map +1 -1
  66. package/dist/src/observed-routes.d.ts +114 -0
  67. package/dist/src/observed-routes.js +545 -0
  68. package/dist/src/observed-routes.js.map +1 -0
  69. package/dist/src/operational-contract.d.ts +26 -0
  70. package/dist/src/operational-contract.js +94 -0
  71. package/dist/src/operational-contract.js.map +1 -0
  72. package/dist/src/reviewer.d.ts +218 -8
  73. package/dist/src/reviewer.js +927 -25
  74. package/dist/src/reviewer.js.map +1 -1
  75. package/dist/src/state/corrective-replan-executor.js +21 -16
  76. package/dist/src/state/corrective-replan-executor.js.map +1 -1
  77. package/dist/src/state/corrective-replan-public.js +35 -10
  78. package/dist/src/state/corrective-replan-public.js.map +1 -1
  79. package/dist/src/state/corrective-replan-transaction.js +12 -4
  80. package/dist/src/state/corrective-replan-transaction.js.map +1 -1
  81. package/dist/src/state/corrective-yield-transaction.js +11 -2
  82. package/dist/src/state/corrective-yield-transaction.js.map +1 -1
  83. package/dist/src/state/lock.d.ts +1 -0
  84. package/dist/src/state/lock.js +24 -0
  85. package/dist/src/state/lock.js.map +1 -1
  86. package/dist/src/version.d.ts +1 -1
  87. package/dist/src/version.js +1 -1
  88. package/dist/src/workflow.d.ts +65 -4
  89. package/dist/src/workflow.js +1710 -155
  90. package/dist/src/workflow.js.map +1 -1
  91. package/docs/autonomy-guardrails.md +41 -14
  92. package/docs/delegated-approval.md +6 -1
  93. package/docs/development-flow.md +42 -12
  94. package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
  95. package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
  96. package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
  97. package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +189 -22
  98. package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +154 -26
  99. package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +333 -52
  100. package/docs/problem-briefs/01-pre-implementation-integrity.md +11 -7
  101. package/docs/problem-briefs/04-task-dependency-and-structural-replacement-integrity.md +13 -6
  102. package/docs/problem-briefs/README.md +11 -11
  103. package/docs/release.md +92 -9
  104. package/docs/updating-existing-project.md +227 -0
  105. package/docs/validation-report.md +177 -99
  106. package/package.json +12 -3
  107. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +42 -1
  108. package/schemas/authorization-event.schema.json +10 -3
  109. package/schemas/corrective-decision-event.schema.json +164 -9
  110. package/schemas/corrective-replan-credentials.private.schema.json +4 -2
  111. package/schemas/milestone-scope-change-event.schema.json +25 -1
  112. package/schemas/plan-risk-audit-event.schema.json +1 -0
  113. package/schemas/remediation-event.schema.json +17 -1
  114. package/schemas/review-result.schema.json +1 -0
  115. package/schemas/step-review-event.schema.json +15 -0
  116. package/schemas/task.schema.json +61 -1
  117. package/schemas/transition-definition.schema.json +8 -0
package/README.md CHANGED
@@ -32,12 +32,38 @@ automation do not import anything from the parent V1 project.
32
32
  the rejected Plan, and exact dirty bytes can be adopted by one newly authorized owning Step;
33
33
  - bounded first-failure Plan-integrity recovery for legacy/in-flight contradictions that could not
34
34
  be rejected by the current pre-authorization feasibility gate;
35
+ - beta.12.17 Plan-integrity update transport accepts any coherent exact beta.12 source from .11 up
36
+ to the current runner, provided declared, locked, installed, Task-branch, and Milestone-base
37
+ versions agree; this removes the release-specific source-version literal without weakening the
38
+ dirty-worktree, lease, transaction, or dependency-only commit boundary;
39
+ - beta.12.18 preserves historical check-support decisions against the Plan that produced them and
40
+ recognizes one exact post-rebind Plan that explicitly adopts every previously derived support
41
+ path; the same dependency-only transport can therefore resume the stranded Task without a Human
42
+ approval, retroactive evidence mutation, or implicit scope carry-over;
43
+ - beta.13 replaces secret-bearing CLI credentials with host-safe local references, atomically
44
+ records failed-Step continuation while preserving dirty bytes, and routes continuation by stable
45
+ mechanical/reviewer causes instead of attempt count. It also validates transitive component
46
+ owners and derives explicit production-edge obligations from multi-Step `runtime-composition`
47
+ PRA classifications before authorization, publishes a Signal-observed route-class
48
+ catalog with explicit action-level witness status, defaults `status` to a bounded projection, prepares isolated reviewer runtime evidence,
49
+ and requires an explicit ordinary/security review mode;
50
+ - beta.12.19 closes the previous execution-boundary gap: after dependency registration, Knowledge
51
+ rebind, PRA and authorization, `next` and `task run` share one fail-closed authority for adopting
52
+ the exact registered dirty set. HEAD, Plan/rebind chain, file list, content hash, historical event
53
+ and current Step scope must all match; any byte or scope drift routes to `doctor`;
54
+ - beta.12.16 check-support authority: migration checksum/catalog modules imported directly by an
55
+ approved check must be owned by the producing Step; an already-running Step receives only the
56
+ exact machine-proved support path without a Human replan or a synthetic second failure;
35
57
  - read-only Milestone progress projection with stable membership ordinals and replacement links;
36
58
  - one project-monotonic `#NNN` chat registry with compact titles, exact readback, and deterministic fallback;
37
59
  - narrow, read-only alpha.6 strict-review rescue preflight for the lifecycle deadlock fixed in alpha.7;
38
60
  - optional time-bound delegated approval with project/Milestone/Task scope and an explicit audit trail;
39
61
  - one bounded Milestone Autonomy Contract for approvals, guarded content-only context refresh,
40
62
  and membership-only Task-graph evolution;
63
+ - audited remediation topology for an unstarted Task whose current Plan Risk Audit records
64
+ `stop-escalate`: Core may append exactly one upstream Task, inherit the blocked Task's exact
65
+ merged dependency frontier, and derive replacement Milestone/Task authority without a new
66
+ human approval while preserving outcome, success signal, acceptance, and checks;
41
67
  - bounded recovery of one previously passed and accepted Step commit omitted by a corrective Plan,
42
68
  without rewriting Git history or adopting the old Step into the replacement Plan;
43
69
  - Milestones aggregate already merged Tasks on the base branch, without an integration branch;
@@ -51,7 +77,7 @@ cross-machine synchronization are not part of its contract.
51
77
  Node.js 22 or newer is required. Consumers pin the exact package version:
52
78
 
53
79
  ```bash
54
- npm install --save-dev --save-exact codex-workflow-v2@2.0.0-beta.12.9
80
+ npm install --save-dev --save-exact codex-workflow-v2@2.0.0-beta.13.1
55
81
  npx codex-workflow gateway handshake --repo .
56
82
  npx codex-workflow doctor --repo .
57
83
  ```
@@ -215,16 +241,19 @@ historical remediation event. An identical retry is idempotent. After recovery,
215
241
  the historical attempt is interpreted as `corrective`, but no attempt-count hard stop is
216
242
  created: after any required Knowledge refresh, `next` may continue the same failed Step.
217
243
 
218
- For a legacy authorization without P01-A evidence, or a contradiction that genuinely becomes
219
- observable only after execution starts, the first guarded `checks-failed` event may cause `next` to advertise
220
- `task plan-integrity-recover` instead of an identical retry. The route is deliberately narrow:
221
- the current Step must contain an exact root `npm run <script>` check, that script must be absent
222
- from the current root `package.json`, and `package.json` must be outside the Step's
223
- `allowedWrites`. Core binds the current Task revision, Plan, failed remediation event, Step
224
- definition, Git HEAD, manifest hash, and complete dirty-file set. The recovery records an early
225
- `replan-required` decision and then reuses the existing corrective-yield plus human-confirmed,
226
- journaled corrective-replan path. It does not edit the Plan, run a second failing attempt, widen
227
- `allowedWrites`, or modify the worktree.
244
+ For a legacy authorization without current mechanical evidence, or a contradiction that genuinely
245
+ becomes observable only after execution starts, the first guarded `checks-failed` event may cause
246
+ `next` to advertise `task plan-integrity-recover` instead of an identical retry. Missing scripts and
247
+ missing required selectors retain the existing evidence-bound `replan-required` route. beta.12.16
248
+ adds one narrower outcome for a direct imported checksum/catalog authority: when an absent declared
249
+ migration output is writable by the Step, the check runner directly imports a tracked immutable
250
+ support module, that module contains approved SHA/catalog anchors for the same output family, every
251
+ dirty file remains inside the original Step scope, and the support module is outside both the
252
+ original `allowedWrites` and `forbiddenScope`, Core records an append-only `continue-fix` authority
253
+ for that exact support path. The Task keeps the same Plan hash and implementation bytes; subsequent
254
+ run, commit and sealed-review packets use the effective scope and disclose the derived authority.
255
+ Any semantic Plan change, indirect/dynamic check, unrelated dirty path, forbidden path, missing
256
+ hash anchor or ambiguous import remains fail-closed and uses the ordinary corrective path.
228
257
 
229
258
  When an active downstream proof exposes a required change in files owned by a completed transitive
230
259
  predecessor Step, fresh `next` advertises `task downstream-proof-recover` instead of the impossible
@@ -289,7 +318,12 @@ success signal, acceptance, checks, discovery, and base branch remain cryptograp
289
318
  Pass `--delegation-grant` only when the same `next` response exposes an exact eligible
290
319
  `delegatedApprovalOptions` entry for that transition. Ordinary C1 handoff, claim, run,
291
320
  step-complete, step-review, merge, and sync-base do not inherit a Milestone approval grant.
292
- Adoption apply and semantic scope changes stay human-only. Revocation is immediate for future
321
+ Adoption apply and arbitrary semantic scope changes stay human-only. The bounded
322
+ `milestone remediation-materialize` route is not a generic delegated scope change: it is admitted
323
+ only by a current `stop-escalate` audit, keeps Milestone semantics byte-for-byte unchanged, appends
324
+ one required remediation Task, and adds only the blocked Task dependency edge. Its
325
+ `corrective-derived` authority covers execution authorization and final acceptance of current
326
+ required Tasks; final Milestone acceptance remains unchanged. Revocation is immediate for future
293
327
  uses. The original human path remains available and unchanged.
294
328
 
295
329
  ## Milestone autonomy and alpha.6 rescue
@@ -348,13 +382,21 @@ alpha regressions that must not recur are tracked in the
348
382
  - [Chat-only development guide](docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf)
349
383
  - [Deep technical reference](docs/pdf/codex-workflow-v2-technical-reference-ru.pdf)
350
384
 
351
- These beta.12.7 documents cover delegated Discovery, Milestone Autonomy Contract issuance,
385
+ These beta.13 documents cover delegated Discovery, Milestone Autonomy Contract issuance,
352
386
  dependency-aware Task routing, C1 credential handling, external-sealed reviews, bounded
353
- Plan-integrity recovery, Task-local dependency provenance recovery, the human-confirmed legacy
387
+ Plan-integrity recovery (including repeated selector-contract failures), pre-authorization
388
+ selector feasibility, Task-local dependency provenance recovery, the human-confirmed legacy
354
389
  attempt-four stop override (including append-only multi-rebind, dependency-only HEAD continuation,
355
390
  evidence-accounted post-audit recovery revisions), both downstream-proof update bridges, exact
356
- dirty-worktree carryover into a replacement Step, and the P04-A
357
- structural-replacement stop boundary. Their reviewable
391
+ dirty-worktree carryover into a replacement Step, audited additive remediation topology with
392
+ corrective-derived Task authority, its atomic dependency-only Knowledge refresh without a Human
393
+ approval gap, the atomic beta.12.11-to-beta.12.12 dirty-worktree update bridge, separate source/target
394
+ Knowledge bindings for corrective replan, exact consecutive dependency-update carryover, historical
395
+ corrective-yield journal continuity, atomic recovery of multiple consecutive unregistered
396
+ dependency-only updates after a failed package transition, and the P04-A
397
+ structural-replacement stop boundary. They also cover beta.13 host-safe credentials, atomic
398
+ failed-Step continuation, cause-bound rolling refinement, structural production-edge admission,
399
+ bounded status and prepared ordinary/security review. Their reviewable
358
400
  sources live in [`docs/pdf/sources`](docs/pdf/sources), and `npm run docs:pdf:check` proves the
359
401
  tracked binaries were generated from the current source and package version. The PDFs remain
360
402
  human-facing artifacts; the Markdown documents above, bundled gateway, schemas, and runtime code