@chllming/wave-orchestration 0.5.2 → 0.5.4

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 (79) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +56 -501
  3. package/docs/README.md +39 -0
  4. package/docs/concepts/context7-vs-skills.md +94 -0
  5. package/docs/concepts/operating-modes.md +91 -0
  6. package/docs/concepts/runtime-agnostic-orchestration.md +95 -0
  7. package/docs/concepts/what-is-a-wave.md +133 -0
  8. package/docs/guides/planner.md +113 -0
  9. package/docs/guides/terminal-surfaces.md +80 -0
  10. package/docs/image.png +0 -0
  11. package/docs/plans/context7-wave-orchestrator.md +2 -0
  12. package/docs/plans/current-state.md +10 -0
  13. package/docs/plans/master-plan.md +3 -3
  14. package/docs/plans/migration.md +4 -3
  15. package/docs/plans/wave-orchestrator.md +27 -3
  16. package/docs/reference/runtime-config/README.md +19 -0
  17. package/docs/reference/skills.md +156 -0
  18. package/docs/roadmap.md +160 -564
  19. package/package.json +2 -1
  20. package/releases/manifest.json +32 -0
  21. package/scripts/wave-orchestrator/config.mjs +17 -0
  22. package/scripts/wave-orchestrator/context7.mjs +9 -0
  23. package/scripts/wave-orchestrator/coordination.mjs +16 -0
  24. package/scripts/wave-orchestrator/executors.mjs +24 -11
  25. package/scripts/wave-orchestrator/install.mjs +41 -2
  26. package/scripts/wave-orchestrator/launcher.mjs +131 -25
  27. package/scripts/wave-orchestrator/planner.mjs +1328 -0
  28. package/scripts/wave-orchestrator/project-profile.mjs +190 -0
  29. package/scripts/wave-orchestrator/shared.mjs +2 -0
  30. package/scripts/wave-orchestrator/skills.mjs +448 -0
  31. package/scripts/wave-orchestrator/terminals.mjs +16 -0
  32. package/scripts/wave-orchestrator/traces.mjs +23 -0
  33. package/scripts/wave-orchestrator/wave-files.mjs +299 -84
  34. package/scripts/wave.mjs +11 -0
  35. package/skills/provider-aws/SKILL.md +6 -0
  36. package/skills/provider-aws/skill.json +5 -0
  37. package/skills/provider-custom-deploy/SKILL.md +5 -0
  38. package/skills/provider-custom-deploy/skill.json +5 -0
  39. package/skills/provider-docker-compose/SKILL.md +6 -0
  40. package/skills/provider-docker-compose/skill.json +5 -0
  41. package/skills/provider-github-release/SKILL.md +6 -0
  42. package/skills/provider-github-release/skill.json +5 -0
  43. package/skills/provider-kubernetes/SKILL.md +6 -0
  44. package/skills/provider-kubernetes/skill.json +5 -0
  45. package/skills/provider-railway/SKILL.md +6 -0
  46. package/skills/provider-railway/adapters/claude.md +1 -0
  47. package/skills/provider-railway/adapters/codex.md +1 -0
  48. package/skills/provider-railway/adapters/local.md +1 -0
  49. package/skills/provider-railway/adapters/opencode.md +1 -0
  50. package/skills/provider-railway/skill.json +5 -0
  51. package/skills/provider-ssh-manual/SKILL.md +6 -0
  52. package/skills/provider-ssh-manual/skill.json +5 -0
  53. package/skills/repo-coding-rules/SKILL.md +7 -0
  54. package/skills/repo-coding-rules/skill.json +5 -0
  55. package/skills/role-deploy/SKILL.md +6 -0
  56. package/skills/role-deploy/skill.json +5 -0
  57. package/skills/role-documentation/SKILL.md +6 -0
  58. package/skills/role-documentation/skill.json +5 -0
  59. package/skills/role-evaluator/SKILL.md +6 -0
  60. package/skills/role-evaluator/skill.json +5 -0
  61. package/skills/role-implementation/SKILL.md +6 -0
  62. package/skills/role-implementation/skill.json +5 -0
  63. package/skills/role-infra/SKILL.md +6 -0
  64. package/skills/role-infra/skill.json +5 -0
  65. package/skills/role-integration/SKILL.md +6 -0
  66. package/skills/role-integration/skill.json +5 -0
  67. package/skills/role-research/SKILL.md +6 -0
  68. package/skills/role-research/skill.json +5 -0
  69. package/skills/runtime-claude/SKILL.md +6 -0
  70. package/skills/runtime-claude/skill.json +5 -0
  71. package/skills/runtime-codex/SKILL.md +6 -0
  72. package/skills/runtime-codex/skill.json +5 -0
  73. package/skills/runtime-local/SKILL.md +5 -0
  74. package/skills/runtime-local/skill.json +5 -0
  75. package/skills/runtime-opencode/SKILL.md +6 -0
  76. package/skills/runtime-opencode/skill.json +5 -0
  77. package/skills/wave-core/SKILL.md +7 -0
  78. package/skills/wave-core/skill.json +5 -0
  79. package/wave.config.json +27 -0
