@chllming/wave-orchestration 0.8.4 → 0.8.6

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 (60) hide show
  1. package/CHANGELOG.md +41 -1
  2. package/README.md +31 -13
  3. package/docs/README.md +4 -0
  4. package/docs/agents/wave-design-role.md +47 -0
  5. package/docs/concepts/what-is-a-wave.md +11 -7
  6. package/docs/context7/bundles.json +19 -20
  7. package/docs/context7/planner-agent/README.md +4 -1
  8. package/docs/guides/author-and-run-waves.md +27 -0
  9. package/docs/guides/planner.md +46 -0
  10. package/docs/guides/signal-wrappers.md +165 -0
  11. package/docs/guides/terminal-surfaces.md +13 -0
  12. package/docs/plans/context7-wave-orchestrator.md +24 -7
  13. package/docs/plans/current-state.md +10 -2
  14. package/docs/plans/end-state-architecture.md +22 -5
  15. package/docs/plans/examples/wave-example-design-handoff.md +262 -0
  16. package/docs/plans/examples/wave-example-live-proof.md +1 -1
  17. package/docs/plans/migration.md +301 -75
  18. package/docs/plans/wave-orchestrator.md +16 -3
  19. package/docs/reference/cli-reference.md +22 -1
  20. package/docs/reference/npmjs-trusted-publishing.md +2 -2
  21. package/docs/reference/sample-waves.md +14 -7
  22. package/docs/reference/skills.md +18 -0
  23. package/docs/reference/wave-control.md +2 -0
  24. package/package.json +1 -1
  25. package/releases/manifest.json +38 -0
  26. package/scripts/context7-api-check.sh +57 -13
  27. package/scripts/wave-orchestrator/agent-state.mjs +64 -0
  28. package/scripts/wave-orchestrator/config.mjs +5 -0
  29. package/scripts/wave-orchestrator/control-cli.mjs +19 -0
  30. package/scripts/wave-orchestrator/coordination.mjs +77 -1
  31. package/scripts/wave-orchestrator/gate-engine.mjs +106 -2
  32. package/scripts/wave-orchestrator/install.mjs +5 -0
  33. package/scripts/wave-orchestrator/launcher-runtime.mjs +18 -1
  34. package/scripts/wave-orchestrator/launcher.mjs +75 -1
  35. package/scripts/wave-orchestrator/ledger.mjs +56 -27
  36. package/scripts/wave-orchestrator/local-executor.mjs +37 -0
  37. package/scripts/wave-orchestrator/planner.mjs +24 -4
  38. package/scripts/wave-orchestrator/result-envelope.mjs +32 -1
  39. package/scripts/wave-orchestrator/retry-control.mjs +17 -2
  40. package/scripts/wave-orchestrator/retry-engine.mjs +85 -0
  41. package/scripts/wave-orchestrator/role-helpers.mjs +73 -1
  42. package/scripts/wave-orchestrator/session-supervisor.mjs +113 -0
  43. package/scripts/wave-orchestrator/shared.mjs +2 -0
  44. package/scripts/wave-orchestrator/signals.mjs +681 -0
  45. package/scripts/wave-orchestrator/skills.mjs +1 -0
  46. package/scripts/wave-orchestrator/task-entity.mjs +65 -45
  47. package/scripts/wave-orchestrator/wave-control-schema.mjs +2 -0
  48. package/scripts/wave-orchestrator/wave-files.mjs +85 -1
  49. package/scripts/wave-orchestrator/wave-state-reducer.mjs +24 -7
  50. package/scripts/wave-status.sh +200 -0
  51. package/scripts/wave-watch.sh +200 -0
  52. package/skills/README.md +10 -0
  53. package/skills/role-design/SKILL.md +50 -0
  54. package/skills/role-design/skill.json +36 -0
  55. package/skills/signal-hygiene/SKILL.md +51 -0
  56. package/skills/signal-hygiene/skill.json +20 -0
  57. package/skills/tui-design/SKILL.md +77 -0
  58. package/skills/tui-design/references/tui-design.md +259 -0
  59. package/skills/tui-design/skill.json +36 -0
  60. package/wave.config.json +15 -1
@@ -1,157 +1,369 @@
1
1
  # Migration
2
2
 
3
- This page is the operator-facing upgrade guide for adopting repos. It explains how to move from older Wave package versions onto the current `0.8.4` surface without guessing which files are package-owned, which files are repo-owned, and which validations to trust after the bump.
3
+ This page is the practical repo-upgrade guide for the current `0.8.6` surface.
4
4
 
5
- For the completed internal architecture cutover record, see [architecture-hardening-migration.md](./architecture-hardening-migration.md). That document is historical. This one is the practical repo-upgrade checklist.
5
+ Use it when you are:
6
6
 
7
- ## What `0.8.4` Changes
7
+ - adopting Wave in a repo that already has local prompts, docs, or skills
8
+ - upgrading from an older package release
9
+ - deciding which files to sync from the starter surface and which files to leave repo-owned
8
10
 
9
- `0.8.4` is a hardening release, not a new authoring model.
11
+ For the completed internal architecture cutover record, see [architecture-hardening-migration.md](./architecture-hardening-migration.md). That document is historical. This one is the operator-facing upgrade checklist.
10
12
 
11
- - contradiction replay no longer depends on component-matrix parsing when the trace does not declare promoted components
12
- - `requireComponentPromotionsFromWave` now disables both component-promotion proof blocking and component-matrix current-level blocking before the configured threshold
13
- - `projection-writer.mjs` is now the single persistence layer for projection outputs, while `derived-state-engine.mjs` computes those payloads without persisting them directly
14
- - starter docs, release notes, README, and publishing guidance now describe the shipped runtime instead of transitional architecture claims
13
+ ## What `0.8.6` Changes
15
14
 
