@chllming/wave-orchestration 0.7.3 → 0.8.0

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 (48) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +14 -13
  3. package/docs/README.md +3 -1
  4. package/docs/agents/wave-cont-qa-role.md +1 -0
  5. package/docs/agents/wave-integration-role.md +1 -0
  6. package/docs/agents/wave-launcher-role.md +4 -1
  7. package/docs/agents/wave-orchestrator-role.md +5 -3
  8. package/docs/concepts/operating-modes.md +1 -1
  9. package/docs/concepts/runtime-agnostic-orchestration.md +5 -4
  10. package/docs/concepts/what-is-a-wave.md +12 -10
  11. package/docs/guides/author-and-run-waves.md +3 -3
  12. package/docs/plans/architecture-hardening-migration.md +206 -0
  13. package/docs/plans/current-state.md +5 -3
  14. package/docs/plans/examples/wave-example-live-proof.md +1 -1
  15. package/docs/plans/master-plan.md +2 -2
  16. package/docs/plans/migration.md +12 -2
  17. package/docs/plans/wave-orchestrator.md +10 -8
  18. package/docs/reference/coordination-and-closure.md +8 -4
  19. package/docs/reference/npmjs-trusted-publishing.md +2 -2
  20. package/docs/reference/sample-waves.md +4 -4
  21. package/docs/reference/skills.md +3 -0
  22. package/docs/reference/wave-control.md +4 -2
  23. package/docs/research/coordination-failure-review.md +4 -4
  24. package/docs/roadmap.md +1 -1
  25. package/package.json +1 -1
  26. package/releases/manifest.json +19 -0
  27. package/scripts/wave-orchestrator/agent-state.mjs +405 -89
  28. package/scripts/wave-orchestrator/contradiction-entity.mjs +487 -0
  29. package/scripts/wave-orchestrator/launcher-gates.mjs +79 -11
  30. package/scripts/wave-orchestrator/launcher-retry.mjs +36 -6
  31. package/scripts/wave-orchestrator/launcher.mjs +163 -2
  32. package/scripts/wave-orchestrator/task-entity.mjs +425 -51
  33. package/scripts/wave-orchestrator/wave-control-schema.mjs +2 -0
  34. package/scripts/wave-orchestrator/wave-state-reducer.mjs +260 -111
  35. package/skills/README.md +3 -0
  36. package/skills/repo-coding-rules/SKILL.md +1 -1
  37. package/skills/role-cont-qa/SKILL.md +2 -2
  38. package/skills/role-deploy/SKILL.md +1 -1
  39. package/skills/role-documentation/SKILL.md +1 -1
  40. package/skills/role-implementation/SKILL.md +1 -1
  41. package/skills/role-infra/SKILL.md +1 -1
  42. package/skills/role-integration/SKILL.md +2 -2
  43. package/skills/role-security/SKILL.md +1 -1
  44. package/skills/runtime-claude/SKILL.md +1 -1
  45. package/skills/runtime-codex/SKILL.md +1 -1
  46. package/skills/runtime-opencode/SKILL.md +1 -1
  47. package/skills/wave-core/SKILL.md +14 -6
  48. package/skills/wave-core/references/marker-syntax.md +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.8.0 - 2026-03-24
6
+
7
+ ### Changed
8
+
9
+ - Updated the shipped package metadata, release manifest, README, migration guide, sample-wave docs, and npm publishing runbook to advertise `0.8.0` as the current release surface.
10
+ - Added the architecture hardening migration plan and aligned the active README, guides, runbooks, role prompts, and starter skills to the canonical authority-set and thin-launcher architecture model.
11
+
12
+ ### Fixed And Hardened
13
+
14
+ - Hardened reducer and task replay determinism so coordination-derived work uses stable semantic task identity and reducer output is fit for authoritative replay.
15
+ - Hardened helper-assignment, contradiction or fact wiring, resume planning, and gate evaluation so the reducer, control-plane schema, and result-envelope path agree on the same live closure and retry state.
16
+ - Hardened live launcher evaluation by computing reducer snapshots during real runs instead of keeping that path effectively test-only.
17
+
18
+ ### Testing And Validation
19
+
20
+ - Added regression coverage that guards the active docs and starter skills against stale launcher-truth wording and asserts the migration surface is anchored on the canonical authority-set architecture.
21
+ - Re-ran the full Vitest suite, `wave doctor --json`, and `wave launch --lane main --dry-run --no-dashboard`, while preserving shared `0.7.3` parity behavior where the release-era suites overlap.
22
+
5
23
  ## 0.7.3 - 2026-03-23
6
24
 
7
25
  ### Changed
package/README.md CHANGED
@@ -13,7 +13,7 @@ The framework does three things:
13
13
  - `One orchestrator, many runtimes.`
14
14
  Planning, skills, evals, proof, and traces stay constant while the executor adapter changes.
15
15
  - `A blackboard-style multi-agent system.`
16
- The coordination log is canonical shared state; the rolling board, shared summary, inboxes, ledger, and integration views are generated projections over that state.
16
+ Wave definitions, the coordination log, the control-plane log, and immutable result envelopes form the machine-trustable authority set; the rolling board, shared summary, inboxes, ledger, and integration views are generated projections over that state.
17
17
  - `Completion is goal-driven and proof-bounded.`
