@chllming/wave-orchestration 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/CHANGELOG.md +53 -3
  2. package/README.md +81 -506
  3. package/docs/README.md +53 -0
  4. package/docs/agents/wave-cont-eval-role.md +36 -0
  5. package/docs/agents/{wave-evaluator-role.md → wave-cont-qa-role.md} +14 -11
  6. package/docs/agents/wave-documentation-role.md +1 -1
  7. package/docs/agents/wave-infra-role.md +1 -1
  8. package/docs/agents/wave-integration-role.md +3 -3
  9. package/docs/agents/wave-launcher-role.md +4 -3
  10. package/docs/agents/wave-security-role.md +40 -0
  11. package/docs/concepts/context7-vs-skills.md +94 -0
  12. package/docs/concepts/operating-modes.md +91 -0
  13. package/docs/concepts/runtime-agnostic-orchestration.md +95 -0
  14. package/docs/concepts/what-is-a-wave.md +183 -0
  15. package/docs/evals/README.md +166 -0
  16. package/docs/evals/benchmark-catalog.json +663 -0
  17. package/docs/guides/author-and-run-waves.md +135 -0
  18. package/docs/guides/planner.md +118 -0
  19. package/docs/guides/terminal-surfaces.md +82 -0
  20. package/docs/image.png +0 -0
  21. package/docs/plans/component-cutover-matrix.json +1 -1
  22. package/docs/plans/component-cutover-matrix.md +1 -1
  23. package/docs/plans/context7-wave-orchestrator.md +2 -0
  24. package/docs/plans/current-state.md +29 -1
  25. package/docs/plans/examples/wave-example-live-proof.md +435 -0
  26. package/docs/plans/master-plan.md +3 -3
  27. package/docs/plans/migration.md +46 -3
  28. package/docs/plans/wave-orchestrator.md +71 -8
  29. package/docs/plans/waves/wave-0.md +4 -4
  30. package/docs/reference/live-proof-waves.md +177 -0
  31. package/docs/reference/migration-0.2-to-0.5.md +26 -19
  32. package/docs/reference/npmjs-trusted-publishing.md +6 -5
  33. package/docs/reference/runtime-config/README.md +29 -0
  34. package/docs/reference/sample-waves.md +87 -0
  35. package/docs/reference/skills.md +224 -0
  36. package/docs/research/agent-context-sources.md +130 -11
  37. package/docs/research/coordination-failure-review.md +266 -0
  38. package/docs/roadmap.md +164 -564
  39. package/package.json +3 -2
  40. package/releases/manifest.json +37 -2
  41. package/scripts/research/agent-context-archive.mjs +83 -1
  42. package/scripts/research/manifests/agent-context-expanded-2026-03-22.mjs +811 -0
  43. package/scripts/wave-orchestrator/adhoc.mjs +1331 -0
  44. package/scripts/wave-orchestrator/agent-state.mjs +358 -6
  45. package/scripts/wave-orchestrator/artifact-schemas.mjs +173 -0
  46. package/scripts/wave-orchestrator/clarification-triage.mjs +10 -3
  47. package/scripts/wave-orchestrator/config.mjs +65 -12
  48. package/scripts/wave-orchestrator/context7.mjs +11 -0
  49. package/scripts/wave-orchestrator/coord-cli.mjs +51 -19
  50. package/scripts/wave-orchestrator/coordination-store.mjs +26 -4
  51. package/scripts/wave-orchestrator/coordination.mjs +99 -9
  52. package/scripts/wave-orchestrator/dashboard-state.mjs +20 -8
  53. package/scripts/wave-orchestrator/dep-cli.mjs +5 -2
  54. package/scripts/wave-orchestrator/docs-queue.mjs +8 -2
  55. package/scripts/wave-orchestrator/evals.mjs +451 -0
  56. package/scripts/wave-orchestrator/executors.mjs +24 -11
  57. package/scripts/wave-orchestrator/feedback.mjs +15 -1
  58. package/scripts/wave-orchestrator/install.mjs +69 -7
  59. package/scripts/wave-orchestrator/launcher-closure.mjs +281 -0
  60. package/scripts/wave-orchestrator/launcher-runtime.mjs +334 -0
  61. package/scripts/wave-orchestrator/launcher.mjs +778 -577
  62. package/scripts/wave-orchestrator/ledger.mjs +123 -20
  63. package/scripts/wave-orchestrator/local-executor.mjs +99 -12
  64. package/scripts/wave-orchestrator/planner.mjs +1463 -0
  65. package/scripts/wave-orchestrator/project-profile.mjs +190 -0
  66. package/scripts/wave-orchestrator/replay.mjs +6 -3
  67. package/scripts/wave-orchestrator/role-helpers.mjs +84 -0
  68. package/scripts/wave-orchestrator/shared.mjs +77 -11
  69. package/scripts/wave-orchestrator/skills.mjs +979 -0
  70. package/scripts/wave-orchestrator/terminals.mjs +16 -0
  71. package/scripts/wave-orchestrator/traces.mjs +73 -27
  72. package/scripts/wave-orchestrator/wave-files.mjs +1224 -163
  73. package/scripts/wave.mjs +20 -0
  74. package/skills/README.md +202 -0
  75. package/skills/provider-aws/SKILL.md +117 -0
  76. package/skills/provider-aws/adapters/claude.md +1 -0
  77. package/skills/provider-aws/adapters/codex.md +1 -0
  78. package/skills/provider-aws/references/service-verification.md +39 -0
  79. package/skills/provider-aws/skill.json +54 -0
  80. package/skills/provider-custom-deploy/SKILL.md +64 -0
  81. package/skills/provider-custom-deploy/skill.json +50 -0
  82. package/skills/provider-docker-compose/SKILL.md +96 -0
  83. package/skills/provider-docker-compose/adapters/local.md +1 -0
  84. package/skills/provider-docker-compose/skill.json +53 -0
  85. package/skills/provider-github-release/SKILL.md +121 -0
  86. package/skills/provider-github-release/adapters/claude.md +1 -0
  87. package/skills/provider-github-release/adapters/codex.md +1 -0
  88. package/skills/provider-github-release/skill.json +55 -0
  89. package/skills/provider-kubernetes/SKILL.md +143 -0
  90. package/skills/provider-kubernetes/adapters/claude.md +1 -0
  91. package/skills/provider-kubernetes/adapters/codex.md +1 -0
  92. package/skills/provider-kubernetes/references/kubectl-patterns.md +58 -0
  93. package/skills/provider-kubernetes/skill.json +52 -0
  94. package/skills/provider-railway/SKILL.md +123 -0
  95. package/skills/provider-railway/adapters/claude.md +1 -0
  96. package/skills/provider-railway/adapters/codex.md +1 -0
  97. package/skills/provider-railway/adapters/local.md +1 -0
  98. package/skills/provider-railway/adapters/opencode.md +1 -0
  99. package/skills/provider-railway/references/verification-commands.md +39 -0
  100. package/skills/provider-railway/skill.json +71 -0
  101. package/skills/provider-ssh-manual/SKILL.md +97 -0
  102. package/skills/provider-ssh-manual/skill.json +54 -0
  103. package/skills/repo-coding-rules/SKILL.md +91 -0
  104. package/skills/repo-coding-rules/skill.json +34 -0
  105. package/skills/role-cont-eval/SKILL.md +90 -0
  106. package/skills/role-cont-eval/adapters/codex.md +1 -0
  107. package/skills/role-cont-eval/skill.json +36 -0
  108. package/skills/role-cont-qa/SKILL.md +93 -0
  109. package/skills/role-cont-qa/adapters/claude.md +1 -0
  110. package/skills/role-cont-qa/skill.json +36 -0
  111. package/skills/role-deploy/SKILL.md +96 -0
  112. package/skills/role-deploy/skill.json +36 -0
  113. package/skills/role-documentation/SKILL.md +72 -0
  114. package/skills/role-documentation/skill.json +36 -0
  115. package/skills/role-implementation/SKILL.md +68 -0
  116. package/skills/role-implementation/skill.json +36 -0
  117. package/skills/role-infra/SKILL.md +80 -0
  118. package/skills/role-infra/skill.json +36 -0
  119. package/skills/role-integration/SKILL.md +84 -0
  120. package/skills/role-integration/skill.json +36 -0
  121. package/skills/role-research/SKILL.md +64 -0
  122. package/skills/role-research/skill.json +36 -0
  123. package/skills/role-security/SKILL.md +60 -0
  124. package/skills/role-security/skill.json +36 -0
  125. package/skills/runtime-claude/SKILL.md +65 -0
  126. package/skills/runtime-claude/skill.json +36 -0
  127. package/skills/runtime-codex/SKILL.md +57 -0
  128. package/skills/runtime-codex/skill.json +36 -0
  129. package/skills/runtime-local/SKILL.md +44 -0
  130. package/skills/runtime-local/skill.json +36 -0
  131. package/skills/runtime-opencode/SKILL.md +57 -0
  132. package/skills/runtime-opencode/skill.json +36 -0
  133. package/skills/wave-core/SKILL.md +114 -0
  134. package/skills/wave-core/references/marker-syntax.md +62 -0
  135. package/skills/wave-core/skill.json +35 -0
  136. package/wave.config.json +61 -5
