@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 0.8.7 - 2026-03-27
6
+
7
+ ### Changed
8
+
9
+ - Generic `budget.turns` is now treated consistently as advisory metadata unless a runtime-specific ceiling such as `claude.maxTurns` or `opencode.steps` is declared; `budget.minutes` remains the primary attempt budget and the release docs/tests now match that runtime behavior.
10
+ - The blocker-severity model is now consistent across coordination, control status, and reducer-backed closure state, so open work can stay visible as `soft`, `stale`, or `advisory` without automatically reopening hard blocking state.
11
+ - The expanded `wave control task act` repair surface now supports deferral, advisory or stale downgrade, and policy resolution inside canonical control state instead of manual file edits.
12
+
13
+ ### Fixed And Hardened
14
+
15
+ - Recoverable execution failures such as timeout, max-turn, rate-limit, and missing-status outcomes now prefer targeted rerun or resume paths plus bounded repair work instead of broad wave failure when proof-critical blockers are not present.
16
+ - Autonomous and retry flows now keep moving when only non-blocking human or clarification records remain, while proof-centric owners still default to sticky executor behavior.
17
+ - Capability routing now prefers demonstrated same-wave success for the requested capability before falling back to the least-busy matching capability owner; unrelated completed work no longer counts as routing evidence.
18
+ - Structured marker extraction now also recognizes proof, doc-delta, and component markers embedded inside JSON log lines, so wrapped executor transcripts no longer hide valid closure evidence.
19
+ - Wave agent and resident-orchestrator tmux sessions now reuse stable per-wave session names instead of appending a run tag, which prevents stale launcher exits from accumulating extra tmux sessions for the same wave.
20
+
21
+ ### Testing And Validation
22
+
23
+ - Added regression coverage around advisory blockers, targeted recovery, autonomous non-blocking human-input handling, advisory turn-budget behavior, capability-specific same-wave routing preference, non-blocking clarification/human-input reducer behavior, and stable per-wave tmux session naming.
24
+
25
+ ## 0.8.6 - 2026-03-25
26
+
27
+ ### Added
28
+
29
+ - 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.
30
+ - 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.
31
+ - 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.
32
+
33
+ ### Changed
34
+
35
+ - 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.
36
+ - 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.
37
+
38
+ ### Fixed And Hardened
39
+
40
+ - 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.
41
+ - 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.
42
+ - 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.
43
+
44
+ ### Testing And Validation
45
+
46
+ - Added regression coverage for terminal signal precedence, resident reroute versioning, and terminal-failure wrapper exits.
47
+ - Re-ran the full Vitest suite, `wave doctor --json`, and `wave launch --lane main --dry-run --no-dashboard`.
48
+
3
49
  ## 0.8.5 - 2026-03-25
4
50
 
5
51
  ### 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.7`
107
+ - Release tag: [`v0.8.7`](https://github.com/chllming/agent-wave-orchestrator/releases/tag/v0.8.7)
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.7`:
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 `0.8.7` adds capability-specific same-wave helper routing, blocker-severity consistency across reducer state, and stable per-wave tmux session reuse.
117
+ - Release docs, current-state notes, migration guidance, and publishing instructions now point at the `0.8.7` 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.7` 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.7` 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.7` 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.
@@ -47,6 +47,8 @@ By default the launcher can start per-wave dashboard sessions in tmux.
47
47
 
48
48
  Wave now maintains stable tmux attach targets for both the current-wave dashboard and the global dashboard on the lane socket.
49
49
 
50
+ Wave-agent sessions and the resident orchestrator now also use stable per-wave tmux session names. A relaunch reuses the same session identity for that wave instead of creating a new run-tagged session name each time, which reduces stale session buildup after launcher crashes or interrupted retries.
51
+
50
52
  Use:
51
53
 
52
54
  ```bash
@@ -78,6 +80,19 @@ Important flags:
78
80
  - Pair `--keep-sessions` with incident review or deep debugging, not as a default steady-state mode.
79
81
  - Pair `--no-dashboard` with scripted dry-runs or when the board and summaries are sufficient.
80
82
 
83
+ ## Operator Wrappers
84
+
85
+ Starter repos now include two thin helper scripts:
86
+
87
+ - `scripts/wave-status.sh`
88
+ 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.
89
+ - `scripts/wave-watch.sh`
90
+ 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.
91
+
92
+ Both wrappers are convenience readers only. The canonical surface is the versioned signal projection under `.tmp/<lane>-wave-launcher/signals/`.
93
+
94
+ For the full wrapper contract, long-running-agent ack loop, and external automation patterns, read [signal-wrappers.md](./signal-wrappers.md).
95
+
81
96
  ## Suggested Defaults
82
97
 
83
98
  - 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.7`, 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.