@chllming/wave-orchestration 0.8.3 → 0.8.5

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 (59) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/README.md +60 -11
  3. package/docs/README.md +8 -2
  4. package/docs/agents/wave-design-role.md +47 -0
  5. package/docs/concepts/what-is-a-wave.md +11 -7
  6. package/docs/guides/author-and-run-waves.md +24 -0
  7. package/docs/guides/planner.md +44 -0
  8. package/docs/plans/architecture-hardening-migration.md +8 -1
  9. package/docs/plans/current-state.md +19 -7
  10. package/docs/plans/end-state-architecture.md +88 -70
  11. package/docs/plans/examples/wave-example-design-handoff.md +262 -0
  12. package/docs/plans/examples/wave-example-live-proof.md +1 -1
  13. package/docs/plans/migration.md +370 -64
  14. package/docs/plans/wave-orchestrator.md +49 -13
  15. package/docs/reference/cli-reference.md +46 -14
  16. package/docs/reference/coordination-and-closure.md +19 -6
  17. package/docs/reference/npmjs-trusted-publishing.md +5 -4
  18. package/docs/reference/sample-waves.md +14 -7
  19. package/docs/reference/skills.md +10 -0
  20. package/package.json +1 -1
  21. package/releases/manifest.json +39 -0
  22. package/scripts/wave-orchestrator/agent-state.mjs +64 -491
  23. package/scripts/wave-orchestrator/autonomous.mjs +10 -6
  24. package/scripts/wave-orchestrator/{launcher-closure.mjs → closure-engine.mjs} +190 -74
  25. package/scripts/wave-orchestrator/config.mjs +5 -0
  26. package/scripts/wave-orchestrator/coordination.mjs +42 -1
  27. package/scripts/wave-orchestrator/{launcher-derived-state.mjs → derived-state-engine.mjs} +34 -146
  28. package/scripts/wave-orchestrator/{launcher-gates.mjs → gate-engine.mjs} +501 -141
  29. package/scripts/wave-orchestrator/human-input-resolution.mjs +14 -10
  30. package/scripts/wave-orchestrator/human-input-workflow.mjs +104 -0
  31. package/scripts/wave-orchestrator/implementation-engine.mjs +120 -0
  32. package/scripts/wave-orchestrator/install.mjs +3 -0
  33. package/scripts/wave-orchestrator/launcher-runtime.mjs +11 -6
  34. package/scripts/wave-orchestrator/launcher.mjs +324 -723
  35. package/scripts/wave-orchestrator/ledger.mjs +56 -27
  36. package/scripts/wave-orchestrator/local-executor.mjs +37 -0
  37. package/scripts/wave-orchestrator/planner.mjs +24 -4
  38. package/scripts/wave-orchestrator/projection-writer.mjs +256 -0
  39. package/scripts/wave-orchestrator/reconcile-format.mjs +32 -0
  40. package/scripts/wave-orchestrator/reducer-snapshot.mjs +297 -0
  41. package/scripts/wave-orchestrator/replay.mjs +3 -1
  42. package/scripts/wave-orchestrator/result-envelope.mjs +620 -0
  43. package/scripts/wave-orchestrator/retry-control.mjs +22 -2
  44. package/scripts/wave-orchestrator/{launcher-retry.mjs → retry-engine.mjs} +352 -18
  45. package/scripts/wave-orchestrator/role-helpers.mjs +124 -1
  46. package/scripts/wave-orchestrator/{launcher-supervisor.mjs → session-supervisor.mjs} +178 -103
  47. package/scripts/wave-orchestrator/shared.mjs +2 -0
  48. package/scripts/wave-orchestrator/skills.mjs +1 -0
  49. package/scripts/wave-orchestrator/task-entity.mjs +65 -45
  50. package/scripts/wave-orchestrator/traces.mjs +10 -1
  51. package/scripts/wave-orchestrator/wave-files.mjs +96 -10
  52. package/scripts/wave-orchestrator/wave-state-reducer.mjs +76 -12
  53. package/skills/README.md +7 -0
  54. package/skills/role-design/SKILL.md +50 -0
  55. package/skills/role-design/skill.json +36 -0
  56. package/skills/tui-design/SKILL.md +77 -0
  57. package/skills/tui-design/references/tui-design.md +259 -0
  58. package/skills/tui-design/skill.json +36 -0
  59. package/wave.config.json +15 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,41 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.8.5 - 2026-03-25
