@chllming/wave-orchestration 0.7.1 → 0.7.3

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 (32) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +8 -8
  3. package/docs/plans/component-cutover-matrix.json +50 -3
  4. package/docs/plans/current-state.md +1 -1
  5. package/docs/plans/end-state-architecture.md +927 -0
  6. package/docs/plans/examples/wave-example-live-proof.md +1 -1
  7. package/docs/plans/migration.md +2 -2
  8. package/docs/plans/waves/wave-1.md +376 -0
  9. package/docs/plans/waves/wave-2.md +292 -0
  10. package/docs/plans/waves/wave-3.md +342 -0
  11. package/docs/plans/waves/wave-4.md +391 -0
  12. package/docs/plans/waves/wave-5.md +382 -0
  13. package/docs/plans/waves/wave-6.md +321 -0
  14. package/docs/reference/npmjs-trusted-publishing.md +2 -2
  15. package/docs/reference/sample-waves.md +4 -4
  16. package/package.json +1 -1
  17. package/releases/manifest.json +36 -0
  18. package/scripts/wave-orchestrator/agent-state.mjs +462 -35
  19. package/scripts/wave-orchestrator/artifact-schemas.mjs +81 -0
  20. package/scripts/wave-orchestrator/control-cli.mjs +7 -1
  21. package/scripts/wave-orchestrator/coordination.mjs +11 -10
  22. package/scripts/wave-orchestrator/human-input-workflow.mjs +289 -0
  23. package/scripts/wave-orchestrator/install.mjs +22 -0
  24. package/scripts/wave-orchestrator/launcher-derived-state.mjs +915 -0
  25. package/scripts/wave-orchestrator/launcher-gates.mjs +1061 -0
  26. package/scripts/wave-orchestrator/launcher-retry.mjs +873 -0
  27. package/scripts/wave-orchestrator/launcher-supervisor.mjs +704 -0
  28. package/scripts/wave-orchestrator/launcher.mjs +153 -2922
  29. package/scripts/wave-orchestrator/task-entity.mjs +557 -0
  30. package/scripts/wave-orchestrator/wave-files.mjs +11 -2
  31. package/scripts/wave-orchestrator/wave-state-reducer.mjs +566 -0
  32. package/wave.config.json +1 -1
