@chllming/wave-orchestration 0.8.2 → 0.8.4

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 (42) hide show
  1. package/CHANGELOG.md +40 -2
  2. package/README.md +47 -11
  3. package/docs/README.md +6 -2
  4. package/docs/concepts/what-is-a-wave.md +1 -1
  5. package/docs/plans/architecture-hardening-migration.md +8 -1
  6. package/docs/plans/current-state.md +17 -7
  7. package/docs/plans/end-state-architecture.md +82 -69
  8. package/docs/plans/examples/wave-example-live-proof.md +1 -1
  9. package/docs/plans/migration.md +235 -61
  10. package/docs/plans/wave-orchestrator.md +37 -11
  11. package/docs/reference/cli-reference.md +39 -15
  12. package/docs/reference/coordination-and-closure.md +30 -6
  13. package/docs/reference/npmjs-trusted-publishing.md +5 -4
  14. package/docs/reference/sample-waves.md +4 -4
  15. package/package.json +1 -1
  16. package/releases/manifest.json +39 -0
  17. package/scripts/wave-orchestrator/agent-state.mjs +0 -491
  18. package/scripts/wave-orchestrator/autonomous.mjs +10 -6
  19. package/scripts/wave-orchestrator/{launcher-closure.mjs → closure-engine.mjs} +190 -74
  20. package/scripts/wave-orchestrator/control-cli.mjs +8 -0
  21. package/scripts/wave-orchestrator/coord-cli.mjs +8 -0
  22. package/scripts/wave-orchestrator/{launcher-derived-state.mjs → derived-state-engine.mjs} +34 -146
  23. package/scripts/wave-orchestrator/feedback.mjs +11 -1
  24. package/scripts/wave-orchestrator/{launcher-gates.mjs → gate-engine.mjs} +395 -139
  25. package/scripts/wave-orchestrator/human-input-resolution.mjs +348 -0
  26. package/scripts/wave-orchestrator/human-input-workflow.mjs +104 -0
  27. package/scripts/wave-orchestrator/implementation-engine.mjs +120 -0
  28. package/scripts/wave-orchestrator/launcher-runtime.mjs +5 -6
  29. package/scripts/wave-orchestrator/launcher.mjs +271 -724
  30. package/scripts/wave-orchestrator/projection-writer.mjs +256 -0
  31. package/scripts/wave-orchestrator/reconcile-format.mjs +32 -0
  32. package/scripts/wave-orchestrator/reducer-snapshot.mjs +297 -0
  33. package/scripts/wave-orchestrator/replay.mjs +3 -1
  34. package/scripts/wave-orchestrator/result-envelope.mjs +589 -0
  35. package/scripts/wave-orchestrator/retry-control.mjs +5 -0
  36. package/scripts/wave-orchestrator/{launcher-retry.mjs → retry-engine.mjs} +267 -18
  37. package/scripts/wave-orchestrator/role-helpers.mjs +51 -0
  38. package/scripts/wave-orchestrator/{launcher-supervisor.mjs → session-supervisor.mjs} +178 -103
  39. package/scripts/wave-orchestrator/shared.mjs +1 -0
  40. package/scripts/wave-orchestrator/traces.mjs +10 -1
  41. package/scripts/wave-orchestrator/wave-files.mjs +11 -9
  42. package/scripts/wave-orchestrator/wave-state-reducer.mjs +52 -5
@@ -25,6 +25,17 @@ Those are related, but they are not the same.
25
25
 
26
26
  An implementation agent can be locally complete and still leave the wave blocked if it created open helper work, unresolved clarification chains, or required dependencies.
27
27
 
28
+ At runtime, those distinctions map onto separate modules:
29
+
30
+ - `implementation-engine.mjs` selects implementation work
31
+ - `derived-state-engine.mjs` rebuilds the blackboard projections
32
+ - `gate-engine.mjs` evaluates closure and barrier state from envelopes plus canonical logs
33
+ - `retry-engine.mjs` decides what can safely resume
34
+ - `closure-engine.mjs` sequences the staged closeout
35
+ - `session-supervisor.mjs` only launches sessions and records observed facts
36
+
37
+ Closure roles are resolved from the wave definition first, then from starter defaults. In other words, integration, documentation, `cont-QA`, `cont-EVAL`, and security review keep the same semantics even when a wave overrides the default role ids such as `A8`, `A9`, `A0`, `E0`, or `A7`.
38
+
28
39
  ## Durable State Surfaces
29
40
 
30
41
  The runtime writes several different artifacts, but they do different jobs:
@@ -52,6 +63,8 @@ The runtime writes several different artifacts, but they do different jobs:
52
63
 
