codex-workflow-v2 2.0.0-beta.1 → 2.0.0-beta.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 (156) hide show
  1. package/README.md +52 -4
  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 +23 -0
  5. package/dist/src/alpha6/handoff.js +221 -28
  6. package/dist/src/alpha6/handoff.js.map +1 -1
  7. package/dist/src/alpha6/milestone.d.ts +12 -0
  8. package/dist/src/alpha6/milestone.js +113 -1
  9. package/dist/src/alpha6/milestone.js.map +1 -1
  10. package/dist/src/alpha6/plan-risk.d.ts +1 -0
  11. package/dist/src/alpha6/plan-risk.js +15 -7
  12. package/dist/src/alpha6/plan-risk.js.map +1 -1
  13. package/dist/src/alpha6/remediation.js +18 -6
  14. package/dist/src/alpha6/remediation.js.map +1 -1
  15. package/dist/src/alpha6/review.d.ts +3 -0
  16. package/dist/src/alpha6/review.js +24 -0
  17. package/dist/src/alpha6/review.js.map +1 -1
  18. package/dist/src/cli.js +473 -45
  19. package/dist/src/cli.js.map +1 -1
  20. package/dist/src/contracts.d.ts +169 -5
  21. package/dist/src/contracts.js +1 -1
  22. package/dist/src/credential-output.d.ts +10 -0
  23. package/dist/src/credential-output.js +73 -0
  24. package/dist/src/credential-output.js.map +1 -0
  25. package/dist/src/dependency-provenance.d.ts +19 -0
  26. package/dist/src/dependency-provenance.js +185 -0
  27. package/dist/src/dependency-provenance.js.map +1 -0
  28. package/dist/src/errors.d.ts +1 -1
  29. package/dist/src/errors.js.map +1 -1
  30. package/dist/src/git.js +5 -4
  31. package/dist/src/git.js.map +1 -1
  32. package/dist/src/index.d.ts +1 -1
  33. package/dist/src/index.js +1 -1
  34. package/dist/src/index.js.map +1 -1
  35. package/dist/src/lifecycle/canonical-hash.d.ts +6 -0
  36. package/dist/src/lifecycle/canonical-hash.js +24 -0
  37. package/dist/src/lifecycle/canonical-hash.js.map +1 -0
  38. package/dist/src/lifecycle/catalog.d.ts +26 -0
  39. package/dist/src/lifecycle/catalog.js +208 -0
  40. package/dist/src/lifecycle/catalog.js.map +1 -0
  41. package/dist/src/lifecycle/compiler-inspection.d.ts +48 -0
  42. package/dist/src/lifecycle/compiler-inspection.js +29 -0
  43. package/dist/src/lifecycle/compiler-inspection.js.map +1 -0
  44. package/dist/src/lifecycle/core-static-readiness.d.ts +6 -0
  45. package/dist/src/lifecycle/core-static-readiness.js +130 -0
  46. package/dist/src/lifecycle/core-static-readiness.js.map +1 -0
  47. package/dist/src/lifecycle/corrective-replan-authority.d.ts +53 -0
  48. package/dist/src/lifecycle/corrective-replan-authority.js +139 -0
  49. package/dist/src/lifecycle/corrective-replan-authority.js.map +1 -0
  50. package/dist/src/lifecycle/corrective-replan-binding-manifest.d.ts +21 -0
  51. package/dist/src/lifecycle/corrective-replan-binding-manifest.js +35 -0
  52. package/dist/src/lifecycle/corrective-replan-binding-manifest.js.map +1 -0
  53. package/dist/src/lifecycle/corrective-replan-credential-core.d.ts +86 -0
  54. package/dist/src/lifecycle/corrective-replan-credential-core.js +563 -0
  55. package/dist/src/lifecycle/corrective-replan-credential-core.js.map +1 -0
  56. package/dist/src/lifecycle/corrective-replan-credential-schema.d.ts +17 -0
  57. package/dist/src/lifecycle/corrective-replan-credential-schema.js +44 -0
  58. package/dist/src/lifecycle/corrective-replan-credential-schema.js.map +1 -0
  59. package/dist/src/lifecycle/corrective-replan-credentials.d.ts +47 -0
  60. package/dist/src/lifecycle/corrective-replan-credentials.js +103 -0
  61. package/dist/src/lifecycle/corrective-replan-credentials.js.map +1 -0
  62. package/dist/src/lifecycle/corrective-replan.d.ts +64 -0
  63. package/dist/src/lifecycle/corrective-replan.js +548 -0
  64. package/dist/src/lifecycle/corrective-replan.js.map +1 -0
  65. package/dist/src/lifecycle/evaluator.d.ts +2 -0
  66. package/dist/src/lifecycle/evaluator.js +35 -0
  67. package/dist/src/lifecycle/evaluator.js.map +1 -0
  68. package/dist/src/lifecycle/fingerprint.d.ts +31 -0
  69. package/dist/src/lifecycle/fingerprint.js +388 -0
  70. package/dist/src/lifecycle/fingerprint.js.map +1 -0
  71. package/dist/src/lifecycle/immutable.d.ts +1 -0
  72. package/dist/src/lifecycle/immutable.js +10 -0
  73. package/dist/src/lifecycle/immutable.js.map +1 -0
  74. package/dist/src/lifecycle/implementation-table.d.ts +29 -0
  75. package/dist/src/lifecycle/implementation-table.js +87 -0
  76. package/dist/src/lifecycle/implementation-table.js.map +1 -0
  77. package/dist/src/lifecycle/index.d.ts +4 -0
  78. package/dist/src/lifecycle/index.js +5 -0
  79. package/dist/src/lifecycle/index.js.map +1 -0
  80. package/dist/src/lifecycle/schema-artifact.d.ts +12 -0
  81. package/dist/src/lifecycle/schema-artifact.js +214 -0
  82. package/dist/src/lifecycle/schema-artifact.js.map +1 -0
  83. package/dist/src/lifecycle/semantic-registry.d.ts +6 -0
  84. package/dist/src/lifecycle/semantic-registry.js +489 -0
  85. package/dist/src/lifecycle/semantic-registry.js.map +1 -0
  86. package/dist/src/lifecycle/types.d.ts +718 -0
  87. package/dist/src/lifecycle/types.js +4 -0
  88. package/dist/src/lifecycle/types.js.map +1 -0
  89. package/dist/src/observation.d.ts +20 -0
  90. package/dist/src/observation.js +171 -0
  91. package/dist/src/observation.js.map +1 -0
  92. package/dist/src/reviewer.d.ts +43 -1
  93. package/dist/src/reviewer.js +203 -50
  94. package/dist/src/reviewer.js.map +1 -1
  95. package/dist/src/state/corrective-replan-executor.d.ts +64 -0
  96. package/dist/src/state/corrective-replan-executor.js +608 -0
  97. package/dist/src/state/corrective-replan-executor.js.map +1 -0
  98. package/dist/src/state/corrective-replan-public-schema.d.ts +3 -0
  99. package/dist/src/state/corrective-replan-public-schema.js +43 -0
  100. package/dist/src/state/corrective-replan-public-schema.js.map +1 -0
  101. package/dist/src/state/corrective-replan-public.d.ts +95 -0
  102. package/dist/src/state/corrective-replan-public.js +665 -0
  103. package/dist/src/state/corrective-replan-public.js.map +1 -0
  104. package/dist/src/state/corrective-replan-transaction.d.ts +160 -0
  105. package/dist/src/state/corrective-replan-transaction.js +730 -0
  106. package/dist/src/state/corrective-replan-transaction.js.map +1 -0
  107. package/dist/src/state/corrective-yield-executor.d.ts +31 -0
  108. package/dist/src/state/corrective-yield-executor.js +236 -0
  109. package/dist/src/state/corrective-yield-executor.js.map +1 -0
  110. package/dist/src/state/corrective-yield-transaction.d.ts +97 -0
  111. package/dist/src/state/corrective-yield-transaction.js +591 -0
  112. package/dist/src/state/corrective-yield-transaction.js.map +1 -0
  113. package/dist/src/state/lock.d.ts +76 -3
  114. package/dist/src/state/lock.js +611 -30
  115. package/dist/src/state/lock.js.map +1 -1
  116. package/dist/src/state/store.d.ts +3 -0
  117. package/dist/src/state/store.js +65 -12
  118. package/dist/src/state/store.js.map +1 -1
  119. package/dist/src/transition-core.d.ts +67 -0
  120. package/dist/src/transition-core.js +318 -0
  121. package/dist/src/transition-core.js.map +1 -0
  122. package/dist/src/version.d.ts +1 -1
  123. package/dist/src/version.js +1 -1
  124. package/dist/src/version.js.map +1 -1
  125. package/dist/src/workflow.d.ts +83 -24
  126. package/dist/src/workflow.js +1255 -187
  127. package/dist/src/workflow.js.map +1 -1
  128. package/docs/autonomy-guardrails.md +40 -1
  129. package/docs/beta2-initial-assembly-navigation-brief.md +616 -0
  130. package/docs/delegated-approval.md +26 -1
  131. package/docs/development-flow.md +32 -2
  132. package/docs/lifecycle/state-machine-stabilization.md +641 -0
  133. package/docs/release.md +17 -2
  134. package/docs/split-required-recovery.md +5 -4
  135. package/docs/stable-release-defect-register.md +465 -3
  136. package/docs/updating-existing-project.md +59 -4
  137. package/docs/validation-report.md +85 -56
  138. package/package.json +5 -1
  139. package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +10 -3
  140. package/plugins/codex-workflow-gateway/references/protocol.md +74 -3
  141. package/plugins/codex-workflow-gateway/scripts/chat-registry.mjs +376 -0
  142. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +246 -1
  143. package/references/state-machine.md +4 -1
  144. package/roles/delivery-coordinator.md +39 -0
  145. package/schemas/adoption-posture-event.schema.json +1 -1
  146. package/schemas/context-envelope.schema.json +1 -1
  147. package/schemas/corrective-replan-credentials.private.schema.json +98 -0
  148. package/schemas/corrective-replan-execution-event.private.schema.json +53 -0
  149. package/schemas/corrective-replan-public.schema.json +142 -0
  150. package/schemas/corrective-replan-task-transaction.private.schema.json +151 -0
  151. package/schemas/corrective-yield-task-transaction.private.schema.json +98 -0
  152. package/schemas/remediation-event.schema.json +11 -1
  153. package/schemas/task-handoff-event.schema.json +1 -1
  154. package/schemas/task.schema.json +24 -1
  155. package/schemas/transition-definition.schema.json +2609 -0
  156. package/schemas/transition-payloads.schema.json +140 -0