16
- There are no new CLI flags or wave-file section requirements in `0.8.4`.
15
+ `0.8.6` keeps the `0.8.5` design-role surface and adds a new signal-driven operator and long-running-agent model.
16
+
17
+ The biggest additions are:
18
+
19
+ - the optional `design` worker role remains part of the published package surface
20
+ - starter design bundles still ship in `docs/agents/wave-design-role.md`, `skills/role-design/`, and `skills/tui-design/`
21
+ - starter signal bundles now also ship in `skills/signal-hygiene/`, `scripts/wave-status.sh`, and `scripts/wave-watch.sh`
22
+ - long-running agents and resident orchestrators now receive prompt-visible signal-state and signal-ack paths
23
+ - canonical versioned wave and agent signal snapshots now live under `.tmp/<lane>-wave-launcher/signals/`
24
+ - wrapper and signal semantics now treat `completed` and `failed` as truly terminal, with wrapper exit `40` for failed terminal state
25
+
26
+ There are no new top-level CLI commands for `0.8.6`. The wrapper scripts are starter utilities layered over `wave control status --json`, not a new top-level CLI family.
17
27
 
18
28
  ## Upgrade Contract
19
29
 
20
- - `pnpm up @chllming/wave-orchestration` updates the runtime in `node_modules`.
30
+ - `pnpm up @chllming/wave-orchestration` updates the installed runtime.
21
31
  - `pnpm exec wave upgrade` writes `.wave/install-state.json` and `.wave/upgrade-history/*` only.
22
- - `wave upgrade` does not rewrite repo-owned `wave.config.json`, `docs/agents/*`, `docs/plans/waves/*`, `skills/*`, `docs/context7/*`, or repo-specific reference docs.
23
- - `.tmp/<lane>-wave-launcher/` is runtime state, not migration source of truth. Do not treat old generated artifacts as the thing to preserve.
32
+ - `wave upgrade` does not rewrite repo-owned `wave.config.json`, `docs/agents/*`, `docs/plans/waves/*`, `skills/*`, `docs/context7/*`, or local runbooks.
33
+ - `.tmp/<lane>-wave-launcher/` is runtime state, not migration source of truth. Do not preserve old generated artifacts as if they were authored configuration.
24
34
 
25
- ## Default Adoption Path
35
+ ## Package-Owned vs Repo-Owned
26
36
 
27
- Use this when the repo is not already running Wave or you are replacing a very old local starter copy.
37
+ Treat these as package-owned starter surface unless your repo intentionally copied and now maintains them:
28
38
 
29
- 1. Install the package from npmjs with `pnpm add -D @chllming/wave-orchestration`.
30
- 2. For a fresh repo, run `pnpm exec wave init`.
31
- 3. For a repo that already owns Wave config, docs, or waves, run `pnpm exec wave init --adopt-existing`.
32
- 4. Review `wave.config.json` for docs roots, roles, validation thresholds, executor defaults, skill attachments, Context7 bundles, and component-cutover matrix paths.
33
- 5. Replace starter sample plans, starter skills, and starter prompts with repo-owned versions where needed.
34
- 6. Run the validation checklist in this doc before the first live launcher run.
39
+ - `docs/agents/*.md`
40
+ - `skills/*`
41
+ - `scripts/wave-status.sh`
42
+ - `scripts/wave-watch.sh`
43
+ - `docs/guides/signal-wrappers.md`
44
+ - `docs/plans/current-state.md`
45
+ - `docs/plans/end-state-architecture.md`
46
+ - `docs/plans/wave-orchestrator.md`
47
+ - `docs/plans/migration.md`
48
+ - `docs/reference/*`
49
+ - `docs/context7/planner-agent/*`
35
50
 
36
- GitHub Packages remains an authenticated fallback install path, but npmjs is the default public distribution channel.
51
+ Treat these as repo-owned operational surface:
37
52
 
38
- ## Safe Upgrade Flow For Any Existing Repo
53
+ - `wave.config.json`
54
+ - `docs/plans/waves/*.md`
55
+ - `docs/plans/waves/specs/*.json`
56
+ - repo-specific prompts, internal runbooks, and policy docs
57
+ - repository source code and deployment config
39
58
 
40
- Use this flow before the version-specific sections below.
59
+ If your repo never copied a starter file, do not invent migration work for it. The installed package already ships the runtime behavior.
41
60
 
42
- ### 1. Upgrade When The Lane Is Idle
61
+ ## Safe Upgrade Flow For Any Existing Repo
62
+
63
+ ### 1. Upgrade when the lane is idle
43
64
 
44
65
  - Prefer upgrading between waves, not mid-attempt.
45
66
  - If a lane still has running sessions, finish or intentionally stop that attempt before changing package versions.
46
- - If a repo is stranded after a prior crash, inspect `wave control status` first, then decide whether to relaunch or reconcile on the upgraded package.
67
+ - If the repo is stranded after a prior crash, inspect `wave control status` first and decide whether to relaunch or reconcile on the upgraded package.
47
68
 
48
- ### 2. Bump The Package
69
+ ### 2. Bump the package
49
70
 
50
71
  ```bash
51
72
  pnpm up @chllming/wave-orchestration
52
73
  pnpm exec wave upgrade
53
74
  ```
54
75
 
55
- ### 3. Sync Repo-Owned Starter Surface Only If You Copied It
56
-
57
- If your repo copied package-owned starter docs, prompts, or skills instead of treating them as read-only package material, sync the copied files that you still want to match upstream.
76
+ ### 3. Sync repo-owned starter surface only if you copied it
58
77
 