package/README.md CHANGED
@@ -1,568 +1,143 @@
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: optional `cont-EVAL` (`E0`), integration (`A8`), documentation (`A9`), and `cont-QA` (`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
18
-
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.
25
-
26
- Install from npmjs:
27
-
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:
13
+ ## Features
37
14
 
38
- ```bash
39
- pnpm exec wave init --adopt-existing
40
- ```
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
41
24
 
42
- ## New In 0.5.3
25
+ ## Example Output
43
26
 
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.
27
+ Representative rolling message board output from a real wave run:
47
28
 
48
- ## New In 0.5.2
29
+ <img src="./docs/image.png" alt="Example rolling message board output showing claims, evidence, requests, and cont-QA closure for a wave run" width="100%" />
49
30
 
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.
31
+ ## Quick Start
54
32
 
55
- ## New In 0.5.1
33
+ Current release:
56
34
 
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`.
35
+ - `@chllming/wave-orchestration@0.6.0`
36
+ - Release tag: [`v0.6.0`](https://github.com/chllming/wave-orchestration/releases/tag/v0.6.0)
37
+ - Public install path: npmjs
38
+ - Authenticated fallback: GitHub Packages
61
39
 
62
- ## New In 0.5.0
40
+ Highlights in `0.6.0`:
63
41
 
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.
42
+ - `cont-EVAL` (`E0`) is now a first-class optional eval stage before integration, separate from final `cont-QA` closure.
43
+ - Optional security review now has a dedicated role, report path, and `[wave-security]` closure marker.
44
+ - `wave adhoc plan|run|show|promote` now supports transient operator requests on the same launcher substrate.
45
+ - Starter docs and skills now cover the current `0.6.0` closure, benchmark, security, and provider surfaces.
68
46
 
69
- ## Requirements
47
+ Requirements:
70
48
 
71
49
  - Node.js 22+
72
50
  - `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
51
+ - `tmux` on `PATH` for dashboarded runs
52
+ - at least one executor on `PATH`: `codex`, `claude`, or `opencode`
53
+ - optional: `CONTEXT7_API_KEY` for launcher-side prefetch
78
54
 
79
- 1. Install the package from npmjs:
55
+ Install into another repo:
80
56
 
81
57
  ```bash
82
58
  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
59
  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
60
  pnpm exec wave doctor
189
61
  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
62
  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
63
  ```
207
64
 
208
- 9. Check pending human feedback:
65
+ If the repo already has Wave config, plans, or waves you want to keep:
209
66
 
210
67
  ```bash
211
- pnpm exec wave feedback list --lane main --pending
68
+ pnpm exec wave init --adopt-existing
212
69
  ```
213
70
 
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.
71
+ 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.
215
72
 
216
- Cross-lane work is also explicit and operator-visible:
73
+ ## Common Commands
217
74
 
218
75
  ```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
- ```
223
-
224
- 10. Launch one wave at a time until the plan is stable:
76
+ # Save project defaults and draft a new wave
77
+ pnpm exec wave project setup
78
+ pnpm exec wave draft --wave 1 --template implementation
225
79
 
226
- ```bash
80
+ # Run one wave with a real executor
227
81
  pnpm exec wave launch --lane main --start-wave 0 --end-wave 0 --executor codex --codex-sandbox danger-full-access
228
- ```
229
82
 
230
- 11. Use autonomous mode only after the wave set is already solid:
83
+ # Inspect operator surfaces
84
+ pnpm exec wave feedback list --lane main --pending
85
+ pnpm exec wave dep show --lane main --wave 0 --json
231
86
 
232
- ```bash
87
+ # Run autonomous mode after the wave set is stable
233
88
  pnpm exec wave autonomous --lane main --executor codex --codex-sandbox danger-full-access
234
89
  ```
235
90
 
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:
91
+ ## Develop This Package
499
92
 
500
93
  ```bash
501
- pnpm context7:api-check
94
+ pnpm install
95
+ pnpm test
96
+ node scripts/wave.mjs launch --lane main --dry-run --no-dashboard
502
97
  ```
503
98
 
504
- 4. Define or trim bundles in [docs/context7/bundles.json](./docs/context7/bundles.json).
99
+ ## Learn More
505
100
 
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
510
-
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
- ```
101
+ - [docs/README.md](./docs/README.md): docs map and suggested structure
102
+ - [docs/concepts/what-is-a-wave.md](./docs/concepts/what-is-a-wave.md): wave anatomy, lifecycle, and closure model
103
+ - [docs/guides/planner.md](./docs/guides/planner.md): `wave project` and `wave draft` workflow
104
+ - [docs/concepts/context7-vs-skills.md](./docs/concepts/context7-vs-skills.md): when to use external docs vs repo-owned skills
105
+ - [docs/guides/terminal-surfaces.md](./docs/guides/terminal-surfaces.md): tmux, VS Code terminal registry, and dry-run surfaces
106
+ - [docs/plans/wave-orchestrator.md](./docs/plans/wave-orchestrator.md): operator runbook
107
+ - [docs/plans/context7-wave-orchestrator.md](./docs/plans/context7-wave-orchestrator.md): Context7 setup and bundle authoring
108
+ - [docs/reference/runtime-config/README.md](./docs/reference/runtime-config/README.md): executor, runtime, and skill-projection configuration
109
+ - [docs/reference/skills.md](./docs/reference/skills.md): skill bundle format, resolution order, and runtime projection
110
+ - [CHANGELOG.md](./CHANGELOG.md): release history
552
111
 
553
112
  ## Research Sources
554
113
 
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/`.
114
+ Canonical source index:
115
+ - [docs/research/agent-context-sources.md](./docs/research/agent-context-sources.md)
116
+
117
+ The implementation is based on the following research:
556
118
 
119
+ **Harness and Runtime Surfaces**
557
120
  - [Effective harnesses for long-running agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents)
558
121
  - [Harness engineering: leveraging Codex in an agent-first world](https://openai.com/index/harness-engineering/)
559
122
  - [Unlocking the Codex harness: how we built the App Server](https://openai.com/index/unlocking-the-codex-harness/)
560
123
  - [Building Effective AI Coding Agents for the Terminal: Scaffolding, Harness, Context Engineering, and Lessons Learned](https://arxiv.org/abs/2603.05344)
561
124
  - [VeRO: An Evaluation Harness for Agents to Optimize Agents](https://arxiv.org/abs/2602.22480)
562
125
  - [EvoClaw: Evaluating AI Agents on Continuous Software Evolution](https://arxiv.org/abs/2603.13428)
126
+ - [Verified Multi-Agent Orchestration: A Plan-Execute-Verify-Replan Framework for Complex Query Resolution](https://arxiv.org/abs/2603.11445)
127
+ - [Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models](https://arxiv.org/abs/2510.04618)
128
+
129
+ **Shared Coordination and Closure**
563
130
  - [LLM-Based Multi-Agent Blackboard System for Information Discovery in Data Science](https://arxiv.org/abs/2510.01285)
564
131
  - [Exploring Advanced LLM Multi-Agent Systems Based on Blackboard Architecture](https://arxiv.org/abs/2507.01701)
565
132
  - [DOVA: Deliberation-First Multi-Agent Orchestration for Autonomous Research Automation](https://arxiv.org/abs/2603.13327)
133
+ - [Why Do Multi-Agent LLM Systems Fail?](https://arxiv.org/abs/2503.13657)
566
134
  - [Silo-Bench: A Scalable Environment for Evaluating Distributed Coordination in Multi-Agent LLM Systems](https://arxiv.org/abs/2603.01045)
567
- - [SYMPHONY: Synergistic Multi-agent Planning with Heterogeneous Language Model Assembly](https://arxiv.org/abs/2601.22623)
568
135
  - [An Open Agent Architecture](https://cdn.aaai.org/Symposia/Spring/1994/SS-94-03/SS94-03-001.pdf)
136
+
137
+ **Skills, Repo Context, and Reusable Operating Knowledge**
138
+ - [SoK: Agentic Skills -- Beyond Tool Use in LLM Agents](https://arxiv.org/abs/2602.20867)
139
+ - [Agent Skills for Large Language Models: Architecture, Acquisition, Security, and the Path Forward](https://arxiv.org/abs/2602.12430)
140
+ - [SkillsBench: Benchmarking How Well Agent Skills Work Across Diverse Tasks](https://arxiv.org/abs/2602.12670)
141
+ - [Agent Workflow Memory](https://arxiv.org/abs/2409.07429)
142
+ - [Agent READMEs: An Empirical Study of Context Files for Agentic Coding](https://arxiv.org/abs/2511.12884)
143
+ - [Context Engineering for AI Agents in Open-Source Software](https://arxiv.org/abs/2510.21413)