@chllming/wave-orchestration 0.8.5 → 0.8.7

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 (58) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +14 -9
  3. package/docs/README.md +3 -1
  4. package/docs/context7/bundles.json +19 -20
  5. package/docs/context7/planner-agent/README.md +4 -1
  6. package/docs/guides/author-and-run-waves.md +4 -1
  7. package/docs/guides/planner.md +3 -1
  8. package/docs/guides/signal-wrappers.md +165 -0
  9. package/docs/guides/terminal-surfaces.md +15 -0
  10. package/docs/plans/context7-wave-orchestrator.md +24 -7
  11. package/docs/plans/current-state.md +7 -3
  12. package/docs/plans/end-state-architecture.md +16 -4
  13. package/docs/plans/examples/wave-example-design-handoff.md +1 -1
  14. package/docs/plans/examples/wave-example-live-proof.md +1 -1
  15. package/docs/plans/migration.md +179 -72
  16. package/docs/plans/wave-orchestrator.md +11 -5
  17. package/docs/reference/cli-reference.md +21 -4
  18. package/docs/reference/coordination-and-closure.md +26 -5
  19. package/docs/reference/live-proof-waves.md +9 -0
  20. package/docs/reference/npmjs-trusted-publishing.md +2 -2
  21. package/docs/reference/runtime-config/README.md +9 -3
  22. package/docs/reference/sample-waves.md +5 -5
  23. package/docs/reference/skills.md +9 -1
  24. package/docs/reference/wave-control.md +18 -0
  25. package/docs/reference/wave-planning-lessons.md +7 -1
  26. package/docs/research/coordination-failure-review.md +6 -6
  27. package/package.json +1 -1
  28. package/releases/manifest.json +38 -0
  29. package/scripts/context7-api-check.sh +57 -13
  30. package/scripts/wave-orchestrator/agent-state.mjs +42 -0
  31. package/scripts/wave-orchestrator/autonomous.mjs +42 -6
  32. package/scripts/wave-orchestrator/clarification-triage.mjs +4 -3
  33. package/scripts/wave-orchestrator/control-cli.mjs +145 -11
  34. package/scripts/wave-orchestrator/control-plane.mjs +12 -1
  35. package/scripts/wave-orchestrator/coordination-store.mjs +124 -4
  36. package/scripts/wave-orchestrator/coordination.mjs +35 -0
  37. package/scripts/wave-orchestrator/executors.mjs +11 -6
  38. package/scripts/wave-orchestrator/gate-engine.mjs +5 -5
  39. package/scripts/wave-orchestrator/install.mjs +2 -0
  40. package/scripts/wave-orchestrator/launcher-runtime.mjs +12 -1
  41. package/scripts/wave-orchestrator/launcher.mjs +236 -0
  42. package/scripts/wave-orchestrator/ledger.mjs +14 -12
  43. package/scripts/wave-orchestrator/reducer-snapshot.mjs +8 -6
  44. package/scripts/wave-orchestrator/retry-engine.mjs +19 -11
  45. package/scripts/wave-orchestrator/routing-state.mjs +50 -3
  46. package/scripts/wave-orchestrator/session-supervisor.mjs +119 -10
  47. package/scripts/wave-orchestrator/shared.mjs +1 -0
  48. package/scripts/wave-orchestrator/signals.mjs +681 -0
  49. package/scripts/wave-orchestrator/task-entity.mjs +4 -4
  50. package/scripts/wave-orchestrator/terminals.mjs +14 -14
  51. package/scripts/wave-orchestrator/wave-control-schema.mjs +2 -0
  52. package/scripts/wave-orchestrator/wave-files.mjs +15 -21
  53. package/scripts/wave-orchestrator/wave-state-reducer.mjs +72 -5
  54. package/scripts/wave-status.sh +200 -0
  55. package/scripts/wave-watch.sh +200 -0
  56. package/skills/README.md +3 -0
  57. package/skills/signal-hygiene/SKILL.md +51 -0
  58. package/skills/signal-hygiene/skill.json +20 -0
@@ -1,6 +1,6 @@
1
1
  # End-State Architecture
2
2
 
3
- This document describes the canonical architecture for the current Wave runtime. It is the authoritative reference for the engine boundaries, canonical authority set, and artifact ownership model that the shipped `0.8.5` surface now follows.
3
+ This document describes the canonical architecture for the current Wave runtime. It is the authoritative reference for the engine boundaries, canonical authority set, and artifact ownership model that the shipped `0.8.7` surface now follows.
4
4
 
5
5
  The thesis is unchanged: bounded waves, closure roles, proof artifacts, selective rerun, and delivery discipline. What changes is the internal authority model. The launcher stops being the decision engine and becomes a thin orchestrator that reads decisions from canonical state, sequences the engines, and delegates process work to the session supervisor.
6
6
 
@@ -41,10 +41,10 @@ The system uses **Model B: canonical authority set**, not a single event log. Th
41
41
  | Source | Kind | Authority Over |
42
42
  |--------|------|----------------|
43
43
  | Wave definitions (`docs/plans/waves/`) | Parsed declarations, read-only after parse | Goals, agent roles, component promotions, exit contracts, proof artifact requirements, eval targets, skill bindings |