@@ -29,9 +29,29 @@ adoption posture.
29
29
  используйте внешний точный runner alpha.7 только для `update rescue-preflight`. Продолжать
30
30
  можно лишь при `eligible=true`; допустимы только перечисленные им `locks repair` и
31
31
  `task step-review`. Этот путь не меняет dependency и не разрешает другие команды alpha.7.
32
+ Для `task step-review` используйте lifecycle-actor из `next` или rescue-preflight; это claimant
33
+ или required actor, а не identity независимого reviewer-процесса.
32
34
  После terminal review выполните обычный Knowledge reconcile/rebind, доведите Task до безопасной
33
35
  границы и только затем обновляйте package/lock обычным способом.
34
36
 
37
+ ### Исключение beta.10 для retained reviewed commit
38
+
39
+ Если corrective replan уже убрал evidence завершённой попытки из текущего Step, но её product
40
+ commit остался в Git между `baseCommit` и новым dependency-only HEAD, beta.10 может штатно принять
41
+ такую историю. Это допустимо только при полной криптографически целостной strict-review цепочке с
42
+ решением `passed` и verified reviewer attestation. Pending/failed review, отдельный `evidence.json`,
43
+ повреждённый sidecar или неизвестный product commit не подходят.
44
+
45
+ Не регистрируйте сохранённый product commit вручную в `systemCommits`. После установки beta.10
46
+ выполните свежий `next`; продолжайте только если он рекламирует
47
+ `update dependency-provenance-recover`. Затем последовательно выполните read-only
48
+ `update dependency-provenance-preflight`, проверьте `eligible=true`, точные Task revision/HEAD,
49
+ пустой `blockers` и ожидаемый список `retainedHistoricalCommits`, и только после этого вызывайте
50
+ рекламируемый recover с той же revision. Успешный recover записывает dependency HEAD в
51
+ `systemCommits`, а исторические reviewed product commits — отдельно в recovery evidence. После
52
+ него обязательны последовательные `status` и `next`; выполняйте возвращённый Knowledge reconcile
53
+ или `task context-refresh`, если manifest/lock сделали Knowledge Map stale.
54
+
35
55
  ## 1. Подготовьте отдельный чат обновления
