@chllming/wave-orchestration 0.5.1

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 (68) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +549 -0
  3. package/docs/agents/wave-deploy-verifier-role.md +34 -0
  4. package/docs/agents/wave-documentation-role.md +30 -0
  5. package/docs/agents/wave-evaluator-role.md +43 -0
  6. package/docs/agents/wave-infra-role.md +34 -0
  7. package/docs/agents/wave-integration-role.md +32 -0
  8. package/docs/agents/wave-launcher-role.md +37 -0
  9. package/docs/context7/bundles.json +91 -0
  10. package/docs/plans/component-cutover-matrix.json +112 -0
  11. package/docs/plans/component-cutover-matrix.md +49 -0
  12. package/docs/plans/context7-wave-orchestrator.md +130 -0
  13. package/docs/plans/current-state.md +44 -0
  14. package/docs/plans/master-plan.md +16 -0
  15. package/docs/plans/migration.md +23 -0
  16. package/docs/plans/wave-orchestrator.md +254 -0
  17. package/docs/plans/waves/wave-0.md +165 -0
  18. package/docs/reference/github-packages-setup.md +52 -0
  19. package/docs/reference/migration-0.2-to-0.5.md +622 -0
  20. package/docs/reference/npmjs-trusted-publishing.md +55 -0
  21. package/docs/reference/repository-guidance.md +18 -0
  22. package/docs/reference/runtime-config/README.md +85 -0
  23. package/docs/reference/runtime-config/claude.md +105 -0
  24. package/docs/reference/runtime-config/codex.md +81 -0
  25. package/docs/reference/runtime-config/opencode.md +93 -0
  26. package/docs/research/agent-context-sources.md +57 -0
  27. package/docs/roadmap.md +626 -0
  28. package/package.json +53 -0
  29. package/releases/manifest.json +101 -0
  30. package/scripts/context7-api-check.sh +21 -0
  31. package/scripts/context7-export-env.sh +52 -0
  32. package/scripts/research/agent-context-archive.mjs +472 -0
  33. package/scripts/research/generate-agent-context-indexes.mjs +85 -0
  34. package/scripts/research/import-agent-context-archive.mjs +793 -0
  35. package/scripts/research/manifests/harness-and-blackboard-2026-03-21.mjs +201 -0
  36. package/scripts/wave-autonomous.mjs +13 -0
  37. package/scripts/wave-cli-bootstrap.mjs +27 -0
  38. package/scripts/wave-dashboard.mjs +11 -0
  39. package/scripts/wave-human-feedback.mjs +11 -0
  40. package/scripts/wave-launcher.mjs +11 -0
  41. package/scripts/wave-local-executor.mjs +13 -0
  42. package/scripts/wave-orchestrator/agent-state.mjs +416 -0
  43. package/scripts/wave-orchestrator/autonomous.mjs +367 -0
  44. package/scripts/wave-orchestrator/clarification-triage.mjs +605 -0
  45. package/scripts/wave-orchestrator/config.mjs +848 -0
  46. package/scripts/wave-orchestrator/context7.mjs +464 -0
  47. package/scripts/wave-orchestrator/coord-cli.mjs +286 -0
  48. package/scripts/wave-orchestrator/coordination-store.mjs +987 -0
  49. package/scripts/wave-orchestrator/coordination.mjs +768 -0
  50. package/scripts/wave-orchestrator/dashboard-renderer.mjs +254 -0
  51. package/scripts/wave-orchestrator/dashboard-state.mjs +473 -0
  52. package/scripts/wave-orchestrator/dep-cli.mjs +219 -0
  53. package/scripts/wave-orchestrator/docs-queue.mjs +75 -0
  54. package/scripts/wave-orchestrator/executors.mjs +385 -0
  55. package/scripts/wave-orchestrator/feedback.mjs +372 -0
  56. package/scripts/wave-orchestrator/install.mjs +540 -0
  57. package/scripts/wave-orchestrator/launcher.mjs +3879 -0
  58. package/scripts/wave-orchestrator/ledger.mjs +332 -0
  59. package/scripts/wave-orchestrator/local-executor.mjs +263 -0
  60. package/scripts/wave-orchestrator/replay.mjs +246 -0
  61. package/scripts/wave-orchestrator/roots.mjs +10 -0
  62. package/scripts/wave-orchestrator/routing-state.mjs +542 -0
  63. package/scripts/wave-orchestrator/shared.mjs +405 -0
  64. package/scripts/wave-orchestrator/terminals.mjs +209 -0
  65. package/scripts/wave-orchestrator/traces.mjs +1094 -0
  66. package/scripts/wave-orchestrator/wave-files.mjs +1923 -0
  67. package/scripts/wave.mjs +103 -0
  68. package/wave.config.json +115 -0