44
- | Control-plane event log (`.tmp/<lane>-wave-launcher/control-plane/wave-<N>.jsonl`) | Append-only JSONL | Lifecycle state: tasks, attempts, proof bundles, rerun requests, gates, contradictions, facts, human inputs, wave runs, agent runs, artifacts, benchmarks, verifications, reviews |
44
+ | Control-plane event log (`.tmp/<lane>-wave-launcher/control-plane/wave-<N>.jsonl`) | Append-only JSONL | Lifecycle state: tasks, attempts, proof bundles, rerun requests, gates, contradictions, facts, human inputs, wave runs, agent runs, signal updates, artifacts, benchmarks, verifications, reviews |
45
45
  | Coordination log (`.tmp/<lane>-wave-launcher/coordination/wave-<N>.jsonl`) | Append-only JSONL | Conversational/workflow state: requests, acks, claims, evidence, decisions, blockers, handoffs, clarifications, human feedback, escalations, orchestrator guidance, integration summaries |
46
46
 
47
- **Everything else is a projection.** Shared summaries, dashboards, inboxes, proof registries, retry overrides, relaunch plans, assignment snapshots, dependency snapshots, ledgers, docs queues, security summaries, integration summaries, markdown boards, and trace bundles are all derived from these three canonical sources plus immutable agent result envelopes.
47
+ **Everything else is a projection.** Shared summaries, dashboards, inboxes, signal snapshots, proof registries, retry overrides, relaunch plans, assignment snapshots, dependency snapshots, ledgers, docs queues, security summaries, integration summaries, markdown boards, and trace bundles are all derived from these three canonical sources plus immutable agent result envelopes.
48
48
 
49
49
  The reducer consumes all three canonical sources plus result envelopes to rebuild state. No other input is read for decision-making.
50
50
 
@@ -153,7 +153,7 @@ wave-state-reducer.mjs Rebuilds full wave state from canonical authority set
153
153
 
154
154
  The supervisor is the only module that interacts with the outside world: launching processes, managing terminals, and monitoring sessions. It reads decisions from phase engines and executes them. It is the only module that writes observed lifecycle events.
155
155
 
156
- The projection writer is the single module responsible for projection writes. Workflow-owned compatibility state, clarification triage, and canonical coordination/control-plane mutations stay in their own modules.
156
+ `projection-writer.mjs` owns the operator-facing projection writes family: dashboards, traces, summaries, inboxes, ledgers, docs queues, board projections, and assignment or dependency snapshots. `signals.mjs` owns the separate versioned signal projections used by long-running agents and operator wrappers. Workflow-owned compatibility state, clarification triage, and canonical coordination/control-plane mutations stay in their own modules.
157
157
 
158
158
  ```
159
159
  session-supervisor.mjs Launches and monitors agent sessions
@@ -188,6 +188,16 @@ projection-writer.mjs Writes projection outputs
188
188
  Rule: never reads its own outputs,
189
189
  always writes atomically,
190
190
  labels every artifact with its class
191
+
192
+ signals.mjs Writes versioned signal projections
193
+ Inputs: materialized control status for a wave,
194
+ logical-agent state, feedback state
195
+ Outputs: wave-level signal snapshot,
196
+ per-agent signal snapshots,
197
+ resident-orchestrator signal snapshot
198
+ Rule: versions snapshots only when the normalized
199
+ wake payload changes and tracks ack state
200
+ for long-running watcher loops
191
201
  ```
192
202
 
193
203
  ### Layer 4 — Launcher Orchestrator
@@ -564,6 +574,8 @@ Projections materialized from Class 1 and Class 2 sources. Can be deleted and re
564
574
  | Run state | `.tmp/<lane>-wave-launcher/run-state.json` | JSON |
565
575
  | Quality metrics | `.tmp/<lane>-wave-launcher/traces/wave-<N>/attempt-<A>/quality.json` | JSON |
566
576
  | Reducer snapshot | `.tmp/<lane>-wave-launcher/reducer/wave-<N>.json` | JSON |
577
+ | Wave signal snapshot | `.tmp/<lane>-wave-launcher/signals/wave-<N>.json` | JSON |
578
+ | Agent signal snapshot | `.tmp/<lane>-wave-launcher/signals/wave-<N>/<agentId>.json` | JSON |
567
579
 
568
580
  ### Class 4 — Human-Facing Projections
569
581
 
@@ -1,6 +1,6 @@
1
1
  # Wave 12 - Optional Design Steward Handoff
2
2
 
3
- This is a showcase-first sample wave for the shipped `design` worker role in `0.8.5`.
3
+ This is a showcase-first sample wave for the shipped `design` worker role in `0.8.7`.
4
4
 
5
5
  This example demonstrates the docs-first design-steward path where a design packet is published before code-owning implementation begins.
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  This is a showcase-first sample wave.
4
4
 
5
- Use it as the single reference example for the current `0.8.5` Wave surface.
5
+ Use it as the single reference example for the current `0.8.7` Wave surface.
6
6
 
7
7
  It intentionally combines more sections than a normal production wave so one file can demonstrate:
8
8
 
@@ -1,6 +1,6 @@
1
1
  # Migration
2
2
 
3
- This page is the practical repo-upgrade guide for the current `0.8.5` surface.
3
+ This page is the practical repo-upgrade guide for the current `0.8.7` surface.
4
4
 
5
5
  Use it when you are:
6
6
 
@@ -10,21 +10,33 @@ Use it when you are:
10
10
 
11
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.
12
12
 