59
- The common sync set is:
78
+ The most common sync set for `0.8.6` is:
60
79
 
61
80
  - `docs/agents/wave-launcher-role.md`
62
81
  - `docs/agents/wave-orchestrator-role.md`
63
82
  - `docs/agents/wave-planner-role.md`
83
+ - `docs/agents/wave-design-role.md`
64
84
  - `skills/wave-core/`
65
85
  - `skills/role-planner/`
66
- - runtime and closure-role starter skills under `skills/`
86
+ - `skills/role-design/`
87
+ - `skills/tui-design/`
88
+ - `skills/signal-hygiene/`
89
+ - `scripts/wave-status.sh`
90
+ - `scripts/wave-watch.sh`
91
+ - `docs/guides/author-and-run-waves.md`
92
+ - `docs/guides/planner.md`
93
+ - `docs/guides/terminal-surfaces.md`
94
+ - `docs/guides/signal-wrappers.md`
67
95
  - `docs/context7/planner-agent/`
68
96
  - `docs/reference/wave-planning-lessons.md`
97
+ - `docs/reference/cli-reference.md`
98
+ - `docs/reference/skills.md`
99
+ - `docs/reference/sample-waves.md`
69
100
  - `docs/plans/current-state.md`
70
101
  - `docs/plans/end-state-architecture.md`
71
102
  - `docs/plans/wave-orchestrator.md`
72
103
  - `docs/plans/migration.md`
73
104
 
74
- If your repo never copied those starter files, do not invent migration work. The installed package already carries the new runtime behavior.
105
+ If your repo copied starter `wave.config.json` defaults, also sync:
106
+
107
+ - `roles.designRolePromptPath`
108
+ - `skills.byRole.design`
109
+ - `executors.profiles.design-pass`
75
110
 
76
- ### 4. Re-validate Before A Live Run
111
+ ### 4. Re-validate before a live run
77
112
 
78
113
  Run these from the repo root:
79
114
 
80
115
  ```bash
81
- pnpm exec wave doctor
116
+ pnpm exec wave doctor --json
82
117
  pnpm exec wave launch --lane main --dry-run --no-dashboard
83
118
  pnpm exec wave control status --lane main --wave 0 --json
119
+ scripts/wave-status.sh --lane main --wave 0
120
+ scripts/wave-watch.sh --lane main --wave 0 --until-change --refresh-ms 500
84
121
  pnpm exec wave coord inbox --lane main --wave 0 --agent A1 --dry-run
85
122
  ```
86
123
 
87
- Use `pnpm exec wave dashboard --lane <lane> --attach current` or `--attach global` when you need to reattach to an existing tmux-backed dashboard after the upgrade.
124
+ Use `pnpm exec wave dashboard --lane <lane> --attach current` or `--attach global` when you need to reattach to a tmux-backed dashboard after the upgrade.
125
+
126
+ ## `0.8.6` Release Model
127
+
128
+ The current `0.8.6` surface is two changes together:
129
+
130
+ - the shipped `design` worker role and hybrid design-steward flow introduced in `0.8.5`
131
+ - the signal-driven long-running-agent and wrapper model introduced in `0.8.6`
132
+
133
+ ### Signal-driven waiting and wrapper model
134
+
135
+ This is the main new behavior in `0.8.6`.
136
+
137
+ Starter repos now include:
138
+
139
+ - `skills/signal-hygiene/`
140
+ - `scripts/wave-status.sh`
141
+ - `scripts/wave-watch.sh`
142
+
143
+ Use that model when:
144
+
145
+ - an external shell loop or CI job should wait for a wave or agent to change state
146
+ - a non-resident agent is intentionally long-running and should wake only on orchestrator-written signal changes
147
+ - a resident orchestrator should explicitly acknowledge that it observed a reroute, answered feedback, or terminal transition
148
+
149
+ The contract is:
150
+
151
+ - the runtime publishes versioned signal snapshots under `.tmp/<lane>-wave-launcher/signals/`
152
+ - long-running watchers receive a signal-state path and signal-ack path in the prompt
153
+ - the watcher writes the ack file immediately after it observes a new signal version
154
+ - wrapper exit codes are now:
155
+ - `0` completed
156
+ - `10` still active or waiting
157
+ - `20` input required
158
+ - `30` signal changed while still active from `wave-watch.sh --until-change`
159
+ - `40` failed
160
+
161
+ If your repo copied operator docs, shell automation, or starter scripts, this is the main sync set to apply from `0.8.6`.
162
+
163
+ ### `0.8.5` design-steward model
164
+
165
+ Docs-first design stewards:
166
+
167
+ - import `docs/agents/wave-design-role.md`
168
+ - own at least one packet path such as `docs/plans/waves/design/wave-<n>-<agentId>.md`
169
+ - stay docs or spec-first
170
+ - finish with `[wave-design] state=<ready-for-implementation|needs-clarification|blocked> ...`
171
+
172
+ If the wave explicitly assigns non-packet ownership to a design agent, that agent becomes a hybrid design steward.
173
+
174
+ The runtime treats that as:
175
+
176
+ 1. a design pass first
177
+ 2. then the same agent rejoins implementation with normal proof obligations
178
+
179
+ For a hybrid design steward, make sure the wave still includes:
180
+
181
+ - a design packet path
182
+ - any explicit implementation-owned paths
183
+ - `### Exit contract` when your lane validation requires it
184
+ - `### Components` when your lane validation requires them
185
+ - `### Proof artifacts` when the owned slice is proof-centric
186
+
187
+ The second pass must still re-emit `[wave-design]`, and it must also satisfy the normal implementation proof, doc-delta, and component-marker contract.
188
+
189
+ The interactive `wave draft` flow supports `design` as a worker role and scaffolds the docs-first default path. If you want a hybrid design steward today, the safest authoring paths are manual edits or an agentic planner payload that already declares the design agent's explicit implementation ownership.
88
190
 