36
56
 
37
57
  Не обновляйте пакет во время выполняющегося Worker Step. Дождитесь завершения текущего ответа
@@ -78,6 +98,15 @@ plugin за пределами workspace. Это ожидаемая границ
78
98
  8. `update preflight` до изменения подтвердил чистую lifecycle-границу.
79
99
  9. Для alpha.6 существующий schema 2 проект либо уже имеет `adoption-posture.jsonl`,
80
100
  либо `next`/`status` требуют `state adoption-prepare` и затем `state adoption-apply`.
101
+ 10. При переходе с protocol v1 на v2 неизменённый и криптографически целостный adoption sidecar
102
+ остаётся читаемым как legacy evidence. Runtime не переписывает его автоматически; неизвестная
103
+ версия или смешанная protocol-цепочка считаются повреждением state.
104
+
105
+ Protocol v2 меняет navigation/CLI corrective-replan и lifecycle epoch, но не Task state schema.
106
+ До обновления не должно быть `in_progress` Step, writer lease, Core Task operation mutex или
107
+ незавершённого corrective Task journal. Такие состояния требуют штатного completion/repair старой
108
+ версией; переносить или удалять journal вручную нельзя. Старые grants/receipts не получают authority
109
+ в epoch 2 — новый corrective replan всегда проходит новый prepare/human-gate/execute цикл.
81
110
 