13
- ## What `0.8.5` Changes
13
+ ## What `0.8.7` Changes
14
14
 
15
- `0.8.5` ships a new authored and runtime surface, not just a patch-level hardening change.
15
+ The current `0.8.7` surface adds policy consistency and stable per-wave session reuse on top of the `0.8.6` signal-driven operator model.
16
+
17
+ The practical changes are:
18
+
19
+ - generic `budget.turns` stays advisory metadata unless the runtime-specific ceiling is set explicitly with `claude.maxTurns` or `opencode.steps`
20
+ - capability-targeted helper routing now treats demonstrated same-wave success as capability-specific evidence; unrelated completed work no longer makes an agent the preferred helper owner
21
+ - advisory or stale clarification and human-input records remain visible in coordination history and reducer blocker views, but they no longer reopen `clarifying` or blocked reducer state by themselves
22
+ - wave-agent and resident-orchestrator tmux sessions now reuse stable per-wave session names, so relaunches and stale launcher exits stop accumulating extra tmux sessions for the same wave
23
+
24
+ If your repo copied starter docs, shell automation, or operator runbooks, these are the areas most likely to need a sync before the `0.8.7` package cut.
25
+
26
+ ## What `0.8.6` Changes
27
+
28
+ `0.8.6` keeps the `0.8.5` design-role surface and adds a new signal-driven operator and long-running-agent model.
16
29
 
17
30
  The biggest additions are:
18
31
 
19
- - the optional `design` worker role is now part of the published package surface
20
- - starter design bundles now ship in `docs/agents/wave-design-role.md`, `skills/role-design/`, and `skills/tui-design/`
21
- - design stewards are docs-first by default, but a wave may explicitly give one implementation ownership
22
- - hybrid design stewards now run in two phases:
23
- - design packet first
24
- - implementation follow-through second
25
- - gates, retry or resume planning, reducer state, prompts, local smoke execution, and result envelopes now all agree on that hybrid-design contract
32
+ - the optional `design` worker role remains part of the published package surface
33
+ - starter design bundles still ship in `docs/agents/wave-design-role.md`, `skills/role-design/`, and `skills/tui-design/`
34
+ - starter signal bundles now also ship in `skills/signal-hygiene/`, `scripts/wave-status.sh`, and `scripts/wave-watch.sh`
35
+ - long-running agents and resident orchestrators now receive prompt-visible signal-state and signal-ack paths
36
+ - canonical versioned wave and agent signal snapshots now live under `.tmp/<lane>-wave-launcher/signals/`
37
+ - wrapper and signal semantics now treat `completed` and `failed` as truly terminal, with wrapper exit `40` for failed terminal state
26
38
 
27
- There are no new top-level CLI commands for `0.8.5`.
39
+ 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.
28
40
 
29
41
  ## Upgrade Contract
30
42
 
@@ -39,6 +51,9 @@ Treat these as package-owned starter surface unless your repo intentionally copi
39
51
 
40
52
  - `docs/agents/*.md`
41
53
  - `skills/*`
54
+ - `scripts/wave-status.sh`
55
+ - `scripts/wave-watch.sh`
56
+ - `docs/guides/signal-wrappers.md`
42
57
  - `docs/plans/current-state.md`
43
58
  - `docs/plans/end-state-architecture.md`
44
59
  - `docs/plans/wave-orchestrator.md`
@@ -73,7 +88,7 @@ pnpm exec wave upgrade
73
88
 
74
89
  ### 3. Sync repo-owned starter surface only if you copied it
75
90
 
76
- The most common sync set for `0.8.5` is:
91
+ The most common sync set for `0.8.6` is:
77
92
 
78
93
  - `docs/agents/wave-launcher-role.md`
79
94
  - `docs/agents/wave-orchestrator-role.md`
@@ -82,17 +97,25 @@ The most common sync set for `0.8.5` is:
82
97
  - `skills/wave-core/`
83
98
  - `skills/role-planner/`
84
99
  - `skills/role-design/`
85
- - `skills/tui-design/` when your repo wants the terminal or operator-surface design reference
100
+ - `skills/tui-design/`
101
+ - `skills/signal-hygiene/`
102
+ - `scripts/wave-status.sh`
103
+ - `scripts/wave-watch.sh`
104
+ - `docs/guides/author-and-run-waves.md`
105
+ - `docs/guides/planner.md`
106
+ - `docs/guides/terminal-surfaces.md`
107
+ - `docs/guides/signal-wrappers.md`
86
108
  - `docs/context7/planner-agent/`
87
109
  - `docs/reference/wave-planning-lessons.md`
110
+ - `docs/reference/cli-reference.md`
111
+ - `docs/reference/skills.md`
112
+ - `docs/reference/sample-waves.md`
88
113
  - `docs/plans/current-state.md`
89
114
  - `docs/plans/end-state-architecture.md`
90
115
  - `docs/plans/wave-orchestrator.md`
91
116
  - `docs/plans/migration.md`
92
- - `docs/reference/skills.md`
93
- - `docs/reference/sample-waves.md`
94
117
 
95
- If your repo copied starter `wave.config.json` defaults, also sync the design-role entries:
118
+ If your repo copied starter `wave.config.json` defaults, also sync:
96
119
 
97
120
  - `roles.designRolePromptPath`
98
121
  - `skills.byRole.design`
@@ -106,29 +129,63 @@ Run these from the repo root:
106
129
  pnpm exec wave doctor --json