53
64
  The important rule is that decisions come from the canonical authority set: wave definitions, the coordination log, the control-plane log, and immutable result envelopes. The markdown board is a projection for humans. See [wave-orchestrator.md](../plans/wave-orchestrator.md).
54
65
 
66
+ That control-plane log also carries observed `wave_run`, `attempt`, and `agent_run` lifecycle facts from `session-supervisor.mjs`. When human feedback or escalation remains open, the reducer materializes the wave as `clarifying` with blocked `waveState` instead of flattening it into generic progress.
67
+
55
68
  Live waves now keep refreshing that derived state while agents are still running. Shared summaries, inboxes, dashboard coordination metrics, and clarification routing are not only recomputed at attempt boundaries; they are also refreshed during active wave execution so stale clarification and acknowledgement timing is machine-visible before the attempt ends.
56
69
 
57
70
  ## What Agents Should Use
@@ -61,7 +74,7 @@ Use the coordination log for conversational or workflow state:
61
74
  - `request`
62
75
  Use this when you need another agent or capability owner to do work. Target it explicitly. This is the kind that becomes a helper assignment.
63
76
  - `blocker`
64
- Use this when the wave is blocked, but not because the launcher needs to route work to a specific assignee.
77
+ Use this when the wave is blocked, but not because the runtime needs to route work to a specific assignee.
65
78
  - `handoff`
66
79
  Use this for continuity and context transfer. This is informative by itself; it is not the same as a blocking helper assignment.
67
80
  - `evidence`
@@ -164,7 +177,7 @@ pnpm exec wave control task create \
164
177
  What happens next:
165
178
 
166
179
  - the request lands in the canonical coordination log
167
- - the launcher derives a helper assignment for `agent:A8`
180
+ - the runtime derives a helper assignment for `agent:A8`
168
181
  - that assignment is written into the assignment snapshot
169
182
  - the shared summary and A8 inbox now show the open helper work
170
183
 
@@ -230,9 +243,9 @@ pnpm exec wave coord post \
230
243
 
231
244
  What happens next:
232
245
 
233
- 1. the launcher triages the clarification from repo policy, ownership, prior decisions, and routing context
246
+ 1. the orchestrator triages the clarification from repo policy, ownership, prior decisions, and routing context
234
247
  2. if it can answer inside the wave, it writes the resolution back into coordination state
235
- 3. if another owner can answer it, the launcher opens a targeted follow-up request and keeps the clarification chain blocking
248
+ 3. if another owner can answer it, the runtime opens a targeted follow-up request and keeps the clarification chain blocking
236
249
  4. only after policy and routed follow-up paths are exhausted does it create human feedback or escalation artifacts
237
250
  5. until that chain is resolved, clarification remains a closure barrier and any routed follow-up also remains blocking helper work
238
251
 
@@ -250,6 +263,17 @@ pnpm exec wave control task act resolve --lane main --wave 10 --id escalation-cl
250
263
 
251
264
  That keeps clarification routing, dismissal, escalation, and human-answer handling inside the canonical coordination state instead of forcing ad hoc file edits.
252
265
 
266
+ When the operator answers through the feedback queue directly, the answer path now repairs the same canonical state:
267
+
268
+ ```bash
269
+ pnpm exec wave feedback respond \
270
+ --id 202603240000-main-w6-A3-abc123 \
271
+ --response "Use the 90-day compatibility window documented in docs/plans/migration.md." \
272
+ --operator ops-lead
273
+ ```
274
+
275
+ For ad-hoc runs, include `--run <id>` on that command. The response path will reconcile the linked clarification or escalation chain, re-sync helper-assignment projections, and write a safe one-shot continuation request when the reducer can resume but no active attempt is still running.
276
+
253
277
  ## End-To-End Example: Required Dependency
254
278
 
255
279
  Assume the wave needs another lane to land a required API first.
@@ -395,7 +419,7 @@ That gives Wave two useful properties:
395
419
 
396
420
  ## Targeted Retry Behavior
397
421
 
398
- When closure fails, the launcher does not always relaunch the entire wave.
422
+ When closure fails, the runtime does not always relaunch the entire wave.
399
423
 
400
424
  It tries to relaunch only the implicated owners:
401
425
 
@@ -414,7 +438,7 @@ pnpm exec wave control rerun get --lane main --wave 10 --json
414
438
  pnpm exec wave control rerun request --lane main --wave 10 --agent A2 --agent A7 --clear-reuse A2 --reason "Resume sibling-owned component closure"