18
18
  Waves close only when deliverables, proof artifacts, eval targets, dependencies, and closure stewards agree.
19
19
  - `Context is compiled, not hand-maintained.`
@@ -28,7 +28,7 @@ The framework does three things:
28
28
  1. Define shared docs plus `docs/plans/waves/wave-<n>.md` files, or generate them with `wave draft`.
29
29
  2. Run `wave launch --dry-run` to validate the wave and materialize prompts, shared summaries, inboxes, dashboards, and executor previews before any live execution.
30
30
  3. During live execution, implementation agents write claims, evidence, requests, and decisions into the canonical coordination log instead of relying on ad hoc terminal narration.
31
- 4. The launcher compiles blackboard projections from that state: rolling board, shared summary, per-agent inboxes, ledger, docs queue, dependency views, and integration summaries.
31
+ 4. The reducer and derived-state engines materialize blackboard projections from the canonical authority set: rolling board, shared summary, per-agent inboxes, ledger, docs queue, dependency views, and integration summaries.
32
32
  5. Closure runs only when the integrated state is ready: optional `cont-EVAL` (`E0`), optional security review, integration (`A8`), documentation (`A9`), and `cont-QA` (`A0`).
33
33
 
34
34
  ## Architecture Surfaces
@@ -36,7 +36,7 @@ The framework does three things:
36
36
  - `Wave contract`
37
37
  Shared plan docs, wave markdown, deliverables, proof artifacts, and eval targets define the goal.
38
38
  - `Shared state`
39
- The coordination log is the source of truth; the board is for humans, not the scheduler.
39
+ Decisions come from the canonical authority set; boards, inboxes, dashboards, and other summaries are human-facing or operator-facing projections.
40
40
  - `Runtime abstraction`
41
41
  Executor adapters preserve Codex, Claude, and OpenCode-specific launch features without changing the higher-level wave contract.
42
42
  - `Compiled context`
@@ -59,7 +59,7 @@ Representative rolling message board output from a real wave run:
59
59
  Recent multi-agent research keeps returning to the same failure modes:
60
60
 
61
61
  - `Cosmetic board, no canonical state`
62
- Agents appear coordinated, but there is no machine-trustable source of truth underneath the conversation.
62
+ Agents appear coordinated, but there is no machine-trustable authority set underneath the conversation.
63
63
  - `Hidden evidence never gets pooled`
64
64
  One agent has the critical fact, but it never reaches shared state before closure.
65
65
  - `Communication without global-state reconstruction`
@@ -73,24 +73,24 @@ Recent multi-agent research keeps returning to the same failure modes:
73
73
  - `Premature closure`
74
74
  Agents say they are done before proof, evals, or integrated state actually support PASS.
75
75
 
76
- Wave is built to mitigate those failures with canonical shared state, generated blackboard projections, explicit ownership, goal-driven, proof-bounded closure, replayable traces, and local-first telemetry. For the research framing and the current gaps, see [docs/research/coordination-failure-review.md](./docs/research/coordination-failure-review.md). For the concrete signal map, see [docs/reference/proof-metrics.md](./docs/reference/proof-metrics.md).
76
+ Wave is built to mitigate those failures with a canonical authority set, generated blackboard projections, explicit ownership, goal-driven, proof-bounded closure, replayable traces, and local-first telemetry. For the research framing and the current gaps, see [docs/research/coordination-failure-review.md](./docs/research/coordination-failure-review.md). For the concrete signal map, see [docs/reference/proof-metrics.md](./docs/reference/proof-metrics.md).
77
77
 
78
78
  ## Quick Start
79
79
 
80
80
  Current release:
81
81
 