107
130
  pnpm exec wave launch --lane main --dry-run --no-dashboard
108
131
  pnpm exec wave control status --lane main --wave 0 --json
132
+ scripts/wave-status.sh --lane main --wave 0
133
+ scripts/wave-watch.sh --lane main --wave 0 --until-change --refresh-ms 500
109
134
  pnpm exec wave coord inbox --lane main --wave 0 --agent A1 --dry-run
110
135
  ```
111
136
 
112
137
  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.
113
138
 
114
- ## `0.8.5` Design-Steward Model
139
+ ## `0.8.7` Release Model
140
+
141
+ The current `0.8.7` surface is three changes together:
142
+
143
+ - the shipped `design` worker role and hybrid design-steward flow introduced in `0.8.5`
144
+ - the signal-driven long-running-agent and wrapper model introduced in `0.8.6`
145
+ - the policy-consistency, targeted-recovery, capability-specific routing, and stable per-wave session reuse hardening introduced in `0.8.7`
146
+
147
+ ### Signal-driven waiting and wrapper model
148
+
149
+ This is the main new behavior in `0.8.6`.
150
+
151
+ Starter repos now include:
115
152
 
116
- This is the main new behavior in the current `0.8.5` surface.
153
+ - `skills/signal-hygiene/`
154
+ - `scripts/wave-status.sh`
155
+ - `scripts/wave-watch.sh`
117
156
 
118
- ### Docs-first design stewards
157
+ Use that model when:
119
158
 
120
- Default design stewards:
159
+ - an external shell loop or CI job should wait for a wave or agent to change state
160
+ - a non-resident agent is intentionally long-running and should wake only on orchestrator-written signal changes
161
+ - a resident orchestrator should explicitly acknowledge that it observed a reroute, answered feedback, or terminal transition
162
+
163
+ The contract is:
164
+
165
+ - the runtime publishes versioned signal snapshots under `.tmp/<lane>-wave-launcher/signals/`
166
+ - long-running watchers receive a signal-state path and signal-ack path in the prompt
167
+ - the watcher writes the ack file immediately after it observes a new signal version
168
+ - wrapper exit codes are now:
169
+ - `0` completed
170
+ - `10` still active or waiting
171
+ - `20` input required
172
+ - `30` signal changed while still active from `wave-watch.sh --until-change`
173
+ - `40` failed
174
+
175
+ If your repo copied operator docs, shell automation, or starter scripts, this is the main sync set to apply from `0.8.6`.
176
+
177
+ ### `0.8.5` design-steward model
178
+
179
+ Docs-first design stewards:
121
180
 
122
181
  - import `docs/agents/wave-design-role.md`
123
182
  - own at least one packet path such as `docs/plans/waves/design/wave-<n>-<agentId>.md`
124
183
  - stay docs or spec-first
125
184
  - finish with `[wave-design] state=<ready-for-implementation|needs-clarification|blocked> ...`
126
185
 
127
- ### Hybrid design stewards
128
-
129
186
  If the wave explicitly assigns non-packet ownership to a design agent, that agent becomes a hybrid design steward.
130
187
 
131
- The runtime now treats that as:
188
+ The runtime treats that as:
132
189
 
133
190
  1. a design pass first
134
191
  2. then the same agent rejoins implementation with normal proof obligations
@@ -143,72 +200,58 @@ For a hybrid design steward, make sure the wave still includes:
143
200
 
144
201
  The second pass must still re-emit `[wave-design]`, and it must also satisfy the normal implementation proof, doc-delta, and component-marker contract.
145
202
 
146
- ### Planner note
147
-
148
- The interactive `wave draft` flow now supports `design` as a worker role and scaffolds the docs-first default path.
149
-
150
- If you want a hybrid design steward today, the safest authoring paths are:
151
-
152
- - edit the drafted wave manually
153
- - or use an agentic planner payload that already declares the design agent's explicit implementation ownership
203
+ 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.
154
204
 
155
205
  ## Version-Specific Upgrade Guidance
156
206
 
157
- ## Upgrading From `0.8.3` To `0.8.5`
207
+ ## Upgrading From `0.8.5` To `0.8.6`
158
208
 
159
- This is the most common one-step package upgrade path.
209
+ This is the smallest upgrade, but it changes the live wait-loop contract for external automation and intentionally long-running agents.
160
210
 
161
- ### What changed across that range
211
+ ### What changed
162
212
 
163
- - `0.8.4` tightened contradiction replay, component-promotion threshold handling, and projection persistence boundaries
164
- - `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
165
- - current operator and planner docs now describe the shipped surface directly instead of splitting behavior between a published package and newer `main`-only additions
213
+ - versioned signal snapshots are now published under `.tmp/<lane>-wave-launcher/signals/`
214
+ - starter repos now include `skills/signal-hygiene/`, `scripts/wave-status.sh`, and `scripts/wave-watch.sh`
215
+ - the runtime injects signal-state plus signal-ack paths into long-running agent and resident-orchestrator prompts
216
+ - `completed` and `failed` now override stale feedback or coordination wakeups in agent signal state
217
+ - wrapper scripts now treat `failed` as terminal with exit `40`
166
218
 
167
219
  ### Required repo changes
168
220
 
169
- Usually none if the repo does not copy starter prompts, skills, or planning docs.
221
+ Usually none if the repo did not copy starter scripts, operator docs, or skill bundles.
170
222
 