package/CHANGELOG.md CHANGED
@@ -1,10 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.4 - 2026-03-22
4
+
5
+ - Added the planner foundation: project bootstrap memory in `.wave/project-profile.json`, `wave project setup|show`, and interactive `wave draft` generation of structured wave specs plus launcher-compatible markdown.
6
+ - Added the cross-runtime skill system: canonical `skills/` bundles, lane and per-agent attachment, deploy-kind and runtime-aware resolution, and runtime projections for Codex, Claude Code, OpenCode, and local execution.
7
+ - Expanded package docs with a docs index plus concept, guide, and reference pages covering waves, planner workflow, operating modes, Context7 vs skills, terminal surfaces, and runtime-agnostic orchestration.
8
+ - Clarified `--reconcile-status` failures by surfacing why incomplete waves are not reconstructable instead of failing with opaque output.
9
+
10
+ ## 0.5.3 - 2026-03-22
11
+
12
+ - Deferred integration, documentation, and evaluator agents until the closure sweep whenever implementation work is still pending, so the runtime now matches the documented closure model.
13
+ - Scoped wave wait/progress and human-feedback monitoring to the runs actually launched in the current pass, preventing deferred closure agents from surfacing as false pending or missing-status failures.
14
+ - Added regression coverage for mixed implementation/closure waves and for closure-only retry waves.
15
+ - Published `@chllming/wave-orchestration@0.5.3` successfully to npmjs and GitHub Releases.
16
+
3
17
  ## 0.5.2 - 2026-03-22
4
18
 
5
19
  - Hardened structured closure marker parsing so fenced or prose example `[wave-*]` lines no longer satisfy implementation, integration, documentation, or evaluator gates.
6
20
  - Hardened `### Deliverables` so declared outputs must remain repo-relative file paths inside the implementation agent's declared file ownership before the exit contract can pass.
7
21
  - Added regression coverage for the fenced-marker false-positive path and for deliverables that escape ownership boundaries.
22
+ - Published `@chllming/wave-orchestration@0.5.2` successfully to npmjs, making npmjs the working public install path instead of a pending rollout target.
8
23
 
9
24
  ## 0.5.1 - 2026-03-22
10
25
 
package/README.md CHANGED
@@ -1,551 +1,106 @@
1
1
  # Wave Orchestration
2
2
 
3
- Wave Orchestration is a generic repository harness for running multi-agent work in bounded waves.
3
+ Wave Orchestration is a repository harness for running multi-agent work in bounded waves. You define shared plan docs plus per-wave markdown, the launcher validates the wave, compiles prompts and inboxes, runs implementation agents first, then performs staged closure. Every run writes durable state under `.tmp/<lane>-wave-launcher/` so humans can inspect progress, replay outcomes, and intervene only when needed.
4
4
 
5
- It includes:
5
+ ## How It Works
6
6
 
7
- - wave parsing and validation
8
- - launcher, dashboard, autonomous, and human-feedback CLIs
9
- - coordination log, helper-assignment decisions, generated board projection, compiled inboxes, and a per-wave ledger
10
- - integration stewardship, docs queues, and versioned trace bundles under `.tmp/`
11
- - typed cross-lane dependency tickets plus `wave dep` operator commands
12
- - role prompt imports and closure-sweep gating
13
- - component-cutover tracking and promotion gates
14
- - Context7 bundle selection, prefetch, caching, and prompt injection
15
- - starter docs and a sample wave scaffold
7
+ 1. Write shared docs and one or more `docs/plans/waves/wave-<n>.md` files.
8
+ 2. Run `wave launch --dry-run` to validate the wave and materialize prompts, inboxes, dashboards, and executor previews.
9
+ 3. A real launch runs implementation agents first. Agents post claims, evidence, requests, and decisions into the coordination log and rolling message board.
10
+ 4. When implementation gates pass, closure runs in order: integration (`A8`), documentation (`A9`), evaluator (`A0`).
11
+ 5. Operators use the generated ledgers, inboxes, feedback queue, dependency views, and traces instead of guessing from raw terminal output.
16
12
 
17
- ## Quick Start
13
+ ## Features
18
14
 