415
439
  ```
416
440
 
417
- The canonical rerun request is written under `.tmp/<lane>-wave-launcher/control-plane/`, projected to `.tmp/<lane>-wave-launcher/control/` for compatibility, consumed by the launcher on the next retry decision, and then cleared by default after one application. This is the supported path for:
441
+ The canonical rerun request is written under `.tmp/<lane>-wave-launcher/control-plane/`, projected to `.tmp/<lane>-wave-launcher/control/` for compatibility, consumed by the retry engine on the next retry decision, and then cleared by default after one application. This is the supported path for:
418
442
 
419
443
  - rerunning only specific owners
420
444
  - preserving explicit reuse selectors such as attempt ids, proof bundle ids, derived-summary reuse, and invalidated component ids through the compatibility projection
@@ -2,7 +2,7 @@
2
2
 
3
3
  This repo now includes a dedicated npmjs publish workflow at [publish-npm.yml](../../.github/workflows/publish-npm.yml).
4
4
 
5
- The current `0.8.2` release procedure publishes through a repository Actions secret named `NPM_TOKEN`.
5
+ The current `0.8.4` release procedure publishes through a repository Actions secret named `NPM_TOKEN`.
6
6
 
7
7
  ## What This Repo Already Does
8
8
 
@@ -47,6 +47,7 @@ If this repo later needs private npm dependencies during CI, consider a separate
47
47
  1. Confirm [publish-npm.yml](../../.github/workflows/publish-npm.yml) is on the default branch.
48
48
  2. Confirm `NPM_TOKEN` exists in the GitHub repo secrets.
49
49
  3. Confirm the package version has been bumped and committed.
50
- 4. Push the release commit and release tag, for example `v0.8.2`.
51
- 5. Verify both `publish-npm.yml` and `publish-package.yml` start from the tag push.
52
- 6. Verify the npmjs publish completes successfully for the tagged source.
50
+ 4. Confirm `README.md`, `CHANGELOG.md`, `releases/manifest.json`, and `docs/plans/migration.md` all describe the same release surface.
51
+ 5. Push the release commit and release tag, for example `v0.8.4`.
52
+ 6. Verify both `publish-npm.yml` and `publish-package.yml` start from the tag push.
53
+ 7. Verify the npmjs publish completes successfully for the tagged source.
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  title: "Sample Waves"
3
- summary: "Showcase-first sample waves that demonstrate the current 0.8.2 Wave surface."
3
+ summary: "Showcase-first sample waves that demonstrate the current 0.8.4 Wave surface."
4
4
  ---
5
5
 
6
6
  # Sample Waves
7
7
 
8
- This guide points to showcase-first sample waves that demonstrate the current `0.8.2` authored Wave surface.
8
+ This guide points to showcase-first sample waves that demonstrate the current `0.8.4` authored Wave surface.
9
9
 
10
10
  The examples are intentionally denser than typical production waves. Their job is to teach the current authoring and runtime surface quickly, not to be the smallest possible launch-ready files.
11
11
 
@@ -15,7 +15,7 @@ The examples are intentionally denser than typical production waves. Their job i
15
15
  Shows what a good `repo-landed` outcome looks like when one promoted component only closes honestly if desired-state records, reconcile-loop substrate, and cluster-view surfaces land together. It emphasizes maturity discipline, explicit deliverables, and shared-plan closure without drifting into `pilot-live` claims.
16
16
 
17
17
  - [Full modern sample wave](../plans/examples/wave-example-live-proof.md)
18
- Shows the combined `0.8.2` authored surface in one file: closure roles, `E0`, optional security review, delegated and pinned benchmark targets, richer executor config, `### Skills`, `### Capabilities`, `### Deliverables`, `### Exit contract`, `### Proof artifacts`, sticky retry, deploy environments, and proof-first live-wave structure.
18
+ Shows the combined `0.8.4` authored surface in one file: closure roles, `E0`, optional security review, delegated and pinned benchmark targets, richer executor config, `### Skills`, `### Capabilities`, `### Deliverables`, `### Exit contract`, `### Proof artifacts`, sticky retry, deploy environments, and proof-first live-wave structure.
19
19
 
20
20
  ## What These Examples Teach
21
21
 
@@ -38,7 +38,7 @@ The examples are intentionally denser than typical production waves. Their job i
38
38
 
39
39
  ## Feature Coverage Map
40
40
 
41
- Together these samples cover the main surfaces added or hardened for `0.8.2`:
41
+ Together these samples cover the main surfaces added or hardened for `0.8.4`:
42
42
 
43
43
  - repo-landed maturity discipline and anti-overclaim framing
44
44
  - explicit shared-plan closure for future-wave safety
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chllming/wave-orchestration",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "license": "MIT",
5
5
  "description": "Generic wave-based multi-agent orchestration for repository work.",