4
+
5
+ ### Added
6
+
7
+ - Shipped the optional `design` worker role as a first-class release surface instead of a main-branch-only addition, including the standing prompt in `docs/agents/wave-design-role.md`, the `role-design` skill bundle, and the `tui-design` reference bundle for terminal or operator-surface work.
8
+ - Added support for hybrid design stewards: design agents stay docs-first by default, but waves can now explicitly give them implementation ownership so the same agent runs a design pass first and then rejoins the implementation fan-out with normal proof obligations.
9
+ - Added regression coverage for hybrid design validation, prompt shaping, local-executor marker emission, reducer task splitting, and post-design implementation fan-out.
10
+
11
+ ### Changed
12
+
13
+ - Updated README, current-state notes, planner and authoring guides, sample-wave docs, skills reference, and architecture docs so they all describe the shipped `0.8.5` surface instead of distinguishing `0.8.4` from unpublished main-branch behavior.
14
+ - Rewrote the migration guide as a practical upgrade guide for fresh adoption plus upgrades from `0.8.4`, `0.8.0`-`0.8.4`, `0.6.x`-`0.7.x`, and `0.5.x` or earlier, with explicit repo-owned starter-surface sync guidance and concrete validation steps.
15
+
16
+ ### Fixed And Hardened
17
+
18
+ - Design-aware validation, gates, retry or resume planning, reducer state, task materialization, and result-envelope projection now agree on the same hybrid-design contract instead of treating all design agents as permanently report-only.
19
+ - Hybrid design prompts now switch cleanly between packet-first design work and implementation follow-through, and local-executor smoke behavior now emits both `[wave-design]` and implementation proof markers when that second pass is active.
20
+
21
+ ## 0.8.4 - 2026-03-25
22
+
23
+ ### Changed
24
+
25
+ - Updated the shipped package metadata, release manifest, README, migration guide, current-state notes, sample-wave docs, and npm publishing runbook to advertise `0.8.4` as the current release surface.
26
+ - Rewrote the operator migration guide so it now covers fresh adoption plus upgrades from `0.8.3`, `0.8.0`-`0.8.2`, `0.6.x`-`0.7.x`, and `0.5.x` or earlier with explicit repo-owned surface sync guidance.
27
+ - Clarified the README and architecture docs so `derived-state-engine.mjs` is described as compute-only and `projection-writer.mjs` as the projection persistence boundary.
28
+
29
+ ### Fixed And Hardened
30
+
31
+ - Hermetic contradiction replay no longer depends on component-matrix parsing when a trace does not declare promoted components.
32
+ - `requireComponentPromotionsFromWave` now gates both component-promotion proof validation and component-matrix current-level validation consistently across live and replay paths.
33
+ - Projection persistence is now centralized under `projection-writer.mjs`, including dashboards, traces, ledgers, docs queues, summaries, inboxes, assignment snapshots, dependency snapshots, and board projections.
34
+
35
+ ### Testing And Validation
36
+
37
+ - Added regression coverage for the projection-writer persistence boundary and for component-matrix short-circuiting when no promotions are declared.
38
+ - Re-ran the full Vitest suite, `wave doctor --json`, and `wave launch --lane main --dry-run --no-dashboard`.
4
39
 
5
40
  ## 0.8.3 - 2026-03-24
6
41
 
package/README.md CHANGED
@@ -28,8 +28,32 @@ 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 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
- 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`).
31
+ 4. Optional design workers can run before code-owning implementation workers. When present, they publish design packets under `docs/plans/waves/design/` and implementation does not start until those packets are `ready-for-implementation`.
32
+ 5. Design stewards are docs-first by default, but a wave may explicitly give one source-code ownership. That hybrid design steward runs a design pass first, then rejoins the implementation fan-out with normal proof obligations.
33
+ 6. 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. Helper-assignment blocking, retry target selection, and resume planning read from reducer state during live runs.
34
+ 7. The derived-state engine computes projection payloads and the projection writer persists them, so dashboards, traces, board projections, summaries, inboxes, ledgers, docs queues, and integration or security summaries all flow through one projection boundary.
35
+ 8. Live closure is result-envelope-first. Optional `cont-EVAL`, optional security review, integration, documentation, and `cont-QA` evaluate validated envelopes plus canonical state through the wave's effective closure-role bindings, with starter defaults (`E0`, security reviewer, `A8`, `A9`, `A0`) filling gaps only when a wave does not override them.
36
+
37
+ ## Runtime Modules
38
+
39
+ - `launcher.mjs`
40
+ Thin orchestrator: parses args, acquires the launcher lock, and sequences the engines.
41
+ - `implementation-engine.mjs`
42
+ Selects the design-first or implementation fan-out for a wave or retry attempt.
43
+ - `derived-state-engine.mjs`
44
+ Computes shared summary, inboxes, assignments, dependency views, ledger, docs queue, and integration/security projection payloads from canonical state.
45
+ - `gate-engine.mjs`
46
+ Evaluates implementation, component, assignment, dependency, clarification, `cont-EVAL`, security, integration, documentation, and `cont-QA` gates.
47
+ - `retry-engine.mjs`
48
+ Plans reducer-driven resume and retry targets, reusable work, executor fallback changes, and blocking conditions.
49
+ - `closure-engine.mjs`
50
+ Sequences the staged closure sweep from implementation proof through final `cont-QA`.
51
+ - `wave-state-reducer.mjs`
52
+ Rebuilds deterministic wave state from canonical inputs for live queries and replay.
53
+ - `session-supervisor.mjs`
54
+ Owns launches, waits, tmux sessions, lock handling, resident orchestrator sessions, and observed `wave_run`, `attempt`, and `agent_run` lifecycle facts.
55
+ - `projection-writer.mjs`
56
+ Persists dashboards, traces, summaries, inboxes, board projections, assignment/dependency snapshots, ledgers, docs queues, and integration/security summaries.
33
57
 
34
58
  ## Architecture Surfaces
35
59
 
@@ -79,18 +103,18 @@ Wave is built to mitigate those failures with a canonical authority set, generat
79
103
 
80
104
  Current release:
81
105
 
82
- - `@chllming/wave-orchestration@0.8.3`
83
- - Release tag: [`v0.8.3`](https://github.com/chllming/agent-wave-orchestrator/releases/tag/v0.8.3)
106
+ - `@chllming/wave-orchestration@0.8.5`
107
+ - Release tag: [`v0.8.5`](https://github.com/chllming/agent-wave-orchestrator/releases/tag/v0.8.5)
84
108
  - Public install path: npmjs
85
109
  - Authenticated fallback: GitHub Packages
86
110
 
87
- Highlights in `0.8.3`:
111
+ Highlights in `0.8.5`:
88
112
 
89
- - Answering a human-feedback request now reconciles linked clarification, escalation, and helper-assignment state back into the canonical coordination log instead of only updating the feedback JSON.
90
- - `wave feedback respond --run <id>` now applies that same reconciliation and safe continuation flow to ad-hoc runs instead of writing into the roadmap lane state root.
91
- - When a stranded wave can safely continue after the answer arrives and no attempt is still running, Wave writes a one-shot continuation request automatically.
92
- - The completed-wave control-status hardening from `0.8.2` remains intact.
93
- - Upgrade and operator docs now cover the full `0.8.3` package surface end to end.
113
+ - The optional `design` worker role is now part of the shipped release surface, including `docs/agents/wave-design-role.md`, `skills/role-design/`, and `skills/tui-design/`.
114
+ - Design stewards are docs-first by default, but waves can now explicitly assign code ownership and get a hybrid two-pass flow: design packet first, implementation follow-through second.
115
+ - Gates, retry or resume planning, reducer state, prompts, local-executor smoke behavior, and result envelopes now all agree on that hybrid design-steward contract.
116
+ - The migration guide is now a practical upgrade document for fresh adoption plus upgrades from `0.8.3`, `0.8.4`, `0.8.0`-`0.8.4`, `0.6.x`-`0.7.x`, and `0.5.x` or earlier.
117
+ - Release docs, sample waves, current-state notes, and publishing instructions now point at the `0.8.5` surface.
94
118
 
95
119
  Requirements:
96
120
 
@@ -119,6 +143,15 @@ pnpm exec wave init --adopt-existing
119
143
 
120
144
  Fresh init also seeds a starter `skills/` library plus `docs/evals/benchmark-catalog.json`. The launcher projects those skill bundles into Codex, Claude, OpenCode, and local executor overlays after the final runtime for each agent is resolved, and waves that include `cont-EVAL` can declare `## Eval targets` against that catalog.