89
191
  ## Version-Specific Upgrade Guidance
90
192
 
91
- ## Upgrading From `0.8.3` To `0.8.4`
193
+ ## Upgrading From `0.8.5` To `0.8.6`
92
194
 
93
- This is the smallest migration.
195
+ This is the smallest upgrade, but it changes the live wait-loop contract for external automation and intentionally long-running agents.
94
196
 
95
197
  ### What changed
96
198
 
97
- - contradiction replay for non-promoted traces is now independent of component-matrix parsing
98
- - component-promotion threshold handling is now consistent between proof validation and matrix-current-level validation
99
- - projection output writes are centralized in `projection-writer.mjs`
199
+ - versioned signal snapshots are now published under `.tmp/<lane>-wave-launcher/signals/`
200
+ - starter repos now include `skills/signal-hygiene/`, `scripts/wave-status.sh`, and `scripts/wave-watch.sh`
201
+ - the runtime injects signal-state plus signal-ack paths into long-running agent and resident-orchestrator prompts
202
+ - `completed` and `failed` now override stale feedback or coordination wakeups in agent signal state
203
+ - wrapper scripts now treat `failed` as terminal with exit `40`
100
204
 
101
205
  ### Required repo changes
102
206
 
103
- None for wave shape, config keys, or CLI usage.
207
+ Usually none if the repo did not copy starter scripts, operator docs, or skill bundles.
104
208
 
105
- ### Recommended checks
209
+ ### Strongly recommended sync
106
210
 
107
- 1. Re-run `pnpm exec wave doctor`.
108
- 2. Re-run `pnpm exec wave launch --lane main --dry-run --no-dashboard`.
109
- 3. If your repo copied starter architecture docs or starter skills, sync them so local runbooks stop describing the older split projection behavior.
110
- 4. If you keep historical trace fixtures, replay at least one contradiction-blocked trace and one promoted-component trace after the upgrade.
211
+ If the repo copied starter surface, sync:
111
212
 
112
- ## Upgrading From `0.8.0`-`0.8.2` To `0.8.4`
213
+ - `skills/signal-hygiene/`
214
+ - `scripts/wave-status.sh`
215
+ - `scripts/wave-watch.sh`
216
+ - `docs/guides/signal-wrappers.md`
217
+ - `docs/guides/terminal-surfaces.md`
218
+ - `docs/reference/cli-reference.md`
219
+ - `docs/reference/skills.md`
220
+ - `docs/plans/current-state.md`
221
+ - `docs/plans/end-state-architecture.md`
222
+ - `docs/plans/wave-orchestrator.md`
223
+
224
+ ### Validation focus
225
+
226
+ - confirm any existing shell automation treats wrapper exit `40` as terminal failure
227
+ - if the repo uses long-running watchers, confirm they can write the ack file where the prompt tells them to
228
+ - reroute one targeted feedback or coordination request and confirm the resident signal version changes even when the signal kind stays the same
229
+
230
+ ## Upgrading From `0.8.4` To `0.8.6`
231
+
232
+ ### What changed
233
+
234
+ - `0.8.5` added the optional `design` worker role plus the `role-design` and `tui-design` starter bundles
235
+ - design stewards can now be docs-first or explicit hybrid design stewards
236
+ - `0.8.6` adds signal-driven waiting, `signal-hygiene`, and the seeded wrapper scripts
237
+
238
+ ### Required repo changes
239
+
240
+ None if your repo does not use design stewards, long-running watcher agents, or copied starter scripts.
241
+
242
+ ### Strongly recommended sync
243
+
244
+ If your repo copied starter prompts, skills, or authoring docs, sync:
245
+
246
+ - `docs/agents/wave-design-role.md`
247
+ - `skills/role-design/`
248
+ - `skills/tui-design/`
249
+ - `skills/signal-hygiene/`
250
+ - `scripts/wave-status.sh`
251
+ - `scripts/wave-watch.sh`
252
+ - `docs/guides/author-and-run-waves.md`
253
+ - `docs/guides/signal-wrappers.md`
254
+ - `docs/guides/planner.md`
255
+ - `docs/reference/skills.md`
256
+ - `docs/reference/sample-waves.md`
257
+
258
+ If your repo copied starter config defaults, also sync the `designRolePromptPath`, `skills.byRole.design`, and `design-pass` profile entries.
259
+
260
+ ### Validation focus
261
+
262
+ - the design packet path resolves inside the repo
263
+ - design runs before implementation
264
+ - implementation does not start until every design packet is `ready-for-implementation`
265
+ - hybrid design stewards rejoin implementation when they explicitly own code
266
+ - long-running prompts receive signal-state and ack paths when the repo uses the new waiting model
267
+
268
+ ## Upgrading From `0.8.3` To `0.8.6`
269
+
270
+ This is the most common one-step package upgrade path.
271
+
272
+ ### What changed across that range
273
+
274
+ - `0.8.4` tightened contradiction replay, component-promotion threshold handling, and projection persistence boundaries
275
+ - `0.8.5` ships the `design` worker role, the `role-design` and `tui-design` starter bundles, and the hybrid design-steward runtime model as part of the published package
276
+ - `0.8.6` adds versioned signal snapshots, `signal-hygiene`, prompt-injected signal ack loops, and the seeded operator wrappers
277
+ - current operator and planner docs now describe the shipped surface directly instead of splitting behavior between a published package and newer `main`-only additions
278
+
279
+ ### Required repo changes
280
+
281
+ Usually none if the repo does not copy starter prompts, skills, planning docs, or wrapper scripts.
282
+
283
+ ### Strongly recommended sync
284
+
285
+ If the repo copied starter surface, sync:
286
+
287
+ - `docs/agents/wave-design-role.md`
288
+ - `skills/role-design/`
289
+ - `skills/tui-design/`
290
+ - `skills/signal-hygiene/`
291
+ - `scripts/wave-status.sh`
292
+ - `scripts/wave-watch.sh`
293
+ - `docs/guides/author-and-run-waves.md`
294
+ - `docs/guides/signal-wrappers.md`
295
+ - `docs/guides/planner.md`
296
+ - `docs/reference/skills.md`
297
+ - `docs/reference/sample-waves.md`
298
+ - `docs/plans/current-state.md`
299
+ - `docs/plans/wave-orchestrator.md`
300
+ - `docs/plans/end-state-architecture.md`
301
+
302
+ If the repo copied starter `wave.config.json` defaults, also sync:
303
+
304
+ - `roles.designRolePromptPath`
305
+ - `skills.byRole.design`
306
+ - `executors.profiles.design-pass`
307
+
308
+ ### Validation focus
309
+
310
+ - confirm contradiction-blocked replay cases still compare cleanly if the repo keeps replay fixtures
311
+ - if the repo uses design stewards, confirm packet-only design waves still block implementation until `ready-for-implementation`
312
+ - if the repo uses hybrid design stewards, confirm the same agent rejoins implementation only when the authored wave explicitly gives it code ownership
313
+ - if the repo uses long-running agents or shell automation, confirm the new wrapper exit contract and ack-loop semantics before relying on an older polling script
113
314
 