6
6
  "repository": {
@@ -2,6 +2,45 @@
2
2
  "schemaVersion": 1,
3
3
  "packageName": "@chllming/wave-orchestration",
4
4
  "releases": [
5
+ {
6
+ "version": "0.8.4",
7
+ "date": "2026-03-25",
8
+ "summary": "Contradiction replay repair, consistent component-promotion thresholds, projection-writer persistence centralization, and 0.8.4 release-surface alignment.",
9
+ "features": [
10
+ "Hermetic contradiction replay no longer depends on component-matrix parsing when the trace does not declare promoted components.",
11
+ "`requireComponentPromotionsFromWave` now gates both component-promotion proof validation and component-matrix current-level validation consistently across live and replay paths.",
12
+ "Projection persistence is now centralized under `projection-writer.mjs`, while `derived-state-engine.mjs` computes projection payloads without writing them directly.",
13
+ "The operator migration guide now covers fresh adoption plus upgrades from `0.8.3`, `0.8.0`-`0.8.2`, `0.6.x`-`0.7.x`, and `0.5.x` or earlier with explicit repo-owned surface sync guidance.",
14
+ "Shipped package metadata, README, migration guidance, current-state notes, sample-wave docs, and npm publishing instructions now point at the `0.8.4` release surface."
15
+ ],
16
+ "manualSteps": [
17
+ "Run `pnpm exec wave doctor` and `pnpm exec wave launch --lane main --dry-run --no-dashboard` after upgrading so the repo validates against the `0.8.4` replay, projection, and component-threshold behavior.",
18
+ "If your adopted repo uses planner workflows and copied the starter planner corpus, sync `docs/agents/wave-planner-role.md`, `skills/role-planner/`, `docs/context7/planner-agent/`, `docs/reference/wave-planning-lessons.md`, and the `planner-agentic` bundle entry in `docs/context7/bundles.json`.",
19
+ "If your repo copied the shipped starter docs or skills, sync the current operator runbook, architecture docs, launcher or orchestrator prompts, planner corpus, and relevant runtime or closure-role starter skills before relying on local runbooks.",
20
+ "If your repo keeps historical replay fixtures, replay at least one contradiction-blocked trace and one promoted-component trace after the upgrade so both code paths stay covered.",
21
+ "If an older adopted repo still carries legacy evaluator wording or pre-control-plane operator docs, complete the repo-owned prompt and runbook migration described in `docs/plans/migration.md` before cutting live waves on `0.8.4`."
22
+ ],
23
+ "breaking": false
24
+ },
25
+ {
26
+ "version": "0.8.3",
27
+ "date": "2026-03-24",
28
+ "summary": "Human-input reconciliation repair, ad-hoc feedback-run context hardening, and 0.8.3 release-surface alignment.",
29
+ "features": [
30
+ "Answered human-feedback requests now reconcile linked clarification, escalation, and helper-assignment state back into the canonical coordination log instead of only updating the feedback request JSON.",
31
+ "`wave feedback respond --run <id>` now preserves ad-hoc run context while writing reconciliation and safe continuation state, so ad-hoc answers stop mutating the roadmap lane state root.",
32
+ "When no attempt is still running and the reducer can safely continue, human-input reconciliation writes a one-shot continuation request instead of leaving the wave stranded after the operator answer arrives.",
33
+ "Regression coverage now exercises both direct feedback-response reconciliation and the ad-hoc `--run <id>` path.",
34
+ "Shipped package metadata, README, migration guidance, current-state notes, sample-wave docs, and npm publishing instructions now point at the `0.8.3` release surface."
35
+ ],
36
+ "manualSteps": [
37
+ "If your operators answer tickets through `wave feedback respond`, update any repo-local runbooks so ad-hoc runs always pass `--run <id>` when answering outside the main roadmap lane.",
38
+ "Run `pnpm exec wave doctor` and `pnpm exec wave launch --lane main --dry-run --no-dashboard` after upgrading so the repo validates against the `0.8.3` runtime and human-input reconciliation contract.",
39
+ "If an adopted repo fails `wave doctor` after the upgrade, sync the repo-owned planner starter surface (`docs/agents/wave-planner-role.md`, `skills/role-planner/`, `docs/context7/planner-agent/`, `docs/reference/wave-planning-lessons.md`, and the `planner-agentic` bundle entry) before relying on planner-aware validation.",
40
+ "If a repo copied the shipped starter architecture docs or skills and wants the `0.8.3` operator guidance, sync the updated launcher and orchestrator role prompts plus the relevant runtime and closure-role skill bundles."
41
+ ],
42
+ "breaking": false
43
+ },
5
44
  {
6
45
  "version": "0.8.2",
7
46
  "date": "2026-03-24",