171
223
  ### Strongly recommended sync
172
224
 
173
225
  If the repo copied starter surface, sync:
174
226
 
175
- - `docs/agents/wave-design-role.md`
176
- - `skills/role-design/`
177
- - `skills/tui-design/`
178
- - `docs/guides/author-and-run-waves.md`
179
- - `docs/guides/planner.md`
227
+ - `skills/signal-hygiene/`
228
+ - `scripts/wave-status.sh`
229
+ - `scripts/wave-watch.sh`
230
+ - `docs/guides/signal-wrappers.md`
231
+ - `docs/guides/terminal-surfaces.md`
232
+ - `docs/reference/cli-reference.md`
180
233
  - `docs/reference/skills.md`
181
- - `docs/reference/sample-waves.md`
182
234
  - `docs/plans/current-state.md`
183
- - `docs/plans/wave-orchestrator.md`
184
235
  - `docs/plans/end-state-architecture.md`
185
-
186
- If the repo copied starter `wave.config.json` defaults, also sync:
187
-
188
- - `roles.designRolePromptPath`
189
- - `skills.byRole.design`
190
- - `executors.profiles.design-pass`
236
+ - `docs/plans/wave-orchestrator.md`
191
237
 
192
238
  ### Validation focus
193
239
 
194
- - confirm contradiction-blocked replay cases still compare cleanly if the repo keeps replay fixtures
195
- - if the repo uses design stewards, confirm packet-only design waves still block implementation until `ready-for-implementation`
196
- - if the repo uses hybrid design stewards, confirm the same agent rejoins implementation only when the authored wave explicitly gives it code ownership
197
-
198
- ## Upgrading From `0.8.4` To `0.8.5`
240
+ - confirm any existing shell automation treats wrapper exit `40` as terminal failure
241
+ - if the repo uses long-running watchers, confirm they can write the ack file where the prompt tells them to
242
+ - reroute one targeted feedback or coordination request and confirm the resident signal version changes even when the signal kind stays the same
199
243
 
200
- This is the smallest upgrade that still changes authored behavior.
244
+ ## Upgrading From `0.8.4` To `0.8.6`
201
245
 
202
246
  ### What changed
203
247
 
204
- - the optional `design` worker role is now part of the published package surface
205
- - `role-design` and `tui-design` starter bundles now ship with the release
248
+ - `0.8.5` added the optional `design` worker role plus the `role-design` and `tui-design` starter bundles
206
249
  - design stewards can now be docs-first or explicit hybrid design stewards
207
- - prompts, gates, retry or resume planning, reducer state, and local smoke execution now honor that hybrid-design contract consistently
250
+ - `0.8.6` adds signal-driven waiting, `signal-hygiene`, and the seeded wrapper scripts
208
251
 
209
252
  ### Required repo changes
210
253
 
211
- None if your repo does not use design stewards.
254
+ None if your repo does not use design stewards, long-running watcher agents, or copied starter scripts.
212
255
 
213
256
  ### Strongly recommended sync
214
257
 
@@ -217,7 +260,11 @@ If your repo copied starter prompts, skills, or authoring docs, sync:
217
260
  - `docs/agents/wave-design-role.md`
218
261
  - `skills/role-design/`
219
262
  - `skills/tui-design/`
263
+ - `skills/signal-hygiene/`
264
+ - `scripts/wave-status.sh`
265
+ - `scripts/wave-watch.sh`
220
266
  - `docs/guides/author-and-run-waves.md`
267
+ - `docs/guides/signal-wrappers.md`
221
268
  - `docs/guides/planner.md`
222
269
  - `docs/reference/skills.md`
223
270
  - `docs/reference/sample-waves.md`
@@ -226,17 +273,62 @@ If your repo copied starter config defaults, also sync the `designRolePromptPath
226
273
 
227
274
  ### Validation focus
228
275
 
229
- If the repo uses design stewards, dry-run at least one wave that proves:
230
-
231
276
  - the design packet path resolves inside the repo
232
277
  - design runs before implementation
233
278
  - implementation does not start until every design packet is `ready-for-implementation`
234
279
  - hybrid design stewards rejoin implementation when they explicitly own code
235
- - downstream implementation prompts read the same-wave design packet context
280
+ - long-running prompts receive signal-state and ack paths when the repo uses the new waiting model
236
281
 
237
- ## Upgrading From `0.8.0`-`0.8.4` To `0.8.5`
282
+ ## Upgrading From `0.8.3` To `0.8.6`
238
283
 
239
- Treat this as one move to the current `0.8.5` surface.
284
+ This is the most common one-step package upgrade path.
285
+
286
+ ### What changed across that range
287
+
288
+ - `0.8.4` tightened contradiction replay, component-promotion threshold handling, and projection persistence boundaries
289
+ - `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
290
+ - `0.8.6` adds versioned signal snapshots, `signal-hygiene`, prompt-injected signal ack loops, and the seeded operator wrappers
291
+ - current operator and planner docs now describe the shipped surface directly instead of splitting behavior between a published package and newer `main`-only additions
292
+
293
+ ### Required repo changes
294
+
295
+ Usually none if the repo does not copy starter prompts, skills, planning docs, or wrapper scripts.
296
+
297
+ ### Strongly recommended sync
298
+
299
+ If the repo copied starter surface, sync:
300
+
301
+ - `docs/agents/wave-design-role.md`
302
+ - `skills/role-design/`
303
+ - `skills/tui-design/`
304
+ - `skills/signal-hygiene/`
305
+ - `scripts/wave-status.sh`
306
+ - `scripts/wave-watch.sh`
307
+ - `docs/guides/author-and-run-waves.md`
308
+ - `docs/guides/signal-wrappers.md`
309
+ - `docs/guides/planner.md`
310
+ - `docs/reference/skills.md`
311
+ - `docs/reference/sample-waves.md`
312
+ - `docs/plans/current-state.md`
313
+ - `docs/plans/wave-orchestrator.md`
314
+ - `docs/plans/end-state-architecture.md`
315
+
316
+ If the repo copied starter `wave.config.json` defaults, also sync:
317
+
318
+ - `roles.designRolePromptPath`
319
+ - `skills.byRole.design`
320
+ - `executors.profiles.design-pass`
321
+
322
+ ### Validation focus
323
+
324
+ - confirm contradiction-blocked replay cases still compare cleanly if the repo keeps replay fixtures
325
+ - if the repo uses design stewards, confirm packet-only design waves still block implementation until `ready-for-implementation`
326
+ - if the repo uses hybrid design stewards, confirm the same agent rejoins implementation only when the authored wave explicitly gives it code ownership
327
+ - 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
328
+
329
+ ## Upgrading From `0.8.3` To `0.8.7`
330
+
331
+ Treat this as one move to the current `0.8.7` surface.
240
332
 