121
145
 
146
+ The starter surface includes:
147
+
148
+ - `docs/agents/wave-design-role.md`
149
+ - `skills/role-design/`
150
+ - `skills/tui-design/` for terminal and operator-surface design work
151
+ - `wave.config.json` defaults for `roles.designRolePromptPath`, `skills.byRole.design`, and the `design-pass` executor profile
152
+
153
+ Interactive `wave draft` scaffolds the docs-first design-steward path. If you want a hybrid design steward, author that wave explicitly or use an agentic planner payload that gives the same design agent implementation-owned paths plus the normal implementation contract sections.
154
+
122
155
  When runtime launch commands detect a newer npmjs release, Wave prints a non-blocking update notice on stderr. The fast path is `pnpm exec wave self-update`, which updates the dependency, prints the changelog delta, and then records the workspace upgrade report.
123
156
 
124
157
  ## Common Commands
@@ -145,6 +178,19 @@ pnpm exec wave autonomous --lane main --executor codex --codex-sandbox danger-fu
145
178
  pnpm exec wave self-update
146
179
  ```
147
180
 
181
+ ## CLI Surfaces
182
+
183
+ - `wave launch` and `wave autonomous`
184
+ Live execution, dry-run validation, retry cadence, terminal surfaces, and orchestrator options.
185
+ - `wave control`
186
+ Read-only live status plus operator task, rerun, proof, and telemetry control surfaces.
187
+ - `wave coord` and `wave dep`
188
+ Coordination-log and cross-lane dependency utilities. `wave control` is the preferred operator surface; `wave coord` remains useful for direct log inspection and rendering.
189
+ - `wave project`, `wave draft`, and `wave adhoc`
190
+ Planner defaults, authored wave generation, and transient operator-driven runs on the same runtime.
191
+ - `wave init`, `wave doctor`, `wave upgrade`, and `wave self-update`
192
+ Workspace setup, validation, adoption, and package lifecycle.
193
+
148
194
  ## Develop This Package
149
195
 
150
196
  ```bash
@@ -178,12 +224,15 @@ codex mcp list
178
224
  - [docs/concepts/runtime-agnostic-orchestration.md](./docs/concepts/runtime-agnostic-orchestration.md): how one orchestration substrate spans Claude, Codex, OpenCode, and local execution
179
225
  - [docs/concepts/context7-vs-skills.md](./docs/concepts/context7-vs-skills.md): compiled context, external truth, and repo-owned operating knowledge
180
226
  - [docs/guides/planner.md](./docs/guides/planner.md): `wave project` and `wave draft` workflow
227
+ - [docs/agents/wave-design-role.md](./docs/agents/wave-design-role.md): standing prompt for the optional pre-implementation design steward
181
228
  - [docs/guides/terminal-surfaces.md](./docs/guides/terminal-surfaces.md): tmux, VS Code terminal registry, and dry-run surfaces