@@ -0,0 +1,622 @@
1
+ ---
2
+ title: "Wave Orchestration Migration Guide: 0.2 to 0.5"
3
+ summary: "How to migrate a repository from the earlier 0.2 wave baseline to the current post-roadmap Wave model."
4
+ ---
5
+
6
+ # Wave Orchestration Migration Guide: 0.2 to 0.5
7
+
8
+ This guide explains how to migrate a repository from the earlier Wave
9
+ Orchestration 0.2 baseline to the current post-roadmap Wave model.
10
+
11
+ It uses two concrete references:
12
+
13
+ - the 0.2-style baseline in the sibling `~/slowfast.ai` repo
14
+ - the current target shape in this standalone `wave-orchestration` repo
15
+
16
+ This is a migration guide for the current architecture described in
17
+ [Roadmap](../roadmap.md), not just a changelog of whatever happens to be landed
18
+ in one point-in-time package build. This document is about the shipped runtime
19
+ shape, not only the semver label.
20
+
21
+ ## Baseline And Target
22
+
23
+ Use these files as the concrete examples while migrating:
24
+
25
+ - 0.2 baseline config: `~/slowfast.ai/wave-orchestration/wave.config.json`
26
+ - 0.2 baseline runbook: `~/slowfast.ai/docs/plans/wave-orchestrator.md`
27
+ - 0.2 baseline wave example: `~/slowfast.ai/docs/plans/waves/wave-7.md`
28
+ - current target config: [wave.config.json](../../wave.config.json)
29
+ - current target sample wave: [wave-0.md](../plans/waves/wave-0.md)
30
+ - current target architecture: [roadmap.md](../roadmap.md)
31
+ - current package workflow: [README.md](../../README.md)
32
+
33
+ The migration is intentionally evolutionary:
34
+
35
+ - keep wave markdown as the authored plan surface
36
+ - keep lanes
37
+ - keep multi-role agents
38
+ - keep A0 evaluator and A9 documentation stewardship
39
+ - add stronger runtime planning, typed coordination, A8 integration, and
40
+ orchestrator-first clarification handling
41
+
42
+ ## What Changes
43
+
44
+ | Area | 0.2 baseline | 0.5 target | Migration action |
45
+ | --- | --- | --- | --- |
46
+ | Shared coordination | markdown message board plus status files | canonical coordination JSONL plus rendered board projection | Treat the markdown board as a view, not the source of truth |
47
+ | Agent context | raw board snapshots in prompts | compiled shared summary plus per-agent inbox | Switch operator review and agent recovery to inbox artifacts |
48
+ | Closure flow | implementation -> A9 -> A0 | implementation -> A8 integration -> A9 -> A0 | Add and require an integration steward |
49
+ | Runtime selection | lane default plus limited per-agent overrides | runtime profiles, role defaults, mix targets, fallbacks, budgets | Expand `wave.config.json` and deliberate `### Executor` planning |
50
+ | Clarification flow | file-backed human feedback queue | `clarification-request` -> orchestrator triage -> human escalation only if needed | Move humans to the end of the escalation ladder |
51
+ | Derived state | status summaries and dashboards | ledger, docs queue, integration summary, traces, triage logs | Update operator workflow and acceptance checks |
52
+ | Retry behavior | retry failed agents | retry based on coordination state, capabilities, lane policy, and fallback executor rules | Tighten relaunch logic and audit trail |
53
+
54
+ ## Target 0.5 Policy Defaults
55
+
56
+ For this migration, use these defaults unless your repo has a strong reason to
57
+ do otherwise:
58
+
59
+ - `runtimeMixTargets` are a hard preflight limit.
60
+ - A rerouted clarification remains blocking until the routed follow-up is
61
+ actually resolved or closed.
62
+ - Fallback executors are allowed on retry after unavailability, timeout, or
63
+ failed attempt when policy permits.
64
+ - Automatic fallback must stay within the declared runtime mix.
65
+ - Documentation and evaluator closure must not run until the integration
66
+ steward reports `ready-for-doc-closure`.
67
+
68
+ These defaults match the intended 0.5 operating model and keep the runtime
69
+ plan authoritative.
70
+
71
+ ## Before You Change Anything
72
+
73
+ Treat the migration as a lane-runtime cutover, not a doc-only rename.
74
+
75
+ Before starting:
76
+
77
+ 1. Stop any active launcher for the lane you are migrating.
78
+ 2. Reconcile stale state so you do not carry an abandoned run into the new
79
+ model.
80
+ 3. Snapshot the current wave docs, `wave.config.json`, and any repo-local
81
+ role prompts before editing.
82
+ 4. Assume `.tmp/<lane>-wave-launcher/` is disposable runtime state, not a
83
+ migration source of truth.
84
+
85
+ Recommended prep commands:
86
+
87
+ ```bash
88
+ pnpm exec wave launch --lane <lane> --reconcile-status
89
+ pnpm exec wave launch --lane <lane> --dry-run --no-dashboard
90
+ pnpm exec wave feedback list --lane <lane> --pending
91
+ ```
92
+
93
+ If your repo still uses wrapper scripts like the `slowfast.ai` baseline:
94
+
95
+ ```bash
96
+ pnpm wave:launch -- --lane <lane> --reconcile-status
97
+ pnpm wave:launch -- --lane <lane> --dry-run --no-dashboard
98
+ pnpm wave:feedback -- list --lane <lane> --pending
99
+ ```
100
+
101
+ ## Step 1: Upgrade The Package And Keep Existing Docs
102
+
103
+ If the repo consumes Wave as a package:
104
+
105
+ ```bash
106
+ pnpm up @chllming/wave-orchestration
107
+ pnpm exec wave upgrade
108
+ pnpm exec wave doctor
109
+ ```
110
+
111
+ If the repo vendors or ports the scripts directly, update the orchestrator
112
+ surface first and only then migrate wave docs.
113
+
114
+ The migration assumes you preserve existing plans and waves. Do not wipe
115
+ `docs/plans/` just because the runtime model is getting stronger.
116
+
117
+ ## Step 2: Expand `wave.config.json`
118
+
119
+ The most obvious config difference between the `slowfast.ai` baseline and the
120
+ 0.5 target is that 0.2 only models:
121
+
122
+ - A0 evaluator
123
+ - A9 documentation steward
124
+ - global executor defaults
125
+ - validation thresholds
126
+
127
+ The 0.5 target adds:
128
+
129
+ - A8 integration steward
130
+ - executor profiles
131
+ - capability routing
132
+ - per-lane runtime policy
133
+ - integration validation threshold
134
+
135
+ ### 0.2 baseline shape
136
+
137
+ From `~/slowfast.ai/wave-orchestration/wave.config.json`, the important parts
138
+ look like:
139
+
140
+ ```json
141
+ {
142
+ "roles": {
143
+ "evaluatorAgentId": "A0",
144
+ "documentationAgentId": "A9",
145
+ "evaluatorRolePromptPath": "docs/agents/wave-evaluator-role.md",
146
+ "documentationRolePromptPath": "docs/agents/wave-documentation-role.md"
147
+ },
148
+ "executors": {
149
+ "default": "codex",
150
+ "codex": { "command": "codex", "sandbox": "danger-full-access" },
151
+ "claude": { "command": "claude", "appendSystemPromptMode": "append", "outputFormat": "text" },
152
+ "opencode": { "command": "opencode", "format": "default" }
153
+ },
154
+ "validation": {
155
+ "requireDocumentationStewardFromWave": 0,
156
+ "requireContext7DeclarationsFromWave": 6,
157
+ "requireExitContractsFromWave": 6,
158
+ "requireComponentPromotionsFromWave": 0,
159
+ "requireAgentComponentsFromWave": 0
160
+ }
161
+ }
162
+ ```
163
+
164
+ ### 0.5 target shape
165
+
166
+ In the standalone target repo, [wave.config.json](../../wave.config.json)
167
+ adds the missing surfaces:
168
+
169
+ ```json
170
+ {
171
+ "roles": {
172
+ "evaluatorAgentId": "A0",
173
+ "integrationAgentId": "A8",
174
+ "documentationAgentId": "A9",
175
+ "evaluatorRolePromptPath": "docs/agents/wave-evaluator-role.md",
176
+ "integrationRolePromptPath": "docs/agents/wave-integration-role.md",
177
+ "documentationRolePromptPath": "docs/agents/wave-documentation-role.md"
178
+ },
179
+ "executors": {
180
+ "default": "codex",
181
+ "profiles": {
182
+ "implement-fast": { "id": "codex" },
183
+ "deep-review": { "id": "claude" },
184
+ "docs-pass": { "id": "claude" },
185
+ "ops-triage": { "id": "opencode" }
186
+ }
187
+ },
188
+ "validation": {
189
+ "requireIntegrationStewardFromWave": 0
190
+ },
191
+ "capabilityRouting": {
192
+ "preferredAgents": {}
193
+ },
194
+ "lanes": {
195
+ "main": {
196
+ "runtimePolicy": {
197
+ "runtimeMixTargets": { "codex": 3, "claude": 3, "opencode": 2 },
198
+ "defaultExecutorByRole": {
199
+ "implementation": "codex",
200
+ "integration": "claude",
201
+ "documentation": "claude",
202
+ "evaluator": "claude",
203
+ "research": "opencode",
204
+ "infra": "opencode",
205
+ "deploy": "opencode"
206
+ },
207
+ "fallbackExecutorOrder": ["claude", "opencode", "codex"]
208
+ }
209
+ }
210
+ }
211
+ }
212
+ ```
213
+
214
+ ### Required config migration actions
215
+
216
+ 1. Add `roles.integrationAgentId`.
217
+ 2. Add `roles.integrationRolePromptPath`.
218
+ 3. Add `validation.requireIntegrationStewardFromWave`.
219
+ 4. Add `executors.profiles`.
220
+ 5. Add `capabilityRouting`.
221
+ 6. Add per-lane `runtimePolicy`.
222
+ 7. Keep existing `sharedPlanDocs`, Context7 config, and component matrix paths
223
+ unless your repo layout changed.
224
+
225
+ ### Recommended runtime-profile starter set
226
+
227
+ Use four profiles first:
228
+
229
+ - `implement-fast`: default implementation work
230
+ - `deep-review`: integration, evaluator, and review-heavy work
231
+ - `docs-pass`: documentation steward work
232
+ - `ops-triage`: research, infra, and deployment triage work
233
+
234
+ Do not start with ten profiles. Keep the first migration small and legible.
235
+
236
+ ## Step 3: Add The Integration Steward Role
237
+
238
+ The biggest behavior change from 0.2 to 0.5 is that A9 and A0 are no longer
239
+ the only closure agents. A8 becomes the explicit integration steward.
240
+
241
+ Add [wave-integration-role.md](../agents/wave-integration-role.md) or an
242
+ equivalent repo-local role prompt.
243
+
244
+ What A8 owns in 0.5:
245
+
246
+ - synthesize cross-agent state
247
+ - detect unresolved contradictions
248
+ - detect interface drift and unowned work
249
+ - decide whether the wave is ready for documentation closure
250
+ - emit the final `[wave-integration]` marker
251
+
252
+ What A8 does not own:
253
+
254
+ - feature implementation
255
+ - documentation closure
256
+ - evaluator verdict
257
+
258
+ If your 0.2 repo used evaluator prose to absorb integration work implicitly,
259
+ move that responsibility out of A0 and into A8.
260
+
261
+ ## Step 4: Migrate Wave Files
262
+
263
+ The baseline `slowfast.ai` waves already have several good habits:
264
+
265
+ - explicit A0 evaluator
266
+ - explicit A9 documentation steward
267
+ - Context7 declarations
268
+ - component promotions
269
+ - exit contracts
270
+ - explicit owned files
271
+
272
+ Keep those.
273
+
274
+ The 0.5 migration changes the wave shape in four places:
275
+
276
+ 1. Add A8.
277
+ 2. Add `### Executor` for deliberate mixed-runtime waves.
278
+ 3. Add `### Capabilities` where dynamic routing is useful.
279
+ 4. Make integration and clarification flow explicit in prompts and ownership.
280
+
281
+ ### Minimum wave-file delta
282
+
283
+ For each migrated wave:
284
+
285
+ - keep `## Component promotions`
286
+ - keep `## Context7 defaults`
287
+ - keep A0
288
+ - add A8
289
+ - keep A9
290
+ - keep implementation agents
291
+ - preserve `### Exit contract` and `### Components`
292
+ - add `### Executor` to every agent when you want a deliberate runtime mix
293
+
294
+ ### Example: 0.2 baseline to 0.5 target
295
+
296
+ The `~/slowfast.ai/docs/plans/waves/wave-7.md` baseline already has A0 and A9
297
+ plus strong implementation sections, but no dedicated A8 integration steward
298
+ and no explicit runtime planning model.
299
+
300
+ A minimal 0.5 upgrade looks like this:
301
+
302
+ ````md
303
+ ## Agent A8: Integration Steward
304
+
305
+ ### Role prompts
306
+
307
+ - docs/agents/wave-integration-role.md
308
+
309
+ ### Executor
310
+
311
+ - profile: deep-review
312
+
313
+ ### Context7
314
+
315
+ - bundle: none
316
+
317
+ ### Capabilities
318
+
319
+ - integration
320
+ - docs-shared-plan
321
+
322
+ ### Prompt
323
+ ```text
324
+ Synthesize cross-agent state before documentation and evaluator closure.
325
+
326
+ File ownership (only touch these paths):
327
+ - .tmp/<lane>-wave-launcher/integration/wave-<n>.md
328
+ - .tmp/<lane>-wave-launcher/integration/wave-<n>.json
329
+ ```
330
+ ````
331
+
332
+ For implementation agents in a mixed-runtime wave, prefer explicit executor
333
+ sections instead of relying on lane defaults:
334
+
335
+ ````md
336
+ ### Executor
337
+
338
+ - profile: implement-fast
339
+ - fallbacks: claude, opencode
340
+ ````
341
+
342
+ For documentation or evaluator roles:
343
+
344
+ ````md
345
+ ### Executor
346
+
347
+ - profile: deep-review
348
+ ````
349
+
350
+ ### Planning rules for mixed-runtime waves
351
+
352
+ If the wave is intentionally mixed-runtime, declare `### Executor` on every
353
+ agent. Do not leave half the wave implicit and expect the lane defaults to
354
+ communicate the runtime plan clearly.
355
+
356
+ Recommended first mapping:
357
+
358
+ - implementation and test-fix roles: `codex`
359
+ - integration steward: `claude`
360
+ - documentation steward: `claude`
361
+ - evaluator: `claude`
362
+ - infra or deploy roles: `opencode` or `codex`, chosen deliberately
363
+ - research helpers: `opencode`
364
+
365
+ ## Step 5: Change Clarification Semantics
366
+
367
+ In the 0.2 baseline, the human feedback queue is visible early in the launcher
368
+ workflow. The `slowfast.ai` launcher role even says pending feedback is an
369
+ inspection signal, not a strongly orchestrated triage path.
370
+
371
+ In 0.5, the intended flow is:
372
+
373
+ 1. an agent emits a `clarification-request`
374
+ 2. the orchestrator tries to resolve or reroute it
375
+ 3. only unresolved product, policy, safety, or external-intent questions become
376
+ human tickets
377
+
378
+ ### Required migration action
379
+
380
+ Update role prompts and operator guidance so the human feedback CLI is no longer
381
+ the first reflex.
382
+
383
+ Agents should be taught to:
384
+
385
+ - read the shared summary and inbox first
386
+ - emit structured clarification records
387
+ - continue with a logged best assumption when safe
388
+ - use human feedback only when the orchestrator cannot resolve the issue
389
+
390
+ ### Blocking rule
391
+
392
+ A routed clarification is still blocking until the routed follow-up request is
393
+ actually resolved or closed.
394
+
395
+ A reroute is not resolution. It is just reassignment.
396
+
397
+ ## Step 6: Change Operator Workflow
398
+
399
+ The 0.2 operator loop is centered on:
400
+
401
+ - wave dry run
402
+ - message board inspection
403
+ - status files
404
+ - dashboards
405
+ - human feedback queue
406
+
407
+ The 0.5 operator loop must center on derived state:
408
+
409
+ - coordination log
410
+ - board projection
411
+ - shared summary
412
+ - per-agent inboxes
413
+ - ledger
414
+ - integration summary
415
+ - docs queue
416
+ - clarification triage
417
+ - traces
418
+
419
+ ### Old review habit
420
+
421
+ Inspect:
422
+
423
+ - `.tmp/<lane>-wave-launcher/messageboards/`
424
+ - `.tmp/<lane>-wave-launcher/status/`
425
+ - `.tmp/<lane>-wave-launcher/dashboards/`
426
+
427
+ ### New review habit
428
+
429
+ Inspect:
430
+
431
+ - `.tmp/<lane>-wave-launcher/coordination/wave-<n>.jsonl`
432
+ - `.tmp/<lane>-wave-launcher/messageboards/wave-<n>.md`
433
+ - `.tmp/<lane>-wave-launcher/inboxes/wave-<n>/shared-summary.md`
434
+ - `.tmp/<lane>-wave-launcher/inboxes/wave-<n>/<agent>.md`
435
+ - `.tmp/<lane>-wave-launcher/ledger/wave-<n>.json`
436
+ - `.tmp/<lane>-wave-launcher/integration/wave-<n>.md`
437
+ - `.tmp/<lane>-wave-launcher/feedback/triage/wave-<n>.jsonl`
438
+ - `.tmp/<lane>-wave-launcher/traces/wave-<n>/attempt-<k>/run-metadata.json`
439
+ - `.tmp/<lane>-wave-launcher/traces/wave-<n>/attempt-<k>/quality.json`
440
+ - `.tmp/<lane>-wave-launcher/traces/wave-<n>/attempt-<k>/structured-signals.json`
441
+
442
+ Trace review note:
443
+
444
+ - `wave launch --dry-run` still seeds only pre-attempt state. It should not create `attempt-<k>` trace snapshots.
445
+ - New `traceVersion: 2` bundles are hermetic: replay uses only the stored bundle, validates recorded hashes, and stays read-only.
446
+ - Launched-agent summary files and promoted-wave component matrix files are part of that hermetic v2 contract.
447
+ - Legacy `traceVersion: 1` bundles still replay in best-effort warning mode.
448
+ - Trace replay support is internal in the current package. Use the stored bundle for regression review, but do not assume a supported `wave replay` CLI yet.
449
+
450
+ ### New operator commands
451
+
452
+ ```bash
453
+ pnpm exec wave doctor
454
+ pnpm exec wave launch --lane <lane> --dry-run --no-dashboard
455
+ pnpm exec wave coord show --lane <lane> --wave <n> --dry-run
456
+ pnpm exec wave coord inbox --lane <lane> --wave <n> --agent A8 --dry-run
457
+ pnpm exec wave feedback list --lane <lane> --pending
458
+ ```
459
+
460
+ If the repo still exposes wrapper scripts:
461
+
462
+ ```bash
463
+ pnpm wave:launch -- --lane <lane> --dry-run --no-dashboard
464
+ pnpm wave:feedback -- list --lane <lane> --pending
465
+ ```
466
+
467
+ ## Step 7: Migrate Closure And Retry Rules
468
+
469
+ The 0.2 baseline already had a useful closure sweep, but it was effectively:
470
+
471
+ - implementation settles
472
+ - A9 reruns
473
+ - A0 reruns
474
+
475
+ The 0.5 target changes this to:
476
+
477
+ - implementation settles
478
+ - A8 emits a final integration summary
479
+ - if A8 says `needs-more-work`, relaunch the right owners
480
+ - only after A8 says `ready-for-doc-closure`, run A9
481
+ - only after A9 closes or confirms `no-change`, run A0
482
+
483
+ ### Runtime fallback policy
484
+
485
+ 0.5 should allow fallback executor reassignment on retry when policy allows it,
486
+ including:
487
+
488
+ - executor unavailable
489
+ - timeout
490
+ - failed attempt
491
+
492
+ But fallback must:
493
+
494
+ - follow the declared fallback order
495
+ - stay within hard `runtimeMixTargets`
496
+ - record the reassignment in the ledger, integration summary, and traces
497
+
498
+ ### Runtime mix policy
499
+
500
+ Treat lane `runtimeMixTargets` as a hard fail at validation or launch
501
+ preflight.
502
+
503
+ That means:
504
+
505
+ - if the wave resolves to `4 codex / 2 claude / 1 opencode` but the lane says
506
+ `3 / 2 / 2`, the wave should not launch
507
+ - if a retry fallback would violate the mix, the fallback should be rejected
508
+ and the wave should remain blocked
509
+
510
+ ## Step 8: Migrate Acceptance Criteria
511
+
512
+ A 0.2 wave often feels complete when:
513
+
514
+ - all agents exit `0`
515
+ - A9 closes docs
516
+ - A0 passes
517
+
518
+ The 0.5 target adds more explicit acceptance state:
519
+
520
+ - no unresolved integration contradiction
521
+ - no unresolved blocking clarification
522
+ - no unresolved high-priority blocker
523
+ - runtime plan is within policy
524
+ - documentation closure is explicit
525
+ - evaluator verdict is explicit
526
+ - the ledger says the wave is actually complete
527
+ - traces capture the final state for replay
528
+
529
+ Use this acceptance checklist after the migration:
530
+
531
+ 1. `wave doctor` passes.
532
+ 2. `wave launch --dry-run` passes.
533
+ 3. Seeded coordination state exists.
534
+ 4. Shared summary and inboxes exist.
535
+ 5. A8 exists and is validated.
536
+ 6. Runtime profiles resolve correctly for every agent.
537
+ 7. No resolved executor count exceeds lane mix targets.
538
+ 8. Clarification triage works without immediately creating human tickets for
539
+ obvious ownership questions.
540
+ 9. Documentation and evaluator closure run only after the integration steward
541
+ is ready.
542
+ 10. A live attempt writes a trace bundle with coordination, inbox, ledger,
543
+ integration, structured signals, `run-metadata.json`, and cumulative
544
+ `quality.json`.
545
+
546
+ ## Step 9: Roll Out In Two Passes
547
+
548
+ Do not flip a large repo from 0.2 to full 0.5 autonomy in one step.
549
+
550
+ Recommended rollout:
551
+
552
+ ### Pass 1: Structural migration
553
+
554
+ - update `wave.config.json`
555
+ - add A8 role prompt
556
+ - update one or two wave files
557
+ - keep launches manual
558
+ - validate coordination, inbox, ledger, and integration artifacts
559
+
560
+ ### Pass 2: Behavioral migration
561
+
562
+ - enable mixed-runtime planning
563
+ - enable hard runtime-mix preflight
564
+ - enable orchestrator-first clarification handling
565
+ - enable fallback-on-retry policy
566
+ - only then trust autonomous mode for the lane
567
+
568
+ ## Common Pitfalls
569
+
570
+ ### 1. Adding A8 only in config
571
+
572
+ Adding `integrationAgentId` to config is not enough. Each migrated wave must
573
+ actually declare the A8 agent and import the integration role prompt.
574
+
575
+ ### 2. Leaving runtime choice implicit in mixed-runtime waves
576
+
577
+ If the lane intentionally runs `codex + claude + opencode`, declare
578
+ `### Executor` on every agent. Otherwise the runtime plan is real but hidden.
579
+
580
+ ### 3. Treating the generated board as canonical state
581
+
582
+ The markdown board is now an audit projection. Read the coordination JSONL and
583
+ the compiled inboxes when debugging scheduler behavior.
584
+
585
+ ### 4. Escalating to humans too early
586
+
587
+ If the question is really ownership, shared-plan scope, component ownership, or
588
+ integration routing, the orchestrator should resolve it first.
589
+
590
+ ### 5. Reusing stale runtime state
591
+
592
+ Do not trust old `.tmp/<lane>-wave-launcher/` artifacts after the migration.
593
+ Reconcile or clear stale run state before validating the new model.
594
+
595
+ ## Minimal Migration Checklist
596
+
597
+ - Add A8 config and prompt.
598
+ - Add executor profiles.
599
+ - Add lane runtime policy.
600
+ - Add or update `### Executor` blocks.
601
+ - Add or update `### Capabilities` blocks where needed.
602
+ - Update launcher/operator guidance to use inboxes, ledger, and integration.
603
+ - Make clarification escalation orchestrator-first.
604
+ - Enforce hard runtime-mix preflight.
605
+ - Keep routed clarifications blocking until final resolution.
606
+ - Allow fallback executors only within declared policy and with traceable audit.
607
+
608
+ ## Final Recommendation
609
+
610
+ If the repo looks like the `slowfast.ai` 0.2 baseline, do not try to migrate
611
+ every historical wave at once.
612
+
613
+ Migrate in this order:
614
+
615
+ 1. `wave.config.json`
616
+ 2. role prompts
617
+ 3. one representative active wave
618
+ 4. operator workflow
619
+ 5. autonomous and retry policy
620
+
621
+ That sequence keeps the migration reviewable and avoids a large, ambiguous
622
+ "orchestrator rewrite" commit.
@@ -0,0 +1,55 @@
1
+ # npmjs Trusted Publishing
2
+
3
+ This repo now includes a dedicated npmjs publish workflow at [publish-npm.yml](../../.github/workflows/publish-npm.yml).
4
+
5
+ It is designed for npm trusted publishing from GitHub Actions, so the publish step does not need an `NPM_TOKEN`.
6
+
7
+ ## What This Repo Already Does
8
+
9
+ - `package.json` no longer hardcodes GitHub Packages as the publish registry.
10
+ - `publish-npm.yml` publishes tagged releases to `https://registry.npmjs.org`.
11
+ - `publish-package.yml` still publishes to GitHub Packages explicitly, so both registries can coexist.
12
+
13
+ ## One-Time npm Setup
14
+
15
+ 1. Open the package settings for `@chllming/wave-orchestration` on npmjs.com.
16
+ 2. Go to `Settings` -> `Trusted publishing`.
17
+ 3. Add a GitHub Actions trusted publisher with:
18
+ - organization or user: `chllming`
19
+ - repository: `wave-orchestration`
20
+ - workflow filename: `publish-npm.yml`
21
+ - environment name: leave empty unless you later add a protected GitHub environment to the workflow
22
+ 4. Save the trusted publisher.
23
+
24
+ If npmjs does not expose package settings for `@chllming/wave-orchestration` yet, complete the first npmjs publish manually once, then return and configure trusted publishing for later releases.
25
+
26
+ ## GitHub Workflow Behavior
27
+
28
+ The npmjs workflow:
29
+
30
+ - runs on GitHub-hosted runners
31
+ - requires `contents: read` and `id-token: write`
32
+ - installs dependencies with `pnpm install --frozen-lockfile`
33
+ - runs `pnpm test`
34
+ - publishes with `pnpm publish --access public --no-git-checks`
35
+
36
+ Trusted publishing depends on npm's OIDC support. The workflow is configured for Node 24 so the runner satisfies npm's current trusted-publishing requirements.
37
+
38
+ ## Security Follow-Up
39
+
40
+ After the first trusted publish succeeds:
41
+
42
+ 1. Return to the npm package settings.
43
+ 2. Restrict publishing access to trusted publishing / 2FA as appropriate for your account policy.
44
+ 3. Remove any old publish-capable npm automation tokens that are no longer needed.
45
+
46
+ If this repo later needs private npm dependencies during CI, add a separate read-only install token for `pnpm install`. Trusted publishing only covers `npm publish` / `pnpm publish`.
47
+
48
+ ## First Release Checklist
49
+
50
+ 1. Confirm [publish-npm.yml](../../.github/workflows/publish-npm.yml) is on the default branch.
51
+ 2. Confirm the trusted publisher entry on npm matches `publish-npm.yml` exactly.
52
+ 3. Confirm the package version has been bumped and committed.
53
+ 4. Push the release tag, for example `v0.4.1`.
54
+ 5. Verify the GitHub Actions run publishes successfully to npmjs.
55
+ 6. After the publish is visible on npmjs, update README install guidance if npmjs should become the primary documented install path.
@@ -0,0 +1,18 @@
1
+ ---
2
+ title: "Repository Guidance"
3
+ summary: "Default repository-level guidance for orchestrated wave work."
4
+ ---
5
+
6
+ # Repository Guidance
7
+
8
+ Use this page as the default in-repo guidance for wave agents.
9
+
10
+ ## Defaults
11
+
12
+ - Keep file ownership explicit in every agent prompt.
13
+ - Prefer small, reviewable changes over broad speculative edits.
14
+ - Update impacted docs when work changes interfaces, status, sequencing, or proof expectations.
15
+ - When the repo defines a component cutover matrix, keep wave promotions, agent ownership, and shared-plan status aligned with it.
16
+ - Run the relevant validation commands for touched workspaces.
17
+ - Record blockers, assumptions, clarifications, and handoffs with `wave coord post`; treat the markdown message board as the human-readable projection of that durable state.
18
+ - Treat external docs as non-canonical unless the task is specifically about third-party APIs or tooling behavior.