@chllming/wave-orchestration 0.8.3 → 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.
- package/CHANGELOG.md +19 -0
- package/README.md +47 -11
- package/docs/README.md +6 -2
- package/docs/concepts/what-is-a-wave.md +1 -1
- package/docs/plans/architecture-hardening-migration.md +8 -1
- package/docs/plans/current-state.md +15 -7
- package/docs/plans/end-state-architecture.md +82 -69
- package/docs/plans/examples/wave-example-live-proof.md +1 -1
- package/docs/plans/migration.md +235 -62
- package/docs/plans/wave-orchestrator.md +37 -11
- package/docs/reference/cli-reference.md +34 -14
- package/docs/reference/coordination-and-closure.md +19 -6
- package/docs/reference/npmjs-trusted-publishing.md +5 -4
- package/docs/reference/sample-waves.md +4 -4
- package/package.json +1 -1
- package/releases/manifest.json +20 -0
- package/scripts/wave-orchestrator/agent-state.mjs +0 -491
- package/scripts/wave-orchestrator/autonomous.mjs +10 -6
- package/scripts/wave-orchestrator/{launcher-closure.mjs → closure-engine.mjs} +190 -74
- package/scripts/wave-orchestrator/{launcher-derived-state.mjs → derived-state-engine.mjs} +34 -146
- package/scripts/wave-orchestrator/{launcher-gates.mjs → gate-engine.mjs} +395 -139
- package/scripts/wave-orchestrator/human-input-resolution.mjs +14 -10
- package/scripts/wave-orchestrator/human-input-workflow.mjs +104 -0
- package/scripts/wave-orchestrator/implementation-engine.mjs +120 -0
- package/scripts/wave-orchestrator/launcher-runtime.mjs +5 -6
- package/scripts/wave-orchestrator/launcher.mjs +271 -724
- package/scripts/wave-orchestrator/projection-writer.mjs +256 -0
- package/scripts/wave-orchestrator/reconcile-format.mjs +32 -0
- package/scripts/wave-orchestrator/reducer-snapshot.mjs +297 -0
- package/scripts/wave-orchestrator/replay.mjs +3 -1
- package/scripts/wave-orchestrator/result-envelope.mjs +589 -0
- package/scripts/wave-orchestrator/retry-control.mjs +5 -0
- package/scripts/wave-orchestrator/{launcher-retry.mjs → retry-engine.mjs} +267 -18
- package/scripts/wave-orchestrator/role-helpers.mjs +51 -0
- package/scripts/wave-orchestrator/{launcher-supervisor.mjs → session-supervisor.mjs} +178 -103
- package/scripts/wave-orchestrator/shared.mjs +1 -0
- package/scripts/wave-orchestrator/traces.mjs +10 -1
- package/scripts/wave-orchestrator/wave-files.mjs +11 -9
- package/scripts/wave-orchestrator/wave-state-reducer.mjs +52 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.8.4 - 2026-03-25
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Updated the shipped package metadata, release manifest, README, migration guide, current-state notes, sample-wave docs, and npm publishing runbook to advertise `0.8.4` as the current release surface.
|
|
10
|
+
- Rewrote the operator migration guide so it 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.
|
|
11
|
+
- Clarified the README and architecture docs so `derived-state-engine.mjs` is described as compute-only and `projection-writer.mjs` as the projection persistence boundary.
|
|
12
|
+
|
|
13
|
+
### Fixed And Hardened
|
|
14
|
+
|
|
15
|
+
- Hermetic contradiction replay no longer depends on component-matrix parsing when a trace does not declare promoted components.
|
|
16
|
+
- `requireComponentPromotionsFromWave` now gates both component-promotion proof validation and component-matrix current-level validation consistently across live and replay paths.
|
|
17
|
+
- Projection persistence is now centralized under `projection-writer.mjs`, including dashboards, traces, ledgers, docs queues, summaries, inboxes, assignment snapshots, dependency snapshots, and board projections.
|
|
18
|
+
|
|
19
|
+
### Testing And Validation
|
|
20
|
+
|
|
21
|
+
- Added regression coverage for the projection-writer persistence boundary and for component-matrix short-circuiting when no promotions are declared.
|
|
22
|
+
- Re-ran the full Vitest suite, `wave doctor --json`, and `wave launch --lane main --dry-run --no-dashboard`.
|
|
23
|
+
|
|
5
24
|
## 0.8.3 - 2026-03-24
|
|
6
25
|
|
|
7
26
|
### Changed
|
package/README.md
CHANGED
|
@@ -28,8 +28,30 @@ The framework does three things:
|
|
|
28
28
|
1. Define shared docs plus `docs/plans/waves/wave-<n>.md` files, or generate them with `wave draft`.
|
|
29
29
|
2. Run `wave launch --dry-run` to validate the wave and materialize prompts, shared summaries, inboxes, dashboards, and executor previews before any live execution.
|
|
30
30
|
3. During live execution, implementation agents write claims, evidence, requests, and decisions into the canonical coordination log instead of relying on ad hoc terminal narration.
|
|
31
|
-
4. The reducer and derived-state engines materialize blackboard projections from the canonical authority set: rolling board, shared summary, per-agent inboxes, ledger, docs queue, dependency views, and integration summaries.
|
|
32
|
-
5.
|
|
31
|
+
4. The reducer and derived-state engines materialize blackboard projections from the canonical authority set: rolling board, shared summary, per-agent inboxes, ledger, docs queue, dependency views, and integration summaries. Helper-assignment blocking, retry target selection, and resume planning read from reducer state during live runs.
|
|
32
|
+
5. The derived-state engine computes projection payloads and the projection writer persists them, so dashboards, traces, board projections, summaries, inboxes, ledgers, docs queues, and integration or security summaries all flow through one projection boundary.
|
|
33
|
+
6. Live closure is result-envelope-first. Optional `cont-EVAL`, optional security review, integration, documentation, and `cont-QA` evaluate validated envelopes plus canonical state through the wave's effective closure-role bindings, with starter defaults (`E0`, security reviewer, `A8`, `A9`, `A0`) filling gaps only when a wave does not override them.
|
|
34
|
+
|
|
35
|
+
## Runtime Modules
|
|
36
|
+
|
|
37
|
+
- `launcher.mjs`
|
|
38
|
+
Thin orchestrator: parses args, acquires the launcher lock, and sequences the engines.
|
|
39
|
+
- `implementation-engine.mjs`
|
|
40
|
+
Selects the implementation fan-out for a wave or retry attempt.
|
|
41
|
+
- `derived-state-engine.mjs`
|
|
42
|
+
Computes shared summary, inboxes, assignments, dependency views, ledger, docs queue, and integration/security projection payloads from canonical state.
|
|
43
|
+
- `gate-engine.mjs`
|
|
44
|
+
Evaluates implementation, component, assignment, dependency, clarification, `cont-EVAL`, security, integration, documentation, and `cont-QA` gates.
|
|
45
|
+
- `retry-engine.mjs`
|
|
46
|
+
Plans reducer-driven resume and retry targets, reusable work, executor fallback changes, and blocking conditions.
|
|
47
|
+
- `closure-engine.mjs`
|
|
48
|
+
Sequences the staged closure sweep from implementation proof through final `cont-QA`.
|
|
49
|
+
- `wave-state-reducer.mjs`
|
|
50
|
+
Rebuilds deterministic wave state from canonical inputs for live queries and replay.
|
|
51
|
+
- `session-supervisor.mjs`
|
|
52
|
+
Owns launches, waits, tmux sessions, lock handling, resident orchestrator sessions, and observed `wave_run`, `attempt`, and `agent_run` lifecycle facts.
|
|
53
|
+
- `projection-writer.mjs`
|
|
54
|
+
Persists dashboards, traces, summaries, inboxes, board projections, assignment/dependency snapshots, ledgers, docs queues, and integration/security summaries.
|
|
33
55
|
|
|
34
56
|
## Architecture Surfaces
|
|
35
57
|
|
|
@@ -79,18 +101,18 @@ Wave is built to mitigate those failures with a canonical authority set, generat
|
|
|
79
101
|
|
|
80
102
|
Current release:
|
|
81
103
|
|
|
82
|
-
- `@chllming/wave-orchestration@0.8.
|
|
83
|
-
- Release tag: [`v0.8.
|
|
104
|
+
- `@chllming/wave-orchestration@0.8.4`
|
|
105
|
+
- Release tag: [`v0.8.4`](https://github.com/chllming/agent-wave-orchestrator/releases/tag/v0.8.4)
|
|
84
106
|
- Public install path: npmjs
|
|
85
107
|
- Authenticated fallback: GitHub Packages
|
|
86
108
|
|
|
87
|
-
Highlights in `0.8.
|
|
109
|
+
Highlights in `0.8.4`:
|
|
88
110
|
|
|
89
|
-
-
|
|
90
|
-
- `
|
|
91
|
-
-
|
|
92
|
-
- The
|
|
93
|
-
-
|
|
111
|
+
- Hermetic contradiction replay no longer depends on component-matrix parsing when the trace does not declare promoted components.
|
|
112
|
+
- `requireComponentPromotionsFromWave` now gates both component-promotion proof validation and component-matrix current-level validation consistently in live and replay paths.
|
|
113
|
+
- Projection persistence is now centralized under `projection-writer.mjs`, while `derived-state-engine.mjs` stays compute-only.
|
|
114
|
+
- The migration guide now includes explicit upgrade guidance for `0.8.3`, `0.8.0`-`0.8.2`, `0.6.x`-`0.7.x`, and older starter repos instead of only a narrow point upgrade.
|
|
115
|
+
- Release docs, sample waves, current-state notes, and npm publishing instructions now point at the `0.8.4` surface.
|
|
94
116
|
|
|
95
117
|
Requirements:
|
|
96
118
|
|
|
@@ -145,6 +167,19 @@ pnpm exec wave autonomous --lane main --executor codex --codex-sandbox danger-fu
|
|
|
145
167
|
pnpm exec wave self-update
|
|
146
168
|
```
|
|
147
169
|
|
|
170
|
+
## CLI Surfaces
|
|
171
|
+
|
|
172
|
+
- `wave launch` and `wave autonomous`
|
|
173
|
+
Live execution, dry-run validation, retry cadence, terminal surfaces, and orchestrator options.
|
|
174
|
+
- `wave control`
|
|
175
|
+
Read-only live status plus operator task, rerun, proof, and telemetry control surfaces.
|
|
176
|
+
- `wave coord` and `wave dep`
|
|
177
|
+
Coordination-log and cross-lane dependency utilities. `wave control` is the preferred operator surface; `wave coord` remains useful for direct log inspection and rendering.
|
|
178
|
+
- `wave project`, `wave draft`, and `wave adhoc`
|
|
179
|
+
Planner defaults, authored wave generation, and transient operator-driven runs on the same runtime.
|
|
180
|
+
- `wave init`, `wave doctor`, `wave upgrade`, and `wave self-update`
|
|
181
|
+
Workspace setup, validation, adoption, and package lifecycle.
|
|
182
|
+
|
|
148
183
|
## Develop This Package
|
|
149
184
|
|
|
150
185
|
```bash
|
|
@@ -182,8 +217,9 @@ codex mcp list
|
|
|
182
217
|
- [docs/reference/sample-waves.md](./docs/reference/sample-waves.md): showcase-first authored waves, including a high-fidelity repo-landed rollout example
|
|
183
218
|
- [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
|
|
184
219
|
- [docs/reference/cli-reference.md](./docs/reference/cli-reference.md): complete CLI syntax for all commands and flags
|
|
220
|
+
- [docs/plans/end-state-architecture.md](./docs/plans/end-state-architecture.md): canonical runtime architecture, engine boundaries, and artifact ownership
|
|
185
221
|
- [docs/plans/wave-orchestrator.md](./docs/plans/wave-orchestrator.md): operator runbook
|
|
186
|
-
- [docs/plans/architecture-hardening-migration.md](./docs/plans/architecture-hardening-migration.md):
|
|
222
|
+
- [docs/plans/architecture-hardening-migration.md](./docs/plans/architecture-hardening-migration.md): historical record of the completed architecture hardening stages
|
|
187
223
|
- [docs/plans/context7-wave-orchestrator.md](./docs/plans/context7-wave-orchestrator.md): Context7 setup and bundle authoring
|
|
188
224
|
- [docs/reference/runtime-config/README.md](./docs/reference/runtime-config/README.md): executor, runtime, and skill-projection configuration
|
|
189
225
|
- [docs/reference/wave-control.md](./docs/reference/wave-control.md): local-first telemetry contract and Railway control-plane model
|
package/docs/README.md
CHANGED
|
@@ -39,8 +39,12 @@ The useful path is journey-first:
|
|
|
39
39
|
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).
|
|
40
40
|
- Upgrading an existing repo:
|
|
41
41
|
Read [plans/migration.md](./plans/migration.md), then review the release notes in [../CHANGELOG.md](../CHANGELOG.md) before running `pnpm exec wave upgrade`.
|
|
42
|
-
-
|
|
43
|
-
Read [plans/
|
|
42
|
+
- Want the concrete runtime module map:
|
|
43
|
+
Read [plans/end-state-architecture.md](./plans/end-state-architecture.md) for the engine-by-engine architecture and artifact ownership model.
|
|
44
|
+
- Want the CLI surface map:
|
|
45
|
+
Read [reference/cli-reference.md](./reference/cli-reference.md) for the shipped commands, flags, and compatibility surfaces.
|
|
46
|
+
- Want the historical architecture migration notes:
|
|
47
|
+
Read [plans/architecture-hardening-migration.md](./plans/architecture-hardening-migration.md) for the completed cutover record.
|
|
44
48
|
- Looking for concrete example waves:
|
|
45
49
|
Read [reference/sample-waves.md](./reference/sample-waves.md) for showcase-first examples that demonstrate the current authored wave surface.
|
|
46
50
|
- Release notes and shipped deltas:
|
|
@@ -89,7 +89,7 @@ Inside each agent block, the important sections are:
|
|
|
89
89
|
|
|
90
90
|
## Standard Roles
|
|
91
91
|
|
|
92
|
-
The starter runtime
|
|
92
|
+
The starter runtime ships with three default closure roles plus up to two optional review specialists. A wave may override the role ids, but the closure semantics stay the same:
|
|
93
93
|
|
|
94
94
|
- `A8`
|
|
95
95
|
Integration steward
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Architecture Hardening Migration
|
|
2
2
|
|
|
3
|
-
This document is the
|
|
3
|
+
This document is the historical record of the completed cutover from the legacy launcher-centric runtime to the architecture described in [end-state-architecture.md](./end-state-architecture.md).
|
|
4
|
+
|
|
5
|
+
Current status at this head:
|
|
6
|
+
|
|
7
|
+
- Stage 1 is complete: reducer snapshots persist machine-readable shadow diffs for high-value decision slices.
|
|
8
|
+
- Stage 2 is complete: live helper-assignment blocking, retry target selection, and resume planning consume reducer state.
|
|
9
|
+
- Stage 3 and Stage 4 are complete in runtime behavior: live gate and closure decisions are envelope-authoritative, and the launcher sequences explicit engine surfaces instead of recomputing those policies inline.
|
|
10
|
+
- Stage 5 is complete for live runtime behavior: compatibility parsing remains only for replay, reconcile, and historical trace materialization, and the old `launcher-*` engine module names have been removed from the live runtime tree.
|
|
4
11
|
|
|
5
12
|
The target model is fixed:
|
|
6
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Current State
|
|
2
2
|
|
|
3
|
-
- The starter workspace in this source repo reflects the `0.8.
|
|
4
|
-
- The
|
|
3
|
+
- The starter workspace in this source repo reflects the `0.8.4` package release surface.
|
|
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/`.
|
|
7
7
|
- Runtime launch entrypoints now perform a best-effort npmjs version check, cache the result under `.wave/package-update-check.json`, and point operators at `pnpm exec wave self-update` when a newer published package exists.
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
- runtime projections are generated for Codex, Claude, OpenCode, and local execution
|
|
29
29
|
- The runtime now includes:
|
|
30
30
|
- a canonical authority set built from wave definitions, coordination JSONL logs, and control-plane JSONL events
|
|
31
|
-
- immutable attempt-scoped result envelopes for structured role outcomes
|
|
31
|
+
- immutable attempt-scoped result envelopes for structured role outcomes under `.tmp/<lane>-wave-launcher/results/wave-<n>/attempt-<a>/<agent>.json`
|
|
32
32
|
- a generated markdown board projection
|
|
33
33
|
- compiled shared summaries and per-agent inboxes
|
|
34
34
|
- active live-wave orchestration refresh that keeps summaries, inboxes, clarification triage, and dashboard coordination metrics current while agents are still running
|
|
@@ -37,17 +37,25 @@
|
|
|
37
37
|
- explicit integration summaries with actionable claim, interface, proof, docs, and deploy-risk evidence
|
|
38
38
|
- versioned runtime artifact contracts for manifests, dashboards, relaunch plans, helper-assignment snapshots, dependency snapshots, and run-state
|
|
39
39
|
- append-only `run-state.json` history with per-wave current state, compatibility `completedWaves`, and causal completion or blocker evidence
|
|
40
|
-
- hermetic `traceVersion: 2` per-attempt trace bundles with copied launched-agent summaries, copied component matrices for promoted waves, a hashed `outcome.json` replay baseline, run metadata, and cumulative quality metrics
|
|
40
|
+
- hermetic `traceVersion: 2` per-attempt trace bundles with copied launched-agent summaries, copied component matrices for promoted waves only, a hashed `outcome.json` replay baseline, run metadata, and cumulative quality metrics
|
|
41
41
|
- an internal, read-only replay validator for trace bundles, with legacy `traceVersion: 1` bundles kept in best-effort warning mode
|
|
42
42
|
- orchestrator-first clarification triage plus human escalation artifacts
|
|
43
43
|
- answered human-feedback responses that reconcile canonical coordination state, helper assignments, and safe continuation intent even when the launcher is no longer active
|
|
44
44
|
- optional `--resident-orchestrator` support for a long-running, non-owning orchestrator session during live waves
|
|
45
45
|
- persisted relaunch plans under `.tmp/<lane>-wave-launcher/status/` so targeted retry intent can survive a launcher restart
|
|
46
|
-
- a canonical control-plane event log under `.tmp/<lane>-wave-launcher/control-plane/` that records operator tasks, rerun requests, proof bundles,
|
|
46
|
+
- 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
|
|
47
47
|
- 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
|
|
48
48
|
- 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
|
|
49
49
|
- optional Wave Control telemetry under `.tmp/<lane>-wave-launcher/control-plane/telemetry/` for local-first, best-effort reporting to the Railway-hosted analysis plane
|
|
50
|
-
- reducer-driven live state snapshots plus
|
|
50
|
+
- reducer-driven live state snapshots plus persisted machine-readable shadow diffs for helper-assignment, blocker, contradiction, closure, and retry slices
|
|
51
|
+
- reducer-authoritative helper-assignment blocking, retry target selection, and resume planning, with live gate and closure reads now driven from validated result envelopes
|
|
52
|
+
- hermetic replay that reconstructs contradiction-driven blockers from bundled control-plane events
|
|
53
|
+
- contradiction replay for non-promoted traces that no longer depends on copied component-matrix parsing
|
|
54
|
+
- consistent `requireComponentPromotionsFromWave` threshold handling across both component-promotion proof validation and component-matrix current-level validation
|
|
55
|
+
- `projection-writer.mjs` as the single persistence layer for projection outputs such as dashboards, traces, generated board projections, compiled summaries and inboxes, helper-assignment and dependency snapshots, docs queues, ledgers, and integration or security summaries; clarification-triage workflow artifacts remain workflow-owned
|
|
56
|
+
- reducer phases that materialize open human-feedback and escalation barriers as `clarifying` with blocked `waveState`, instead of flattening them into generic `running`
|
|
57
|
+
- replay, reconcile, and trace materialization compatibility adapters that can still synthesize envelopes from legacy summaries or marker-era artifacts without deciding live correctness
|
|
58
|
+
- a launcher entrypoint that now sequences explicit engine modules plus the session supervisor, with the old `launcher-*` engine module names removed from the live runtime tree
|
|
51
59
|
- Runtime executor support now includes:
|
|
52
60
|
- Codex `exec` profile, inline config, search, image, add-dir, JSON, and ephemeral flags
|
|
53
61
|
- Claude settings overlay merging for inline settings and hooks
|
|
@@ -67,7 +75,7 @@
|
|
|
67
75
|
- open capability-targeted requests become explicit helper assignments
|
|
68
76
|
- helper assignments are written into coordination state, the ledger, summaries, and traces
|
|
69
77
|
- helper assignments remain blocking until the linked follow-up resolves
|
|
70
|
-
- Closure now runs in staged order: implementation and proof, then optional `
|
|
78
|
+
- 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.
|
|
71
79
|
- `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.
|
|
72
80
|
- 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.
|
|
73
81
|
- Proof-centric waves can now declare `### Proof artifacts`, and implementation proof validation can require those machine-visible local artifacts in addition to deliverables and structured proof markers.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# End-State Architecture
|
|
2
2
|
|
|
3
|
-
This document describes the
|
|
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 code now follows.
|
|
4
4
|
|
|
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
|
|
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
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ The thesis is unchanged: bounded waves, closure roles, proof artifacts, selectiv
|
|
|
12
12
|
|
|
13
13
|
2. **Phase engines replace the monolithic launcher loop.** Each distinct concern — implementation orchestration, derived-state materialization, gate evaluation, retry planning, closure sequencing, session supervision — lives in its own deterministic module with an explicit input/output contract.
|
|
14
14
|
|
|
15
|
-
3. **Planning engines emit intent; the supervisor emits observed facts.** A phase engine may output
|
|
15
|
+
3. **Planning engines emit intent; the supervisor emits observed facts.** A phase engine may output a run selection or launch request. Only the session supervisor, after the process actually launches, writes `agent_run.started`. This distinction between desired action and observed action is critical for replay and auditability.
|
|
16
16
|
|
|
17
17
|
4. **Proof and closure are separate first-class states.** An agent can satisfy its own work contract (`owned_slice_proven`) without the wave being closeable (`wave_closure_ready`). These are distinct top-level state transitions, not implicit conditions scattered across gate checks.
|
|
18
18
|
|
|
@@ -84,25 +84,26 @@ Each phase engine is a pure-ish function: it reads from the canonical authority
|
|
|
84
84
|
implementation-engine.mjs Drives the implementation phase
|
|
85
85
|
Inputs: wave definition, materialized event state,
|
|
86
86
|
task graph, retry plan
|
|
87
|
-
Outputs: launch
|
|
88
|
-
|
|
87
|
+
Outputs: run selections, launch requests,
|
|
88
|
+
executor assignments,
|
|
89
89
|
prompt construction requests
|
|
90
|
-
Does NOT output: agent_run.started, attempt.
|
|
90
|
+
Does NOT output: agent_run.started, attempt.running
|
|
91
91
|
(those are observed facts written by the supervisor)
|
|
92
92
|
|
|
93
|
-
derived-state-engine.mjs
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
Outputs: shared summaries,
|
|
97
|
-
|
|
98
|
-
ledger, docs queue,
|
|
99
|
-
integration summary
|
|
93
|
+
derived-state-engine.mjs Computes all derived state from canonical sources
|
|
94
|
+
Inputs: coordination log, control-plane events,
|
|
95
|
+
agent result envelopes
|
|
96
|
+
Outputs: derived payloads for shared summaries,
|
|
97
|
+
per-agent inboxes, assignment snapshots,
|
|
98
|
+
dependency snapshots, ledger, docs queue,
|
|
99
|
+
security summary, integration summary
|
|
100
100
|
Rule: reads only from canonical authority set,
|
|
101
|
-
never from its own prior outputs
|
|
101
|
+
never from its own prior outputs and
|
|
102
|
+
never persists projections directly
|
|
102
103
|
|
|
103
104
|
gate-engine.mjs Evaluates all closure gates
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
Inputs: agent result envelopes, proof registry,
|
|
106
|
+
coordination state, component matrix,
|
|
106
107
|
task graph
|
|
107
108
|
Outputs: per-gate verdicts (ok/blocked + detail),
|
|
108
109
|
per-task owned_slice_proven verdicts
|
|
@@ -114,15 +115,15 @@ gate-engine.mjs Evaluates all closure gates
|
|
|
114
115
|
dependency-barrier, clarification-barrier
|
|
115
116
|
|
|
116
117
|
closure-engine.mjs Sequences the closure sweep
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
Inputs: gate verdicts, wave definition, task graph
|
|
119
|
+
Outputs: closure phase transitions, agent relaunch
|
|
119
120
|
requests, wave completion or block events
|
|
120
121
|
Stages: implementation+proof → cont-eval → security →
|
|
121
122
|
integration → documentation → cont-qa
|
|
122
123
|
|
|
123
124
|
retry-engine.mjs Plans all retry and resume operations
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
Inputs: failure records, proof registry, rerun
|
|
126
|
+
requests, executor history, task graph
|
|
126
127
|
Outputs: retry plan with explicit contract:
|
|
127
128
|
- why_resuming
|
|
128
129
|
- invalidated (task ids)
|
|
@@ -148,26 +149,27 @@ wave-state-reducer.mjs Rebuilds full wave state from canonical authority set
|
|
|
148
149
|
|
|
149
150
|
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.
|
|
150
151
|
|
|
151
|
-
The projection writer is the single module responsible for
|
|
152
|
+
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.
|
|
152
153
|
|
|
153
154
|
```
|
|
154
155
|
session-supervisor.mjs Launches and monitors agent sessions
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
Inputs: run selections / launch requests from
|
|
157
|
+
implementation engine and closure engine,
|
|
158
|
+
launch specs from executor adapters
|
|
157
159
|
Owns: process lifecycle, tmux sessions,
|
|
158
160
|
terminal surfaces, PID tracking,
|
|
159
161
|
lock management, rate-limit retry loops,
|
|
160
162
|
resident orchestrator sessions
|
|
161
|
-
Writes:
|
|
162
|
-
|
|
163
|
-
|
|
163
|
+
Writes: wave_run.started|completed|failed,
|
|
164
|
+
attempt.running|completed|failed,
|
|
165
|
+
agent_run.started|completed|failed|timed_out
|
|
164
166
|
Observes: human feedback responses (collects and
|
|
165
167
|
submits, but does NOT own SLA, reroute,
|
|
166
168
|
escalation, or timeout policy — those
|
|
167
169
|
are control-plane workflow semantics
|
|
168
170
|
materialized by the reducer)
|
|
169
171
|
|
|
170
|
-
projection-writer.mjs Writes
|
|
172
|
+
projection-writer.mjs Writes projection outputs
|
|
171
173
|
(new) Inputs: derived state from materializer,
|
|
172
174
|
gate verdicts from gate engine,
|
|
173
175
|
wave state from reducer
|
|
@@ -175,7 +177,10 @@ projection-writer.mjs Writes all non-canonical outputs
|
|
|
175
177
|
markdown board projections,
|
|
176
178
|
coordination board projection,
|
|
177
179
|
trace bundles, quality metrics,
|
|
178
|
-
|
|
180
|
+
shared summaries, inboxes, assignment
|
|
181
|
+
and dependency snapshots, ledger,
|
|
182
|
+
docs queue, security summary,
|
|
183
|
+
integration summary
|
|
179
184
|
Rule: never reads its own outputs,
|
|
180
185
|
always writes atomically,
|
|
181
186
|
labels every artifact with its class
|
|
@@ -192,15 +197,15 @@ launcher.mjs Thin orchestrator
|
|
|
192
197
|
3. For each wave:
|
|
193
198
|
a. reducer.rebuild() → current state
|
|
194
199
|
b. retry-engine.plan() → retry decisions
|
|
195
|
-
c. implementation-engine.select() →
|
|
196
|
-
d. derived-state-engine.materialize() →
|
|
197
|
-
e. supervisor.launch(
|
|
200
|
+
c. implementation-engine.select() → run selections
|
|
201
|
+
d. derived-state-engine.materialize() → derived payloads
|
|
202
|
+
e. supervisor.launch(run selections) → agent sessions
|
|
198
203
|
(supervisor writes agent_run.started)
|
|
199
204
|
f. supervisor.wait() → completion
|
|
200
205
|
(supervisor writes agent_run.completed)
|
|
201
206
|
g. gate-engine.evaluate() → gate verdicts
|
|
202
207
|
h. closure-engine.sequence() → closure phases
|
|
203
|
-
i. projection-writer.write() →
|
|
208
|
+
i. projection-writer.write() → persisted projections
|
|
204
209
|
4. Release lock, exit
|
|
205
210
|
```
|
|
206
211
|
|
|
@@ -361,11 +366,11 @@ All tasks in the wave are `owned_slice_proven` AND all cross-cutting closure con
|
|
|
361
366
|
- no open clarification barriers
|
|
362
367
|
- no open helper assignment barriers
|
|
363
368
|
- no open cross-lane dependency barriers
|
|
364
|
-
- integration gate passed (A8)
|
|
365
|
-
- documentation gate passed (A9)
|
|
366
|
-
- cont-eval gate passed (E0) if applicable
|
|
369
|
+
- integration gate passed (effective integration steward; starter default `A8`)
|
|
370
|
+
- documentation gate passed (effective documentation steward; starter default `A9`)
|
|
371
|
+
- cont-eval gate passed (effective `cont-EVAL`; starter default `E0`) if applicable
|
|
367
372
|
- security gate passed if applicable
|
|
368
|
-
- cont-qa final verdict is PASS (A0)
|
|
373
|
+
- cont-qa final verdict is PASS (effective `cont-QA`; starter default `A0`)
|
|
369
374
|
- component matrix promotions validated
|
|
370
375
|
|
|
371
376
|
Only when `wave_closure_ready` is true does the closure engine emit the `wave_run.completed` event.
|
|
@@ -499,13 +504,11 @@ Agent result envelopes are classified as canonical structured snapshots and must
|
|
|
499
504
|
.tmp/<lane>-wave-launcher/results/wave-<N>/attempt-<A>/<agentId>.json
|
|
500
505
|
```
|
|
501
506
|
|
|
502
|
-
###
|
|
503
|
-
|
|
504
|
-
- Phase 1: agents emit the envelope alongside existing log markers. Gate engine reads the envelope when present, falls back to the legacy adapter.
|
|
505
|
-
- Phase 2: gate engine requires the envelope. Log markers become human-readable only.
|
|
506
|
-
- Phase 3: log-parsing code is removed.
|
|
507
|
+
### Current runtime behavior
|
|
507
508
|
|
|
508
|
-
|
|
509
|
+
- Live runs read and write the attempt-scoped canonical envelope path directly.
|
|
510
|
+
- Legacy sibling `*.envelope.json` files and marker-era artifacts are compatibility import inputs for replay, reconcile, and historical trace materialization only.
|
|
511
|
+
- `synthesizeLegacyEnvelope()` remains explicit migration-only compatibility code; live gate, retry, closure, and reducer decisions do not use it as a correctness path.
|
|
509
512
|
|
|
510
513
|
---
|
|
511
514
|
|
|
@@ -545,15 +548,17 @@ Projections materialized from Class 1 and Class 2 sources. Can be deleted and re
|
|
|
545
548
|
| Relaunch plan | `.tmp/<lane>-wave-launcher/status/relaunch-plan-wave-<N>.json` | JSON |
|
|
546
549
|
| Assignment snapshot | `.tmp/<lane>-wave-launcher/assignments/wave-<N>.json` | JSON |
|
|
547
550
|
| Dependency snapshot | `.tmp/<lane>-wave-launcher/dependencies/wave-<N>.json` | JSON |
|
|
548
|
-
| Shared summary | `.tmp/<lane>-wave-launcher/
|
|
551
|
+
| Shared summary | `.tmp/<lane>-wave-launcher/inboxes/wave-<N>/shared-summary.md` | Markdown |
|
|
549
552
|
| Per-agent inbox | `.tmp/<lane>-wave-launcher/inboxes/wave-<N>/<agentId>.md` | Markdown |
|
|
550
|
-
| Ledger | `.tmp/<lane>-wave-launcher/
|
|
553
|
+
| Ledger | `.tmp/<lane>-wave-launcher/ledger/wave-<N>.json` | JSON |
|
|
551
554
|
| Docs queue | `.tmp/<lane>-wave-launcher/docs-queue/wave-<N>.json` | JSON |
|
|
552
|
-
| Security summary | `.tmp/<lane>-wave-launcher/
|
|
553
|
-
|
|
|
555
|
+
| Security summary JSON | `.tmp/<lane>-wave-launcher/security/wave-<N>.json` | JSON |
|
|
556
|
+
| Security summary markdown | `.tmp/<lane>-wave-launcher/security/wave-<N>.md` | Markdown |
|
|
557
|
+
| Integration summary JSON | `.tmp/<lane>-wave-launcher/integration/wave-<N>.json` | JSON |
|
|
558
|
+
| Integration summary markdown | `.tmp/<lane>-wave-launcher/integration/wave-<N>.md` | Markdown |
|
|
554
559
|
| Run state | `.tmp/<lane>-wave-launcher/run-state.json` | JSON |
|
|
555
560
|
| Quality metrics | `.tmp/<lane>-wave-launcher/traces/wave-<N>/attempt-<A>/quality.json` | JSON |
|
|
556
|
-
|
|
|
561
|
+
| Reducer snapshot | `.tmp/<lane>-wave-launcher/reducer/wave-<N>.json` | JSON |
|
|
557
562
|
|
|
558
563
|
### Class 4 — Human-Facing Projections
|
|
559
564
|
|
|
@@ -563,9 +568,9 @@ Convenience outputs for operator dashboards and review. Never read by the system
|
|
|
563
568
|
|----------|------|--------|
|
|
564
569
|
| Global dashboard | `.tmp/<lane>-wave-launcher/dashboards/global.json` | JSON |
|
|
565
570
|
| Wave dashboard | `.tmp/<lane>-wave-launcher/dashboards/wave-<N>.json` | JSON |
|
|
566
|
-
| Coordination board | `.tmp/<lane>-wave-launcher/
|
|
567
|
-
| Orchestrator board | `.tmp
|
|
568
|
-
| Wave manifest | `.tmp/<lane>-wave-launcher/
|
|
571
|
+
| Coordination board | `.tmp/<lane>-wave-launcher/messageboards/wave-<N>.md` | Markdown |
|
|
572
|
+
| Orchestrator board | `.tmp/wave-orchestrator/messageboards/orchestrator.md` | Markdown |
|
|
573
|
+
| Wave manifest | `.tmp/<lane>-wave-launcher/waves.manifest.json` | JSON |
|
|
569
574
|
|
|
570
575
|
Each artifact file includes a `_meta` field (or frontmatter for markdown) declaring:
|
|
571
576
|
|
|
@@ -839,23 +844,31 @@ This boundary means a future Temporal-backed or service-backed orchestrator can
|
|
|
839
844
|
|
|
840
845
|
---
|
|
841
846
|
|
|
842
|
-
##
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
|
847
|
-
|
|
848
|
-
| `launcher.mjs`
|
|
849
|
-
| `
|
|
850
|
-
| `
|
|
851
|
-
| `
|
|
852
|
-
| `
|
|
853
|
-
| `
|
|
854
|
-
| `
|
|
855
|
-
|
|
|
856
|
-
|
|
|
857
|
-
|
|
|
858
|
-
|
|
|
847
|
+
## Runtime Module Layout
|
|
848
|
+
|
|
849
|
+
The runtime tree now uses the engine-oriented module names directly.
|
|
850
|
+
|
|
851
|
+
| Runtime Module | Responsibility |
|
|
852
|
+
|---------------|----------------|
|
|
853
|
+
| `launcher.mjs` | Thin orchestrator and CLI entrypoint |
|
|
854
|
+
| `implementation-engine.mjs` | Implementation fan-out planning |
|
|
855
|
+
| `derived-state-engine.mjs` | Derived state computation from canonical inputs |
|
|
856
|
+
| `gate-engine.mjs` | Live gate evaluation |
|
|
857
|
+
| `closure-engine.mjs` | Closure sequencing |
|
|
858
|
+
| `retry-engine.mjs` | Retry and resume planning |
|
|
859
|
+
| `wave-state-reducer.mjs` | Deterministic wave-state reconstruction |
|
|
860
|
+
| `session-supervisor.mjs` | Session launch and observation |
|
|
861
|
+
| `projection-writer.mjs` | Projection writes |
|
|
862
|
+
| `result-envelope.mjs` | Envelope schema, validation, and compatibility synthesis |
|
|
863
|
+
| `launcher-runtime.mjs` | Low-level launch and wait helpers used by the session supervisor |
|
|
864
|
+
| `control-plane.mjs` | Canonical control-plane event log |
|
|
865
|
+
| `coordination-store.mjs` | Canonical coordination log |
|
|
866
|
+
| `wave-files.mjs` | Parsed wave definitions |
|
|
867
|
+
|
|
868
|
+
Historical note:
|
|
869
|
+
|
|
870
|
+
- earlier transition builds used `launcher-gates.mjs`, `launcher-retry.mjs`, `launcher-derived-state.mjs`, `launcher-closure.mjs`, and `launcher-supervisor.mjs` as extracted runtime modules
|
|
871
|
+
- those compatibility names are no longer part of the live runtime tree
|
|
859
872
|
| (new) | `contradiction-entity.mjs` | Contradiction lifecycle |
|
|
860
873
|
| (new) | `fact-entity.mjs` | Fact/evidence lineage |
|
|
861
874
|
| (new) | `human-input-workflow.mjs` | Human input workflow logic |
|
|
@@ -900,7 +913,7 @@ This section documents the 10 feedback corrections incorporated from architectur
|
|
|
900
913
|
|
|
901
914
|
2. **Task vs coordination_record boundary:** added an explicit section defining the crisp rule. Task = durable work unit with ownership, artifact contract, proof rules, closure semantics. Coordination record = event or message about a task. They do not overlap.
|
|
902
915
|
|
|
903
|
-
3. **Intent vs observation:**
|
|
916
|
+
3. **Intent vs observation:** planning engines emit run selections or launch requests (intent). Only the session supervisor writes `wave_run.*`, `attempt.*`, and `agent_run.*` observed lifecycle facts after those events actually happen.
|
|
904
917
|
|
|
905
918
|
4. **Reducer input model:** the reducer explicitly takes all three canonical sources (control-plane events, coordination records, agent result envelopes) as arguments. The doc no longer claims a single event log.
|
|
906
919
|
|
|
@@ -914,7 +927,7 @@ This section documents the 10 feedback corrections incorporated from architectur
|
|
|
914
927
|
|
|
915
928
|
9. **Human input workflow ownership:** explicitly moved SLA, reroute, escalation, and timeout logic out of the supervisor. The supervisor observes and submits; workflow semantics live in control-plane events, the reducer, and `human-input-workflow.mjs`.
|
|
916
929
|
|
|
917
|
-
10. **Executor adapter contract:** `
|
|
930
|
+
10. **Executor adapter contract:** `locateResultEnvelope()` + `validateResultEnvelope()` define the live end state, and `synthesizeLegacyEnvelope()` is explicitly named as migration-only compatibility code.
|
|
918
931
|
|
|
919
932
|
---
|
|
920
933
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This is a showcase-first sample wave.
|
|
4
4
|
|
|
5
|
-
Use it as the single reference example for the current `0.8.
|
|
5
|
+
Use it as the single reference example for the current `0.8.4` Wave surface.
|
|
6
6
|
|
|
7
7
|
It intentionally combines more sections than a normal production wave so one file can demonstrate:
|
|
8
8
|
|