82
111
  Изменение `projectId`, исчезновение сущностей или ошибка unsupported state schema — причина
83
112
  остановиться. Не соглашайтесь на «починку» удалением state. Агент должен вернуть dependency к
@@ -224,14 +253,40 @@ Grant сам не запускает агента и не прикрепляет
224
253
  `next.delegatedApprovalOptions`. Внутренние Worker и Independent Reviewer grant не используют:
225
254
  его применяет координатор после получения их evidence.
226
255
 
227
- Рекомендуемые названия чатов:
256
+ Все автоматически создаваемые чаты получают проектный монотонный номер из
257
+ `plugins/codex-workflow-gateway/scripts/chat-registry.mjs`; `count + 1` запрещён. Основные формы:
228
258
 
229
259
  ```text
230
- NN - M2 delegated coordinator
231
- NN - M2/T1 delegated execution
232
- NN - Standalone delegated task
260
+ #NNN · M<NN> · Coord · <Milestone title> · <MS-ID>
261
+ #NNN · M<NN>/T<NN> · Task · <Task title> · <TASK-ID>
233
262
  ```
234
263
 
264
+ Task-чат создавайте только как новую standalone Codex task (`create_thread`) в том же Project, а
265
+ не как fork/handoff/продолжение Milestone-чата. В начальный prompt передавайте только exact
266
+ TaskContextPacket: repository, точные Milestone/Task ID и ordinal, текущие Task revision/title,
267
+ Brief/Plan bindings, Task requirements/acceptance, свежий маршрут `status -> next --task <Task
268
+ ID>`, Task-local scope/checks/stop conditions и exact actor/grant ID при необходимости. Не
269
+ переносите transcript Milestone-чата, историю recovery/approval, соседние Tasks, reasoning или
270
+ confirmation/handoff/writer credentials.
271
+
272
+ До создания проверьте, нет ли уже чата для exact Task ID. После создания передайте прочитанный
273
+ title в registry readback и применяйте только возвращённый deterministic fallback. Title должен
274
+ быть уникален и содержать exact `#NNN`, membership ordinal и ID. Input должен состоять из
275
+ TaskContextPacket; допустима только добавленная Codex App служебная `codex_delegation`-обёртка с
276
+ `source_thread_id`, но не parent turns или transcript. Если title отсутствует или нормализован
277
+ неверно, переименуйте и перепроверьте. Ошибка `create_thread` допускает один
278
+ последовательный retry после проверки списка, но не разрешает fallback на `fork_thread`.
279
+ Создавайте или переиспользуйте Task-чат непосредственно перед dispatch этой Task, а не как пустой
280
+ placeholder для всего membership; `T<NN>` берите только из утверждённого membership order.
281
+
282
+ После dispatch Milestone-координатор не заканчивает turn: он ждёт exact Task-чат bounded-вызовами
283
+ `wait_threads`, сохраняет cursor, читает completed/attention результат и обязательно сверяет его
284
+ через `status -> next`. Recoverable non-human продолжение отправляется в тот же чат через
285
+ `send_message_to_thread`; пользователь нужен только для mandatory human/semantic gate, внешнего
286
+ разрешения, unrecoverable integrity conflict или исчерпанного infrastructure retry. Следующий
287
+ Task-чат создаётся только после Core-подтверждения `terminal + merged`. Завершённый Task-чат сам по
288
+ себе не доказывает terminal state и не пробуждает уже завершившийся coordinator turn.
289
+
235
290
  После завершения автономного окна попросите отдельный контрольный чат показать