114
- Treat this as one upgrade to the current surface.
315
+ ## Upgrading From `0.8.0`-`0.8.4` To `0.8.6`
316
+
317
+ Treat this as one move to the current `0.8.6` surface.
115
318
 
116
319
  ### What changed across that range
117
320
 
118
- - completed-wave `wave control status` projection hardened in `0.8.2`
119
- - human-input reconciliation and ad-hoc `--run <id>` context hardening landed in `0.8.3`
120
- - contradiction replay, component-threshold consistency, and projection-writer centralization landed in `0.8.4`
321
+ - completed-wave control projections hardened
322
+ - human-input reconciliation and continuation repair landed
323
+ - contradiction replay and component-threshold handling were tightened
324
+ - projection persistence centralized under `projection-writer.mjs`
325
+ - the design-role surface is now shipped instead of living only on source `main`
326
+ - versioned signal snapshots, wrapper scripts, and long-running signal ack loops are now part of the shipped operator surface
121
327
 
122
328
  ### Required repo changes
123
329
 
124
- Usually none for config shape.
330
+ Usually none for core config shape.
125
331
 
126
332
  ### Strongly recommended sync
127
333
 
128
- If your repo copied upstream starter docs or skills, sync:
334
+ If your repo copied starter docs or skills, sync:
129
335
 
130
- - the current operator runbook and architecture docs
131
- - the launcher and orchestrator role prompts
132
- - the relevant runtime skills and closure-role starter skills
336
+ - current operator runbook and architecture docs
337
+ - planner starter corpus
338
+ - design-role starter prompt and skill bundles
339
+ - signal-wrapper starter scripts and docs
340
+ - any repo-local docs that still describe design as “main only” or “future”
133
341
 
134
342
  ### Validation focus
135
343
 
136
344
  - check that completed waves do not show stale blockers through `wave control status`
137
345
  - answer at least one human-feedback ticket in a test lane and confirm the linked clarification or escalation chain closes cleanly
138
- - replay one contradiction-blocked trace if your repo relies on trace-based regression checks
346
+ - replay one contradiction-blocked trace if your repo relies on replay regression coverage
347
+ - dry-run one design-steward wave if the repo wants the new authored surface
348
+ - if the repo uses long-running watcher agents or shell automation, validate `scripts/wave-status.sh` and `scripts/wave-watch.sh` against a live or staged lane
139
349
 
140
- ## Upgrading From `0.6.x` Or `0.7.x` To `0.8.4`
350
+ ## Upgrading From `0.6.x` Or `0.7.x` To `0.8.6`
141
351
 
142
352
  This is the main migration path for older adopted repos.
143
353
 
144
354
  ### Behavioral changes you must account for
145
355
 
146
356
  - `wave control` is the preferred operator surface for status, rerun, proof, and telemetry work
147
- - `cont-QA` and optional `cont-EVAL` remain distinct closure roles; older overloaded evaluator language should be removed
148
- - planner corpus files are now treated as required starter surface for repos that use planner workflows
149
- - live closure depends on validated result envelopes plus canonical state, not only older summary-era behavior
150
- - control-plane state, reducer state, and replay are now first-class runtime surfaces, not optional internals
357
+ - `cont-QA` and optional `cont-EVAL` are distinct closure roles
358
+ - planner starter files are now treated as required repo-owned surface when the repo uses planner workflows
359
+ - live closure depends on validated result envelopes plus canonical state
360
+ - control-plane state, reducer state, and replay are first-class runtime surfaces
361
+ - optional design stewards are now a supported authored shape
362
+ - signal-driven long-running watchers are now a supported operator shape
151
363
 
152
364
  ### Required repo changes
153
365
 
154
- 1. Remove or rename any legacy `evaluator` role/config terminology to `cont-QA`.
366
+ 1. Remove or rename legacy `evaluator` terminology to `cont-QA`.
155
367
  2. Keep `A0` as the final closure owner and add `E0` only when the wave needs eval-driven tuning.
156
368
  3. Add wave-level `## Eval targets` whenever `cont-EVAL` is present.