82
- - `@chllming/wave-orchestration@0.7.3`
83
- - Release tag: [`v0.7.3`](https://github.com/chllming/agent-wave-orchestrator/releases/tag/v0.7.3)
82
+ - `@chllming/wave-orchestration@0.8.0`
83
+ - Release tag: [`v0.8.0`](https://github.com/chllming/agent-wave-orchestrator/releases/tag/v0.8.0)
84
84
  - Public install path: npmjs
85
85
  - Authenticated fallback: GitHub Packages
86
86
 
87
- Highlights in `0.7.3`:
87
+ Highlights in `0.8.0`:
88
88
 
89
- - Malformed end-of-tail fenced blocks no longer hide later final `[wave-proof]`, `[wave-doc-delta]`, and `[wave-component]` markers from the structured-signal collector.
90
- - Legacy proof-centric summaries now rebuild from source logs when required proof/doc/component fields are missing, even if a stale `structuredSignalDiagnostics` object already exists.
91
- - Final implementation marker diagnostics still distinguish truly missing markers from malformed marker syntax, so proof-centric failures stay actionable instead of collapsing into generic missing-marker noise.
92
- - Implementation prompts now keep incomplete work inside the required final markers with `state=gap` and route unresolved issues through `wave coord post`.
93
- - Upgrade and operator docs now cover the full `0.7.3` package surface end to end.
89
+ - Reducer and task replay hardening now keeps coordination-derived task identity deterministic and strengthens authoritative replay of live wave state.
90
+ - Gate evaluation, contradiction or fact schema wiring, and resume planning are aligned around control-plane state plus typed result-envelope reads.
91
+ - Live launcher evaluation now computes reducer snapshots during real runs instead of leaving that path effectively test-only.
92
+ - The package now ships a dedicated architecture hardening migration plan and aligns the active README, guides, role prompts, and starter skills to the canonical authority-set and thin-launcher model.
93
+ - Upgrade and operator docs now cover the full `0.8.0` package surface end to end.
94
94
 
95
95
  Requirements:
96
96
 
@@ -183,6 +183,7 @@ codex mcp list
183
183
  - [docs/plans/examples/wave-example-rollout-fidelity.md](./docs/plans/examples/wave-example-rollout-fidelity.md): concrete example of what good wave fidelity looks like for a narrow, closure-ready outcome
184
184
  - [docs/reference/cli-reference.md](./docs/reference/cli-reference.md): complete CLI syntax for all commands and flags
185
185
  - [docs/plans/wave-orchestrator.md](./docs/plans/wave-orchestrator.md): operator runbook
186
+ - [docs/plans/architecture-hardening-migration.md](./docs/plans/architecture-hardening-migration.md): staged cutover from the transitional launcher-centric runtime to the authority-set / reducer / phase-engine architecture
186
187
  - [docs/plans/context7-wave-orchestrator.md](./docs/plans/context7-wave-orchestrator.md): Context7 setup and bundle authoring
187
188
  - [docs/reference/runtime-config/README.md](./docs/reference/runtime-config/README.md): executor, runtime, and skill-projection configuration
188
189
  - [docs/reference/wave-control.md](./docs/reference/wave-control.md): local-first telemetry contract and Railway control-plane model
package/docs/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  These docs are organized around three core ideas:
4
4
 
5
5
  - one orchestrator, many runtimes across Claude, Codex, OpenCode, and local execution
6
- - a blackboard-style multi-agent system with goal-driven, proof-bounded closure
6
+ - a blackboard-style multi-agent system with a canonical authority set, generated projections, and proof-bounded closure
7
7
  - compiled context from shared state, skills, runtime files, and Context7 instead of hand-maintained per-runtime context files
8
8
 
9
9
  The useful path is journey-first:
@@ -39,6 +39,8 @@ The useful path is journey-first:
39
39
  Read [plans/wave-orchestrator.md](./plans/wave-orchestrator.md) and the standing reviewer prompt in [agents/wave-security-role.md](./agents/wave-security-role.md).
40
40
  - Upgrading an existing repo:
41
41
  Read [plans/migration.md](./plans/migration.md), then review the release notes in [../CHANGELOG.md](../CHANGELOG.md) before running `pnpm exec wave upgrade`.
42
+ - Tracking the architecture hardening cutover:
43
+ Read [plans/architecture-hardening-migration.md](./plans/architecture-hardening-migration.md) for the staged migration from launcher-centric decisions to reducer and phase-engine ownership.
42
44
  - Looking for concrete example waves:
43
45
  Read [reference/sample-waves.md](./reference/sample-waves.md) for showcase-first examples that demonstrate the current authored wave surface.
44
46
  - Release notes and shipped deltas:
@@ -18,6 +18,7 @@ Operating rules:
18
18
  - Review changed files against the relevant repository docs and plan docs.
19
19
  - Read docs/reference/repository-guidance.md and docs/research/agent-context-sources.md before making final judgments.
20
20
  - Re-read the compiled shared summary, your inbox, and the generated wave board projection before major decisions, before validation, and before final output.
21
+ - Treat the shared summary, inbox, and board as generated views. When they conflict with landed code, control-plane state, or typed result artifacts, trust the canonical state.
21
22
  - Judge landed evidence, not intent, effort, or ownership handoff language.
22
23
  - Require implementation agents to make gaps explicit instead of implying completion.
23
24
  - Treat shared-plan documentation closure as a real gate when the wave changes status, sequencing, ownership, or proof expectations.
@@ -16,6 +16,7 @@ Your job is to synthesize cross-agent state after any `cont-EVAL` tuning pass an
16
16
 
17
17
  Operating rules:
18
18
  - Re-read the generated wave inboxes and coordination board projection before major decisions.
19
+ - Treat summaries and board projections as generated views over canonical state, not as the only source of closure truth.
19
20
  - Treat contradictions, unresolved blockers, interface drift, and unowned follow-up work as first-class integration failures.
20
21
  - Prefer explicit follow-up requests over vague warnings.
21
22
  - Keep the integration summary machine-readable and short enough to drive relaunch decisions.
@@ -12,7 +12,7 @@ Use this prompt when an agent or human operator should launch waves through the
12
12
  ```text
13
13
  You are the wave launcher operator.
14
14
 
15
- Your job is to run wave files safely, one wave at a time by default, while respecting launcher locks, runtime policy, clarification barriers, optional `cont-EVAL` gates, integration gates, documentation closure, and cont-QA closure.
15
+ Your job is to run wave files safely, one wave at a time by default, while respecting launcher locks, runtime policy, reducer state, clarification barriers, optional `cont-EVAL` gates, integration gates, documentation closure, and cont-QA closure.
16
16
 
17
17
  Before launching:
18
18
  1. Run `pnpm exec wave doctor`.
@@ -24,6 +24,7 @@ Before launching:
24
24
 
25
25
  Completion requires:
26
26
  - all agents exit `0`
27
+ - reducer and control-plane state show no unresolved helper-assignment, clarification, contradiction, or rerun blockers
27
28
  - if `cont-EVAL` is present, it must report satisfied targets before integration closure runs
28
29
  - integration must be `ready-for-doc-closure` before documentation and cont-QA closure run
29
30
  - cont-QA verdict is `PASS`
@@ -33,6 +34,8 @@ Completion requires:
33
34
  - runtime mix targets and retry fallbacks remain within lane policy
34
35
  - live attempts write a hermetic `traceVersion: 2` trace bundle with `run-metadata.json`, `quality.json`, structured signals, copied launched-agent summaries, and recorded artifact hashes
35
36
 
37
+ Generated boards, inboxes, and dashboards are operator surfaces. When they disagree with landed code, control-plane state, or typed result artifacts, trust the canonical state and rerun the projections instead of treating the projection as authority.
38
+
36
39
  Dry-run rule:
37
40
  - `wave launch --dry-run` is pre-attempt only. It should seed derived state and leave `traces/` without `attempt-<k>` files.
38
41
  ```
@@ -15,10 +15,12 @@ You are the resident Wave orchestrator.
15
15
  Your job is to monitor the live wave for its full duration and intervene through the control plane instead of through product-code ownership.
16
16
 
17
17
  You do not own implementation files, proof markers, or closure verdicts.
18
- The launcher remains the scheduler truth and final authority for retries, barriers, and completion.
18
+ You do not override reducer, gate, retry, or closure decisions with narrative claims.
19
19
 
20
20
  Operate through durable state:
21
21
  - coordination log
22
+ - control-plane log
23
+ - typed result artifacts when present
22
24
  - shared summary
23
25
  - per-wave dashboard
24
26
  - clarification triage artifacts
@@ -35,13 +37,13 @@ Hard limits:
35
37
  - do not edit product code, tests, or implementation-owned docs
36
38
  - do not satisfy another agent's deliverables or proof obligations
37
39
  - do not emit implementation, integration, documentation, or cont-QA closure markers
38
- - do not override launcher gate results with narrative claims
40
+ - do not override reducer, gate, retry, or closure outputs with narrative claims
39
41
 
40
42
  Good interventions:
41
43
  - route or reroute a clarification to the current owner
42
44
  - resolve a clarification from existing repo policy or published artifacts
43
45
  - open or summarize a human escalation only after orchestrator-first routing is exhausted
44
- - post concise board or coordination notes when timing or routing policy changed
46
+ - post concise projection or coordination notes when timing or routing policy changed
45
47
 
46
48
  Bad interventions:
47
49
  - taking over code ownership because an owner is slow
@@ -38,7 +38,7 @@ Treat them as planning posture:
38
38
 
39
39
  Human feedback is a runtime escalation mechanism, not an operating mode.
40
40
 
41
- The launcher flow is:
41
+ The runtime flow is:
42
42
 
43
43
  1. agent emits a clarification request or blocker
44
44
  2. the orchestrator tries to resolve it from repo state, policy, ownership, or targeted rerouting
@@ -14,17 +14,18 @@ These layers are runtime-neutral:
14
14
 
15
15
  - wave parsing and validation
16
16
  - planner-produced wave specs and authored wave markdown
17
+ - reducer state and phase-engine decisions
17
18
  - eval targets, deliverables, and proof artifacts
18
19
  - component and closure gates
19
20
  - skill resolution and attachment policy
20
21
  - compiled shared summaries and per-agent inboxes
21
- - coordination log and rendered message board
22
+ - canonical authority-set state plus rendered projections
22
23
  - helper assignments and dependency handling
23
24
  - integration summaries, docs queues, and ledgers
24
25
  - dry-run previews
25
26
  - trace bundles and replay metadata
26
27
 
27
- The runtime only changes at the last step, when the launcher translates the resolved assignment into an executor-specific invocation.
28
+ The runtime only changes at the last step, when the session supervisor and executor adapter translate the resolved assignment into an executor-specific invocation.
28
29
 
29
30
  ## Where Runtime-Specific Logic Lives
30
31
 
@@ -68,7 +69,7 @@ Executor choice resolves in a fixed order:
68
69
  4. CLI `--executor`
69
70
  5. global default
70
71
 
71
- After that choice is final, the launcher resolves runtime-specific overlays and any runtime-attached skill packs.
72
+ After that choice is final, the orchestrator resolves runtime-specific overlays and any runtime-attached skill packs.
72
73
 
73
74
  ## Fallback And Mix Policy
74
75
 
@@ -86,7 +87,7 @@ The important part is that fallback does not change the higher-level wave contra
86
87
  The skill system follows the same pattern:
87
88
 
88
89
  - `skills/` is the canonical repo-owned source
89
- - the launcher resolves skill ids without caring which runtime will consume them
90
+ - the orchestrator resolves skill ids without caring which runtime will consume them
90
91
  - the executor adapter projects those skills into the surface each runtime understands
91
92
 
92
93
  Examples:
@@ -38,17 +38,18 @@ Waves force a higher planning bar than ad hoc prompts. A good wave answers:
38
38
 
39
39
  ## Why This Is A Blackboard-Style Model
40
40
 
41
- Wave is blackboard-style because agents work against shared state instead of treating chat output as the system of record.
41
+ Wave is blackboard-style because agents work against shared canonical state instead of treating chat output as the system of record.
42
42
 
43
- - the canonical coordination log is the machine-readable source of truth
44
- - the rolling board is a human projection over that state, not the scheduler's authority
45
- - shared summaries and per-agent inboxes are compiled views over the same state
43
+ - wave definitions, the coordination log, and the control-plane log form the canonical authority set
44
+ - attempt-scoped result envelopes are the immutable structured outcome surface for completed agent work
45
+ - the rolling board is a human projection over that state, not a decision input
46
+ - shared summaries and per-agent inboxes are compiled views over the same authority set
46
47
  - helper assignments, clarification flow, dependencies, and integration all operate on that shared state
47
48
  - closure depends on the integrated state, not on whether an agent says "done"
48
49
 
49
50
  ## Wave Anatomy
50
51
 
51
- Wave markdown is the authored execution surface today. A typical wave can include:
52
+ Wave markdown is one authored declaration surface today. A typical wave can include:
52
53
 
53
54
  - title and commit message
54
55
  - project profile details such as oversight mode and lane
@@ -107,10 +108,10 @@ Implementation or specialist agents own the actual work slices. Closure roles do
107
108
 
108
109
  1. Author or draft the wave.
109
110
  2. Run `wave launch --dry-run --no-dashboard`.
110
- 3. The launcher validates the wave, resolves executors and skills, builds prompts, and materializes operator surfaces.
111
+ 3. The launcher parses the wave, resolves executors and skills, rebuilds reducer state, and materializes operator surfaces.
111
112
  4. A live run launches implementation agents first when implementation work remains.
112
113
  5. Agents write structured coordination events instead of relying on ad hoc terminal output.
113
- 6. The launcher checks implementation contracts, promoted-component proof, helper assignments, dependencies, and clarification state.
114
+ 6. The reducer, gate engine, and retry or closure engines evaluate implementation contracts, promoted-component proof, helper assignments, dependencies, contradictions, and clarification state.
114
115
  7. If implementation is ready, closure runs in order: optional `cont-EVAL`, optional security review, integration, documentation, then cont-QA.
115
116
  8. The attempt is captured in per-wave traces, ledgers, inboxes, summaries, and copied artifacts.
116
117
 
@@ -187,6 +188,7 @@ For proof-first live-wave examples, see [docs/reference/live-proof-waves.md](../
187
188
  The wave file is only part of the story. The runtime writes durable state under `.tmp/<lane>-wave-launcher/`, including:
188
189
 
189
190
  - prompts and logs
191
+ - result envelopes
190
192
  - status summaries
191
193
  - coordination logs
192
194
  - rendered message boards
@@ -205,7 +207,7 @@ That is why a wave is better understood as a bounded execution record, not just
205
207
  The planner foundation adds a JSON draft spec at `docs/plans/waves/specs/wave-<n>.json`.
206
208
 
207
209
  - The JSON spec is the canonical planner artifact.
208
- - The rendered markdown stays compatible with the launcher and parser.
209
- - The launcher still executes the markdown wave file today.
210
+ - The rendered markdown stays compatible with the current parser and operator workflow.
211
+ - Live execution decisions come from parsed wave definitions plus canonical state, not from treating markdown as the only execution authority.
210
212
 
211
- This split keeps authoring structured while preserving the established execution surface.
213
+ This split keeps authoring structured while preserving the established declaration surface.
@@ -36,7 +36,7 @@ The planner writes two artifacts:
36
36
  - `docs/plans/waves/specs/wave-<n>.json`
37
37
  - `docs/plans/waves/wave-<n>.md`
38
38
 
39
- The JSON spec is the planner-owned structured artifact. The markdown wave is still the launcher-owned execution surface.
39
+ The JSON spec is the planner-owned structured artifact. The markdown wave remains a human-reviewable declaration surface, while live execution is driven from the parsed wave definition plus reducer and phase-engine state.
40
40
 
41
41
  When you review the generated wave, tighten the parts the planner cannot fully infer:
42
42
 
@@ -58,7 +58,7 @@ Every wave should be authored with an explicit operating posture in mind:
58
58
  - `dark-factory`
59
59
  Use only when environments, validation, rollback, and closure evidence are already explicit enough for routine execution without human intervention.
60
60
 
61
- Human feedback is an escalation path, not the operating mode itself. The launcher still tries to resolve clarification inside the orchestration loop before creating a human ticket.
61
+ Human feedback is an escalation path, not the operating mode itself. The orchestrator still tries to resolve clarification inside the control-plane and coordination workflow before creating a human ticket.
62
62
 
63
63
  ## 4. Choose The Operator Surface
64
64
 
@@ -113,7 +113,7 @@ Useful flags:
113
113
 
114
114
  ## 7. Understand Closure
115
115
 
116
- A wave is not done when an implementation agent says it is done. Closure depends on the combined runtime surfaces:
116
+ A wave is not done when an implementation agent says it is done. Closure depends on the canonical authority set, typed result state, and the combined runtime projections:
117
117
 
118
118
  - implementation contracts pass
119
119
  - required deliverables exist
@@ -0,0 +1,206 @@
1
+ # Architecture Hardening Migration
2
+
3
+ This document is the staged cutover plan from the legacy launcher-centric runtime to the end-state architecture described in [end-state-architecture.md](./end-state-architecture.md).
4
+
5
+ The target model is fixed:
6
+
7
+ - decisions come from the canonical authority set, not from projections
8
+ - the reducer is deterministic and replayable
9
+ - gate and closure reads are result-envelope-first
10
+ - the launcher is a thin orchestrator over explicit phase engines plus the session supervisor
11
+
12
+ ## Invariants
13
+
14
+ These rules stay true at every migration stage:
15
+
16
+ - Canonical authority set:
17
+ wave definitions, the coordination log, and the control-plane event log are the authoritative decision inputs.
18
+ - Immutable structured snapshots:
19
+ attempt-scoped result envelopes are the canonical structured output surface for completed agent work.
20
+ - Projection-only rule:
21
+ dashboards, boards, summaries, inboxes, ledgers, proof registries, retry overrides, and status files are derived outputs only.
22
+ - Deterministic replay:
23
+ the reducer must rebuild the same wave state from the same inputs with no random ids or launch-time side effects.
24
+ - Thin-launcher direction:
25
+ the launcher may sequence engines and invoke the supervisor, but it must not remain the long-term decision brain.
26
+
27
+ ## Baseline And Parity Gate
28
+
29
+ Every stage must preserve the shipped `0.7.3` behavior where the shared release-era suite overlaps.
30
+
31
+ Required baseline checks:
32
+
33
+ ```bash
34
+ pnpm test
35
+ node scripts/wave.mjs doctor --json
36
+ node scripts/wave.mjs launch --lane main --dry-run --no-dashboard
37
+ ```
38
+
39
+ Required parity checks:
40
+
41
+ - keep the shared `v0.7.3` release-era suites green
42
+ - preserve the CLI and runtime artifact contracts already shipped in `0.7.3`
43
+ - require any new architecture-only tests to be additive, not replacements for release parity
44
+
45
+ Rollback rule:
46
+
47
+ - if a migration stage breaks the baseline or parity checks, revert that stage to shadow or compatibility mode before taking the next cutover step
48
+
49
+ ## Staged Cutover
50
+
51
+ ### Stage 0: Baseline Lock
52
+
53
+ Objective:
54
+ capture the current parity baseline and make the architecture vocabulary explicit in docs, prompts, skills, and tests.
55
+
56
+ Work:
57
+
58
+ - lock the `0.7.3` parity suite and validation commands
59
+ - document the authority-set model and thin-launcher target everywhere operators and agents read first
60
+ - add wording guardrails so the repo stops reintroducing launcher-as-brain language
61
+
62
+ Exit criteria:
63
+
64
+ - baseline and parity checks pass
65
+ - active docs, prompts, and skills use the same authority-set vocabulary
66
+
67
+ ### Stage 1: Shadow Reducer With Diff Reporting
68
+
69
+ Objective:
70
+ run the reducer on live canonical inputs and compare its view against the compatibility decision path without making reducer output authoritative yet.
71
+
72
+ Work:
73
+
74
+ - compute reducer snapshots during live runs
75
+ - persist machine-readable diffs for helper assignments, blockers, retry targets, contradiction state, and closure readiness
76
+ - treat mismatches as regression signals, not silent telemetry
77
+
78
+ Proof artifacts:
79
+
80
+ - reducer shadow test coverage
81
+ - replay fixtures that rebuild the same state from stored canonical inputs
82
+
83
+ Exit criteria:
84
+
85
+ - repeated live and replay runs show stable reducer output
86
+ - high-value decision slices have zero unexplained shadow diffs
87
+
88
+ Rollback trigger:
89
+
90
+ - non-deterministic reducer output or persistent unexplained diffs in helper-assignment, retry, or closure slices
91
+
92
+ ### Stage 2: Reducer-Authoritative Helper Assignment And Retry
93
+
94
+ Objective:
95
+ promote the reducer to authority for a narrow but critical slice before broader cutover.
96
+
97
+ Decision owner:
98
+
99
+ - helper-assignment blocking state
100
+ - retry target selection and resume-plan inputs
101
+
102
+ Work:
103
+
104
+ - drive helper-assignment barrier reads from reducer state
105
+ - drive retry planning from reducer-produced blocker and retry-target state
106
+ - keep compatibility projections, but stop letting them decide these slices independently
107
+
108
+ Proof artifacts:
109
+
110
+ - deterministic task-identity tests
111
+ - retry-plan regressions from stored state
112
+ - helper-assignment parity tests against `0.7.3` behavior
113
+
114
+ Exit criteria:
115
+
116
+ - live retry planning and helper blocking match replay
117
+ - no launcher-only special cases remain in those decision paths
118
+
119
+ Rollback trigger:
120
+
121
+ - reducer-driven helper or retry behavior diverges from replay or loses blocking information
122
+
123
+ ### Stage 3: Envelope-Authoritative Gate Evaluation
124
+
125
+ Objective:
126
+ make typed result envelopes the primary closure read path.
127
+
128
+ Work:
129
+
130
+ - gate evaluation reads validated result envelopes first
131
+ - summary, report, and marker parsing stays only as named compatibility adapters
132
+ - contradictions, facts, proof bundles, and gate results use one schema vocabulary end to end
133
+
134
+ Proof artifacts:
135
+
136
+ - gate-engine regressions that prove envelopes dominate when present
137
+ - compatibility tests that legacy marker/report inputs still replay correctly
138
+
139
+ Exit criteria:
140
+
141
+ - all live closure gates can succeed or block from envelope + canonical state input
142
+ - marker parsing is clearly documented and tested as compatibility-only
143
+
144
+ Rollback trigger:
145
+
146
+ - missing envelope coverage for a live role or any gate that still depends on ad hoc log parsing for correctness
147
+
148
+ ### Stage 4: Phase-Engine Ownership Expansion
149
+
150
+ Objective:
151
+ move remaining decision logic out of the launcher loop and into explicit engines.
152
+
153
+ Work:
154
+
155
+ - keep derived-state, gate, retry, closure, and supervision boundaries explicit
156
+ - have the launcher sequence engines instead of recomputing policy inline
157
+ - keep human-input workflow semantics in control-plane events and reducer state, not supervisor-local rules
158
+
159
+ Proof artifacts:
160
+
161
+ - engine-level tests from stored state
162
+ - replay tests that reconstruct closure sequencing without launching sessions
163
+
164
+ Exit criteria:
165
+
166
+ - decisions come from engine outputs, not launcher-local branches
167
+ - the supervisor writes observed lifecycle facts only
168
+
169
+ Rollback trigger:
170
+
171
+ - any stage requires relanding launcher-only branches to preserve correctness
172
+
173
+ ### Stage 5: Compatibility Removal And Thin-Launcher Finish
174
+
175
+ Objective:
176
+ finish the migration by removing transitional authority seams.
177
+
178
+ Work:
179
+
180
+ - remove stale compatibility-only decision branches once replay and live coverage prove they are no longer needed
181
+ - keep compatibility artifacts only where needed for operator ergonomics or historical replay
182
+ - reduce launcher responsibilities to argument parsing, lock management, engine sequencing, supervisor invocation, and projection writes
183
+
184
+ Exit criteria:
185
+
186
+ - reducer-authoritative state drives live queries and replay
187
+ - gate reads are envelope-first
188
+ - compatibility parsing no longer decides live correctness
189
+ - active docs no longer describe the launcher as the scheduler brain
190
+
191
+ ## Final Exit Criteria
192
+
193
+ The architecture hardening migration is complete only when all of the following are true:
194
+
195
+ - the canonical authority set is the only decision input model documented and enforced
196
+ - reducer replay is deterministic and trusted for live state queries
197
+ - retry and helper-assignment decisions are reducer-authoritative
198
+ - gate and closure evaluation are result-envelope-first
199
+ - projections remain operator aids only
200
+ - the shared `0.7.3` parity suites still pass
201
+
202
+ ## Risks And Defaults
203
+
204
+ - Structural debt may remain after behavioral cutover. A large `launcher.mjs` file is not by itself a migration failure if decisions already come from explicit engines, but finishing the thin-launcher cleanup is still required before calling the architecture complete.
205
+ - Historical docs may still describe older behavior. Keep that wording explicitly historical instead of mixing it into active operator guidance.
206
+ - When there is doubt between projection output and canonical state, trust canonical state and treat the projection as stale until rebuilt.
@@ -1,6 +1,7 @@
1
1
  # Current State
2
2
 
3
- - The starter workspace in this source repo reflects the `0.7.3` package release surface.
3
+ - The starter workspace in this source repo reflects the `0.8.0` package release surface.
4
+ - The staged architecture cutover from launcher-centric decisions to reducer and phase-engine ownership is tracked in `docs/plans/architecture-hardening-migration.md`.
4
5
  - The repository contains the published `@chllming/wave-orchestration` package plus the starter scaffold used by `wave init`.
5
6
  - The runtime is package-first and non-destructive for adopting repos: `wave init --adopt-existing` records existing repo-owned plans, waves, prompts, and config without overwriting them, and `wave upgrade` writes only `.wave/install-state.json` plus `.wave/upgrade-history/`.
6
7
  - Runtime launch entrypoints now perform a best-effort npmjs version check, cache the result under `.wave/package-update-check.json`, and point operators at `pnpm exec wave self-update` when a newer published package exists.
@@ -25,7 +26,8 @@
25
26
  - wave agents can add explicit `### Skills`
26
27
  - runtime projections are generated for Codex, Claude, OpenCode, and local execution
27
28
  - The runtime now includes:
28
- - a canonical coordination JSONL log
29
+ - a canonical authority set built from wave definitions, coordination JSONL logs, and control-plane JSONL events
30
+ - immutable attempt-scoped result envelopes for structured role outcomes
29
31
  - a generated markdown board projection
30
32
  - compiled shared summaries and per-agent inboxes
31
33
  - active live-wave orchestration refresh that keeps summaries, inboxes, clarification triage, and dashboard coordination metrics current while agents are still running
@@ -43,7 +45,7 @@
43
45
  - operator-applied retry overrides projected to `.tmp/<lane>-wave-launcher/control/` for compatibility with selected reruns, explicit reuse selectors, reuse clearing or preservation, and explicit resume targets
44
46
  - authoritative proof registries projected to `.tmp/<lane>-wave-launcher/proof/` for compatibility, while preserving proof bundle lifecycle state so revoked or superseded operator evidence cannot keep satisfying closure
45
47
  - optional Wave Control telemetry under `.tmp/<lane>-wave-launcher/control-plane/telemetry/` for local-first, best-effort reporting to the Railway-hosted analysis plane
46
- - a thinner launcher entrypoint that now delegates session launch or wait and closure-sweep orchestration to dedicated modules while preserving the existing CLI surface
48
+ - reducer-driven live state snapshots plus a launcher entrypoint that is being hardened toward thin orchestration while preserving the existing CLI surface
47
49
  - Runtime executor support now includes:
48
50
  - Codex `exec` profile, inline config, search, image, add-dir, JSON, and ephemeral flags
49
51
  - Claude settings overlay merging for inline settings and hooks
@@ -2,7 +2,7 @@
2
2
 
3
3
  This is a showcase-first sample wave.
4
4
 
5
- Use it as the single reference example for the current `0.7.3` Wave surface.
5
+ Use it as the single reference example for the current `0.8.0` Wave surface.
6
6
 
7
7
  It intentionally combines more sections than a normal production wave so one file can demonstrate:
8
8
 
@@ -9,8 +9,8 @@
9
9
 
10
10
  ## Near-Term Work
11
11
 
12
- - Keep the starter wave, role prompts, starter skills, and component cutover matrix aligned with the shipped launcher and planner behavior.
12
+ - Keep the starter wave, migration docs, role prompts, starter skills, and component cutover matrix aligned with the authority-set architecture and the staged hardening plan.
13
13
  - Expand `wave doctor` and migration guidance around cross-repo adoption, executor availability, and future breaking config changes.
14
14
  - Build on the shipped planner foundation with richer starter templates and eventually ad-hoc or forward-replan flows.
15
15
  - Extend replay and trace tooling from internal helpers and file-backed artifacts into easier operator workflows, larger historical fixtures, and a public replay surface if it proves stable.
16
- - Add the remaining roadmap items that are not yet shipped, especially stronger operating-mode enforcement and better operator workflows around cross-lane dependency tickets.
16
+ - Add the remaining roadmap items that are not yet shipped, especially stronger operating-mode enforcement, thinner-launcher cleanup, and better operator workflows around cross-lane dependency tickets.
@@ -1,5 +1,7 @@
1
1
  # Migration
2
2
 
3
+ For the staged internal cutover from the legacy launcher-centric runtime to the authority-set / reducer / phase-engine architecture, see [architecture-hardening-migration.md](./architecture-hardening-migration.md). This page stays focused on package adoption and upgrade steps for repo operators.
4
+
3
5
  ## Default Adoption Path
4
6
 
5
7
  1. Install the package from npmjs with `pnpm add -D @chllming/wave-orchestration`.
@@ -22,13 +24,13 @@ GitHub Packages remains available as an authenticated fallback path, and maintai
22
24
  - Fresh `wave init` seeds the starter `skills/` library. `wave init --adopt-existing` records existing repo-owned skill bundles when they are already present, but does not replace or rewrite them.
23
25
  - The current runtime expects the post-roadmap model: typed coordination, compiled inboxes, `A8` integration, staged closure, orchestrator-first clarification, and operational runtime policy.
24
26
 
25
- ## Upgrading From 0.6.x To 0.7.3
27
+ ## Upgrading From 0.6.x To 0.8.0
26
28
 
27
29
  Read `CHANGELOG.md` first, then treat this section as the repo-owned migration checklist for adopted `0.6.x` workspaces.
28
30
 
29
31
  `wave upgrade` updates the installed runtime only. It does not copy planner starter files into a repo that already owns its docs, skills, and Context7 bundles.
30
32
 
31
- `0.7.3` keeps the proof-centric closure hardening from `0.7.2` and closes the remaining parser hole: malformed unmatched end-of-tail fenced blocks no longer hide later final implementation markers, stale summaries rebuild when required proof/doc/component fields are still missing even if diagnostics already exist, malformed marker syntax still surfaces explicit parse errors, and incomplete implementation work should stay inside the required final markers with `state=gap` instead of trailing `[wave-gap]` lines.
33
+ `0.8.0` carries forward the `0.7.3` proof-centric closure hardening and adds the first architecture-hardening release surface: reducer and retry parity fixes, result-envelope-first gate wiring, contradiction or fact schema alignment, a dedicated architecture migration plan, and starter docs or skills that now describe the canonical authority-set model instead of the old launcher-centric wording.
32
34
 
33
35
  ### Required Repo Changes
34
36
 
@@ -40,6 +42,14 @@ If the repo adopted Wave before the planner corpus became a tracked required sur
40
42
  - `docs/reference/wave-planning-lessons.md`
41
43
  - the `planner-agentic` bundle entry in `docs/context7/bundles.json`
42
44
 
45
+ If the repo copied the shipped starter architecture docs or skills and wants the `0.8.0` authority-model language, also sync:
46
+
47
+ - `docs/agents/wave-launcher-role.md`
48
+ - `docs/agents/wave-orchestrator-role.md`
49
+ - `skills/wave-core/`
50
+ - the relevant runtime and closure-role starter skills under `skills/`
51
+ - `docs/plans/architecture-hardening-migration.md`
52
+
43
53
  ### Recommended Upgrade Validation
44
54
 
45
55
  After syncing those repo-owned files: