@chllming/wave-orchestration 0.8.5 → 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 (38) hide show
  1. package/CHANGELOG.md +24 -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 +13 -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 +165 -72
  16. package/docs/plans/wave-orchestrator.md +3 -0
  17. package/docs/reference/cli-reference.md +11 -2
  18. package/docs/reference/npmjs-trusted-publishing.md +2 -2
  19. package/docs/reference/sample-waves.md +5 -5
  20. package/docs/reference/skills.md +9 -1
  21. package/docs/reference/wave-control.md +2 -0
  22. package/package.json +1 -1
  23. package/releases/manifest.json +19 -0
  24. package/scripts/context7-api-check.sh +57 -13
  25. package/scripts/wave-orchestrator/control-cli.mjs +19 -0
  26. package/scripts/wave-orchestrator/coordination.mjs +35 -0
  27. package/scripts/wave-orchestrator/install.mjs +2 -0
  28. package/scripts/wave-orchestrator/launcher-runtime.mjs +11 -0
  29. package/scripts/wave-orchestrator/launcher.mjs +20 -0
  30. package/scripts/wave-orchestrator/session-supervisor.mjs +113 -0
  31. package/scripts/wave-orchestrator/shared.mjs +1 -0
  32. package/scripts/wave-orchestrator/signals.mjs +681 -0
  33. package/scripts/wave-orchestrator/wave-control-schema.mjs +2 -0
  34. package/scripts/wave-status.sh +200 -0
  35. package/scripts/wave-watch.sh +200 -0
  36. package/skills/README.md +3 -0
  37. package/skills/signal-hygiene/SKILL.md +51 -0
  38. package/skills/signal-hygiene/skill.json +20 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.6 - 2026-03-25
4
+
5
+ ### Added
6
+
7
+ - Added canonical wave and per-agent signal projections under `.tmp/<lane>-wave-launcher/signals/`, plus the `signal-hygiene` starter skill for long-running agents that should wait on versioned wake signals instead of exiting after a one-shot pass.
8
+ - Added seeded operator wrappers `scripts/wave-status.sh` and `scripts/wave-watch.sh` as thin readers over `wave control status --json`, including `--agent <id>` targeting and `--until-change` polling for external automation.
9
+ - Added [docs/guides/signal-wrappers.md](./docs/guides/signal-wrappers.md), a dedicated operator guide for signal snapshots, wrapper exit codes, and the ack-loop contract used by long-running agents and the resident orchestrator.
10
+
11
+ ### Changed
12
+
13
+ - Updated the shipped package metadata, README, current-state notes, migration guide, terminal and CLI docs, architecture docs, sample-wave docs, and npm publishing instructions to advertise `0.8.6` as the current release surface.
14
+ - Documented the long-running signal model explicitly: prompt-level signal-state plus ack-path injection, versioned signal snapshots for both waves and agents, and wrapper-driven monitoring for external operator scripts.
15
+
16
+ ### Fixed And Hardened
17
+
18
+ - Agent signal materialization now treats wave-level `completed` and `failed` as terminal, so stale answered feedback or pending coordination tasks cannot keep long-running agents in a non-terminal wait state after the wave has already closed.
19
+ - Resident orchestrator signal versions now bump when only `targetAgentIds` change, so reroutes that keep the same signal kind still wake long-running residents and watchers correctly.
20
+ - Wrapper exit semantics now treat `failed` as terminal with exit code `40`, so external monitors and `signal-hygiene` loops stop waiting when the wave fails instead of hanging on the generic active path.
21
+
22
+ ### Testing And Validation
23
+
24
+ - Added regression coverage for terminal signal precedence, resident reroute versioning, and terminal-failure wrapper exits.
25
+ - Re-ran the full Vitest suite, `wave doctor --json`, and `wave launch --lane main --dry-run --no-dashboard`.
26
+
3
27
  ## 0.8.5 - 2026-03-25
4
28
 
5
29
  ### Added
package/README.md CHANGED
@@ -103,18 +103,18 @@ Wave is built to mitigate those failures with a canonical authority set, generat
103
103
 
104
104
  Current release:
105
105
 
