@chllming/wave-orchestration 0.5.3 → 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 +7 -0
  2. package/README.md +56 -509
  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 +17 -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 +113 -20
  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,5 +1,12 @@
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
+
3
10
  ## 0.5.3 - 2026-03-22
4
11
 
5
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.
package/README.md CHANGED
@@ -1,559 +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.3`
21
- - Primary public registry: `https://registry.npmjs.org`
22
- - Release: [v0.5.3](https://github.com/chllming/wave-orchestration/releases/tag/v0.5.3)
23
- - npmjs publish workflow: [publish-npm.yml](./.github/workflows/publish-npm.yml)
24
- - npmjs install is now live for `0.5.3`; GitHub Packages is the authenticated fallback path only.
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
25
24
 
26
- Install from npmjs:
25
+ ## Example Output
27
26
 
28
- ```bash
29
- pnpm add -D @chllming/wave-orchestration
30
- pnpm exec wave init
31
- pnpm exec wave doctor
32
- pnpm exec wave launch --lane main --dry-run --no-dashboard
33
- pnpm exec wave coord show --lane main --wave 0 --dry-run
34
- ```
35
-
36
- If your repo already has Wave config, docs, or waves you want to keep:
37
-
38
- ```bash
39
- pnpm exec wave init --adopt-existing
40
- ```
27
+ Representative rolling message board output from a real wave run:
41
28
 
42
- ## New In 0.5.3
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%" />
43
30
 
44
- - The launcher now starts only implementation agents in the initial wave pass when implementation work is still pending.
45
- - Wait/progress tracking now scopes to the runs actually launched in the current pass, so deferred closure agents no longer look like missing or pending failures.
46
- - Closure-only retries still run through the existing `A8` -> `A9` -> `A0` sweep, with regression coverage for both mixed and closure-only cases.
47
-
48
- ## New In 0.5.2
49
-
50
- - Example `[wave-*]` markers inside fenced snippets or prose no longer satisfy closure; only real standalone structured signals count.
51
- - `### Deliverables` is now enforced as an ownership-scoped file contract, so declared outputs must stay inside that agent's `File ownership` block.
52
- - Regression coverage now includes both of those failure paths directly.
53
- - The npmjs package release is now live, so `pnpm add -D @chllming/wave-orchestration` works from the public registry without the older GitHub Packages auth setup.
54
-
55
- ## New In 0.5.1
56
-
57
- - Phase 4 finalization now correctly stays blocked on unresolved human feedback and escalation items from completed waves.
58
- - 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.
59
- - npmjs is now the primary public install path.
60
- - npmjs publishing is wired in parallel with GitHub Packages, with repository-secret auth through `NPM_TOKEN`.
61
-
62
- ## New In 0.5.0
63
-
64
- - 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.
65
- - 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.
66
- - 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.
67
- - The package now carries explicit repository metadata for package and release provenance.
31
+ ## Quick Start
68
32
 
69
- ## Requirements
33
+ Requirements:
70
34
 
71
35
  - Node.js 22+
72
36
  - `pnpm`
73
- - `tmux` on `PATH` for dashboarded wave runs
74
- - one or more real executors on `PATH`: `codex`, `claude`, or `opencode`
75
- - optional: `CONTEXT7_API_KEY` for launcher-side Context7 prefetch
76
-
77
- ## 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
78
40
 
79
- 1. Install the package from npmjs:
41
+ Install into another repo:
80
42
 
81
43
  ```bash
82
44
  pnpm add -D @chllming/wave-orchestration
83
- ```
84
-
85
- If you need GitHub Packages instead, use the authenticated fallback in [github-packages-setup.md](./docs/reference/github-packages-setup.md).
86
-
87
- 2. Initialize the repo:
88
-
89
- Fresh repo:
90
-
91
- ```bash
92
45
  pnpm exec wave init
93
- ```
94
-
95
- Existing repo with Wave config/docs/waves you want to preserve:
96
-
97
- ```bash
98
- pnpm exec wave init --adopt-existing
99
- ```
100
-
101
- 3. Run a non-mutating health check:
102
-
103
- ```bash
104
- pnpm exec wave doctor
105
- pnpm exec wave launch --lane main --dry-run --no-dashboard
106
- ```
107
-
108
- 4. Upgrade later without overwriting plans or waves:
109
-
110
- ```bash
111
- pnpm up @chllming/wave-orchestration
112
- pnpm exec wave upgrade
113
- pnpm exec wave changelog --since-installed
114
- ```
115
-
116
- `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.
117
-
118
- ## Develop This Package
119
-
120
- 1. Install dependencies in this source repo:
121
-
122
- ```bash
123
- pnpm install
124
- ```
125
-
126
- 2. Review the package-level config and starter assets in [wave.config.json](./wave.config.json) and [docs](./docs).
127
-
128
- This source repo is kept as an adopted Wave workspace; `node scripts/wave.mjs doctor --json` should stay green here.
129
-
130
- 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).
131
-
132
- 4. Dry-parse the starter wave:
133
-
134
- ```bash
135
- node scripts/wave.mjs launch --lane main --dry-run --no-dashboard
136
- ```
137
-
138
- 5. When the wave parses cleanly, launch a single wave:
139
-
140
- ```bash
141
- node scripts/wave.mjs launch --lane main --start-wave 0 --end-wave 0 --executor codex --codex-sandbox danger-full-access
142
- ```
143
-
144
- Alternative real executors:
145
-
146
- ```bash
147
- node scripts/wave.mjs launch --lane main --start-wave 0 --end-wave 0 --executor claude
148
- node scripts/wave.mjs launch --lane main --start-wave 0 --end-wave 0 --executor opencode
149
- ```
150
-
151
- ## Documentation Map
152
-
153
- - [README.md](./README.md): package entry point, install flow, executor behavior, Context7 behavior, and command quick reference
154
- - [docs/plans/wave-orchestrator.md](./docs/plans/wave-orchestrator.md): operator runbook for launch, coordination, closure, and upgrade flow
155
- - [docs/plans/context7-wave-orchestrator.md](./docs/plans/context7-wave-orchestrator.md): Context7 setup, bundle authoring, injection order, and executor layering
156
- - [docs/plans/current-state.md](./docs/plans/current-state.md): shipped runtime and package capabilities
157
- - [docs/plans/master-plan.md](./docs/plans/master-plan.md): next priorities after the current shipped runtime
158
- - [docs/plans/migration.md](./docs/plans/migration.md): adopt this package into another repository
159
- - [docs/reference/github-packages-setup.md](./docs/reference/github-packages-setup.md): optional `.npmrc` and GitHub Packages auth details
160
- - [docs/reference/npmjs-trusted-publishing.md](./docs/reference/npmjs-trusted-publishing.md): maintainer setup for npmjs publishing through the repo workflow and `NPM_TOKEN`
161
- - [docs/reference/runtime-config/README.md](./docs/reference/runtime-config/README.md): runtime precedence, merge rules, and generated artifact paths
162
- - [docs/reference/runtime-config/codex.md](./docs/reference/runtime-config/codex.md): full Codex configuration reference
163
- - [docs/reference/runtime-config/claude.md](./docs/reference/runtime-config/claude.md): full Claude configuration reference
164
- - [docs/reference/runtime-config/opencode.md](./docs/reference/runtime-config/opencode.md): full OpenCode configuration reference
165
- - [docs/reference/migration-0.2-to-0.5.md](./docs/reference/migration-0.2-to-0.5.md): migration guide for older Wave repos
166
- - [docs/roadmap.md](./docs/roadmap.md): rationale, delivered phases, and remaining roadmap items
167
-
168
- ## Typical Harness Workflow
169
-
170
- 1. Initialize or adopt the workspace:
171
- 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.
172
-
173
- 2. Configure the repo:
174
- 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.
175
-
176
- 3. Write or revise the shared docs:
177
- Keep the shared plan docs aligned with the work you want the harness to execute.
178
-
179
- 4. Replace or revise the component cutover matrix:
180
- 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.
181
-
182
- 5. Create a wave file:
183
- 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).
184
-
185
- 6. Dry-run first:
186
-
187
- ```bash
188
46
  pnpm exec wave doctor
189
47
  pnpm exec wave launch --lane main --dry-run --no-dashboard
190
- ```
191
-
192
- 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`.
193
-
194
- 7. Inspect the seeded coordination state and generated inboxes:
195
-
196
- ```bash
197
48
  pnpm exec wave coord show --lane main --wave 0 --dry-run
198
- pnpm exec wave coord inbox --lane main --wave 0 --agent A1 --dry-run
199
- pnpm exec wave dep show --lane main --wave 0 --json
200
- ```
201
-
202
- 8. Reconcile stale state if needed:
203
-
204
- ```bash
205
- pnpm exec wave launch --lane main --reconcile-status
206
49
  ```
207
50
 
208
- 9. Check pending human feedback:
51
+ If the repo already has Wave config, plans, or waves you want to keep:
209
52
 
210
53
  ```bash
211
- pnpm exec wave feedback list --lane main --pending
54
+ pnpm exec wave init --adopt-existing
212
55
  ```
213
56
 
214
- 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.
215
58
 
216
- Cross-lane work is also explicit and operator-visible:
59
+ ## Common Commands
217
60
 
218
61
  ```bash
219
- 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
220
- pnpm exec wave dep show --lane main --wave 0 --json
221
- pnpm exec wave dep resolve --lane main --id <dependency-id> --agent A8
222
- ```
62
+ # Save project defaults and draft a new wave
63
+ pnpm exec wave project setup
64
+ pnpm exec wave draft --wave 1 --template implementation
223
65
 
224
- 10. Launch one wave at a time until the plan is stable:
225
-
226
- ```bash
66
+ # Run one wave with a real executor
227
67
  pnpm exec wave launch --lane main --start-wave 0 --end-wave 0 --executor codex --codex-sandbox danger-full-access
228
- ```
229
68
 
230
- 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
231
72
 
232
- ```bash
73
+ # Run autonomous mode after the wave set is stable
233
74
  pnpm exec wave autonomous --lane main --executor codex --codex-sandbox danger-full-access
234
75
  ```
235
76
 
236
- ## Runtime Artifacts
237
-
238
- The launcher writes runtime state under `.tmp/<lane>-wave-launcher/`:
239
-
240
- - `coordination/wave-<n>.jsonl`: append-only coordination upsert log
241
- - `assignments/wave-<n>.json`: resolved helper-assignment snapshot derived from open requests
242
- - `messageboards/wave-<n>.md`: generated board projection for humans
243
- - `inboxes/wave-<n>/`: compiled shared summary plus per-agent inboxes
244
- - `ledger/wave-<n>.json`: derived task/blocker/closure state
245
- - `integration/wave-<n>.json|md`: explicit or synthesized integration summary
246
- - `dependencies/wave-<n>.json|md`: per-wave inbound/outbound dependency snapshot
247
- - `docs-queue/wave-<n>.json`: documentation reconciliation queue
248
- - `traces/wave-<n>/attempt-<k>/`: versioned attempt bundle with run metadata, quality metrics, prompts, logs, statuses, inboxes, and structured signals
249
- - `feedback/triage/wave-<n>.jsonl|/pending-human.md`: clarification triage log plus unresolved human escalations
250
- - `prompts/`, `logs/`, `status/`, `executors/`, and `context7-cache/`: run artifacts, overlays, and cached external-doc snippets
251
-
252
- `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.
253
-
254
- ## Trace And Replay
255
-
256
- - `--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/`.
257
- - `--dry-run` does not write `attempt-<k>` trace snapshots. The `traces/` directory may exist in dry-run state, but it should remain file-empty.
258
- - Real attempts write a full hermetic `traceVersion: 2` bundle under `.tmp/<lane>-wave-launcher/traces/wave-<n>/attempt-<k>/`.
259
- - `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`.
260
- - `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.
261
- - 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.
262
- - `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.
263
- - 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.
264
- - Legacy `traceVersion: 1` bundles are still accepted in best-effort mode with explicit warnings. They are not treated as fully hermetic.
265
- - 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.
266
-
267
- ## Wave File Shape
268
-
269
- Each wave is regular markdown. The harness looks for:
270
-
271
- - `## Component promotions`
272
- - `## Context7 defaults`
273
- - `## Agent <id>: <title>`
274
- - `### Executor`
275
- - `### Role prompts`
276
- - `### Context7`
277
- - `### Components`
278
- - `### Capabilities`
279
- - `### Deliverables`
280
- - `### Exit contract`
281
- - `### Prompt`
282
-
283
- Under the starter config in this repo, wave 0 and later also require:
284
-
285
- - `A0` as the evaluator
286
- - `A8` as the integration steward
287
- - `A9` as the documentation steward
288
-
289
- Optional standing roles are also available for infra- or rollout-heavy waves:
290
-
291
- - `docs/agents/wave-infra-role.md`
292
- - `docs/agents/wave-deploy-verifier-role.md`
293
-
294
- 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:
295
-
296
- ````md
297
- # Wave 1 - Example
298
-
299
- ## Component promotions
300
-
301
- - wave-parser-and-launcher: repo-landed
302
-
303
- ## Context7 defaults
304
-
305
- - bundle: node-typescript
306
- - query: "Node process spawning and vitest usage"
307
-
308
- ## Agent A0: Running Evaluator
309
-
310
- ### Role prompts
311
-
312
- - docs/agents/wave-evaluator-role.md
313
-
314
- ### Context7
315
-
316
- - bundle: none
317
-
318
- ### Prompt
319
- ```text
320
- Read docs/reference/repository-guidance.md.
321
- Read docs/research/agent-context-sources.md.
322
-
323
- File ownership (only touch these paths):
324
- - docs/plans/waves/reviews/wave-1-evaluator.md
325
- ```
326
-
327
- ## Agent A1: Runtime Work
328
-
329
- ### Executor
330
-
331
- - id: claude
332
- - model: claude-sonnet-4-6
333
- - claude.max_turns: 4
334
-
335
- ### Context7
336
-
337
- - bundle: node-typescript
338
- - query: "Node child_process and test execution"
339
-
340
- ### Components
341
-
342
- - wave-parser-and-launcher
343
-
344
- ### Capabilities
345
-
346
- - runtime
347
- - validation
348
-
349
- ### Exit contract
350
-
351
- - completion: integrated
352
- - durability: none
353
- - proof: integration
354
- - doc-impact: owned
355
-
356
- ### Deliverables
357
-
358
- - src/example.ts
359
- - test/example.test.ts
360
-
361
- ### Prompt
362
- ```text
363
- Read docs/reference/repository-guidance.md.
364
- Read docs/research/agent-context-sources.md.
365
-
366
- File ownership (only touch these paths):
367
- - src/example.ts
368
- - test/example.test.ts
369
- ```
370
- ````
371
-
372
- `## Component promotions` declares the component levels this wave is responsible for proving. `### Components` assigns each promoted component to one or more implementation agents.
373
-
374
- `### Capabilities` is optional. It lets the coordination layer route targeted follow-up work to a capability rather than a single hard-coded agent.
375
-
376
- `### 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.
377
-
378
- 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.
379
-
380
- 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.
381
-
382
- `### Executor` is optional. Resolution order is:
383
-
384
- - per-agent `### Executor`
385
- - selected executor profile id
386
- - lane role default
387
- - launcher `--executor`
388
- - `wave.config.json` `executors.default`
389
-
390
- Common keys:
391
-
392
- - `id`
393
- - `profile`
394
- - `model`
395
- - `fallbacks`
396
- - `tags`
397
- - `budget.turns`
398
- - `budget.minutes`
399
-
400
- The full supported runtime surface lives in:
401
-
402
- - [docs/reference/runtime-config/README.md](./docs/reference/runtime-config/README.md)
403
- - [docs/reference/runtime-config/codex.md](./docs/reference/runtime-config/codex.md)
404
- - [docs/reference/runtime-config/claude.md](./docs/reference/runtime-config/claude.md)
405
- - [docs/reference/runtime-config/opencode.md](./docs/reference/runtime-config/opencode.md)
406
-
407
- Example runtime blocks:
408
-
409
- ````md
410
- ### Executor
411
-
412
- - id: codex
413
- - model: gpt-5-codex
414
- - codex.profile_name: review
415
- - codex.config: model_reasoning_effort=high
416
- - codex.search: true
417
- - codex.json: true
418
- ````
419
-
420
- ````md
421
- ### Executor
422
-
423
- - id: claude
424
- - model: claude-sonnet-4-6
425
- - claude.settings_json: {"permissions":{"allow":["Read"]}}
426
- - claude.hooks_json: {"Stop":[{"command":"echo stop"}]}
427
- - claude.allowed_http_hook_urls: https://example.com/hooks
428
- ````
429
-
430
- ````md
431
- ### Executor
432
-
433
- - id: opencode
434
- - opencode.files: README.md,docs/plans/current-state.md
435
- - opencode.config_json: {"instructions":["Keep shared-plan edits concise."]}
436
- ````
437
-
438
- When an implementation agent owns components, it must emit:
439
-
440
- ```text
441
- [wave-component] component=<id> level=<level> state=<met|gap> detail=<short-note>
442
- ```
443
-
444
- The launcher will not accept final completion until every promoted component has at least one matching `state=met` proof marker at the declared level.
445
-
446
- ## Executor Behavior
447
-
448
- - `codex`
449
- 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.
450
- - `claude`
451
- 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"`.
452
- - `opencode`
453
- 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.
454
- - `local`
455
- Smoke-test only. It creates placeholder deliverables and emits the expected Wave markers, but it is not a real agent runtime.
456
-
457
- The run-level default executor comes from `wave.config.json`:
458
-
459
- ```json
460
- {
461
- "executors": {
462
- "default": "codex",
463
- "codex": {
464
- "command": "codex",
465
- "sandbox": "danger-full-access"
466
- },
467
- "claude": {
468
- "command": "claude",
469
- "appendSystemPromptMode": "append",
470
- "outputFormat": "text"
471
- },
472
- "opencode": {
473
- "command": "opencode",
474
- "format": "default"
475
- }
476
- }
477
- }
478
- ```
479
-
480
- 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.
481
-
482
- ## Context7 Setup
483
-
484
- 1. Add `CONTEXT7_API_KEY` to `.env.local` at repo root.
485
-
486
- 2. Export it into your shell or run commands through the helper:
487
-
488
- ```bash
489
- source scripts/context7-export-env.sh
490
- ```
491
-
492
- or
493
-
494
- ```bash
495
- bash scripts/context7-export-env.sh run pnpm context7:api-check
496
- ```
497
-
498
- 3. Verify the API key works:
77
+ ## Develop This Package
499
78
 
500
79
  ```bash
501
- pnpm context7:api-check
80
+ pnpm install
81
+ pnpm test
82
+ node scripts/wave.mjs launch --lane main --dry-run --no-dashboard
502
83
  ```
503
84
 
504
- 4. Define or trim bundles in [docs/context7/bundles.json](./docs/context7/bundles.json).
505
-
506
- 5. Declare scope in the wave file:
507
- 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.
508
-
509
- ## How Context7 Works In The Harness
85
+ ## Learn More
510
86
 
511
- - The launcher resolves Context7 scope in this order: agent `### Context7`, wave `## Context7 defaults`, lane default, then `none`.
512
- - If a bundle is active, the launcher prefetches third-party snippets before starting the agent.
513
- - The generated agent prompt includes a `Context7 scope for this run` block that lists:
514
- the bundle id, query focus, allowed libraries, and any prefetched non-canonical snippets.
515
- - Prefetched text is included before the assigned implementation prompt, regardless of executor.
516
- - Cache output is written under `.tmp/<lane>-wave-launcher/context7-cache/`.
517
- - Executor runtime overlays are written under `.tmp/<lane>-wave-launcher/executors/`.
518
- - Missing API keys or Context7 API failures do not block the wave; the launcher fails open and starts the agent without the prefetched snippets.
519
- - You can disable injection for a run with `--no-context7`.
520
-
521
- Layering by executor:
522
-
523
- - `codex`: repository rules + generated task prompt with injected Context7 block
524
- - `claude`: repository `CLAUDE.md` / Claude settings + harness append-system-prompt overlay + generated task prompt with injected Context7 block
525
- - `opencode`: repository `AGENTS.md` / project `opencode.json` + harness runtime `OPENCODE_CONFIG` overlay + generated task prompt with injected Context7 block
526
-
527
- ## Useful Commands
528
-
529
- ```bash
530
- pnpm exec wave init
531
- pnpm exec wave init --adopt-existing
532
- pnpm exec wave doctor
533
- pnpm exec wave launch --lane main --dry-run --no-dashboard
534
- pnpm exec wave coord show --lane main --wave 0 --dry-run --json
535
- pnpm exec wave coord inbox --lane main --wave 0 --agent A1 --dry-run
536
- pnpm exec wave coord render --lane main --wave 0 --dry-run
537
- pnpm exec wave coord post --lane main --wave 0 --agent A1 --kind blocker --summary "Need repository decision"
538
- pnpm exec wave launch --lane main --reconcile-status
539
- pnpm exec wave launch --lane main --start-wave 2 --end-wave 2 --executor codex --codex-sandbox danger-full-access
540
- pnpm exec wave launch --lane main --start-wave 2 --end-wave 2 --executor claude
541
- pnpm exec wave launch --lane main --start-wave 2 --end-wave 2 --executor opencode
542
- pnpm exec wave launch --lane main --auto-next --executor codex --codex-sandbox danger-full-access
543
- pnpm exec wave feedback list --lane main --pending
544
- pnpm exec wave feedback show --id <request-id>
545
- pnpm exec wave feedback respond --id <request-id> --response "..." --operator "<name>"
546
- pnpm exec wave autonomous --lane main --executor codex --codex-sandbox danger-full-access
547
- pnpm exec wave autonomous --lane main --executor claude
548
- pnpm exec wave autonomous --lane main --executor opencode
549
- pnpm exec wave upgrade
550
- pnpm exec wave changelog --since-installed
551
- ```
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
552
97
 
553
98
  ## Research Sources
554
99
 
555
- 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)
556
102
 
103
+ Key external sources:
557
104
  - [Effective harnesses for long-running agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents)
558
105
  - [Harness engineering: leveraging Codex in an agent-first world](https://openai.com/index/harness-engineering/)
559
106
  - [Unlocking the Codex harness: how we built the App Server](https://openai.com/index/unlocking-the-codex-harness/)