241
333
  ### What changed across that range
242
334
 
@@ -245,6 +337,7 @@ Treat this as one move to the current `0.8.5` surface.
245
337
  - contradiction replay and component-threshold handling were tightened
246
338
  - projection persistence centralized under `projection-writer.mjs`
247
339
  - the design-role surface is now shipped instead of living only on source `main`
340
+ - versioned signal snapshots, wrapper scripts, and long-running signal ack loops are now part of the shipped operator surface
248
341
 
249
342
  ### Required repo changes
250
343
 
@@ -257,6 +350,7 @@ If your repo copied starter docs or skills, sync:
257
350
  - current operator runbook and architecture docs
258
351
  - planner starter corpus
259
352
  - design-role starter prompt and skill bundles
353
+ - signal-wrapper starter scripts and docs
260
354
  - any repo-local docs that still describe design as “main only” or “future”
261
355
 
262
356
  ### Validation focus
@@ -265,8 +359,9 @@ If your repo copied starter docs or skills, sync:
265
359
  - answer at least one human-feedback ticket in a test lane and confirm the linked clarification or escalation chain closes cleanly
266
360
  - replay one contradiction-blocked trace if your repo relies on replay regression coverage
267
361
  - dry-run one design-steward wave if the repo wants the new authored surface
362
+ - 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
268
363
 
269
- ## Upgrading From `0.6.x` Or `0.7.x` To `0.8.5`
364
+ ## Upgrading From `0.6.x` Or `0.7.x` To `0.8.7`
270
365
 
271
366
  This is the main migration path for older adopted repos.
272
367
 
@@ -278,6 +373,7 @@ This is the main migration path for older adopted repos.
278
373
  - live closure depends on validated result envelopes plus canonical state
279
374
  - control-plane state, reducer state, and replay are first-class runtime surfaces
280
375
  - optional design stewards are now a supported authored shape
376
+ - signal-driven long-running watchers are now a supported operator shape
281
377
 
282
378
  ### Required repo changes
283
379
 
@@ -292,6 +388,7 @@ This is the main migration path for older adopted repos.
292
388
  - the `planner-agentic` entry in `docs/context7/bundles.json`
293
389
  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.
294
390
  6. If the repo wants design stewards, sync the design starter surface listed above and update local authoring docs accordingly.
391
+ 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.
295
392
 
296
393
  ### Additional validation
297
394
 
@@ -305,7 +402,7 @@ pnpm exec wave control proof get --lane main --wave 0 --json
305
402
 
306
403
  If the repo carries proof-first waves, verify that required proof artifacts still exist locally and not only in historical summaries.
307
404
 
308
- ## Upgrading From `0.5.x` Or Earlier To `0.8.5`
405
+ ## Upgrading From `0.5.x` Or Earlier To `0.8.7`
309
406
 
310
407
  Do not treat this as a tiny patch bump.
311
408
 