236
291
  `delegation list`, использованные authorization events и отозвать ненужный широкий grant.
237
292
 
@@ -1,56 +1,85 @@
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.10 Validation Report
2
+
3
+ Release candidate `2.0.0-beta.10` was validated on 2026-08-22 with Node.js 24.17.0.
4
+
5
+ ## Automated release evidence
6
+
7
+ - `npm run validate` passed `297/297` sequential tests with no failures, skips,
8
+ cancellations, or todos. The exact Signal recovery tests also passed independently through
9
+ `npm run test:signal-t04-recovery` (`5/5`).
10
+ - `npm run pack:check` passed with an isolated temporary npm cache. The tarball contains 247 files;
11
+ package size is 1.0 MB and unpacked size is 3.6 MB.
12
+ - `npm run smoke:downstream` packed and installed the actual beta.10 tarball in an empty project,
13
+ then passed the packaged CLI handshake. The first sandboxed attempt was network-blocked while
14
+ fetching `ajv`; the authorized network retry passed.
15
+ - `npm run plugin:check`, the plugin-creator structural validator, the skill validator,
16
+ `npm run release:check`, and `git diff --check` passed. The bundled plugin source cachebuster is
17
+ `0.1.0+codex.20260822140058`; the packaged installer produced and read back personal installation
18
+ `0.1.0+codex.20260822140239` with the beta.10 recovery instructions present in source and cache.
19
+
20
+ ## beta.10 retained-review recovery evidence
21
+
22
+ - Recovery still requires one clean local Task branch whose final unregistered HEAD changes exactly
23
+ `package.json` and `package-lock.json`, with runtime, manifest, lock, installed package, current
24
+ branch, and Task base branch all aligned to beta.10. Running Steps, leases, transactions, Core
25
+ operations, product changes in the candidate, and base payload drift fail closed.
26
+ - A product commit removed from the current Step by corrective replan is now admissible only when
27
+ Core derives it from the globally validated strict-review sidecars: an intact
28
+ `pending review-recorded attestation-verified` chain, `passed` decision, exact completion
29
+ commit, and verified reviewer isolation. Pending review and a corrupted event-hash chain fail
30
+ closed in dedicated regressions.
31
+ - The dependency candidate is recorded in `systemCommits`. Historical reviewed product commits are
32
+ recorded separately in `dependencyProvenanceRecoveries[].retainedHistoricalCommits`; they are not
33
+ relabelled as Workflow system commits. Normal Git-history validation consumes both provenance
34
+ classes after recovery.
35
+ - The release check pins the exact sanitized Signal fixture: project
36
+ `b06d0f18f790f4521a23c770`, Milestone `MS-01M0HVCBC9DM3XQAR82T4550DA`, Task
37
+ `TASK-01M0HVK4YDJ3W9X0N72TYNV8WK` revision 26, status
38
+ `awaiting_execution_authorization`, planned Step with null current evidence, recorded system
39
+ commits `d6cce722…` and `198de88…`, and retained passed-review commit `acdfc803…`.
40
+
41
+ ## Isolated exact Signal replay
42
+
43
+ - The real Signal Git branch and Workflow state were copied to temporary isolated state plus two
44
+ temporary Git worktrees. The replay modelled the actual installed transition
45
+ `2.0.0-beta.7 2.0.0-beta.10`; it did not assume beta.9.
46
+ - With an exact dependency-only candidate over `acdfc803…`, read-only preflight returned
47
+ `eligible=true`, no blockers, Task revision 26, and exactly one retained historical commit:
48
+ `acdfc80345d2d4cd9d42af17da246701c42f0969`.
49
+ - Fresh `next` advertised only `update dependency-provenance-recover`. Recovery advanced the copied
50
+ Task `26 → 27`, preserved current corrective Plan/Step posture, appended the dependency candidate
51
+ to `systemCommits`, and persisted `acdfc803…` under `retainedHistoricalCommits`.
52
+ - Sequential post-recovery `status → next` returned the normal actionable route
53
+ `task context-refresh`, because manifest/lock changed the derived Knowledge inputs. It did not
54
+ return `doctor` or another dependency recovery.
55
+ - Temporary worktrees, branches, tarball, and copied Workflow state were deleted. Direct readback
56
+ then confirmed the real Signal repository remained clean at `acdfc803…` and the real Task remained
57
+ revision 26 with no dependency-provenance recovery record.
58
+
59
+ ## Progress, replacement, and chat evidence
60
+
61
+ - The full suite retains the read-only Milestone progress projection and exact regression
62
+ `T03 cancelled → T08 replacement`, including stable membership/Step ordinals.
63
+ - Automated chat-registry coverage still proves project-monotonic `#NNN`, all compact title
64
+ families, long Cyrillic readback/fallback, multiple review attempts, and atomic allocation.
65
+ - The beta.9 live App E2E evidence remains valid for the unchanged title/registry implementation:
66
+ Tasks `01a02928-0436-7af2-a1b9-a969226d50d9`,
67
+ `01a02928-3d39-7673-8e08-6d4ed0f8d554`, and
68
+ `01a02928-58a0-7e03-b487-f8877b7f76d8` exercised Task, Step Review A1, and Step Review A2 with
69
+ exact deterministic fallback and readback before archival.
70
+
71
+ ## External App-runtime limitation retained
72
+
73
+ Plugin CLI installation and cache readback passed. A currently open Codex task can still retain the
74
+ skill path injected when that task started; loading the new personal plugin version requires a new
75
+ Codex task. This is an App runtime/catalog lifetime boundary, not a package or Workflow-state
76
+ failure.
77
+
78
+ ## Not claimed
79
+
80
+ - No npm publication, Git tag, push, or release commit was performed by validation.
81
+ - No real Signal Workflow mutation, package update, branch change, or manual external-state edit was
82
+ performed.
83
+ - The isolated replay proves the exact recovery path before publication; a real Signal update must
84
+ still install the published beta.10 package and follow fresh project-local `handshake → doctor →
85
+ status → next → preflight → advertised recovery`.
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.10",
4
4
  "description": "Requirements-first Codex development workflow with local state and explicit Git ownership.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,6 +41,7 @@