@@ -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.7.1` Wave surface.
5
+ Use it as the single reference example for the current `0.7.3` Wave surface.
6
6
 
7
7
  It intentionally combines more sections than a normal production wave so one file can demonstrate:
8
8
 
@@ -22,13 +22,13 @@ GitHub Packages remains available as an authenticated fallback path, and maintai
22
22
  - Fresh `wave init` seeds the starter `skills/` library. `wave init --adopt-existing` records existing repo-owned skill bundles when they are already present, but does not replace or rewrite them.
23
23
  - The current runtime expects the post-roadmap model: typed coordination, compiled inboxes, `A8` integration, staged closure, orchestrator-first clarification, and operational runtime policy.
24
24
 
25
- ## Upgrading From 0.6.x To 0.7.1
25
+ ## Upgrading From 0.6.x To 0.7.3
26
26
 
27
27
  Read `CHANGELOG.md` first, then treat this section as the repo-owned migration checklist for adopted `0.6.x` workspaces.
28
28
 
29
29
  `wave upgrade` updates the installed runtime only. It does not copy planner starter files into a repo that already owns its docs, skills, and Context7 bundles.
30
30
 
31
- `0.7.1` also hardens run-control behavior for manual relaunches: fresh live starts clear stale auto-generated relaunch plans by default unless `--resume-control-state` is passed, and `wave control status` now treats the active attempt as the authoritative live fan-out while that attempt is running.
31
+ `0.7.3` keeps the proof-centric closure hardening from `0.7.2` and closes the remaining parser hole: malformed unmatched end-of-tail fenced blocks no longer hide later final implementation markers, stale summaries rebuild when required proof/doc/component fields are still missing even if diagnostics already exist, malformed marker syntax still surfaces explicit parse errors, and incomplete implementation work should stay inside the required final markers with `state=gap` instead of trailing `[wave-gap]` lines.
32
32
 
33
33
  ### Required Repo Changes
34
34
 
@@ -0,0 +1,376 @@
1
+ # Wave 1 - Phase Engine Extraction and Authority Model
2
+
3
+ **Commit message**: `Arch: extract phase engines and establish canonical authority set`
4
+
5
+ ## Component promotions
6
+
7
+ - wave-parser-and-launcher: baseline-proved
8
+ - closure-sweep-and-role-gates: baseline-proved
9
+ - state-artifacts-and-feedback: repo-landed
10
+
11
+ ## Context7 defaults
12
+
13
+ - bundle: node-typescript
14
+ - query: "Node.js module extraction, event sourcing patterns, and vitest test migration"
15
+
16
+ ## Agent A0: cont-QA
17
+
18
+ ### Role prompts
19
+
20
+ - docs/agents/wave-cont-qa-role.md
21
+
22
+ ### Executor
23
+
24
+ - id: codex
25
+ - model: gpt-5-codex
26
+ - codex.profile_name: review
27
+ - codex.search: true
28
+ - codex.json: true
29
+
30
+ ### Context7
31
+
32
+ - bundle: none
33
+
34
+ ### Prompt
35
+
36
+ ```text
37
+ Primary goal:
38
+ - Verify that the phase engine extraction preserves the full public API surface and that authority boundaries are correct.
39
+
40
+ Required context before coding:
41
+ - Read docs/plans/end-state-architecture.md (sections: Design Principles, Module Architecture, Canonical Authority Set).
42
+ - Read docs/reference/repository-guidance.md.
43
+ - Read docs/plans/master-plan.md, docs/plans/current-state.md, and docs/plans/migration.md.
44
+
45
+ Specific expectations:
46
+ - confirm all re-exports from launcher.mjs still resolve to the correct phase engine
47
+ - confirm no phase engine reads from derived caches or projections as decision input
48
+ - confirm gate engine and retry engine do not emit observed lifecycle events (only intent)
49
+ - confirm control-plane events and coordination records are the only append-only stores
50
+ - do not PASS if launcher.mjs still contains decision logic that belongs in a phase engine
51
+
52
+ File ownership (only touch these paths):
53
+ - docs/plans/waves/reviews/wave-1-cont-qa.md
54
+ ```
55
+
56
+ ## Agent A8: Integration Steward
57
+
58
+ ### Role prompts
59
+
60
+ - docs/agents/wave-integration-role.md
61
+
62
+ ### Executor
63
+
64
+ - id: claude
65
+ - model: claude-sonnet-4-6
66
+
67
+ ### Context7
68
+
69
+ - bundle: none
70
+
71
+ ### Capabilities
72
+
73
+ - integration
74
+ - docs-shared-plan
75
+
76
+ ### Prompt
77
+
78
+ ```text
79
+ Synthesize the phase engine extraction before documentation and cont-QA closure.
80
+
81
+ Required context before coding:
82
+ - Read docs/plans/end-state-architecture.md.
83
+ - Read docs/reference/repository-guidance.md.
84
+ - Read docs/research/agent-context-sources.md.
85
+ - Read docs/plans/master-plan.md, docs/plans/current-state.md, and docs/plans/migration.md.
86
+
87
+ Verify:
88
+ - no circular dependencies between phase engine modules
89
+ - supervisor is the only module that interacts with processes, terminals, or the filesystem for non-canonical writes
90
+ - derived-state engine reads only from canonical state, never from its own prior outputs
91
+ - all gate evaluations are side-effect-free
92
+
93
+ File ownership (only touch these paths):
94
+ - .tmp/main-wave-launcher/integration/wave-1.md
95
+ - .tmp/main-wave-launcher/integration/wave-1.json
96
+ ```
97
+
98
+ ## Agent A9: Documentation Steward
99
+
100
+ ### Role prompts
101
+
102
+ - docs/agents/wave-documentation-role.md
103
+
104
+ ### Executor
105
+
106
+ - id: opencode
107
+ - opencode.files: docs/plans/end-state-architecture.md,docs/plans/current-state.md,docs/plans/wave-orchestrator.md
108
+
109
+ ### Context7
110
+
111
+ - bundle: none
112
+
113
+ ### Prompt
114
+
115
+ ```text
116
+ Update shared plan docs to reflect the landed phase engine architecture.
117
+
118
+ Required context before coding:
119
+ - Read docs/plans/end-state-architecture.md.
120
+ - Read docs/reference/repository-guidance.md.
121
+ - Read docs/research/agent-context-sources.md.
122
+
123
+ File ownership (only touch these paths):
124
+ - docs/plans/current-state.md
125
+ - docs/plans/master-plan.md
126
+ - docs/plans/migration.md
127
+ - docs/plans/wave-orchestrator.md
128
+ - docs/plans/component-cutover-matrix.md
129
+ - docs/plans/component-cutover-matrix.json
130
+ ```
131
+
132
+ ## Agent A1: Phase Engine Extraction — Gate Engine
133
+
134
+ ### Executor
135
+
136
+ - profile: implement-fast
137
+ - model: gpt-5-codex
138
+ - codex.config: model_reasoning_effort=medium
139
+ - codex.add_dirs: scripts,test
140
+ - fallbacks: claude, opencode
141
+
142
+ ### Context7
143
+
144
+ - bundle: node-typescript
145
+ - query: "Node.js module extraction, ES module imports and re-exports, vitest test patterns"
146
+
147
+ ### Components
148
+
149
+ - closure-sweep-and-role-gates
150
+
151
+ ### Exit contract
152
+
153
+ - completion: contract
154
+ - durability: none
155
+ - proof: unit
156
+ - doc-impact: owned
157
+
158
+ ### Deliverables
159
+
160
+ - scripts/wave-orchestrator/launcher-gates.mjs
161
+ - test/wave-orchestrator/launcher-gates.test.ts
162
+
163
+ ### Prompt
164
+
165
+ ```text
166
+ Complete the gate engine extraction from launcher.mjs.
167
+
168
+ The in-progress worktree has already extracted launcher-gates.mjs with 19 functions.
169
+ Finish the extraction:
170
+
171
+ 1. Verify all gate evaluation functions are pure (read-only, no side effects).
172
+ 2. Ensure gate functions never read from derived caches (shared summaries, dashboards, retry overrides) — only from canonical state (control-plane events, coordination records, agent result files).
173
+ 3. Ensure buildGateSnapshot orchestrates all gates and returns structured verdicts.
174
+ 4. Write comprehensive tests covering each gate independently.
175
+ 5. The gate engine must NOT emit observed lifecycle events. It returns verdicts; the caller writes events.
176
+
177
+ Required context before coding:
178
+ - Read docs/reference/repository-guidance.md.
179
+ - Read docs/research/agent-context-sources.md.
180
+ - Read docs/plans/end-state-architecture.md (section: Phase Engines, gate-engine).
181
+ - Read scripts/wave-orchestrator/launcher-gates.mjs (current state).
182
+ - Read scripts/wave-orchestrator/launcher.mjs (remaining launcher).
183
+ - Read test/wave-orchestrator/launcher.test.ts (existing gate tests to migrate).
184
+
185
+ File ownership (only touch these paths):
186
+ - scripts/wave-orchestrator/launcher-gates.mjs
187
+ - test/wave-orchestrator/launcher-gates.test.ts
188
+ ```
189
+
190
+ ## Agent A2: Phase Engine Extraction — Retry Engine
191
+
192
+ ### Executor
193
+
194
+ - profile: implement-fast
195
+ - model: gpt-5-codex
196
+ - codex.add_dirs: scripts,test
197
+ - fallbacks: claude, opencode
198
+
199
+ ### Context7
200
+
201
+ - bundle: node-typescript
202
+
203
+ ### Components
204
+
205
+ - wave-parser-and-launcher
206
+
207
+ ### Exit contract
208
+
209
+ - completion: contract
210
+ - durability: none
211
+ - proof: unit
212
+ - doc-impact: none
213
+
214
+ ### Deliverables
215
+
216
+ - scripts/wave-orchestrator/launcher-retry.mjs
217
+ - test/wave-orchestrator/launcher-retry.test.ts
218
+
219
+ ### Prompt
220
+
221
+ ```text
222
+ Complete the retry engine extraction from launcher.mjs.
223
+
224
+ The in-progress worktree has already extracted launcher-retry.mjs with 16 functions.
225
+ Finish the extraction:
226
+
227
+ 1. Verify all retry planning functions are deterministic from stored state.
228
+ 2. The retry engine reads from control-plane materialization and gate verdicts, never from override files as primary input.
229
+ 3. Override files (.tmp/<lane>-wave-launcher/control/) become write-only compatibility caches — the retry engine writes them for legacy CLI compatibility but never reads them for decisions.
230
+ 4. Ensure the retry plan contract is explicit: why resuming, what invalidated, what proof reusable, what closure stage to resume from, what executor changes allowed, what human inputs block resume.
231
+ 5. Write tests that exercise retry planning from stored state without launching processes.
232
+
233
+ Required context before coding:
234
+ - Read docs/reference/repository-guidance.md.
235
+ - Read docs/research/agent-context-sources.md.
236
+ - Read docs/plans/end-state-architecture.md (section: Phase Engines, retry-engine).
237
+ - Read scripts/wave-orchestrator/launcher-retry.mjs (current state).
238
+ - Read scripts/wave-orchestrator/retry-control.mjs (existing retry primitives).
239
+
240
+ File ownership (only touch these paths):
241
+ - scripts/wave-orchestrator/launcher-retry.mjs
242
+ - test/wave-orchestrator/launcher-retry.test.ts
243
+ ```
244
+
245
+ ## Agent A3: Phase Engine Extraction — Derived State and Supervisor
246
+
247
+ ### Executor
248
+
249
+ - profile: implement-fast
250
+ - model: gpt-5-codex
251
+ - codex.add_dirs: scripts,test
252
+ - fallbacks: claude, opencode
253
+
254
+ ### Context7
255
+
256
+ - bundle: node-typescript
257
+
258
+ ### Components
259
+
260
+ - state-artifacts-and-feedback
261
+
262
+ ### Exit contract
263
+
264
+ - completion: contract
265
+ - durability: none
266
+ - proof: unit
267
+ - doc-impact: none
268
+
269
+ ### Deliverables
270
+
271
+ - scripts/wave-orchestrator/launcher-derived-state.mjs
272
+ - scripts/wave-orchestrator/launcher-supervisor.mjs
273
+ - test/wave-orchestrator/launcher-derived-state.test.ts
274
+ - test/wave-orchestrator/launcher-supervisor.test.ts
275
+
276
+ ### Prompt
277
+
278
+ ```text
279
+ Complete the derived-state engine and session supervisor extraction.
280
+
281
+ The in-progress worktree has:
282
+ - launcher-derived-state.mjs (915 lines, 16 functions)
283
+ - launcher-supervisor.mjs (704 lines, 14 functions)
284
+
285
+ Finish the extraction:
286
+
287
+ Derived-state engine:
288
+ 1. Verify it reads only from canonical state (coordination log, control-plane events).
289
+ 2. Verify it never reads from its own prior outputs.
290
+ 3. All path builders are co-located in this module.
291
+
292
+ Session supervisor:
293
+ 1. Confirm it is the ONLY module that launches processes, manages tmux sessions, writes to terminals, or handles PID tracking.
294
+ 2. Human feedback monitoring stays here for process observation, but human-input workflow semantics (SLA, reroute, escalation, timeout policy, closure blocking) must remain in the control-plane event model and reducer — not in the supervisor.
295
+ 3. The supervisor emits observed lifecycle events (agent_run.started, agent_run.completed) — planning engines only emit intent.
296
+
297
+ Required context before coding:
298
+ - Read docs/reference/repository-guidance.md.
299
+ - Read docs/research/agent-context-sources.md.
300
+ - Read docs/plans/end-state-architecture.md (sections: Session Supervisor, Layer 3).
301
+ - Read scripts/wave-orchestrator/launcher-derived-state.mjs (current state).
302
+ - Read scripts/wave-orchestrator/launcher-supervisor.mjs (current state).
303
+
304
+ File ownership (only touch these paths):
305
+ - scripts/wave-orchestrator/launcher-derived-state.mjs
306
+ - scripts/wave-orchestrator/launcher-supervisor.mjs
307
+ - test/wave-orchestrator/launcher-derived-state.test.ts
308
+ - test/wave-orchestrator/launcher-supervisor.test.ts
309
+ ```
310
+
311
+ ## Agent A4: Thin Launcher Orchestrator
312
+
313
+ ### Executor
314
+
315
+ - id: codex
316
+ - model: gpt-5-codex
317
+ - codex.add_dirs: scripts,test
318
+ - fallbacks: claude
319
+
320
+ ### Context7
321
+
322
+ - bundle: node-typescript
323
+
324
+ ### Components
325
+
326
+ - wave-parser-and-launcher
327
+
328
+ ### Exit contract
329
+
330
+ - completion: contract
331
+ - durability: none
332
+ - proof: unit
333
+ - doc-impact: owned
334
+
335
+ ### Deliverables
336
+
337
+ - scripts/wave-orchestrator/launcher.mjs
338
+ - test/wave-orchestrator/launcher.test.ts
339
+
340
+ ### Prompt
341
+
342
+ ```text
343
+ Reduce launcher.mjs to a thin orchestrator that delegates all decisions to phase engines.
344
+
345
+ After A1-A3 complete their extractions, launcher.mjs should contain only:
346
+ 1. CLI argument parsing (parseArgs).
347
+ 2. The wave-level control loop that wires phase engines in order.
348
+ 3. Re-exports for backward compatibility.
349
+
350
+ The orchestration loop should follow this pattern:
351
+ a. reducer.rebuild() → current state
352
+ b. retry-engine.plan() → retry decisions
353
+ c. implementation-engine.select() → run selections (emit intent, not observed events)
354
+ d. derived-state-engine.materialize() → projections
355
+ e. supervisor.launch() → agent sessions (supervisor emits agent_run.started)
356
+ f. supervisor.wait() → completion (supervisor emits agent_run.completed)
357
+ g. gate-engine.evaluate() → gate verdicts
358
+ h. closure-engine.sequence() → closure phases
359
+ i. projection-writer.write() → dashboards, traces
360
+
361
+ Verify:
362
+ - launcher.mjs has no direct fs writes to derived caches or dashboards
363
+ - launcher.mjs does not parse log tails or read status files directly
364
+ - all existing tests pass via re-exported symbols
365
+ - the public CLI surface is unchanged
366
+
367
+ Required context before coding:
368
+ - Read docs/reference/repository-guidance.md.
369
+ - Read docs/research/agent-context-sources.md.
370
+ - Read docs/plans/end-state-architecture.md (section: Layer 4 — Launcher Orchestrator).
371
+ - Read scripts/wave-orchestrator/launcher.mjs (current state in worktree).
372
+
373
+ File ownership (only touch these paths):
374
+ - scripts/wave-orchestrator/launcher.mjs
375
+ - test/wave-orchestrator/launcher.test.ts
376
+ ```
@@ -0,0 +1,292 @@
1
+ # Wave 2 - Task Graph and Two-Phase Proof Model
2
+
3
+ **Commit message**: `Arch: add first-class task entities and two-phase proof separation`
4
+
5
+ ## Component promotions
6
+
7
+ - state-artifacts-and-feedback: baseline-proved
8
+
9
+ ## Context7 defaults
10
+
11
+ - bundle: node-typescript
12
+ - query: "Event sourcing, DAG task graphs, state machine design in Node.js"
13
+
14
+ ## Agent A0: cont-QA
15
+
16
+ ### Role prompts
17
+
18
+ - docs/agents/wave-cont-qa-role.md
19
+
20
+ ### Executor
21
+
22
+ - id: codex
23
+ - model: gpt-5-codex
24
+ - codex.profile_name: review
25
+ - codex.search: true
26
+ - codex.json: true
27
+
28
+ ### Context7
29
+
30
+ - bundle: none
31
+
32
+ ### Prompt
33
+
34
+ ```text
35
+ Primary goal:
36
+ - Verify that the task entity model and two-phase proof separation are correctly implemented and do not break existing wave execution.
37
+
38
+ Required context before coding:
39
+ - Read docs/plans/end-state-architecture.md (sections: Entity Model — Task, Two-Phase Proof Model).
40
+ - Read docs/reference/repository-guidance.md.
41
+
42
+ Specific expectations:
43
+ - confirm task IDs use stable semantic identity with separate version/hash fields, NOT pure content-addressable hashing
44
+ - confirm the distinction between task (durable work unit with ownership, artifact contract, proof rules, closure semantics) and coordination_record (event or message about a task, dependency, contradiction, or workflow)
45
+ - confirm owned_slice_proven is evaluated per-task and does not depend on other agents completing
46
+ - confirm wave_closure_ready requires all tasks proven PLUS all cross-cutting conditions
47
+ - confirm the gate engine now evaluates per-task, not just per-agent
48
+ - do not PASS if the task-coordination boundary is ambiguous
49
+
50
+ File ownership (only touch these paths):
51
+ - docs/plans/waves/reviews/wave-2-cont-qa.md
52
+ ```
53
+
54
+ ## Agent A8: Integration Steward
55
+
56
+ ### Role prompts
57
+
58
+ - docs/agents/wave-integration-role.md
59
+
60
+ ### Executor
61
+
62
+ - id: claude
63
+ - model: claude-sonnet-4-6
64
+
65
+ ### Context7
66
+
67
+ - bundle: none
68
+
69
+ ### Capabilities
70
+
71
+ - integration
72
+ - docs-shared-plan
73
+
74
+ ### Prompt
75
+
76
+ ```text
77
+ Synthesize the task graph and proof model changes before documentation and cont-QA closure.
78
+
79
+ Required context before coding:
80
+ - Read docs/plans/end-state-architecture.md.
81
+ - Read docs/reference/repository-guidance.md.
82
+ - Read docs/research/agent-context-sources.md.
83
+
84
+ Verify:
85
+ - task graph correctly represents dependency edges between agents
86
+ - the two-phase proof split aligns with existing closure stage ordering
87
+ - retry engine correctly uses the split: only unproven tasks on slice failure, only closure agents on gate failure
88
+ - no regression in existing wave-0 execution behavior
89
+
90
+ File ownership (only touch these paths):
91
+ - .tmp/main-wave-launcher/integration/wave-2.md
92
+ - .tmp/main-wave-launcher/integration/wave-2.json
93
+ ```
94
+
95
+ ## Agent A9: Documentation Steward
96
+
97
+ ### Role prompts
98
+
99
+ - docs/agents/wave-documentation-role.md
100
+
101
+ ### Executor
102
+
103
+ - id: opencode
104
+ - opencode.files: docs/plans/end-state-architecture.md,docs/plans/current-state.md
105
+
106
+ ### Context7
107
+
108
+ - bundle: none
109
+
110
+ ### Prompt
111
+
112
+ ```text
113
+ Update shared plan docs to reflect the task graph model and two-phase proof separation.
114
+
115
+ Required context before coding:
116
+ - Read docs/reference/repository-guidance.md.
117
+ - Read docs/research/agent-context-sources.md.
118
+
119
+ File ownership (only touch these paths):
120
+ - docs/plans/current-state.md
121
+ - docs/plans/master-plan.md
122
+ - docs/plans/migration.md
123
+ - docs/plans/component-cutover-matrix.md
124
+ - docs/plans/component-cutover-matrix.json
125
+ ```
126
+
127
+ ## Agent A1: Task Entity and Graph Builder
128
+
129
+ ### Executor
130
+
131
+ - profile: implement-fast
132
+ - model: gpt-5-codex
133
+ - codex.add_dirs: scripts,test
134
+ - fallbacks: claude, opencode
135
+
136
+ ### Context7
137
+
138
+ - bundle: node-typescript
139
+ - query: "DAG construction, topological sort, JSON schema validation in Node.js"
140
+
141
+ ### Components
142
+
143
+ - state-artifacts-and-feedback
144
+
145
+ ### Exit contract
146
+
147
+ - completion: contract
148
+ - durability: none
149
+ - proof: unit
150
+ - doc-impact: owned
151
+
152
+ ### Deliverables
153
+
154
+ - scripts/wave-orchestrator/task-entity.mjs
155
+ - test/wave-orchestrator/task-entity.test.ts
156
+
157
+ ### Prompt
158
+
159
+ ```text
160
+ Implement the first-class task entity model.
161
+
162
+ Design rules from end-state architecture:
163
+ - Task is a durable work unit with ownership, artifact contract, proof rules, and closure semantics.
164
+ - Coordination record is an event or message about a task, dependency, contradiction, or workflow.
165
+ - Tasks and coordination records do NOT overlap. Coordination records reference tasks by taskId.
166
+
167
+ Task identity:
168
+ - taskId is a stable semantic identifier (e.g., "wave-1:A1:wave-parser-and-launcher"), NOT a content hash.
169
+ - Tasks carry a separate contentHash and version field for change tracking.
170
+ - This avoids identity churn when scope, proof requirements, or dependencies change.
171
+
172
+ Task schema:
173
+ task {
174
+ taskId: string // stable semantic id: "wave-<N>:<agentId>:<component-or-slug>"
175
+ version: number // increments on definition change
176
+ contentHash: string // SHA256 of current definition content
177
+ waveNumber: number
178
+ lane: string
179
+ owningAgentId: string
180
+ assigneeAgentId: string
181
+ leaseState: "unleased" | "leased" | "released" | "expired"
182
+ leaseExpiresAt: ISO8601 | null
183
+ artifactContract: { deliverables, proofArtifacts, exitContract }
184
+ proofRequirements: { proofLevel, proofCentric, maturityTarget }
185
+ dependencyEdges: [{ taskId, kind, status }]
186
+ closureState: "open" | "owned_slice_proven" | "wave_closure_ready" | "closed"
187
+ components: [{ componentId, targetLevel }]
188
+ status: "pending" | "in_progress" | "proven" | "blocked" | "completed"
189
+ }
190
+
191
+ Implementation:
192
+ 1. Add task entity type to control-plane schema (wave-control-schema.mjs).
193
+ 2. Build task graph from wave definitions: each agent's deliverables + components + exit contract become a task node.
194
+ 3. Build dependency edges from explicit wave dependencies, component ownership overlap, and closure-role ordering.
195
+ 4. Task lifecycle events go to the control-plane log.
196
+ 5. The wave-files.mjs parser emits task declarations from parsed wave definitions.
197
+ 6. Write a materializeTaskGraph(controlPlaneEvents) function that rebuilds the DAG.
198
+
199
+ Required context before coding:
200
+ - Read docs/reference/repository-guidance.md.
201
+ - Read docs/research/agent-context-sources.md.
202
+ - Read docs/plans/end-state-architecture.md (sections: Entity Model — Task, Two-Phase Proof Model).
203
+ - Read scripts/wave-orchestrator/wave-control-schema.mjs.
204
+ - Read scripts/wave-orchestrator/control-plane.mjs.
205
+ - Read scripts/wave-orchestrator/wave-files.mjs (agent definition parsing).
206
+
207
+ File ownership (only touch these paths):
208
+ - scripts/wave-orchestrator/task-entity.mjs
209
+ - scripts/wave-orchestrator/wave-control-schema.mjs
210
+ - scripts/wave-orchestrator/control-plane.mjs
211
+ - test/wave-orchestrator/task-entity.test.ts
212
+ ```
213
+
214
+ ## Agent A2: Two-Phase Proof Separation
215
+
216
+ ### Executor
217
+
218
+ - profile: implement-fast
219
+ - model: gpt-5-codex
220
+ - codex.add_dirs: scripts,test
221
+ - fallbacks: claude, opencode
222
+
223
+ ### Context7
224
+
225
+ - bundle: node-typescript
226
+
227
+ ### Components
228
+
229
+ - state-artifacts-and-feedback
230
+
231
+ ### Exit contract
232
+
233
+ - completion: contract
234
+ - durability: none
235
+ - proof: unit
236
+ - doc-impact: none
237
+
238
+ ### Deliverables
239
+
240
+ - scripts/wave-orchestrator/launcher-gates.mjs
241
+ - test/wave-orchestrator/proof-phases.test.ts
242
+
243
+ ### Prompt
244
+
245
+ ```text
246
+ Implement the two-phase proof separation: owned_slice_proven and wave_closure_ready.
247
+
248
+ owned_slice_proven (per-task evaluation):
249
+ - deliverables exist on disk
250
+ - proof markers meet or exceed the declared exit contract
251
+ - proof artifacts (if declared) are present and SHA256-valid
252
+ - doc-delta declared if contract requires it
253
+ - component promotions meet target maturity level
254
+ - no open self-owned blockers
255
+
256
+ wave_closure_ready (wave-level evaluation):
257
+ - ALL tasks are owned_slice_proven
258
+ - no unresolved contradictions
259
+ - no open clarification barriers
260
+ - no open helper assignment barriers
261
+ - no open cross-lane dependency barriers
262
+ - integration gate passed (A8)
263
+ - documentation gate passed (A9)
264
+ - cont-eval gate passed (E0) if applicable
265
+ - security gate passed if applicable
266
+ - cont-qa final verdict is PASS (A0)
267
+ - component matrix promotions validated
268
+
269
+ Rerun implications:
270
+ - If an agent's slice fails: only that agent and downstream task dependents need rerun.
271
+ - If closure gates fail but slices are proven: only the failing closure agent reruns.
272
+ - If a contradiction invalidates proof: affected tasks marked for re-proof, unaffected proof bundles preserved.
273
+
274
+ Modify the gate engine to:
275
+ 1. Evaluate owned_slice_proven per-task using the task graph from Wave A1.
276
+ 2. Evaluate wave_closure_ready as an aggregate of all task proofs plus cross-cutting conditions.
277
+ 3. Return both states to the closure engine.
278
+ 4. Update the retry engine to use the split for targeted reruns.
279
+
280
+ Required context before coding:
281
+ - Read docs/reference/repository-guidance.md.
282
+ - Read docs/research/agent-context-sources.md.
283
+ - Read docs/plans/end-state-architecture.md (section: Two-Phase Proof Model).
284
+ - Read scripts/wave-orchestrator/launcher-gates.mjs.
285
+ - Read scripts/wave-orchestrator/launcher-retry.mjs.
286
+ - Read scripts/wave-orchestrator/task-entity.mjs (from A1 in this wave).
287
+
288
+ File ownership (only touch these paths):
289
+ - scripts/wave-orchestrator/launcher-gates.mjs
290
+ - scripts/wave-orchestrator/launcher-retry.mjs
291
+ - test/wave-orchestrator/proof-phases.test.ts
292
+ ```