@@ -314,7 +411,7 @@ Do not treat this as a tiny patch bump.
314
411
  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`.
315
412
  2. Run `pnpm exec wave init --adopt-existing` on a branch so the workspace records install state without overwriting repo-owned material.
316
413
  3. Move the repo onto the `0.6.x` and later surface using the section above.
317
- 4. Sync the planner corpus and, if needed, the design starter surface.
414
+ 4. Sync the planner corpus and, if needed, the design starter surface plus the signal-wrapper starter surface.
318
415
  5. Re-run the full validation checklist before any live executor run.
319
416
 
320
417
  ### Why
@@ -326,6 +423,7 @@ Older repos often differ in:
326
423
  - runtime config keys
327
424
  - planner starter corpus
328
425
  - proof and retry operator surfaces
426
+ - wrapper and signal-monitoring expectations
329
427
  - generated state layout under `.tmp/`
330
428
 
331
429
  Trying to jump directly with ad hoc edits usually leaves hidden drift in prompts, docs, or config.
@@ -345,6 +443,7 @@ Trying to jump directly with ad hoc edits usually leaves hidden drift in prompts
345
443
  - `docs/plans/wave-orchestrator.md`
346
444
  - `docs/plans/end-state-architecture.md`
347
445
  - `docs/plans/migration.md`
446
+ - `docs/guides/signal-wrappers.md`
348
447
  - `docs/reference/cli-reference.md`
349
448
  - `docs/reference/wave-control.md`
350
449
  - `docs/reference/sample-waves.md`
@@ -366,6 +465,8 @@ Use this exact sequence unless your repo has a better repo-specific smoke suite.
366
465
  pnpm exec wave doctor --json
367
466
  pnpm exec wave launch --lane main --dry-run --no-dashboard
368
467
  pnpm exec wave control status --lane main --wave 0 --json
468
+ scripts/wave-status.sh --lane main --wave 0
469
+ scripts/wave-watch.sh --lane main --wave 0 --until-change --refresh-ms 500
369
470
  pnpm exec wave coord show --lane main --wave 0 --dry-run --json
370
471
  pnpm exec wave coord inbox --lane main --wave 0 --agent A1 --dry-run
371
472
  ```
@@ -394,15 +495,21 @@ For repos that depend on replay parity, replay at least:
394
495
  ### A live lane looks blocked after the bump
395
496
 
396
497
  - use `wave control status --lane <lane> --wave <n> --json`
397
- - confirm whether the blocker is canonical coordination, dependency, proof, human-input, or design-gate state
498
+ - confirm whether the blocker is canonical coordination, dependency, proof, human-input, design-gate, or signal-ready state
398
499
  - do not trust generated markdown alone
399
500
 
501
+ ### External automation hangs after the upgrade
502
+
503
+ - confirm your wrapper loop treats exit `40` as terminal failure
504
+ - confirm `wave-watch.sh --until-change` expects exit `30` only for non-terminal signal changes
505
+ - if a long-running agent never wakes, inspect its ack file under `.tmp/<lane>-wave-launcher/signals/wave-<n>/acks/`
506
+
400
507
  ### Replay differs from old expectations
401
508
 
402
509
  - verify whether the trace declares promoted components
403
510
  - compare `storedOutcome.gateSnapshot` against recomputed replay output before changing live policy
404
- - if the repo copied local replay docs, update them to the current reducer and envelope model
511
+ - if the repo copied local replay docs, update them to the current reducer, envelope, and signal model
405
512
 
406
513
  ## Summary
407
514
 
408
- The current `0.8.5` surface keeps the same authority-set and phase-engine architecture, but it now ships the design-role starter surface and the hybrid design-steward runtime model 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, and runbooks so they describe the runtime the package now ships.
515
+ The current `0.8.7` surface keeps the same authority-set and phase-engine architecture, ships both the design-role starter surface and the signal-driven long-running-agent starter surface, and now also hardens policy consistency, targeted recovery, capability-specific routing, and stable per-wave tmux session reuse. 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.
@@ -55,6 +55,8 @@ The live runtime is organized around explicit modules:
55
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
56
  - treats design packets as a first-class pre-implementation gate when a wave declares `design` workers
57
57
  - rebuilds contradiction blockers from canonical control-plane events during replay and materializes human-blocked waves as `clarifying` plus blocked `waveState`
58
+ - distinguishes hard, soft, stale, advisory, proof-critical, and closure-critical blockers instead of treating every open coordination record as equally blocking
59
+ - turns recoverable timeout, max-turn, rate-limit, and missing-status failures into targeted recovery intent plus bounded repair work when proof-critical barriers are not present
58
60
 
59
61
  ## Main Commands
60
62
 
@@ -77,6 +79,8 @@ The live runtime is organized around explicit modules:
77
79
  - `pnpm exec wave feedback list --lane main --pending`
78
80
  - `pnpm exec wave control status --lane main --wave 0 --json`
79
81
  - `pnpm exec wave control status --lane main --wave 0 --agent A1 --json`
82
+ - `scripts/wave-status.sh --lane main --wave 0 --agent A1`
83
+ - `scripts/wave-watch.sh --lane main --wave 0 --agent A1 --until-change --refresh-ms 500`
80
84
  - `pnpm exec wave coord inbox --lane main --wave 0 --agent A1 --dry-run`
81
85
  - `pnpm exec wave control task create --lane main --wave 0 --agent A1 --kind blocker --summary "Need repository decision"`
82
86
  - `pnpm exec wave control task act reassign --lane main --wave 0 --id <task-id> --to A2`
@@ -159,11 +163,13 @@ pnpm exec wave launch --lane main --start-wave 0 --end-wave 0 --executor codex -
159
163
  ## Coordination Surfaces
160
164
 
161
165
  - `wave control status` is the read-only projection for "why blocked / why retrying" at wave or agent scope. It returns blocking edges, logical agent state, tasks, dependencies, rerun intent, active proof bundles, and next timers from one materialized control-plane view.