106
- - `@chllming/wave-orchestration@0.8.5`
107
- - Release tag: [`v0.8.5`](https://github.com/chllming/agent-wave-orchestrator/releases/tag/v0.8.5)
106
+ - `@chllming/wave-orchestration@0.8.6`
107
+ - Release tag: [`v0.8.6`](https://github.com/chllming/agent-wave-orchestrator/releases/tag/v0.8.6)
108
108
  - Public install path: npmjs
109
109
  - Authenticated fallback: GitHub Packages
110
110
 
111
- Highlights in `0.8.5`:
111
+ Highlights in `0.8.6`:
112
112
 
113
- - The optional `design` worker role is now part of the shipped release surface, including `docs/agents/wave-design-role.md`, `skills/role-design/`, and `skills/tui-design/`.
114
- - Design stewards are docs-first by default, but waves can now explicitly assign code ownership and get a hybrid two-pass flow: design packet first, implementation follow-through second.
115
- - Gates, retry or resume planning, reducer state, prompts, local-executor smoke behavior, and result envelopes now all agree on that hybrid design-steward contract.
116
- - The migration guide is now a practical upgrade document for fresh adoption plus upgrades from `0.8.3`, `0.8.4`, `0.8.0`-`0.8.4`, `0.6.x`-`0.7.x`, and `0.5.x` or earlier.
117
- - Release docs, sample waves, current-state notes, and publishing instructions now point at the `0.8.5` surface.
113
+ - The shipped starter surface now includes `skills/signal-hygiene/` plus seeded `scripts/wave-status.sh` and `scripts/wave-watch.sh` wrappers for long-running-agent and operator wait loops.
114
+ - Long-running agents and resident orchestrators now get prompt-level signal-state and signal-ack paths, so wakeups are edge-triggered by versioned signal changes instead of relying on terminal injection.
115
+ - Versioned wave or agent signal snapshots are now a first-class operator surface under `.tmp/<lane>-wave-launcher/signals/`, with failure treated as terminal in both the runtime and the wrapper exit contract.
116
+ - `0.8.5` design-role and hybrid design-steward behavior remains part of the shipped release surface, and the current migration guide now covers the new signal-wrapper model on top of that design-first runtime.
117
+ - Release docs, current-state notes, and publishing instructions now point at the `0.8.6` surface.
118
118
 
119
119
  Requirements:
120
120
 
@@ -148,10 +148,14 @@ The starter surface includes:
148
148
  - `docs/agents/wave-design-role.md`
149
149
  - `skills/role-design/`
150
150
  - `skills/tui-design/` for terminal and operator-surface design work
151
+ - `skills/signal-hygiene/` for intentionally long-running watcher agents
152
+ - `scripts/wave-status.sh` and `scripts/wave-watch.sh` for external wait loops
151
153
  - `wave.config.json` defaults for `roles.designRolePromptPath`, `skills.byRole.design`, and the `design-pass` executor profile
152
154
 
153
155
  Interactive `wave draft` scaffolds the docs-first design-steward path. If you want a hybrid design steward, author that wave explicitly or use an agentic planner payload that gives the same design agent implementation-owned paths plus the normal implementation contract sections.
154
156
 
157
+ If a non-resident agent should stay alive and react only to orchestrator-written signal changes, add `signal-hygiene` explicitly in `### Skills`. That bundle uses the prompt-injected signal-state and ack paths instead of inventing a second wakeup surface. For shell automation and the wrapper contract, see [docs/guides/signal-wrappers.md](./docs/guides/signal-wrappers.md).
158
+
155
159
  When runtime launch commands detect a newer npmjs release, Wave prints a non-blocking update notice on stderr. The fast path is `pnpm exec wave self-update`, which updates the dependency, prints the changelog delta, and then records the workspace upgrade report.
156
160
 
157
161
  ## Common Commands
@@ -183,7 +187,7 @@ pnpm exec wave self-update
183
187
  - `wave launch` and `wave autonomous`
184
188
  Live execution, dry-run validation, retry cadence, terminal surfaces, and orchestrator options.
185
189
  - `wave control`
186
- Read-only live status plus operator task, rerun, proof, and telemetry control surfaces.
190
+ Read-only live status plus operator task, rerun, proof, telemetry, and versioned signal surfaces. Seeded helper scripts `scripts/wave-status.sh` and `scripts/wave-watch.sh` are thin readers over `wave control status --json`.
187
191
  - `wave coord` and `wave dep`
188
192
  Coordination-log and cross-lane dependency utilities. `wave control` is the preferred operator surface; `wave coord` remains useful for direct log inspection and rendering.
189
193
  - `wave project`, `wave draft`, and `wave adhoc`
@@ -226,6 +230,7 @@ codex mcp list
226
230
  - [docs/guides/planner.md](./docs/guides/planner.md): `wave project` and `wave draft` workflow
227
231
  - [docs/agents/wave-design-role.md](./docs/agents/wave-design-role.md): standing prompt for the optional pre-implementation design steward
228
232
  - [docs/guides/terminal-surfaces.md](./docs/guides/terminal-surfaces.md): tmux, VS Code terminal registry, and dry-run surfaces
233
+ - [docs/guides/signal-wrappers.md](./docs/guides/signal-wrappers.md): versioned signal snapshots, wrapper scripts, and long-running-agent ack loops
229
234
  - [docs/reference/sample-waves.md](./docs/reference/sample-waves.md): showcase-first authored waves, including a high-fidelity repo-landed rollout example
230
235
  - [docs/plans/examples/wave-example-design-handoff.md](./docs/plans/examples/wave-example-design-handoff.md): optional design-steward example that hands a validated design packet to downstream implementation owners
231
236
  - [docs/plans/examples/wave-example-rollout-fidelity.md](./docs/plans/examples/wave-example-rollout-fidelity.md): concrete example of what good wave fidelity looks like for a narrow, closure-ready outcome
package/docs/README.md CHANGED
@@ -36,7 +36,9 @@ The useful path is journey-first:
36
36
  - Drafting or revising waves:
37
37
  Read [guides/author-and-run-waves.md](./guides/author-and-run-waves.md), then use [plans/wave-orchestrator.md](./plans/wave-orchestrator.md) as the operator runbook.
38
38
  - Adding an optional pre-implementation design steward:
39
- Read [guides/author-and-run-waves.md](./guides/author-and-run-waves.md), then the standing prompt in [agents/wave-design-role.md](./agents/wave-design-role.md). The shipped `0.8.5` surface includes `role-design` plus `tui-design`, with docs-first design stewards by default and explicit hybrid design stewards when a wave also gives that same agent code ownership.
39
+ Read [guides/author-and-run-waves.md](./guides/author-and-run-waves.md), then the standing prompt in [agents/wave-design-role.md](./agents/wave-design-role.md). The shipped `0.8.6` surface includes `role-design` plus `tui-design`, with docs-first design stewards by default and explicit hybrid design stewards when a wave also gives that same agent code ownership.
40
+ - Want signal-driven automation or long-running watcher loops:
41
+ Read [guides/signal-wrappers.md](./guides/signal-wrappers.md). It covers the seeded `wave-status.sh` and `wave-watch.sh` wrappers, the versioned signal snapshot files, and the ack-loop contract behind `signal-hygiene`.
40
42
  - Adding a security review pass:
41
43
  Read [plans/wave-orchestrator.md](./plans/wave-orchestrator.md) and the standing reviewer prompt in [agents/wave-security-role.md](./agents/wave-security-role.md).
42
44
  - Upgrading an existing repo:
@@ -13,33 +13,28 @@
13
13
  "description": "Node.js and TypeScript runtime docs for JavaScript service and tooling work.",
14
14
  "libraries": [
15
15
  {
16
- "libraryName": "nodejs",
16
+ "libraryId": "/nodejs/node",
17
17
  "queryHint": "runtime APIs, child processes, streams, filesystem behavior, and process lifecycle"
18
18
  },
19
19
  {
20
- "libraryName": "typescript",
20
+ "libraryId": "/microsoft/typescript",
21
21
  "queryHint": "types, declarations, module resolution, tsconfig, and compiler behavior"
22
22
  }
23
23
  ]
24
24
  },
25
25
  "planner-agentic": {
26
- "description": "Repo-curated planning research published as a custom Context7 library for the agentic planner.",
27
- "libraries": [
28
- {
29
- "libraryName": "wave-planner-agentic",
30
- "queryHint": "wave planning best practices, maturity alignment, closure gates, proof surfaces, rollout evidence, and coordination failure prevention"
31
- }
32
- ]
26
+ "description": "Placeholder bundle for a repo-published planner corpus. Keep this empty until the planner corpus is published to Context7 and the exact libraryId is known.",
27
+ "libraries": []
33
28
  },
34
29
  "react-web": {
35
30
  "description": "React and Next.js docs for frontend work.",
36
31
  "libraries": [
37
32
  {
38
- "libraryName": "react",
33
+ "libraryId": "/reactjs/react.dev",
39
34
  "queryHint": "components, hooks, rendering, forms, and data flow"
40
35
  },
41
36
  {
42
- "libraryName": "nextjs",
37
+ "libraryId": "/websites/nextjs",
43
38
  "queryHint": "routing, server components, data fetching, and app router behavior"
44
39
  }
45
40
  ]
@@ -48,11 +43,11 @@
48
43
  "description": "Python backend docs for API and worker services.",
49
44
  "libraries": [
50
45
  {
51
- "libraryName": "python",
46
+ "libraryId": "/websites/python_3",
52
47
  "queryHint": "language features, packaging, typing, and standard library behavior"
53
48
  },
54
49
  {
55
- "libraryName": "fastapi",
50
+ "libraryId": "/fastapi/fastapi",
56
51
  "queryHint": "routing, request validation, dependency injection, and OpenAPI behavior"
57
52
  }
58
53
  ]
@@ -61,11 +56,15 @@
61
56
  "description": "Go service and workflow docs for backend work.",
62
57
  "libraries": [
63
58
  {
64
- "libraryName": "golang",
65
- "queryHint": "packages, testing, concurrency, errors, and module layout"
59
+ "libraryId": "/websites/go_dev_ref_spec",
60
+ "queryHint": "language syntax, testing, concurrency, errors, and module semantics"
61
+ },
62
+ {
63
+ "libraryId": "/websites/pkg_go_dev",
64
+ "queryHint": "standard packages, modules, package layout, and reference behavior"
66
65
  },
67
66
  {
68
- "libraryName": "temporal",
67
+ "libraryId": "/temporalio/documentation",
69
68
  "queryHint": "workflow setup, activities, schedules, retries, and worker bootstrap"
70
69
  }
71
70
  ]
@@ -74,11 +73,11 @@
74
73
  "description": "Database and storage docs for persistence work.",
75
74
  "libraries": [
76
75
  {
77
- "libraryName": "postgresql",
76
+ "libraryId": "/websites/postgresql_current",
78
77
  "queryHint": "schema changes, indexes, transactions, constraints, and query behavior"
79
78
  },
80
79
  {
81
- "libraryName": "sqlite",
80
+ "libraryId": "/websites/sqlite_docs",
82
81
  "queryHint": "local persistence, fts, schema migration, and durability patterns"
83
82
  }
84
83
  ]
@@ -87,11 +86,11 @@
87
86
  "description": "Infrastructure and service-manager docs for deployment and operations work.",
88
87
  "libraries": [
89
88
  {
90
- "libraryName": "docker",
89
+ "libraryId": "/docker/docs",
91
90
  "queryHint": "images, builds, volumes, networking, and runtime configuration"
92
91
  },
93
92
  {
94
- "libraryName": "systemd",
93
+ "libraryId": "/websites/systemd_io",
95
94
  "queryHint": "units, dependencies, restart policies, readiness, and service management"
96
95
  }
97
96
  ]
@@ -13,7 +13,10 @@ Why it exists:
13
13
  Publish target:
14
14
 
15
15
  - bundle id: `planner-agentic`
16
- - library name: `wave-planner-agentic`
16
+ - committed repo config should stay empty until the planner corpus is published
17
+ and Context7 returns an exact `libraryId`
18
+ - once published, record that returned `libraryId` in
19
+ `docs/context7/bundles.json` instead of committing a guessed library name
17
20
 
18
21
  Refresh the copied corpus after updating the agent-context cache:
19
22
 
@@ -47,6 +47,7 @@ When you review the generated wave, tighten the parts the planner cannot fully i
47
47
  - `cont-EVAL` targets when needed
48
48
  - security review expectations when needed
49
49
  - explicit `### Skills` only where defaults are not enough
50
+ - `signal-hygiene` only when an agent is intentionally long-running and should wait for orchestrator-written signal changes instead of exiting after a one-shot pass
50
51
 
51
52
  If you want examples of denser hand-authored waves, read [docs/reference/sample-waves.md](../reference/sample-waves.md).
52
53
 
@@ -60,7 +61,7 @@ Good fits:
60
61
  - multi-owner waves where downstream implementers need the same decisions and assumptions
61
62
  - ambiguous tasks where open questions should become explicit before code owners fan out
62
63
 
63
- The starter contract in `0.8.5` is:
64
+ The starter contract in `0.8.6` is:
64
65
 
65
66
  - import `docs/agents/wave-design-role.md`
66
67
  - own one packet such as `docs/plans/waves/design/wave-<n>-<agentId>.md`
@@ -72,6 +73,8 @@ When a wave includes one or more design agents, the runtime runs them before cod
72
73
 
73
74
  If a wave explicitly gives a design steward source-code ownership, that agent becomes a hybrid design steward. The runtime still runs its design pass first, then includes the same agent in the later implementation fan-out with normal proof obligations. Interactive `wave draft` scaffolds the docs-first default; use manual edits or an agentic planner payload when you want the hybrid path.
74
75
 
76
+ For long-running non-design agents that should stay alive and react only to feedback or coordination changes, add `signal-hygiene` explicitly in `### Skills`. That skill is not for normal one-shot implementation work.
77
+
75
78
  ## 3. Choose The Execution Posture
76
79
 
77
80
  Every wave should be authored with an explicit operating posture in mind:
@@ -6,7 +6,7 @@ If you want the full author-to-launch workflow, start with [author-and-run-waves
6
6
 
7
7
  It reduces repeated setup questions, stores project defaults, and generates wave specs plus markdown that already fit the launcher.
8
8
 
9
- The published `0.8.5` package already includes the optional `design` worker role for pre-implementation design packets. This guide calls out where that affects drafting.
9
+ The published `0.8.6` package already includes the optional `design` worker role for pre-implementation design packets. This guide calls out where that affects drafting.
10
10
 
11
11
  ## What Ships Today
12
12
 
@@ -90,6 +90,8 @@ The planner agent reads repo-local planning sources directly, and it can also
90
90
  prefetch a planner-specific Context7 bundle when
91
91
  `planner.agentic.context7Bundle` points at a published library. The tracked
92
92
  source corpus for that library lives under `docs/context7/planner-agent/`.
93
+ The starter repo keeps that bundle as a placeholder until the planner corpus is
94
+ actually published and the exact `libraryId` is known.
93
95
 
94
96
  Supported templates today:
95
97
 
@@ -0,0 +1,165 @@
1
+ # Signal Wrappers And Long-Running Wake Loops
2
+
3
+ Use this guide when you want shell-friendly monitoring, external automation hooks, or intentionally long-running agents that should wake only when the orchestrator publishes a new signal version.
4
+
5
+ If you want the broader tmux or VS Code operator flow, read [terminal-surfaces.md](./terminal-surfaces.md). This page stays focused on the signal snapshots, wrapper scripts, and ack-loop contract.
6
+
7
+ ## What The Runtime Writes
8
+
9
+ Wave now publishes versioned signal snapshots under:
10
+
11
+ - `.tmp/<lane>-wave-launcher/signals/wave-<n>.json`
12
+ Wave-level signal for the whole wave.
13
+ - `.tmp/<lane>-wave-launcher/signals/wave-<n>/<agentId>.json`
14
+ Per-agent signal state.
15
+ - `.tmp/<lane>-wave-launcher/signals/wave-<n>/acks/<agentId>.json`
16
+ Per-agent acknowledgement file written by a long-running watcher after it observes a new signal version.
17
+
18
+ The resident orchestrator uses the same pattern with `resident-orchestrator` as the agent id.
19
+
20
+ Signal snapshots are derived projections, not canonical decision state. They are machine-friendly wake surfaces built from `wave control status --json`.
21
+
22
+ ## Signal Kinds
23
+
24
+ The shipped signal vocabulary is:
25
+
26
+ - `stable`
27
+ - `waiting`
28
+ - `feedback-requested`
29
+ - `feedback-answered`
30
+ - `coordination-action`
31
+ - `resume-ready`
32
+ - `completed`
33
+ - `failed`
34
+
35
+ `completed` and `failed` are terminal. Long-running watchers should stop waiting once either one appears.
36
+
37
+ ## Wrapper Scripts
38
+
39
+ Starter repos now include two thin helper scripts:
40
+
41
+ - `scripts/wave-status.sh`
42
+ - `scripts/wave-watch.sh`
43
+
44
+ They read `wave control status --json`. They do not recompute status independently.
45
+
46
+ ### `wave-status.sh`
47
+
48
+ Examples:
49
+
50
+ ```bash
51
+ scripts/wave-status.sh --lane main --wave 3
52
+ scripts/wave-status.sh --lane main --wave 3 --agent A1
53
+ scripts/wave-status.sh --lane main --wave 3 --agent A1 --json
54
+ ```
55
+
56
+ Exit codes:
57
+
58
+ - `0`
59
+ Terminal success (`signal=completed`)
60
+ - `10`
61
+ Still active or waiting (`stable`, `waiting`, `feedback-answered`, `coordination-action`, `resume-ready`)
62
+ - `20`
63
+ Input required (`signal=feedback-requested`)
64
+ - `40`
65
+ Terminal failure (`signal=failed`)
66
+
67
+ The printed machine line includes `signal`, `phase`, `status`, `version`, `blocking`, and `should_wake`.
68
+
69
+ ### `wave-watch.sh`
70
+
71
+ Examples:
72
+
73
+ ```bash
74
+ scripts/wave-watch.sh --lane main --wave 3 --agent A1 --follow
75
+ scripts/wave-watch.sh --lane main --wave 3 --agent A1 --until-change --refresh-ms 500
76
+ ```
77
+
78
+ Modes:
79
+
80
+ - `--follow`
81
+ Keep polling until the signal becomes terminal or input-required.
82
+ - `--until-change`
83
+ Exit as soon as the watched signal version changes.
84
+
85
+ Exit codes:
86
+
87
+ - `0`
88
+ Terminal success
89
+ - `20`
90
+ Input required
91
+ - `30`
92
+ The watched signal version changed, but the wave is still active
93
+ - `40`
94
+ Terminal failure
95
+
96
+ Use `--until-change` when an outer supervisor or CI job should re-enter only after a new signal is published.
97
+
98
+ ## Long-Running Agents
99
+
100
+ For non-resident agents, opt in explicitly with:
101
+
102
+ ```md
103
+ ### Skills
104
+
105
+ - signal-hygiene
106
+ ```
107
+
108
+ That skill is only for intentionally long-running agents. Do not attach it to normal one-shot implementation agents.
109
+
110
+ When `signal-hygiene` is active, the runtime injects two prompt-visible paths:
111
+
112
+ - the signal-state JSON path
113
+ - the signal-ack JSON path
114
+
115
+ The watcher loop is:
116
+
117
+ 1. Read the signal state.
118
+ 2. Compare its `version` with the version already recorded in the ack file.
119
+ 3. If the version did not change, stay idle.
120
+ 4. If the version increased, write the ack file immediately.
121
+ 5. Re-read the inbox, shared summary, message board, and any referenced artifacts.
122
+ 6. Act once for that version.
123
+ 7. Stop entirely when the signal becomes `completed` or `failed`.
124
+
125
+ Ack payload shape:
126
+
127
+ ```json
128
+ {
129
+ "agentId": "A1",
130
+ "version": 4,
131
+ "signal": "coordination-action",
132
+ "observedAt": "2026-03-25T19:00:00.000Z"
133
+ }
134
+ ```
135
+
136
+ ## Resident Orchestrator Behavior
137
+
138
+ The resident orchestrator does not need the `signal-hygiene` skill. It always receives the same signal-state and ack-path contract when `--resident-orchestrator` is enabled.
139
+
140
+ That lets the launcher know whether the resident monitor actually observed a reroute, feedback answer, or terminal state change.
141
+
142
+ ## External Automation Pattern
143
+
144
+ Typical shell loop:
145
+
146
+ ```bash
147
+ while true; do
148
+ scripts/wave-watch.sh --lane main --wave 3 --agent A1 --until-change --refresh-ms 500
149
+ code=$?
150
+ if [ "$code" -eq 0 ]; then
151
+ echo "wave completed"
152
+ break
153
+ fi
154
+ if [ "$code" -eq 20 ]; then
155
+ echo "human input required"
156
+ break
157
+ fi
158
+ if [ "$code" -eq 40 ]; then
159
+ echo "wave failed"
160
+ break
161
+ fi
162
+ done
163
+ ```
164
+
165
+ Use `wave control status --json` directly when you need the full structured payload. Use the wrapper scripts when you want stable exit codes and a single machine-readable line.
@@ -78,6 +78,19 @@ Important flags:
78
78
  - Pair `--keep-sessions` with incident review or deep debugging, not as a default steady-state mode.
79
79
  - Pair `--no-dashboard` with scripted dry-runs or when the board and summaries are sufficient.
80
80
 
81
+ ## Operator Wrappers
82
+
83
+ Starter repos now include two thin helper scripts:
84
+
85
+ - `scripts/wave-status.sh`
86
+ Reads `wave control status --json`, prints a single machine-friendly line, and exits `0` for completed, `10` for waiting/running, `20` for input-required, and `40` for failed.
87
+ - `scripts/wave-watch.sh`
88
+ Polls the same status JSON until the watched signal version changes. `--until-change` exits `30` when the signal changed but the wave is still active, and both follow mode and until-change mode terminate immediately with `40` on failed terminal signals.
89
+
90
+ Both wrappers are convenience readers only. The canonical surface is the versioned signal projection under `.tmp/<lane>-wave-launcher/signals/`.
91
+
92
+ For the full wrapper contract, long-running-agent ack loop, and external automation patterns, read [signal-wrappers.md](./signal-wrappers.md).
93
+
81
94
  ## Suggested Defaults
82
95
 
83
96
  - Local development:
@@ -34,11 +34,12 @@ pnpm context7:api-check
34
34
  ```
35
35
 
36
36
  4. Review [docs/context7/bundles.json](../context7/bundles.json) and trim it to the external libraries your repository actually uses.
37
+ 5. Prefer exact `libraryId` values. Use `libraryName` only during one-off discovery, then replace it with the pinned id returned by Context7 before committing the bundle.
37
38
 
38
39
  ## Planner Bundle
39
40
 
40
- The shipped bundle index includes `planner-agentic`, which expects a published
41
- Context7 library named `wave-planner-agentic`.
41
+ The shipped bundle index includes `planner-agentic`, but it is intentionally a
42
+ local-only placeholder by default.
42
43
 
43
44
  The source files for that library live under `docs/context7/planner-agent/`.
44
45
  Refresh that folder from the ignored agent-context cache with:
@@ -47,8 +48,8 @@ Refresh that folder from the ignored agent-context cache with:
47
48
  pnpm research:sync-planner-context7
48
49
  ```
49
50
 
50
- After you publish the folder to Context7, the agentic planner will prefetch that
51
- bundle through `planner.agentic.context7Bundle`.
51
+ After you publish the folder to Context7, replace the placeholder bundle entry
52
+ with the exact published `libraryId`. Do not commit a guessed `libraryName`.
52
53
 
53
54
  ## Resolution Order
54
55
 
@@ -59,7 +60,8 @@ bundle through `planner.agentic.context7Bundle`.
59
60
 
60
61
  ## Bundle Authoring
61
62
 
62
- Each bundle should be small and task-shaped. A bundle entry can name libraries by `libraryName` and optionally add a `queryHint` to keep fetched docs focused.
63
+ Each bundle should be small and task-shaped. Prefer exact `libraryId` values and
64
+ add a `queryHint` to keep fetched docs focused.
63
65
 
64
66
  Example:
65
67
 
@@ -70,11 +72,11 @@ Example:
70
72
  "description": "Node.js and TypeScript runtime docs.",
71
73
  "libraries": [
72
74
  {
73
- "libraryName": "nodejs",
75
+ "libraryId": "/nodejs/node",
74
76
  "queryHint": "child processes, streams, filesystem, process lifecycle"
75
77
  },
76
78
  {
77
- "libraryName": "typescript",
79
+ "libraryId": "/microsoft/typescript",
78
80
  "queryHint": "module resolution, declarations, compiler behavior"
79
81
  }
80
82
  ]
@@ -105,6 +107,20 @@ Agent-level override:
105
107
  - query: "TypeScript declarations and module resolution"
106
108
  ````
107
109
 
110
+ ## Making Attachment Explicit
111
+
112
+ If you want Context7 attachment to be reviewable instead of implied, make all of
113
+ these explicit:
114
+
115
+ 1. The wave or agent selects a concrete bundle id in `## Context7 defaults` or
116
+ `### Context7`.
117
+ 2. `docs/context7/bundles.json` pins the bundle's libraries by exact
118
+ `libraryId`, not a guessed `libraryName`.
119
+ 3. Placeholder bundles stay empty until the real published `libraryId` exists.
120
+ 4. `pnpm context7:api-check` succeeds against the committed ids.
121
+ 5. The launcher log shows `Context7 bundle <bundle-id> attached (...)` for the
122
+ run, or a fail-open warning if the API was unavailable.
123
+
108
124
  ## Injection
109
125
 
110
126
  When a bundle is active, the launcher injects:
@@ -150,3 +166,4 @@ Those inbox artifacts are repository-state summaries. Context7 stays reserved fo
150
166
  - Do not use Context7 for repository architecture, plan decisions, ownership rules, or internal contracts.
151
167
  - Prefer one active backend family in a bundle instead of mixing competing frameworks.
152
168
  - Keep queries specific enough that the prefetched block stays small and useful.
169
+ - Run `pnpm context7:api-check` after editing bundle ids to verify every pinned library still resolves and returns promptable context.
@@ -1,6 +1,6 @@
1
1
  # Current State
2
2
 
3
- - The published package is `0.8.5`, and that release now includes the optional pre-implementation `design` worker role plus the `role-design` and `tui-design` starter bundles.
3
+ - The published package is `0.8.6`, and that release now includes the optional pre-implementation `design` worker role, the `role-design`, `tui-design`, and `signal-hygiene` starter bundles, plus the seeded signal-wrapper scripts for long-running-agent and operator wait loops.
4
4
  - The canonical shipped runtime architecture is documented in `docs/plans/end-state-architecture.md`; historical cutover notes remain in `docs/plans/architecture-hardening-migration.md`.
5
5
  - The repository contains the published `@chllming/wave-orchestration` package plus the starter scaffold used by `wave init`.
6
6
  - The runtime is package-first and non-destructive for adopting repos: `wave init --adopt-existing` records existing repo-owned plans, waves, prompts, and config without overwriting them, and `wave upgrade` writes only `.wave/install-state.json` plus `.wave/upgrade-history/`.
@@ -26,12 +26,13 @@
26
26
  - lane config can attach skills by base, role, runtime, and deploy kind
27
27
  - wave agents can add explicit `### Skills`
28
28
  - runtime projections are generated for Codex, Claude, OpenCode, and local execution
29
- - the starter surface includes `skills/role-design/`, `skills/tui-design/`, `roles.designRolePromptPath`, and `executors.profiles.design-pass`
29
+ - the starter surface includes `skills/role-design/`, `skills/tui-design/`, `skills/signal-hygiene/`, `roles.designRolePromptPath`, and `executors.profiles.design-pass`
30
30
  - The runtime now includes:
31
31
  - a canonical authority set built from wave definitions, coordination JSONL logs, and control-plane JSONL events
32
32
  - immutable attempt-scoped result envelopes for structured role outcomes under `.tmp/<lane>-wave-launcher/results/wave-<n>/attempt-<a>/<agent>.json`
33
33
  - a generated markdown board projection
34
34
  - compiled shared summaries and per-agent inboxes
35
+ - canonical versioned signal projections under `.tmp/<lane>-wave-launcher/signals/` for waves, per-agent wake state, and resident-orchestrator acknowledgement loops
35
36
  - active live-wave orchestration refresh that keeps summaries, inboxes, clarification triage, and dashboard coordination metrics current while agents are still running
36
37
  - a per-wave ledger
37
38
  - docs queues
@@ -43,8 +44,9 @@
43
44
  - orchestrator-first clarification triage plus human escalation artifacts
44
45
  - answered human-feedback responses that reconcile canonical coordination state, helper assignments, and safe continuation intent even when the launcher is no longer active
45
46
  - optional `--resident-orchestrator` support for a long-running, non-owning orchestrator session during live waves
47
+ - seeded operator wrappers `scripts/wave-status.sh` and `scripts/wave-watch.sh` that expose machine-friendly wait, completion, failure, and input-required status by reading `wave control status --json`
46
48
  - persisted relaunch plans under `.tmp/<lane>-wave-launcher/status/` so targeted retry intent can survive a launcher restart
47
- - a canonical control-plane event log under `.tmp/<lane>-wave-launcher/control-plane/` that records operator tasks, rerun requests, proof bundles, contradictions, facts, human-input workflow, and observed `wave_run`, `attempt`, and `agent_run` lifecycle events as append-only JSONL; `wave control` materializes state from this log
49
+ - a canonical control-plane event log under `.tmp/<lane>-wave-launcher/control-plane/` that records operator tasks, rerun requests, proof bundles, contradictions, facts, human-input workflow, observed `wave_run`, `attempt`, and `agent_run` lifecycle events, plus `wave_signal` and `agent_signal` update events as append-only JSONL; `wave control` materializes state from this log
48
50
  - operator-applied retry overrides projected to `.tmp/<lane>-wave-launcher/control/` for compatibility with selected reruns, explicit reuse selectors, reuse clearing or preservation, and explicit resume targets
49
51
  - authoritative proof registries projected to `.tmp/<lane>-wave-launcher/proof/` for compatibility, while preserving proof bundle lifecycle state so revoked or superseded operator evidence cannot keep satisfying closure
50
52
  - optional Wave Control telemetry under `.tmp/<lane>-wave-launcher/control-plane/telemetry/` for local-first, best-effort reporting to the Railway-hosted analysis plane
@@ -79,6 +81,8 @@
79
81
  - helper assignments are written into coordination state, the ledger, summaries, and traces
80
82
  - helper assignments remain blocking until the linked follow-up resolves
81
83
  - Waves with a `design` worker role now run that design pass before code-owning implementation starts; implementation resumes only after every design packet is `ready-for-implementation`.
84
+ - Long-running non-resident agents can opt into `signal-hygiene` through explicit `### Skills`; that skill makes them wait on signal-version changes, acknowledge a new version through an ack file, and only then resume work.
85
+ - Terminal signal state now dominates stale answered feedback or coordination wakeups, so `completed` and `failed` actually stop long-running watcher loops instead of leaving them on a non-terminal signal.
82
86
  - Closure now runs in staged order through the wave's effective closure roles: implementation and proof, then optional `cont-EVAL`, then optional security review, then integration, then documentation, then `cont-QA`. Starter defaults remain `E0`, security reviewer, `A8`, `A9`, and `A0` when a wave does not override them.
83
87
  - `E0` is hybrid: planner-generated waves keep it report-only, while hand-authored waves may assign explicit tuning files and thereby make `E0` participate in implementation proof gating.
84
88
  - Live closure is strict: `cont-EVAL` must prove the declared eval contract with exact target and benchmark ids, and `cont-QA` must provide both final verdict and final gate artifacts. Legacy evaluator-era shapes remain replay-only compatibility inputs.
@@ -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.6` 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.6`.
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