19
- Published package:
20
- - `@chllming/wave-orchestration@0.5.2`
21
- - Primary public registry: `https://registry.npmjs.org`
22
- - Release: [v0.5.2](https://github.com/chllming/wave-orchestration/releases/tag/v0.5.2)
23
- - npmjs publish workflow: [publish-npm.yml](./.github/workflows/publish-npm.yml)
15
+ - Planner foundation with saved project profile memory, draft specs, and rendered wave markdown
16
+ - Implementation-first execution with staged closure and retry support
17
+ - Durable coordination log, rolling message board, compiled inboxes, and per-wave ledger
18
+ - Dry-run prompt and executor preview mode before any real agent launch
19
+ - Context7 bundle selection, caching, and prompt injection
20
+ - Multi-executor support for Codex, Claude Code, OpenCode, and a local smoke executor
21
+ - Cross-runtime skill packs loaded from `skills/` and resolved by lane, role, runtime, deploy kind, and per-agent attachment
22
+ - Human feedback routing, clarification triage, helper assignment, and cross-lane dependencies
23
+ - Replayable trace bundles for regression and release verification
24
24
 
25
- Install from npmjs:
25
+ ## Example Output
26
26
 
27
- ```bash
28
- pnpm add -D @chllming/wave-orchestration
29
- pnpm exec wave init
30
- pnpm exec wave doctor
31
- pnpm exec wave launch --lane main --dry-run --no-dashboard
32
- pnpm exec wave coord show --lane main --wave 0 --dry-run
33
- ```
34
-
35
- If your repo already has Wave config, docs, or waves you want to keep:
36
-
37
- ```bash
38
- pnpm exec wave init --adopt-existing
39
- ```
27
+ Representative rolling message board output from a real wave run:
40
28
 
41
- ## New In 0.5.2
29
+ <img src="./docs/image.png" alt="Example rolling message board output showing claims, evidence, requests, and evaluator closure for a wave run" width="100%" />
42
30
 
43
- - Example `[wave-*]` markers inside fenced snippets or prose no longer satisfy closure; only real standalone structured signals count.
44
- - `### Deliverables` is now enforced as an ownership-scoped file contract, so declared outputs must stay inside that agent's `File ownership` block.
45
- - Regression coverage now includes both of those failure paths directly.
46
-
47
- ## New In 0.5.1
48
-
49
- - Phase 4 finalization now correctly stays blocked on unresolved human feedback and escalation items from completed waves.
50
- - Hermetic trace fixtures now force local executor coverage for seeded control-plane agents, so replay tests cannot accidentally launch real Codex, Claude Code, or OpenCode sessions.
51
- - npmjs is now the primary public install path.
52
- - npmjs publishing is wired in parallel with GitHub Packages, with repository-secret auth through `NPM_TOKEN`.
53
-
54
- ## New In 0.5.0
55
-
56
- - Capability-targeted work is now first-class: open capability requests become explicit helper assignments with deterministic assignee resolution, ledger visibility, inbox coverage, and closure barriers.
57
- - Cross-lane work is now first-class too: `wave dep post|show|resolve|render` manages typed dependency tickets, and required inbound or outbound dependencies now surface directly in lane state and gating.
58
- - Hermetic replay acceptance is now stronger around the runtime-orchestration layer, with stored outcome snapshots and launcher-generated local trace fixtures covering fallback, clarification, and dependency paths.
59
- - The package now carries explicit repository metadata for package and release provenance.
31
+ ## Quick Start
60
32
 
61
- ## Requirements
33
+ Requirements:
62
34
 
63
35
  - Node.js 22+
64
36
  - `pnpm`
65
- - `tmux` on `PATH` for dashboarded wave runs
66
- - one or more real executors on `PATH`: `codex`, `claude`, or `opencode`
67
- - optional: `CONTEXT7_API_KEY` for launcher-side Context7 prefetch
68
-
69
- ## Install Into Another Repo
37
+ - `tmux` on `PATH` for dashboarded runs
38
+ - at least one executor on `PATH`: `codex`, `claude`, or `opencode`
39
+ - optional: `CONTEXT7_API_KEY` for launcher-side prefetch
70
40
 
71
- 1. Install the package from npmjs:
41
+ Install into another repo:
72
42
 
73
43
  ```bash
74
44
  pnpm add -D @chllming/wave-orchestration
75
- ```
76
-
77
- If you need GitHub Packages instead, use the authenticated fallback in [github-packages-setup.md](./docs/reference/github-packages-setup.md).
78
-
79
- 2. Initialize the repo:
80
-
81
- Fresh repo:
82
-
83
- ```bash
84
45
  pnpm exec wave init
85
- ```
86
-
87
- Existing repo with Wave config/docs/waves you want to preserve:
88
-
89
- ```bash
90
- pnpm exec wave init --adopt-existing
91
- ```
92
-
93
- 3. Run a non-mutating health check:
94
-
95
- ```bash
96
46
  pnpm exec wave doctor
97
47
  pnpm exec wave launch --lane main --dry-run --no-dashboard
98
- ```
99
-
100
- 4. Upgrade later without overwriting plans or waves:
101
-
102
- ```bash
103
- pnpm up @chllming/wave-orchestration
104
- pnpm exec wave upgrade
105
- pnpm exec wave changelog --since-installed
106
- ```
107
-
108
- `wave upgrade` only updates `.wave/install-state.json` and writes upgrade reports under `.wave/upgrade-history/`. It does not overwrite existing `wave.config.json`, role prompts, plan docs, or wave files.
109
-
110
- ## Develop This Package
111
-
112
- 1. Install dependencies in this source repo:
113
-
114
- ```bash
115
- pnpm install
116
- ```
117
-
118
- 2. Review the package-level config and starter assets in [wave.config.json](./wave.config.json) and [docs](./docs).
119
-
120
- This source repo is kept as an adopted Wave workspace; `node scripts/wave.mjs doctor --json` should stay green here.
121
-
122
- 3. Review the starter runbook in [docs/plans/wave-orchestrator.md](./docs/plans/wave-orchestrator.md), [docs/plans/context7-wave-orchestrator.md](./docs/plans/context7-wave-orchestrator.md), and [docs/plans/component-cutover-matrix.md](./docs/plans/component-cutover-matrix.md).
123
-
124
- 4. Dry-parse the starter wave:
125
-
126
- ```bash
127
- node scripts/wave.mjs launch --lane main --dry-run --no-dashboard
128
- ```
129
-
130
- 5. When the wave parses cleanly, launch a single wave:
131
-
132
- ```bash
133
- node scripts/wave.mjs launch --lane main --start-wave 0 --end-wave 0 --executor codex --codex-sandbox danger-full-access
134
- ```
135
-
136
- Alternative real executors:
137
-
138
- ```bash
139
- node scripts/wave.mjs launch --lane main --start-wave 0 --end-wave 0 --executor claude
140
- node scripts/wave.mjs launch --lane main --start-wave 0 --end-wave 0 --executor opencode
141
- ```
142
-
143
- ## Documentation Map
144
-
145
- - [README.md](./README.md): package entry point, install flow, executor behavior, Context7 behavior, and command quick reference
146
- - [docs/plans/wave-orchestrator.md](./docs/plans/wave-orchestrator.md): operator runbook for launch, coordination, closure, and upgrade flow
147
- - [docs/plans/context7-wave-orchestrator.md](./docs/plans/context7-wave-orchestrator.md): Context7 setup, bundle authoring, injection order, and executor layering
148
- - [docs/plans/current-state.md](./docs/plans/current-state.md): shipped runtime and package capabilities
149
- - [docs/plans/master-plan.md](./docs/plans/master-plan.md): next priorities after the current shipped runtime
150
- - [docs/plans/migration.md](./docs/plans/migration.md): adopt this package into another repository
151
- - [docs/reference/github-packages-setup.md](./docs/reference/github-packages-setup.md): optional `.npmrc` and GitHub Packages auth details
152
- - [docs/reference/npmjs-trusted-publishing.md](./docs/reference/npmjs-trusted-publishing.md): maintainer setup for npmjs publishing through the repo workflow and `NPM_TOKEN`
153
- - [docs/reference/runtime-config/README.md](./docs/reference/runtime-config/README.md): runtime precedence, merge rules, and generated artifact paths
154
- - [docs/reference/runtime-config/codex.md](./docs/reference/runtime-config/codex.md): full Codex configuration reference
155
- - [docs/reference/runtime-config/claude.md](./docs/reference/runtime-config/claude.md): full Claude configuration reference
156
- - [docs/reference/runtime-config/opencode.md](./docs/reference/runtime-config/opencode.md): full OpenCode configuration reference
157
- - [docs/reference/migration-0.2-to-0.5.md](./docs/reference/migration-0.2-to-0.5.md): migration guide for older Wave repos
158
- - [docs/roadmap.md](./docs/roadmap.md): rationale, delivered phases, and remaining roadmap items
159
-
160
- ## Typical Harness Workflow
161
-
162
- 1. Initialize or adopt the workspace:
163
- Use `pnpm exec wave init` for a fresh repo or `pnpm exec wave init --adopt-existing` for an existing repo you do not want seeded with starter content.
164
-
165
- 2. Configure the repo:
166
- Edit [wave.config.json](./wave.config.json) for your docs layout, shared plan docs, role prompt paths, validator thresholds, component-cutover matrix paths, Context7 bundle index path, executor profiles, and per-lane runtime policy.
167
-
168
- 3. Write or revise the shared docs:
169
- Keep the shared plan docs aligned with the work you want the harness to execute.
170
-
171
- 4. Replace or revise the component cutover matrix:
172
- Keep [docs/plans/component-cutover-matrix.md](./docs/plans/component-cutover-matrix.md) and [docs/plans/component-cutover-matrix.json](./docs/plans/component-cutover-matrix.json) aligned with the components and maturity levels your repo actually uses.
173
-
174
- 5. Create a wave file:
175
- Put wave markdown under [docs/plans/waves](./docs/plans/waves) using the same sections as the sample [wave-0.md](./docs/plans/waves/wave-0.md).
176
-
177
- 6. Dry-run first:
178
-
179
- ```bash
180
- pnpm exec wave doctor
181
- pnpm exec wave launch --lane main --dry-run --no-dashboard
182
- ```
183
-
184
- Dry-run now writes compiled prompts and executor previews under `.tmp/<lane>-wave-launcher/dry-run/`, including `executors/wave-<n>/<agent-slug>/launch-preview.json`.
185
-
186
- 7. Inspect the seeded coordination state and generated inboxes:
187
-
188
- ```bash
189
48
  pnpm exec wave coord show --lane main --wave 0 --dry-run
190
- pnpm exec wave coord inbox --lane main --wave 0 --agent A1 --dry-run
191
- pnpm exec wave dep show --lane main --wave 0 --json
192
- ```
193
-
194
- 8. Reconcile stale state if needed:
195
-
196
- ```bash
197
- pnpm exec wave launch --lane main --reconcile-status
198
49
  ```
199
50
 
200
- 9. Check pending human feedback:
51
+ If the repo already has Wave config, plans, or waves you want to keep:
201
52
 
202
53
  ```bash
203
- pnpm exec wave feedback list --lane main --pending
54
+ pnpm exec wave init --adopt-existing
204
55
  ```
205
56
 
206
- The harness now tries to resolve clarification requests before asking a human. Agents should emit `clarification-request` coordination records first; unresolved items are written into `.tmp/<lane>-wave-launcher/feedback/triage/` and only then become human feedback tickets. Routed clarification follow-ups stay blocking until the linked request or escalation is fully resolved.
57
+ Fresh init also seeds a starter `skills/` library. The launcher projects those skill bundles into Codex, Claude, OpenCode, and local executor overlays after the final runtime for each agent is resolved.
207
58
 
208
- Cross-lane work is also explicit and operator-visible:
59
+ ## Common Commands
209
60
 
210
61
  ```bash
211
- pnpm exec wave dep post --owner-lane main --requester-lane release --owner-wave 0 --requester-wave 2 --agent launcher --summary "Need shared-plan reconciliation" --target capability:docs-shared-plan --required
212
- pnpm exec wave dep show --lane main --wave 0 --json
213
- pnpm exec wave dep resolve --lane main --id <dependency-id> --agent A8
214
- ```
215
-
216
- 10. Launch one wave at a time until the plan is stable:
62
+ # Save project defaults and draft a new wave
63
+ pnpm exec wave project setup
64
+ pnpm exec wave draft --wave 1 --template implementation
217
65
 
218
- ```bash
66
+ # Run one wave with a real executor
219
67
  pnpm exec wave launch --lane main --start-wave 0 --end-wave 0 --executor codex --codex-sandbox danger-full-access
220
- ```
221
68
 
222
- 11. Use autonomous mode only after the wave set is already solid:
69
+ # Inspect operator surfaces
70
+ pnpm exec wave feedback list --lane main --pending
71
+ pnpm exec wave dep show --lane main --wave 0 --json
223
72
 
224
- ```bash
73
+ # Run autonomous mode after the wave set is stable
225
74
  pnpm exec wave autonomous --lane main --executor codex --codex-sandbox danger-full-access
226
75
  ```
227
76
 
228
- ## Runtime Artifacts
229
-
230
- The launcher writes runtime state under `.tmp/<lane>-wave-launcher/`:
231
-
232
- - `coordination/wave-<n>.jsonl`: append-only coordination upsert log
233
- - `assignments/wave-<n>.json`: resolved helper-assignment snapshot derived from open requests
234
- - `messageboards/wave-<n>.md`: generated board projection for humans
235
- - `inboxes/wave-<n>/`: compiled shared summary plus per-agent inboxes
236
- - `ledger/wave-<n>.json`: derived task/blocker/closure state
237
- - `integration/wave-<n>.json|md`: explicit or synthesized integration summary
238
- - `dependencies/wave-<n>.json|md`: per-wave inbound/outbound dependency snapshot
239
- - `docs-queue/wave-<n>.json`: documentation reconciliation queue
240
- - `traces/wave-<n>/attempt-<k>/`: versioned attempt bundle with run metadata, quality metrics, prompts, logs, statuses, inboxes, and structured signals
241
- - `feedback/triage/wave-<n>.jsonl|/pending-human.md`: clarification triage log plus unresolved human escalations
242
- - `prompts/`, `logs/`, `status/`, `executors/`, and `context7-cache/`: run artifacts, overlays, and cached external-doc snippets
243
-
244
- `wave.config.json` can now declare executor profiles and lane runtime policy. In this repo, `main` defaults implementation roles to `codex`, integration/documentation/evaluator roles to `claude`, and research or ops-heavy roles to `opencode`. Runtime mix targets are enforced before launch, retry fallbacks are chosen from the configured fallback chain when a failed agent can move safely, and those fallback decisions are recorded in the ledger, integration summary, and traces. Generic `budget.minutes` now caps attempt timeouts, and `budget.turns` seeds vendor turn or step limits when the executor-specific settings are absent.
245
-
246
- ## Trace And Replay
247
-
248
- - `--dry-run` is still pre-attempt only. It writes the manifest, coordination log, rendered board, ledger, docs queue, integration summary, and compiled inboxes under `.tmp/<lane>-wave-launcher/dry-run/`.
249
- - `--dry-run` does not write `attempt-<k>` trace snapshots. The `traces/` directory may exist in dry-run state, but it should remain file-empty.
250
- - Real attempts write a full hermetic `traceVersion: 2` bundle under `.tmp/<lane>-wave-launcher/traces/wave-<n>/attempt-<k>/`.
251
- - `run-metadata.json` is the canonical bundle index. It records the wave hash, attempt number, launcher settings, agent prompt hashes, executor history, Context7 snippet hashes, gate snapshot, artifact-presence map, `replayContext`, and `historySnapshot`.
252
- - `outcome.json` is the stored replay baseline for the bundle. It carries the normalized stored gate snapshot plus the stored cumulative quality report so replay can compare recomputed results against a hashed bundle-local source of truth.
253
- - For `traceVersion: 2`, every launched agent must have copied prompt, log, status, inbox, and summary artifacts inside the bundle. Waves with `## Component promotions` must also carry the copied component matrix JSON.
254
- - `quality.json` is cumulative through the current attempt. It reports unresolved request and clarification counts, human-escalation and orchestrator-resolution counts, contradiction and documentation-drift counts, proof completeness, relaunch counts, fallback rate, acknowledgement and blocker timing, evaluator reversal, helper-assignment and dependency timing, and the final integration recommendation.
255
- - Hermetic replay is read-only. Replay uses only the stored bundle contents, ignores inline summary duplicates in `run-metadata.json`, revalidates recorded artifact hashes, reports stored-vs-recomputed diffs for gate and quality state, and does not rewrite summaries or other bundle files.
256
- - Legacy `traceVersion: 1` bundles are still accepted in best-effort mode with explicit warnings. They are not treated as fully hermetic.
257
- - Replay validation is internal today. The source tree exposes helper modules for loading, validating, and replaying trace bundles, but there is no supported `wave replay` public CLI yet.
258
-
259
- ## Wave File Shape
260
-
261
- Each wave is regular markdown. The harness looks for:
262
-
263
- - `## Component promotions`
264
- - `## Context7 defaults`
265
- - `## Agent <id>: <title>`
266
- - `### Executor`
267
- - `### Role prompts`
268
- - `### Context7`
269
- - `### Components`
270
- - `### Capabilities`
271
- - `### Deliverables`
272
- - `### Exit contract`
273
- - `### Prompt`
274
-
275
- Under the starter config in this repo, wave 0 and later also require:
276
-
277
- - `A0` as the evaluator
278
- - `A8` as the integration steward
279
- - `A9` as the documentation steward
280
-
281
- Optional standing roles are also available for infra- or rollout-heavy waves:
282
-
283
- - `docs/agents/wave-infra-role.md`
284
- - `docs/agents/wave-deploy-verifier-role.md`
285
-
286
- The sample [wave-0.md](./docs/plans/waves/wave-0.md) is a complete valid example. The excerpt below shows the implementation-agent portion of a full wave:
287
-
288
- ````md
289
- # Wave 1 - Example
290
-
291
- ## Component promotions
292
-
293
- - wave-parser-and-launcher: repo-landed
294
-
295
- ## Context7 defaults
296
-
297
- - bundle: node-typescript
298
- - query: "Node process spawning and vitest usage"
299
-
300
- ## Agent A0: Running Evaluator
301
-
302
- ### Role prompts
303
-
304
- - docs/agents/wave-evaluator-role.md
305
-
306
- ### Context7
307
-
308
- - bundle: none
309
-
310
- ### Prompt
311
- ```text
312
- Read docs/reference/repository-guidance.md.
313
- Read docs/research/agent-context-sources.md.
314
-
315
- File ownership (only touch these paths):
316
- - docs/plans/waves/reviews/wave-1-evaluator.md
317
- ```
318
-
319
- ## Agent A1: Runtime Work
320
-
321
- ### Executor
322
-
323
- - id: claude
324
- - model: claude-sonnet-4-6
325
- - claude.max_turns: 4
326
-
327
- ### Context7
328
-
329
- - bundle: node-typescript
330
- - query: "Node child_process and test execution"
331
-
332
- ### Components
333
-
334
- - wave-parser-and-launcher
335
-
336
- ### Capabilities
337
-
338
- - runtime
339
- - validation
340
-
341
- ### Exit contract
342
-
343
- - completion: integrated
344
- - durability: none
345
- - proof: integration
346
- - doc-impact: owned
347
-
348
- ### Deliverables
349
-
350
- - src/example.ts
351
- - test/example.test.ts
352
-
353
- ### Prompt
354
- ```text
355
- Read docs/reference/repository-guidance.md.
356
- Read docs/research/agent-context-sources.md.
357
-
358
- File ownership (only touch these paths):
359
- - src/example.ts
360
- - test/example.test.ts
361
- ```
362
- ````
363
-
364
- `## Component promotions` declares the component levels this wave is responsible for proving. `### Components` assigns each promoted component to one or more implementation agents.
365
-
366
- `### Capabilities` is optional. It lets the coordination layer route targeted follow-up work to a capability rather than a single hard-coded agent.
367
-
368
- `### Deliverables` is also optional. When present, the launcher validates that each listed repo-relative file both exists and stays within the implementation agent's declared file ownership before the exit contract can pass.
369
-
370
- Open capability-targeted requests now become explicit helper assignments. The launcher resolves them deterministically, writes the assignment snapshot under `.tmp/`, mirrors the decision into the coordination log for the board and replay surface, and keeps the wave blocked until the linked follow-up resolves.
371
-
372
- The component matrix is also expected to reflect the landed state. Before a promoted wave closes, `docs/plans/component-cutover-matrix.json` should advance each promoted component's `currentLevel` to the proved target.
373
-
374
- `### Executor` is optional. Resolution order is:
375
-
376
- - per-agent `### Executor`
377
- - selected executor profile id
378
- - lane role default
379
- - launcher `--executor`
380
- - `wave.config.json` `executors.default`
381
-
382
- Common keys:
383
-
384
- - `id`
385
- - `profile`
386
- - `model`
387
- - `fallbacks`
388
- - `tags`
389
- - `budget.turns`
390
- - `budget.minutes`
391
-
392
- The full supported runtime surface lives in:
393
-
394
- - [docs/reference/runtime-config/README.md](./docs/reference/runtime-config/README.md)
395
- - [docs/reference/runtime-config/codex.md](./docs/reference/runtime-config/codex.md)
396
- - [docs/reference/runtime-config/claude.md](./docs/reference/runtime-config/claude.md)
397
- - [docs/reference/runtime-config/opencode.md](./docs/reference/runtime-config/opencode.md)
398
-
399
- Example runtime blocks:
400
-
401
- ````md
402
- ### Executor
403
-
404
- - id: codex
405
- - model: gpt-5-codex
406
- - codex.profile_name: review
407
- - codex.config: model_reasoning_effort=high
408
- - codex.search: true
409
- - codex.json: true
410
- ````
411
-
412
- ````md
413
- ### Executor
414
-
415
- - id: claude
416
- - model: claude-sonnet-4-6
417
- - claude.settings_json: {"permissions":{"allow":["Read"]}}
418
- - claude.hooks_json: {"Stop":[{"command":"echo stop"}]}
419
- - claude.allowed_http_hook_urls: https://example.com/hooks
420
- ````
421
-
422
- ````md
423
- ### Executor
424
-
425
- - id: opencode
426
- - opencode.files: README.md,docs/plans/current-state.md
427
- - opencode.config_json: {"instructions":["Keep shared-plan edits concise."]}
428
- ````
429
-
430
- When an implementation agent owns components, it must emit:
431
-
432
- ```text
433
- [wave-component] component=<id> level=<level> state=<met|gap> detail=<short-note>
434
- ```
435
-
436
- The launcher will not accept final completion until every promoted component has at least one matching `state=met` proof marker at the declared level.
437
-
438
- ## Executor Behavior
439
-
440
- - `codex`
441
- The harness sends the generated task prompt through `codex exec` stdin. `--codex-sandbox` and `wave.config.json` `executors.codex.sandbox` control the default sandbox. Current runtime support includes CLI profile selection, inline `-c` overrides, search, images, extra directories, JSON mode, and ephemeral sessions.
442
- - `claude`
443
- The harness launches `claude -p` headlessly. The generated task prompt becomes the run message, and a runtime overlay file is injected with `--append-system-prompt-file` by default. Current runtime support includes merged per-run settings overlays from a base `claude.settings` file plus inline settings JSON, hooks JSON, and allowed HTTP hook URLs. Switch to full replacement in `wave.config.json` with `executors.claude.appendSystemPromptMode: "replace"`.
444
- - `opencode`
445
- The harness launches `opencode run` headlessly. The generated task prompt becomes the run message, and the harness writes an ignored runtime `opencode.json` plus a generated agent prompt under `.tmp/.../executors/`, then points `OPENCODE_CONFIG` at that overlay for the run. Current runtime support includes merged config JSON and repeated file attachments.
446
- - `local`
447
- Smoke-test only. It creates placeholder deliverables and emits the expected Wave markers, but it is not a real agent runtime.
448
-
449
- The run-level default executor comes from `wave.config.json`:
450
-
451
- ```json
452
- {
453
- "executors": {
454
- "default": "codex",
455
- "codex": {
456
- "command": "codex",
457
- "sandbox": "danger-full-access"
458
- },
459
- "claude": {
460
- "command": "claude",
461
- "appendSystemPromptMode": "append",
462
- "outputFormat": "text"
463
- },
464
- "opencode": {
465
- "command": "opencode",
466
- "format": "default"
467
- }
468
- }
469
- }
470
- ```
471
-
472
- Dry-run executor previews are written under the same `executors/` tree as live overlays. For each agent, `launch-preview.json` records the resolved executor id, exported env vars, rate-limit retry mode, and the exact invocation lines that would be used in a real run.
473
-
474
- ## Context7 Setup
475
-
476
- 1. Add `CONTEXT7_API_KEY` to `.env.local` at repo root.
477
-
478
- 2. Export it into your shell or run commands through the helper:
479
-
480
- ```bash
481
- source scripts/context7-export-env.sh
482
- ```
483
-
484
- or
485
-
486
- ```bash
487
- bash scripts/context7-export-env.sh run pnpm context7:api-check
488
- ```
489
-
490
- 3. Verify the API key works:
77
+ ## Develop This Package
491
78
 
492
79
  ```bash
493
- pnpm context7:api-check
80
+ pnpm install
81
+ pnpm test
82
+ node scripts/wave.mjs launch --lane main --dry-run --no-dashboard
494
83
  ```
495
84
 
496
- 4. Define or trim bundles in [docs/context7/bundles.json](./docs/context7/bundles.json).
497
-
498
- 5. Declare scope in the wave file:
499
- Use wave-level defaults for the general lane of work, then override per agent only when the agent truly needs a narrower or different external-doc slice.
500
-
501
- ## How Context7 Works In The Harness
85
+ ## Learn More
502
86
 
503
- - The launcher resolves Context7 scope in this order: agent `### Context7`, wave `## Context7 defaults`, lane default, then `none`.
504
- - If a bundle is active, the launcher prefetches third-party snippets before starting the agent.
505
- - The generated agent prompt includes a `Context7 scope for this run` block that lists:
506
- the bundle id, query focus, allowed libraries, and any prefetched non-canonical snippets.
507
- - Prefetched text is included before the assigned implementation prompt, regardless of executor.
508
- - Cache output is written under `.tmp/<lane>-wave-launcher/context7-cache/`.
509
- - Executor runtime overlays are written under `.tmp/<lane>-wave-launcher/executors/`.
510
- - Missing API keys or Context7 API failures do not block the wave; the launcher fails open and starts the agent without the prefetched snippets.
511
- - You can disable injection for a run with `--no-context7`.
512
-
513
- Layering by executor:
514
-
515
- - `codex`: repository rules + generated task prompt with injected Context7 block
516
- - `claude`: repository `CLAUDE.md` / Claude settings + harness append-system-prompt overlay + generated task prompt with injected Context7 block
517
- - `opencode`: repository `AGENTS.md` / project `opencode.json` + harness runtime `OPENCODE_CONFIG` overlay + generated task prompt with injected Context7 block
518
-
519
- ## Useful Commands
520
-
521
- ```bash
522
- pnpm exec wave init
523
- pnpm exec wave init --adopt-existing
524
- pnpm exec wave doctor
525
- pnpm exec wave launch --lane main --dry-run --no-dashboard
526
- pnpm exec wave coord show --lane main --wave 0 --dry-run --json
527
- pnpm exec wave coord inbox --lane main --wave 0 --agent A1 --dry-run
528
- pnpm exec wave coord render --lane main --wave 0 --dry-run
529
- pnpm exec wave coord post --lane main --wave 0 --agent A1 --kind blocker --summary "Need repository decision"
530
- pnpm exec wave launch --lane main --reconcile-status
531
- pnpm exec wave launch --lane main --start-wave 2 --end-wave 2 --executor codex --codex-sandbox danger-full-access
532
- pnpm exec wave launch --lane main --start-wave 2 --end-wave 2 --executor claude
533
- pnpm exec wave launch --lane main --start-wave 2 --end-wave 2 --executor opencode
534
- pnpm exec wave launch --lane main --auto-next --executor codex --codex-sandbox danger-full-access
535
- pnpm exec wave feedback list --lane main --pending
536
- pnpm exec wave feedback show --id <request-id>
537
- pnpm exec wave feedback respond --id <request-id> --response "..." --operator "<name>"
538
- pnpm exec wave autonomous --lane main --executor codex --codex-sandbox danger-full-access
539
- pnpm exec wave autonomous --lane main --executor claude
540
- pnpm exec wave autonomous --lane main --executor opencode
541
- pnpm exec wave upgrade
542
- pnpm exec wave changelog --since-installed
543
- ```
87
+ - [docs/README.md](./docs/README.md): docs map and suggested structure
88
+ - [docs/concepts/what-is-a-wave.md](./docs/concepts/what-is-a-wave.md): wave anatomy, lifecycle, and closure model
89
+ - [docs/guides/planner.md](./docs/guides/planner.md): `wave project` and `wave draft` workflow
90
+ - [docs/concepts/context7-vs-skills.md](./docs/concepts/context7-vs-skills.md): when to use external docs vs repo-owned skills
91
+ - [docs/guides/terminal-surfaces.md](./docs/guides/terminal-surfaces.md): tmux, VS Code terminal registry, and dry-run surfaces
92
+ - [docs/plans/wave-orchestrator.md](./docs/plans/wave-orchestrator.md): operator runbook
93
+ - [docs/plans/context7-wave-orchestrator.md](./docs/plans/context7-wave-orchestrator.md): Context7 setup and bundle authoring
94
+ - [docs/reference/runtime-config/README.md](./docs/reference/runtime-config/README.md): executor, runtime, and skill-projection configuration
95
+ - [docs/reference/skills.md](./docs/reference/skills.md): skill bundle format, resolution order, and runtime projection
96
+ - [CHANGELOG.md](./CHANGELOG.md): release history
544
97
 
545
98
  ## Research Sources
546
99
 
547
- The canonical source index is [docs/research/agent-context-sources.md](./docs/research/agent-context-sources.md). Hydrated paper or article caches should stay local and ignored under `docs/research/cache/` or `docs/research/agent-context-cache/`.
100
+ Canonical source index:
101
+ - [docs/research/agent-context-sources.md](./docs/research/agent-context-sources.md)
548
102
 
103
+ Key external sources:
549
104
  - [Effective harnesses for long-running agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents)
550
105
  - [Harness engineering: leveraging Codex in an agent-first world](https://openai.com/index/harness-engineering/)
551
106
  - [Unlocking the Codex harness: how we built the App Server](https://openai.com/index/unlocking-the-codex-harness/)