41
41
  "build": "npm run clean && tsc -p tsconfig.build.json && node scripts/mark-cli-executable.mjs",
42
42
  "typecheck": "tsc -p tsconfig.json --noEmit",
43
43
  "test": "node scripts/with-validation-lock.mjs test",
44
+ "test:signal-t04-recovery": "node scripts/with-validation-lock.mjs test-signal-t04",
44
45
  "validate": "npm run typecheck && npm test",
45
46
  "pack:check": "npm run build && npm pack --dry-run",
46
47
  "smoke:downstream": "npm run build && node scripts/downstream-smoke.mjs",
@@ -48,6 +49,9 @@
48
49
  "release:check": "node scripts/release-check.mjs",
49
50
  "publish:release": "node scripts/publish.mjs"
50
51
  },
52
+ "dependencies": {
53
+ "ajv": "8.20.0"
54
+ },
51
55
  "devDependencies": {
52
56
  "@types/node": "24.10.1",
53
57
  "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.20260822140058",
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,17 @@
1
- # Gateway Protocol V1
1
+ # Gateway Protocol V2
2
+
3
+ ## beta.10 coordinator projections, retained review provenance, and chat registry
4
+
5
+ - `update dependency-provenance-preflight --id <TASK-ID>` is read-only. The matching
6
+ `update dependency-provenance-recover --id <TASK-ID> --expected-revision <N> --actor <ACTOR>
7
+ --reason <TEXT>` is valid only when preflight and fresh `next` both advertise it. Historical
8
+ product commits absent from the current corrective Step are recognized only through intact passed
9
+ strict-review plus verified reviewer-attestation chains and remain separately auditable as
10
+ `retainedHistoricalCommits`.
11
+ - `milestone progress --id <MS-ID>` is a read-only projection and the sole source for Coordinator
12
+ progress tables. It preserves cancelled/replacement Tasks as distinct membership rows.
13
+ - `scripts/chat-registry.mjs` atomically allocates project-monotonic `#NNN`, builds all six title
14
+ families, verifies exact readback, supplies deterministic fallbacks, and binds the verified chat.
2
15
 
3
16
  ## Handshake
4
17
 
@@ -11,7 +24,7 @@ codex-workflow gateway handshake --repo <git-root>
11
24
  Require:
12
25
 
13
26
  - package name `codex-workflow-v2`
14
- - protocol version `1`
27
+ - protocol version `2`
15
28
  - state schema version `2`
16
29
  - the capabilities needed for the requested operation
17
30
 
@@ -29,6 +42,9 @@ Current capability set:
29
42
  - `project-composite-transaction-journal-v1`
30
43
  - `corrective-plan-audit-v1`
31
44
  - `safe-update-preflight-v1`
45
+ - `bounded-dependency-provenance-recovery-v1`
46
+ - `retained-reviewed-history-recovery-v1`
47
+ - `milestone-progress-projection-v1`
32
48
  - `strict-reviewer-v1`
33
49
  - `legacy-snapshot-v1`
34
50
  - `plan-risk-audit-sidecar-v1`
@@ -44,6 +60,7 @@ Current capability set:
44
60
  - `alpha6-adoption-posture-v1`
45
61
  - `alpha6-strict-review-rescue-v1`
46
62
  - `milestone-initial-assembly-v1`
63
+ - `milestone-initial-assembly-navigation-v2`
47
64
  - `milestone-autonomy-contract-v1`
48
65
  - `milestone-autonomous-membership-evolution-v1`
49
66
  - `task-c1-derived-worker-actor-v1`
@@ -75,7 +92,9 @@ version, canonical entity summaries, and the current sidecar baseline hash. Adop
75
92
 
76
93
  ## Worker Step completion and strict Step Review
77
94
 
78
- `task run` dispatches one Step and returns its writer token and Worker envelope. The Worker
95
+ `task run` dispatches one Step and returns a first-field `writerLeaseReceipt`, followed by the
96
+ credential-free lease metadata, Task state, and Worker envelope. Consume the receipt before the
97
+ remaining payload and retain its token only in working memory. The Worker
79
98
  must leave all changes uncommitted and must not stage, commit, amend, reset, rebase, or
80
99
  modify Git history.
81
100
 
@@ -84,11 +103,36 @@ While that Step is `in_progress`, repository-level `next` normally returns
84
103
  `workflow-core` ownership. The coordinator invokes that transition with the current revision
85
104
  and writer token. Core then runs configured checks, validates `allowedWrites`, stages the
86
105
  changes, creates the atomic commit, and records evidence.
106
+ When `next` also includes `gitMutationPolicy`, obtain bounded permission for that exact
107
+ Git-writing transition before the first call; do not probe and retry after a
108
+ `.git/index.lock` failure. For `task start`, the policy applies only when the coordinator
109
+ chooses `--workspace-owner local`.
110
+
111
+ When `next` also includes `writerTokenContract`, the coordinator must retain the active writer
112
+ lease from `writerLeaseReceipt` and pass it with the advertised option on the first transition call.
113
+ The contract never contains the token value. Do not print, persist, reconstruct, or replace the
114
+ token with a redacted fingerprint; stop before mutation when the active lease is unavailable.
115
+ Satisfy this contract separately from any `gitMutationPolicy` on the same response.
116
+
117
+ `codex-workflow <noun> [action] --help` is a read-only command-discovery route. It exits without
118
+ constructing workflow state or validating lifecycle inputs. Use exact option lists only when the
119
+ response says `exactOptionContractAvailable=true`; otherwise consult this packaged protocol. After
120
+ help, obtain a fresh `next` before invoking the lifecycle transition.
87
121
 
88
122
  If the current Plan Risk Audit marks that Step for strict review, the commit is still
89
123
  workflow-owned, but `next` then returns `action: "task step-review"` with the same `stepId`
90
124
  and the exact `completionCommit`. Canonical Step completion remains blocked until the strict
91
125
  review and reviewer attestation sidecars verify against that exact commit.
126
+ Invoke `task step-review` with the same lifecycle actor advertised by `next`
127
+ (`c1Handoff.claimant` or `requiredActor` when present). The isolated reviewer is launched
128
+ inside Core; do not substitute the reviewer identity into `--actor`. In claimed C1 posture,
129
+ `next.writerTokenContract` is mandatory for both `task step-review` and the later
130
+ `task review-launch`; pass the retained active lease on the first call of each exact action.
131
+
132
+ After submission, a pending Task review is advertised as `action: "task review-launch"`, not
133
+ `task review-record`. That compound route launches the read-only reviewer and atomically
134
+ records the returned review. If claimant-bound mutation is active, pass the same lifecycle
135
+ actor through `--actor`; reviewer identity remains internal to the route.
92
136
 
93
137
  An unrecorded commit is Git history drift. Stop instead of adding another commit or editing
94
138
  workflow state manually; recovery remains coordinator-controlled.
@@ -129,6 +173,12 @@ classifications. A planned new scanner-visible Knowledge file must be declared w
129
173
  directories, and inferred authority are not declarations; only Core may decide whether the final
130
174
  diff is eligible for delegated refresh.
131
175
 
176
+ For every `task plan-set` navigation, consume `next.taskPlanContract` before building the Plan.
177
+ Its `requiredRequirementIds` and `requiredAcceptanceIds` are exact-membership preconditions, not
178
+ descriptive hints. Preserve each ID verbatim in the corresponding Plan array and use the returned
179
+ Brief hash plus Knowledge Map revision/hash as the planning binding. Missing or stale contract data
180
+ is a stop condition.
181
+
132
182
  Use `task context-refresh` only when the same `next` response returns it as the top-level action and
133
183
  exposes `contextRefresh` for the exact grant. Pass Task revision, map revision, delegate actor, and
134
184
  grant ID. Never run standalone `project-memory reconcile` first; Core blocks that non-atomic route
@@ -166,11 +216,28 @@ claimed, only the claimant may mutate the Task, and lease-bound mutations must p
166
216
  bound writer token. Milestone-linked Tasks must be claimed before start, and handback is
167
217
  terminal and evidence-bound. When target actor is omitted, Core derives
168
218
  `agent:worker:<task-id>`. No thread id is required or accepted as authority.
219
+ The successful prepare response begins with `credentialHandoff`. Consume that receipt before the
220
+ Task/event/bundle payload, retain its token only in working memory, and pass it exactly once to the
221
+ declared `task claim --claim-token` action for the declared target actor. The later bundle remains
222
+ contextual and intentionally contains no second copy of the claim token.
223
+ The successful claim response then begins with `writerLeaseReceipt`. Retain that token only in
224
+ working memory. In claimed C1 posture, fresh `next` exposes `writerTokenContract` on `task run`;
225
+ pass the receipt token through its declared `--writer-token` option on the first run call. The
226
+ successful run returns the refreshed writer receipt for later lease-bound transitions.
169
227
 
170
228
  ## Milestone assembly, autonomy, and human gate
171
229
 
172
230
  During initial planning, materialize every linked Task and then call `milestone plan-set` once
173
231
  with the complete membership. Execution is blocked while reverse membership is incomplete.
232
+ Before Task 1 and between linked Tasks, follow top-level `next.action = "milestone initial-assembly"`.
233
+ Its `linked-task-assembly.commands` permit `discovery start` and `discovery materialize`; after the
234
+ first linked Task exists, the separate closing option permits `milestone plan-set`. If `status` or `next` fails, stop: never label
235
+ the gap expected and invoke `milestone plan-set` directly.
236
+
237
+ Every required navigation checkpoint is strictly sequential: start `status`, wait until its
238
+ terminal result is recorded, then start `next` and wait for its terminal result. Never issue the
239
+ pair concurrently or through a parallel tool call. The trusted transcript validator treats a
240
+ second invocation before the first terminal result as indeterminate release evidence.
174
241
 
175
242
  After that Plan, one human may prepare and grant a maximum-72-hour Milestone Autonomy Contract:
176
243
 
@@ -227,6 +294,10 @@ transition matches the requested command, with the named delegate as actor and t
227
294
  as `--delegation-grant`. The resulting authorization event records the grant and both actors.
228
295
  For `milestone.final_accept`, also pass the current `MSA-*` code; the existing grant replaces
229
296
  the later-message requirement, not the state binding.
297
+ Do not pass `--delegation-grant` to ordinary C1 handoff, claim, run, step-complete,
298
+ step-review, merge, or sync-base calls. Those transitions are not authorized by a Milestone
299
+ approval grant unless the same `next` response explicitly advertises an eligible grant for the
300
+ exact transition.
230
301
 
231
302
  Delegated approval does not cover adoption apply or the ordinary semantic Milestone scope-change
232
303
  path. Membership-only evolution requires the separate Milestone Autonomy Contract.