157
369
  4. Sync the planner starter corpus if the repo uses `wave project` or `wave draft`:
@@ -160,7 +372,9 @@ This is the main migration path for older adopted repos.
160
372
  - `docs/context7/planner-agent/`
161
373
  - `docs/reference/wave-planning-lessons.md`
162
374
  - the `planner-agentic` entry in `docs/context7/bundles.json`
163
- 5. Review any repo-owned docs or internal runbooks that still describe one overloaded evaluator role, marker-era closure, or pre-control-plane retry/proof workflow.
375
+ 5. Review any repo-owned docs or runbooks that still describe summary-era closure, pre-control-plane retry or proof behavior, or a single overloaded evaluator role.
376
+ 6. If the repo wants design stewards, sync the design starter surface listed above and update local authoring docs accordingly.
377
+ 7. If the repo wants signal-driven long-running watchers or shell automation, sync `skills/signal-hygiene/`, `scripts/wave-status.sh`, `scripts/wave-watch.sh`, and the wrapper docs before relying on local polling scripts.
164
378
 
165
379
  ### Additional validation
166
380
 
@@ -172,9 +386,9 @@ pnpm exec wave control rerun get --lane main --wave 0 --json
172
386
  pnpm exec wave control proof get --lane main --wave 0 --json
173
387
  ```
174
388
 
175
- If your repo carries proof-first waves, verify that required proof artifacts are still present locally and not only in historical summaries.
389
+ If the repo carries proof-first waves, verify that required proof artifacts still exist locally and not only in historical summaries.
176
390
 
177
- ## Upgrading From `0.5.x` Or Earlier To `0.8.4`
391
+ ## Upgrading From `0.5.x` Or Earlier To `0.8.6`
178
392
 
179
393
  Do not treat this as a tiny patch bump.
180
394
 
@@ -183,7 +397,8 @@ Do not treat this as a tiny patch bump.
183
397
  1. Read [docs/reference/migration-0.2-to-0.5.md](../reference/migration-0.2-to-0.5.md) first if the repo still looks pre-`0.5`.
184
398
  2. Run `pnpm exec wave init --adopt-existing` on a branch so the workspace records install state without overwriting repo-owned material.
185
399
  3. Move the repo onto the `0.6.x` and later surface using the section above.
186
- 4. Re-run the full validation checklist before any live executor run.
400
+ 4. Sync the planner corpus and, if needed, the design starter surface plus the signal-wrapper starter surface.
401
+ 5. Re-run the full validation checklist before any live executor run.
187
402
 
188
403
  ### Why
189
404
 
@@ -194,14 +409,13 @@ Older repos often differ in:
194
409
  - runtime config keys
195
410
  - planner starter corpus
196
411
  - proof and retry operator surfaces
412
+ - wrapper and signal-monitoring expectations
197
413
  - generated state layout under `.tmp/`
198
414
 
199
415
  Trying to jump directly with ad hoc edits usually leaves hidden drift in prompts, docs, or config.
200
416
 
201
417
  ## Repo-Owned Files To Audit During Any Upgrade
202
418
 
203
- These are the highest-value files to check when a repo copied starter surface instead of reading from the package.
204
-
205
419
  ### Prompts and skills
206
420
 
207
421
  - `docs/agents/*.md`
@@ -215,14 +429,17 @@ These are the highest-value files to check when a repo copied starter surface in
215
429
  - `docs/plans/wave-orchestrator.md`
216
430
  - `docs/plans/end-state-architecture.md`
217
431
  - `docs/plans/migration.md`
432
+ - `docs/guides/signal-wrappers.md`
218
433
  - `docs/reference/cli-reference.md`
219
434
  - `docs/reference/wave-control.md`
220
435
  - `docs/reference/sample-waves.md`
436
+ - `docs/reference/skills.md`
221
437
 
222
438
  ### Config and wave contracts
223
439
 
224
440
  - `wave.config.json`
225
441
  - `docs/plans/waves/*.md`
442
+ - `docs/plans/waves/specs/*.json`
226
443
  - `docs/evals/benchmark-catalog.json`
227
444
  - component-cutover matrix files under `docs/plans/`
228
445
 
@@ -234,6 +451,8 @@ Use this exact sequence unless your repo has a better repo-specific smoke suite.
234
451
  pnpm exec wave doctor --json
235
452
  pnpm exec wave launch --lane main --dry-run --no-dashboard
236
453
  pnpm exec wave control status --lane main --wave 0 --json
454
+ scripts/wave-status.sh --lane main --wave 0
455
+ scripts/wave-watch.sh --lane main --wave 0 --until-change --refresh-ms 500
237
456
  pnpm exec wave coord show --lane main --wave 0 --dry-run --json
238
457
  pnpm exec wave coord inbox --lane main --wave 0 --agent A1 --dry-run
239
458
  ```
@@ -254,22 +473,29 @@ For repos that depend on replay parity, replay at least:
254
473
 
255
474
  ### `wave doctor` fails after the upgrade
256
475
 
257
- - check whether the repo is missing planner starter surface it previously copied
476
+ - check whether the repo is missing copied planner starter surface
258
477
  - check whether old `evaluator` naming is still present in config or prompts
259
- - check whether wave files now declare closure roles or eval targets inconsistently with the current runtime
478
+ - check whether local docs still describe unpublished main-branch behavior instead of the current package surface
479
+ - if the repo uses hybrid design stewards, check that each one still owns a design packet path and any required implementation-contract fields
260
480
 
261
481
  ### A live lane looks blocked after the bump
262
482
 
263
483
  - use `wave control status --lane <lane> --wave <n> --json`
264
- - confirm whether the blocker is canonical coordination, dependency, proof, or human-input state
265
- - do not trust old generated markdown alone
484
+ - confirm whether the blocker is canonical coordination, dependency, proof, human-input, design-gate, or signal-ready state
485
+ - do not trust generated markdown alone
486
+
487
+ ### External automation hangs after the upgrade
488
+
489
+ - confirm your wrapper loop treats exit `40` as terminal failure
490
+ - confirm `wave-watch.sh --until-change` expects exit `30` only for non-terminal signal changes
491
+ - if a long-running agent never wakes, inspect its ack file under `.tmp/<lane>-wave-launcher/signals/wave-<n>/acks/`
266
492
 
267
493
  ### Replay differs from old expectations
268
494
 
269
495
  - verify whether the trace declares promoted components
270
- - verify whether the repo relied on pre-`0.8.4` component-threshold behavior
271
496
  - compare `storedOutcome.gateSnapshot` against recomputed replay output before changing live policy
497
+ - if the repo copied local replay docs, update them to the current reducer, envelope, and signal model
272
498
 
273
499
  ## Summary
274
500
 
275
- `0.8.4` does not introduce a new authoring model. It hardens replay, makes component-promotion thresholds behave consistently, and finishes the projection-writer ownership boundary. For most repos already on `0.8.x`, the upgrade is package bump plus validation. For older adopted repos, the real work is syncing repo-owned prompts, skills, and runbooks so they describe the runtime the package now ships.
501
+ The current `0.8.6` surface keeps the same authority-set and phase-engine architecture, but it now ships both the design-role starter surface and the signal-driven long-running-agent starter surface as part of the published package. For most repos already on `0.8.x`, the upgrade is package bump plus validation. For older adopted repos, the real work is syncing repo-owned prompts, skills, planner corpus, wrapper scripts, and runbooks so they describe the runtime the package now ships.
@@ -19,7 +19,7 @@ The live runtime is organized around explicit modules:
19
19
  - `launcher.mjs`
20
20
  Thin orchestrator for CLI parsing, launcher lock handling, wave iteration, and engine sequencing.
21
21
  - `implementation-engine.mjs`
22
- Chooses initial or retry implementation fan-out.
22
+ Chooses initial or retry fan-out, including optional design-first passes before code-owning implementation.
23
23
  - `derived-state-engine.mjs`
24
24
  Computes shared summary, inbox, assignment, dependency, ledger, docs queue, and integration or security projection payloads from canonical state.
25
25
  - `gate-engine.mjs`
@@ -41,6 +41,7 @@ The live runtime is organized around explicit modules:
41
41
  - supports transient ad-hoc runs from `.wave/adhoc/runs/` on the same runtime substrate
42
42
  - fans a wave out into one session per `## Agent ...` section
43
43
  - supports standing role imports from `docs/agents/*.md`
44
+ - supports optional pre-implementation design stewards that publish design packets before code-owning implementation starts
44
45
  - seeds a coordination log, generated board, compiled shared summary, and per-agent inboxes
45
46
  - derives a per-wave ledger, security summary, docs queue, integration summary, and versioned per-attempt trace bundle
46
47
  - versions the runtime JSON surfaces that operators and replay tooling consume, including manifests, dashboards, relaunch plans, assignment snapshots, dependency snapshots, and run-state
@@ -52,6 +53,7 @@ The live runtime is organized around explicit modules:
52
53
  - can retry rate-limited `codex`, `claude`, and `opencode` launches with per-agent exponential backoff via `--agent-rate-limit-*`
53
54
  - supports a file-backed human feedback queue
54
55
  - performs a closure sweep so optional `cont-EVAL`, optional security review, integration, documentation, and cont-QA gates reflect final landed state through the wave's effective closure-role bindings
56
+ - treats design packets as a first-class pre-implementation gate when a wave declares `design` workers
55
57
  - rebuilds contradiction blockers from canonical control-plane events during replay and materializes human-blocked waves as `clarifying` plus blocked `waveState`
56
58
 
57
59
  ## Main Commands
@@ -75,6 +77,8 @@ The live runtime is organized around explicit modules:
75
77
  - `pnpm exec wave feedback list --lane main --pending`
76
78
  - `pnpm exec wave control status --lane main --wave 0 --json`
77
79
  - `pnpm exec wave control status --lane main --wave 0 --agent A1 --json`
80
+ - `scripts/wave-status.sh --lane main --wave 0 --agent A1`
81
+ - `scripts/wave-watch.sh --lane main --wave 0 --agent A1 --until-change --refresh-ms 500`
78
82
  - `pnpm exec wave coord inbox --lane main --wave 0 --agent A1 --dry-run`
79
83
  - `pnpm exec wave control task create --lane main --wave 0 --agent A1 --kind blocker --summary "Need repository decision"`
80
84
  - `pnpm exec wave control task act reassign --lane main --wave 0 --id <task-id> --to A2`
@@ -89,7 +93,7 @@ The live runtime is organized around explicit modules:
89
93
 
90
94
  ## Configuration
91
95
 
92
- - `wave.config.json` controls docs roots, shared plan docs, role prompts, validation thresholds, executor defaults, executor profiles, per-lane runtime policy, skill attachment policy, component-cutover matrix paths, capability-routing preferences, Context7 bundle-index location, and the optional `waveControl` telemetry section. The starter config also wires the optional security reviewer prompt at `docs/agents/wave-security-role.md` and the `security-review` executor profile.
96
+ - `wave.config.json` controls docs roots, shared plan docs, role prompts, validation thresholds, executor defaults, executor profiles, per-lane runtime policy, skill attachment policy, component-cutover matrix paths, capability-routing preferences, Context7 bundle-index location, and the optional `waveControl` telemetry section. The starter config also wires the optional security reviewer prompt at `docs/agents/wave-security-role.md`, the optional design steward prompt at `docs/agents/wave-design-role.md`, plus the `security-review` and `design-pass` executor profiles.
93
97
  - `docs/context7/bundles.json` controls allowed external library bundles and lane defaults.
94
98
  - `docs/evals/README.md` explains how to author delegated versus pinned `## Eval targets`, including the coordination-oriented benchmark families.
95
99
  - `docs/reference/live-proof-waves.md` explains how to author proof-first `pilot-live` and higher-maturity waves with `### Proof artifacts`, sticky executors, and operator command capture.
@@ -113,7 +117,7 @@ The live runtime is organized around explicit modules:
113
117
  - Starter bundles in this repo cover:
114
118
  - core Wave coordination and repo coding rules
115
119
  - runtime packs for Codex, Claude, OpenCode, and local execution
116
- - role packs for implementation, `cont-EVAL`, security review, integration, documentation, cont-QA, infra, deploy, research, and planner work
120
+ - role packs for design, implementation, `cont-EVAL`, security review, integration, documentation, cont-QA, infra, deploy, research, and planner work
117
121
  - deploy and environment packs for Railway, Docker Compose, Kubernetes, SSH/manual rollout, and generic custom deploys
118
122
  - explicit provider packs for GitHub release flow and AWS norms when a wave or lane wants to attach them
119
123
 
@@ -162,6 +166,7 @@ pnpm exec wave launch --lane main --start-wave 0 --end-wave 0 --executor codex -
162
166
  - `wave control rerun request|get|clear` manages targeted rerun intent under `.tmp/<lane>-wave-launcher/control-plane/` and projects compatible retry overrides under `.tmp/<lane>-wave-launcher/control/`, including selected agents, reuse selectors, invalidated components, and clear or preserve reuse lists.
163
167
  - `wave control proof register|get|supersede|revoke` manages authoritative proof bundles in the same control-plane log and projects compatible proof registries under `.tmp/<lane>-wave-launcher/proof/`.
164
168
  - `wave control telemetry status|flush` inspects and delivers the local Wave Control event queue. Pass `--no-telemetry` on `wave launch` to disable event publication for a single run.
169
+ - `scripts/wave-status.sh` and `scripts/wave-watch.sh` are thin wrapper readers over `wave control status --json` for shell automation and long-running watcher loops. Use [guides/signal-wrappers.md](../guides/signal-wrappers.md) for the exit-code and ack-loop contract.
165
170
  - `wave coord render` regenerates the markdown board projection from the canonical coordination log.
166
171
  - `wave coord inbox` writes the compiled shared summary plus the selected agent inbox.
167
172
 
@@ -257,6 +262,8 @@ pnpm exec wave changelog --since-installed
257
262
  Canonical append-only JSONL log of operator tasks, rerun requests, proof bundles, attempt lifecycle, contradictions, facts, and human-input events. This is the canonical lifecycle state for `wave control`. Telemetry queue lives under `control-plane/telemetry/`.
258
263
  - result envelopes: `.tmp/<lane>-wave-launcher/results/`
259
264
  Attempt-scoped immutable structured result snapshots used by reducer, gate, retry, and replay flows.
265
+ - design packets: `docs/plans/waves/design/`
266
+ Repo-owned authored outputs from optional design stewards. These are not runtime state, but the validated packet path is referenced by summaries, envelopes, reducer state, and traces.
260
267
  - proof registries: `.tmp/<lane>-wave-launcher/proof/`
261
268
  Projected from control-plane state for compatibility. Operator-registered authoritative proof bundles that feed integration, cont-QA, and replay.
262
269
  - retry overrides: `.tmp/<lane>-wave-launcher/control/`
@@ -320,6 +327,12 @@ The launcher entrypoint in `scripts/wave-orchestrator/launcher.mjs` now acts as
320
327
  - `## Deploy environments` lets the wave declare named deployment targets. The default deploy environment kind is also used for deploy-kind skill attachment.
321
328
  - Lane runtime policy can assign a default executor by role even when the wave omits `### Executor`.
322
329
  - Use `### Role prompts` for standing-role imports from `docs/agents/*.md`.
330
+ - Optional design stewards are declared by importing `docs/agents/wave-design-role.md` on a worker that owns a design packet.
331
+ - A design steward must own at least one design packet path, usually `docs/plans/waves/design/wave-<n>-<agentId>.md`.
332
+ - Design stewards are docs/spec-only by default. Keep source-code ownership on implementation agents unless the wave explicitly chooses otherwise.
333
+ - If the wave explicitly gives a design steward implementation-owned paths, that same agent becomes a hybrid design steward: it runs the packet pass first, then rejoins implementation and must satisfy the normal implementation proof contract.
334
+ - Design stewards that own terminal UX, dashboards, or other operator-surface work should add `tui-design` in `### Skills`.
335
+ - Design readiness requires one final structured marker: `[wave-design] state=<ready-for-implementation|needs-clarification|blocked> decisions=<n> assumptions=<n> open_questions=<n> detail=<short-note>`. Hybrid design stewards re-emit that marker during the later implementation pass so the latest envelope stays self-contained.
323
336
  - Optional security review is declared by importing `docs/agents/wave-security-role.md` on a report-owning reviewer agent. The starter planner uses a report path under `.tmp/<lane>-wave-launcher/security/` and the `security-review` executor profile.
324
337
  - A security reviewer must own at least one security report path. Any owned `.md` or `.txt` path containing `security` is accepted by the validator.
325
338
  - Security reviewers are report-only by default. They should route fixes to the owning implementation agent instead of taking over product-code ownership.