182
229
  - [docs/reference/sample-waves.md](./docs/reference/sample-waves.md): showcase-first authored waves, including a high-fidelity repo-landed rollout example
230
+ - [docs/plans/examples/wave-example-design-handoff.md](./docs/plans/examples/wave-example-design-handoff.md): optional design-steward example that hands a validated design packet to downstream implementation owners
183
231
  - [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
232
  - [docs/reference/cli-reference.md](./docs/reference/cli-reference.md): complete CLI syntax for all commands and flags
233
+ - [docs/plans/end-state-architecture.md](./docs/plans/end-state-architecture.md): canonical runtime architecture, engine boundaries, and artifact ownership
185
234
  - [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
235
+ - [docs/plans/architecture-hardening-migration.md](./docs/plans/architecture-hardening-migration.md): historical record of the completed architecture hardening stages
187
236
  - [docs/plans/context7-wave-orchestrator.md](./docs/plans/context7-wave-orchestrator.md): Context7 setup and bundle authoring
188
237
  - [docs/reference/runtime-config/README.md](./docs/reference/runtime-config/README.md): executor, runtime, and skill-projection configuration
189
238
  - [docs/reference/wave-control.md](./docs/reference/wave-control.md): local-first telemetry contract and Railway control-plane model
package/docs/README.md CHANGED
@@ -35,12 +35,18 @@ The useful path is journey-first:
35
35
  Read [concepts/context7-vs-skills.md](./concepts/context7-vs-skills.md) for the compiled-context model: shared summary, inboxes, project defaults, skills, Context7, and runtime overlays.
36
36
  - Drafting or revising waves:
37
37
  Read [guides/author-and-run-waves.md](./guides/author-and-run-waves.md), then use [plans/wave-orchestrator.md](./plans/wave-orchestrator.md) as the operator runbook.
38
+ - Adding an optional pre-implementation design steward:
39
+ Read [guides/author-and-run-waves.md](./guides/author-and-run-waves.md), then the standing prompt in [agents/wave-design-role.md](./agents/wave-design-role.md). The shipped `0.8.5` surface includes `role-design` plus `tui-design`, with docs-first design stewards by default and explicit hybrid design stewards when a wave also gives that same agent code ownership.
38
40
  - Adding a security review pass:
39
41
  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
42
  - Upgrading an existing repo:
41
43
  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.
44
+ - Want the concrete runtime module map:
45
+ Read [plans/end-state-architecture.md](./plans/end-state-architecture.md) for the engine-by-engine architecture and artifact ownership model.
46
+ - Want the CLI surface map:
47
+ Read [reference/cli-reference.md](./reference/cli-reference.md) for the shipped commands, flags, and compatibility surfaces.
48
+ - Want the historical architecture migration notes:
49
+ Read [plans/architecture-hardening-migration.md](./plans/architecture-hardening-migration.md) for the completed cutover record.
44
50
  - Looking for concrete example waves:
45
51
  Read [reference/sample-waves.md](./reference/sample-waves.md) for showcase-first examples that demonstrate the current authored wave surface.
46
52
  - Release notes and shipped deltas:
@@ -0,0 +1,47 @@
1
+ ---
2
+ title: "Wave Design Role"
3
+ summary: "Standing prompt for an optional pre-implementation design steward that produces a design packet and explicit implementation handoff."
4
+ ---
5
+
6
+ # Wave Design Role
7
+
8
+ Use this prompt when an agent should act as the design steward for a wave.
9
+
10
+ ## Standing prompt
11
+
12
+ ```text
13
+ You are the wave design steward for the current wave.
14
+
15
+ Your job is to produce an implementation-ready design packet before code-owning implementation work begins. You are report-first and docs/spec-owned by default. Do not silently expand into broad coding work unless the wave explicitly assigns it.
16
+ If the wave explicitly gives you source-code ownership, expect a hybrid two-pass contract: design packet first, then a later implementation pass for those owned files.
17
+
18
+ Operating rules:
19
+ - Re-read the compiled shared summary, your inbox, the generated wave board projection, and any earlier packets before major decisions.
20
+ - Turn ambiguity into explicit decisions, assumptions, and exact open questions.
21
+ - Keep interface impacts concrete: name exact files, APIs, schema fields, CLI flags, contracts, and ownership changes.
22
+ - If the wave touches terminal UX, dashboards, or other operator surfaces, use `skills/tui-design/references/tui-design.md` as the deep heuristic reference.
23
+ - Keep operator surfaces thin by design: ask for reducer or projection truth instead of inventing UI-local state or hiding system uncertainty behind polish.
24
+ - Prefer exact observations tied to concrete surfaces, state transitions, interaction paths, and missing projection-backed affordances over generic design commentary.
25
+ - Prefer a narrow, actionable handoff over a long architecture essay.
26
+ - If the wave needs a human choice or unresolved upstream answer before coding, fail closed and say so directly.
27
+ - Route code changes back to implementation owners unless the wave explicitly gives you source-code ownership.
28
+
29
+ What you must do:
30
+ - leave one design packet with these sections in order:
31
+ `Problem`
32
+ `Constraints`
33
+ `Decisions`
34
+ `Assumptions`
35
+ `Open Questions`
36
+ `Interface Impacts`
37
+ `Validation Plan`
38
+ `Implementation Handoff`
39
+ - make the `Implementation Handoff` section concrete enough that implementation owners can start without re-deriving the same design
40
+ - emit one final structured marker:
41
+ `[wave-design] state=<ready-for-implementation|needs-clarification|blocked> decisions=<n> assumptions=<n> open_questions=<n> detail=<short-note>`
42
+ - when you later rejoin implementation as a hybrid design steward, keep the design packet current and re-emit `[wave-design]` alongside the normal implementation proof markers
43
+
44
+ Use `ready-for-implementation` only when the design packet is sufficient for downstream implementation owners to proceed.
45
+ Use `needs-clarification` when a specific unresolved question should stop implementation until it is answered.
46
+ Use `blocked` only when the wave cannot safely continue because the design packet found a fundamental blocker.
47
+ ```
@@ -20,7 +20,7 @@ It is not just a prompt file. A wave is a bounded slice of repository work with:
20
20
  - Wave
21
21
  One numbered work package inside a lane, usually stored as `docs/plans/waves/wave-<n>.md`.
22
22
  - Agent
23
- One role inside the wave, such as implementation, `cont-EVAL`, security review, integration, documentation, cont-QA, infra, or deploy.
23
+ One role inside the wave, such as design, implementation, `cont-EVAL`, security review, integration, documentation, cont-QA, infra, or deploy.
24
24
  - Attempt
25
25
  One execution pass of a wave. A wave can have multiple attempts due to retries or fallback.
26
26
  - Closure
@@ -89,7 +89,7 @@ Inside each agent block, the important sections are:
89
89
 
90
90
  ## Standard Roles
91
91
 
92
- The starter runtime expects three standard closure roles plus up to two optional review specialists:
92
+ The starter runtime ships with three default closure roles plus optional specialists. A wave may override the role ids, but the closure semantics stay the same:
93
93
 
94
94
  - `A8`
95
95
  Integration steward
@@ -101,6 +101,8 @@ The starter runtime expects three standard closure roles plus up to two optional
101
101
  Optional `cont-EVAL` for iterative benchmark or output tuning; report-only by default, implementation-owning only when explicitly assigned non-report files
102
102
  - `A7`
103
103
  Optional security reviewer; report-only by default and used to publish a threat-model-first security review before integration closure
104
+ - `D1` or another custom id
105
+ Optional design steward; report-first and docs/spec-owned by default, used to publish a design packet before code-owning implementation fans out. If the wave explicitly gives that same agent source-code ownership, it becomes a hybrid design steward that rejoins the later implementation fan-out.
104
106
 
105
107
  Implementation or specialist agents own the actual work slices. Closure roles do not replace implementation ownership; they decide whether the combined result is closure-ready. `cont-EVAL` is the one hybrid role: most waves keep it report-only, but human-authored waves may assign explicit tuning files to `E0`, in which case it must satisfy both implementation proof and eval proof.
106
108
 
@@ -109,11 +111,12 @@ Implementation or specialist agents own the actual work slices. Closure roles do
109
111
  1. Author or draft the wave.
110
112
  2. Run `wave launch --dry-run --no-dashboard`.
111
113
  3. The launcher parses the wave, resolves executors and skills, rebuilds reducer state, and materializes operator surfaces.
112
- 4. A live run launches implementation agents first when implementation work remains.
113
- 5. Agents write structured coordination events instead of relying on ad hoc terminal output.
114
- 6. The reducer, gate engine, and retry or closure engines evaluate implementation contracts, promoted-component proof, helper assignments, dependencies, contradictions, and clarification state.
115
- 7. If implementation is ready, closure runs in order: optional `cont-EVAL`, optional security review, integration, documentation, then cont-QA.
116
- 8. The attempt is captured in per-wave traces, ledgers, inboxes, summaries, and copied artifacts.
114
+ 4. A live run launches design agents first when the wave declares them.
115
+ 5. Code-owning implementation agents start only after every design packet is `ready-for-implementation`; hybrid design stewards rejoin that implementation fan-out once the design gate clears.
116
+ 6. Agents write structured coordination events instead of relying on ad hoc terminal output.
117
+ 7. The reducer, gate engine, and retry or closure engines evaluate design readiness, implementation contracts, promoted-component proof, helper assignments, dependencies, contradictions, and clarification state.
118
+ 8. If implementation is ready, closure runs in order: optional `cont-EVAL`, optional security review, integration, documentation, then cont-QA.
119
+ 9. The attempt is captured in per-wave traces, ledgers, inboxes, summaries, and copied artifacts.
117
120
 
118
121
  ## Runtime And Operating Posture
119
122
 
@@ -170,6 +173,7 @@ That is why switching an agent between Codex, Claude, or OpenCode does not requi
170
173
  A wave is not done because an agent said so. It is done only when the runtime surfaces agree:
171
174
 
172
175
  - implementation exit contracts pass
176
+ - if present, design packets are complete and every design worker reports `ready-for-implementation`
173
177
  - required deliverables exist and stay within ownership boundaries
174
178
  - required proof artifacts exist when the wave declares proof-first live evidence
175
179
  - required component proof and promotions pass
@@ -43,12 +43,35 @@ When you review the generated wave, tighten the parts the planner cannot fully i
43
43
  - file ownership
44
44
  - validation commands
45
45
  - proof artifacts
46
+ - whether the wave needs an optional pre-implementation design steward
46
47
  - `cont-EVAL` targets when needed
47
48
  - security review expectations when needed
48
49
  - explicit `### Skills` only where defaults are not enough
49
50
 
50
51
  If you want examples of denser hand-authored waves, read [docs/reference/sample-waves.md](../reference/sample-waves.md).
51
52
 
53
+ ## 2a. Add A Design Steward Only When It Actually Helps
54
+
55
+ Use the optional `design` role when the wave needs a concrete handoff packet before coding starts, not just more prose.
56
+
57
+ Good fits:
58
+
59
+ - architecture-heavy or interface-heavy changes
60
+ - multi-owner waves where downstream implementers need the same decisions and assumptions
61
+ - ambiguous tasks where open questions should become explicit before code owners fan out
62
+
63
+ The starter contract in `0.8.5` is:
64
+
65
+ - import `docs/agents/wave-design-role.md`
66
+ - own one packet such as `docs/plans/waves/design/wave-<n>-<agentId>.md`
67
+ - keep that agent docs/spec-only by default
68
+ - add explicit `### Skills` such as `tui-design` when the packet covers terminal UX, dashboards, or other operator surfaces
69
+ - end with `[wave-design] state=<ready-for-implementation|needs-clarification|blocked> decisions=<n> assumptions=<n> open_questions=<n> detail=<short-note>`
70
+
71
+ When a wave includes one or more design agents, the runtime runs them before code-owning implementation agents. Implementation does not start until every design packet is `ready-for-implementation`. `needs-clarification` and `blocked` behave like normal wave blockers.
72
+
73
+ If a wave explicitly gives a design steward source-code ownership, that agent becomes a hybrid design steward. The runtime still runs its design pass first, then includes the same agent in the later implementation fan-out with normal proof obligations. Interactive `wave draft` scaffolds the docs-first default; use manual edits or an agentic planner payload when you want the hybrid path.
74
+
52
75
  ## 3. Choose The Execution Posture
53
76
 
54
77
  Every wave should be authored with an explicit operating posture in mind:
@@ -115,6 +138,7 @@ Useful flags:
115
138
 
116
139
  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
140
 
141
+ - if present, design packets are complete and `ready-for-implementation` before code-owning work starts
118
142
  - implementation contracts pass
119
143
  - required deliverables exist
120
144
  - proof artifacts exist when the wave requires them
@@ -6,6 +6,8 @@ If you want the full author-to-launch workflow, start with [author-and-run-waves
6
6
 
7
7
  It reduces repeated setup questions, stores project defaults, and generates wave specs plus markdown that already fit the launcher.
8
8
 
9
+ The published `0.8.5` package already includes the optional `design` worker role for pre-implementation design packets. This guide calls out where that affects drafting.
10
+
9
11
  ## What Ships Today
10
12
 
11
13
  - `wave project setup`
@@ -14,6 +16,7 @@ It reduces repeated setup questions, stores project defaults, and generates wave
14
16
  - agentic `wave draft --agentic --task "..."`
15
17
  - planner run review via `wave draft --show-run <run-id>`
16
18
  - explicit materialization via `wave draft --apply-run <run-id>`
19
+ - worker role kinds including optional `design`
17
20
  - persistent project memory in `.wave/project-profile.json`
18
21
  - transient planner packets in `.wave/planner/runs/<run-id>/`
19
22
  - planner-run Context7 injection via `planner.agentic.context7Bundle`
@@ -95,6 +98,24 @@ Supported templates today:
95
98
  - `infra`
96
99
  - `release`
97
100
 
101
+ Supported worker role kinds today:
102
+
103
+ - `design`
104
+ - `implementation`
105
+ - `qa`
106
+ - `infra`
107
+ - `deploy`
108
+ - `research`
109
+ - `security`
110
+
111
+ The interactive draft flow now offers `design` as a first-class worker role. Agentic planner payloads also accept `workerAgents[].roleKind = "design"`.
112
+
113
+ `design` uses the `design-pass` executor profile by default and scaffolds the docs-first packet path before coding starts. The normal starter packet path is:
114
+
115
+ - `docs/plans/waves/design/wave-<n>-<agentId>.md`
116
+
117
+ If you want a hybrid design steward, keep the same design packet path but explicitly add implementation-owned paths and the normal implementation contract sections in the authored wave or agentic planner payload. Interactive draft does not ask a separate hybrid-design question yet; it stays on the docs-first default.
118
+
98
119
  Interactive draft writes canonical waves immediately:
99
120
 
100
121
  - `docs/plans/waves/specs/wave-<n>.json`
@@ -125,6 +146,7 @@ The draft flow asks for structured inputs such as:
125
146
  - deploy environments in scope
126
147
  - component promotions and target levels
127
148
  - worker count and worker roles
149
+ - whether a wave needs a pre-implementation design steward
128
150
  - executor profiles
129
151
  - file ownership
130
152
  - Context7 defaults and per-agent bundles
@@ -133,6 +155,27 @@ The draft flow asks for structured inputs such as:
133
155
 
134
156
  That gives you a wave that is much closer to launch-ready than a blank markdown template.
135
157
 
158
+ ## When To Use `design`
159
+
160
+ Use a design worker when the wave is heavy on:
161
+
162
+ - architecture or sequencing decisions
163
+ - interface or contract changes across multiple owners
164
+ - ambiguous requirements that should become explicit assumptions and open questions
165
+ - decision-lineage that downstream implementers should not have to rediscover
166
+
167
+ Do not use a design worker just because the wave is large. If the task is straightforward code change plus validation, normal implementation agents are enough.
168
+
169
+ A design worker should usually:
170
+
171
+ - import `docs/agents/wave-design-role.md`
172
+ - own one design packet under `docs/plans/waves/design/`
173
+ - stay docs/spec-only unless the wave explicitly assigns code ownership
174
+ - add `tui-design` in `### Skills` when the packet owns terminal UX, dashboards, or other operator surfaces
175
+ - emit a final `[wave-design] state=<ready-for-implementation|needs-clarification|blocked> ...` marker
176
+
177
+ If the wave does explicitly assign code ownership, the same design agent becomes a hybrid design steward: it runs the design pass first, then rejoins implementation with the normal implementation proof contract while still keeping the packet current and re-emitting `[wave-design]`.
178
+
136
179
  ## Planner And Skills
137
180
 
138
181
  The planner does not auto-discover every possible skill bundle yet, but it supports explicit per-agent `### Skills` in the rendered output.
@@ -169,6 +212,7 @@ If you want concrete authored examples after the planner baseline, see [docs/ref
169
212
  - Treat `### Deliverables` and `### Proof artifacts` as part of the plan contract, not optional polish.
170
213
  - Keep `docs/context7/planner-agent/` in sync with the selected planning cache slice before publishing the planner bundle to Context7.
171
214
  - Add explicit `### Skills` only when the lane, role, runtime, and deploy-kind defaults are not enough.
215
+ - Use `design` when you need a reusable handoff packet; keep straightforward implementation slices on `implementation`.
172
216
  - Use the component matrix as a planning contract, not just a reporting surface.
173
217
  - Prefer updating the project profile when the same answers recur across waves.
174
218
  - Use [docs/reference/sample-waves.md](../reference/sample-waves.md) when you want examples of denser human-authored waves that combine multiple modern surfaces such as `cont-EVAL`, delegated benchmark families, or proof-first live validation.
@@ -1,6 +1,13 @@
1
1
  # Architecture Hardening Migration
2
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).
3
+ This document is the historical record of the completed cutover from the legacy launcher-centric runtime to the architecture described in [end-state-architecture.md](./end-state-architecture.md).
4
+
5
+ Current status at this head:
6
+
7
+ - Stage 1 is complete: reducer snapshots persist machine-readable shadow diffs for high-value decision slices.
8
+ - Stage 2 is complete: live helper-assignment blocking, retry target selection, and resume planning consume reducer state.
9
+ - Stage 3 and Stage 4 are complete in runtime behavior: live gate and closure decisions are envelope-authoritative, and the launcher sequences explicit engine surfaces instead of recomputing those policies inline.
10
+ - Stage 5 is complete for live runtime behavior: compatibility parsing remains only for replay, reconcile, and historical trace materialization, and the old `launcher-*` engine module names have been removed from the live runtime tree.
4
11
 
5
12
  The target model is fixed:
6
13
 
@@ -1,7 +1,7 @@
1
1
  # Current State
2
2
 
3
- - The starter workspace in this source repo reflects the `0.8.3` 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`.
3
+ - The published package is `0.8.5`, and that release now includes the optional pre-implementation `design` worker role plus the `role-design` and `tui-design` starter bundles.
4
+ - The canonical shipped runtime architecture is documented in `docs/plans/end-state-architecture.md`; historical cutover notes remain in `docs/plans/architecture-hardening-migration.md`.
5
5
  - The repository contains the published `@chllming/wave-orchestration` package plus the starter scaffold used by `wave init`.
6
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/`.
7
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.
@@ -26,9 +26,10 @@
26
26
  - lane config can attach skills by base, role, runtime, and deploy kind
27
27
  - wave agents can add explicit `### Skills`
28
28
  - runtime projections are generated for Codex, Claude, OpenCode, and local execution
29
+ - the starter surface includes `skills/role-design/`, `skills/tui-design/`, `roles.designRolePromptPath`, and `executors.profiles.design-pass`
29
30
  - The runtime now includes:
30
31
  - a canonical authority set built from wave definitions, coordination JSONL logs, and control-plane JSONL events
31
- - immutable attempt-scoped result envelopes for structured role outcomes
32
+ - immutable attempt-scoped result envelopes for structured role outcomes under `.tmp/<lane>-wave-launcher/results/wave-<n>/attempt-<a>/<agent>.json`
32
33
  - a generated markdown board projection
33
34
  - compiled shared summaries and per-agent inboxes
34
35
  - active live-wave orchestration refresh that keeps summaries, inboxes, clarification triage, and dashboard coordination metrics current while agents are still running
@@ -37,17 +38,27 @@
37
38
  - explicit integration summaries with actionable claim, interface, proof, docs, and deploy-risk evidence
38
39
  - versioned runtime artifact contracts for manifests, dashboards, relaunch plans, helper-assignment snapshots, dependency snapshots, and run-state
39
40
  - append-only `run-state.json` history with per-wave current state, compatibility `completedWaves`, and causal completion or blocker evidence
40
- - hermetic `traceVersion: 2` per-attempt trace bundles with copied launched-agent summaries, copied component matrices for promoted waves, a hashed `outcome.json` replay baseline, run metadata, and cumulative quality metrics
41
+ - hermetic `traceVersion: 2` per-attempt trace bundles with copied launched-agent summaries, copied component matrices for promoted waves only, a hashed `outcome.json` replay baseline, run metadata, and cumulative quality metrics
41
42
  - an internal, read-only replay validator for trace bundles, with legacy `traceVersion: 1` bundles kept in best-effort warning mode
42
43
  - orchestrator-first clarification triage plus human escalation artifacts
43
44
  - answered human-feedback responses that reconcile canonical coordination state, helper assignments, and safe continuation intent even when the launcher is no longer active
44
45
  - optional `--resident-orchestrator` support for a long-running, non-owning orchestrator session during live waves
45
46
  - persisted relaunch plans under `.tmp/<lane>-wave-launcher/status/` so targeted retry intent can survive a launcher restart
46
- - a canonical control-plane event log under `.tmp/<lane>-wave-launcher/control-plane/` that records operator tasks, rerun requests, proof bundles, attempt lifecycle, and human-input events as append-only JSONL; `wave control` materializes state from this log
47
+ - a canonical control-plane event log under `.tmp/<lane>-wave-launcher/control-plane/` that records operator tasks, rerun requests, proof bundles, contradictions, facts, human-input workflow, and observed `wave_run`, `attempt`, and `agent_run` lifecycle events as append-only JSONL; `wave control` materializes state from this log
47
48
  - 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
48
49
  - 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
49
50
  - optional Wave Control telemetry under `.tmp/<lane>-wave-launcher/control-plane/telemetry/` for local-first, best-effort reporting to the Railway-hosted analysis plane
50
- - reducer-driven live state snapshots plus a launcher entrypoint that is being hardened toward thin orchestration while preserving the existing CLI surface
51
+ - reducer-driven live state snapshots plus persisted machine-readable shadow diffs for helper-assignment, blocker, contradiction, closure, and retry slices
52
+ - reducer-authoritative helper-assignment blocking, retry target selection, and resume planning, with live gate and closure reads now driven from validated result envelopes
53
+ - optional design agents that publish validated design packets under `docs/plans/waves/design/wave-<n>-<agent>.md`, gate implementation through `designGate`, and run before code-owning implementation agents
54
+ - hybrid design stewards that stay docs-first by default but can explicitly own source-code slices, rejoin the implementation fan-out after the design pass, and satisfy both the design packet contract and normal implementation proof
55
+ - hermetic replay that reconstructs contradiction-driven blockers from bundled control-plane events
56
+ - contradiction replay for non-promoted traces that no longer depends on copied component-matrix parsing
57
+ - consistent `requireComponentPromotionsFromWave` threshold handling across both component-promotion proof validation and component-matrix current-level validation
58
+ - `projection-writer.mjs` as the single persistence layer for projection outputs such as dashboards, traces, generated board projections, compiled summaries and inboxes, helper-assignment and dependency snapshots, docs queues, ledgers, and integration or security summaries; clarification-triage workflow artifacts remain workflow-owned
59
+ - reducer phases that materialize open human-feedback and escalation barriers as `clarifying` with blocked `waveState`, instead of flattening them into generic `running`
60
+ - replay, reconcile, and trace materialization compatibility adapters that can still synthesize envelopes from legacy summaries or marker-era artifacts without deciding live correctness
61
+ - a launcher entrypoint that now sequences explicit engine modules plus the session supervisor, with the old `launcher-*` engine module names removed from the live runtime tree
51
62
  - Runtime executor support now includes:
52
63
  - Codex `exec` profile, inline config, search, image, add-dir, JSON, and ephemeral flags
53
64
  - Claude settings overlay merging for inline settings and hooks
@@ -67,7 +78,8 @@
67
78
  - open capability-targeted requests become explicit helper assignments
68
79
  - helper assignments are written into coordination state, the ledger, summaries, and traces
69
80
  - helper assignments remain blocking until the linked follow-up resolves
70
- - Closure now runs in staged order: implementation and proof, then optional `E0` cont-EVAL, then optional security review, then `A8` integration, then `A9` documentation, then `A0` cont-QA.
81
+ - Waves with a `design` worker role now run that design pass before code-owning implementation starts; implementation resumes only after every design packet is `ready-for-implementation`.
82
+ - Closure now runs in staged order through the wave's effective closure roles: implementation and proof, then optional `cont-EVAL`, then optional security review, then integration, then documentation, then `cont-QA`. Starter defaults remain `E0`, security reviewer, `A8`, `A9`, and `A0` when a wave does not override them.
71
83
  - `E0` is hybrid: planner-generated waves keep it report-only, while hand-authored waves may assign explicit tuning files and thereby make `E0` participate in implementation proof gating.
72
84
  - Live closure is strict: `cont-EVAL` must prove the declared eval contract with exact target and benchmark ids, and `cont-QA` must provide both final verdict and final gate artifacts. Legacy evaluator-era shapes remain replay-only compatibility inputs.
73
85
  - Proof-centric waves can now declare `### Proof artifacts`, and implementation proof validation can require those machine-visible local artifacts in addition to deliverables and structured proof markers.