162
- - `wave control task create|get|list|act` is the operator task surface for blocking requests, blockers, clarification chains, human-input tickets, escalations, and informative handoffs, evidence, claims, and decisions. `wave control status` only treats requests, blockers, clarifications, human-input, escalations, helper assignments, and required dependencies as blocking edges.
166
+ - `wave control task create|get|list|act` is the operator task surface for blocking requests, blockers, clarification chains, human-input tickets, escalations, and informative handoffs, evidence, claims, and decisions. `wave control status` only treats requests, blockers, clarifications, human-input, escalations, helper assignments, and required dependencies as candidate blocking edges, and then only when their current task or record metadata still marks them blocking.
167
+ - Tasks now carry explicit `blocking` and `blockerSeverity` semantics. Operators can keep work visible while removing it from the active blocking edge with `defer`, `mark-advisory`, `mark-stale`, or `resolve-policy` when repo policy allows.
163
168
  - A fresh live `wave launch --start-wave <n> --end-wave <n>` now clears the previous auto-generated relaunch plan for that wave before selecting the initial implementation fan-out. Pass `--resume-control-state` only when you intentionally want to keep that persisted relaunch selection.
164
- - `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.
169
+ - `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. The launcher can also queue one automatically after recoverable timeout, max-turn, rate-limit, or missing-status failures.
165
170
  - `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/`.
166
171
  - `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.
172
+ - `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.
167
173
  - `wave coord render` regenerates the markdown board projection from the canonical coordination log.
168
174
  - `wave coord inbox` writes the compiled shared summary plus the selected agent inbox.
169
175
 
@@ -175,7 +181,7 @@ The canonical conversational state is the JSONL log under `.tmp/<lane>-wave-laun
175
181
 
176
182
  Control-plane facts that drive reruns, proof, attempt state, contradictions, facts, human-input workflow, and operator tasks are appended separately under `.tmp/<lane>-wave-launcher/control-plane/`. Result envelopes live under `.tmp/<lane>-wave-launcher/results/wave-<n>/attempt-<a>/<agent>.json`. Legacy proof and retry files remain derived projections for compatibility, not decision inputs.
177
183
 
178
- Capability-targeted requests now become deterministic helper assignments. The runtime resolves the assignee from explicit targets, `capabilityRouting.preferredAgents`, then least-busy matching capability owners, writes that assignment into `.tmp/<lane>-wave-launcher/assignments/`, mirrors the decision into coordination state, and keeps the wave blocked until the linked follow-up resolves.
184
+ Capability-targeted requests now become deterministic helper assignments. The runtime resolves the assignee from explicit targets, `capabilityRouting.preferredAgents`, then matching capability owners with demonstrated same-wave completions, then least-busy fallback, writes that assignment into `.tmp/<lane>-wave-launcher/assignments/`, mirrors the decision into coordination state, and keeps the wave blocked until the linked follow-up resolves or is explicitly downgraded by policy.
179
185
 
180
186
  Clarification flow is orchestrator-first:
181
187
 
@@ -185,7 +191,7 @@ Clarification flow is orchestrator-first:
185
191
  4. Routed clarification follow-up requests remain blocking until they resolve.
186
192
  5. Human escalations are written back into coordination state, the ledger, and trace artifacts.
187
193
 
188
- During live runs, the orchestrator now keeps an active supervision and state-refresh loop while agents are still running. It refreshes the derived coordination surfaces on cadence, surfaces overdue acknowledgements and stale clarification chains in dashboards and traces, and can reroute clarification follow-up requests inside the same attempt when the routed owner never acknowledges them.
194
+ During live runs, the orchestrator now keeps an active supervision and state-refresh loop while agents are still running. It refreshes the derived coordination surfaces on cadence, surfaces overdue acknowledgements and stale clarification chains in dashboards and traces, can reroute clarification follow-up requests inside the same attempt when the routed owner never acknowledges them, and can leave non-critical advisory or stale records visible without forcing the whole wave into terminal failure.
189
195
 
190
196
  If you opt into `--resident-orchestrator`, the launcher also starts a long-running non-owning orchestrator session for the wave. That session can inspect the same coordination artifacts and intervene through coordination records, but it does not override reducer, gate, or closure decisions.
191
197
 
@@ -363,7 +369,7 @@ For the complete syntax of every command, flag, and subcommand, see [docs/refere
363
369
  - Skills resolve only after that executor choice is known. Runtime-specific skill overlays are regenerated whenever retry-time fallback changes the selected executor.
364
370
  - Runtime mix targets are enforced before launch and again before any retry-time fallback reassignment.
365
371
  - Fallbacks are declared in profiles or lane policy, can be applied automatically on retry when the next executor is available and still satisfies mix targets, and are recorded in the ledger, integration summary, and traces when used.
366
- - Generic `budget.minutes` caps per-agent attempt timeouts. Generic `budget.turns` seeds `claude.maxTurns` and `opencode.steps` when executor-specific values are not set; Codex turn ceilings remain external to Wave and show up in preview metadata as opaque when Wave cannot inspect them, though live previews now record an observed ceiling if the Codex runtime later logs one explicitly.
372
+ - Generic `budget.minutes` caps per-agent attempt timeouts. Generic `budget.turns` remains advisory metadata unless the runtime-specific ceiling is declared explicitly through `claude.maxTurns` or `opencode.steps`; Codex turn ceilings remain external to Wave and show up in preview metadata as opaque when Wave cannot inspect them, though live previews now record an observed ceiling if the Codex runtime later logs one explicitly.
367
373
  - The launcher writes runtime overlay files under `.tmp/<lane>-wave-launcher/executors/`; these should stay ignored and local.
368
374
 
369
375
  Runtime authoring examples: