@chllming/wave-orchestration 0.5.4 → 0.6.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 (126) hide show
  1. package/CHANGELOG.md +52 -3
  2. package/README.md +33 -5
  3. package/docs/README.md +18 -4
  4. package/docs/agents/wave-cont-eval-role.md +36 -0
  5. package/docs/agents/{wave-evaluator-role.md → wave-cont-qa-role.md} +14 -11
  6. package/docs/agents/wave-documentation-role.md +1 -1
  7. package/docs/agents/wave-infra-role.md +1 -1
  8. package/docs/agents/wave-integration-role.md +3 -3
  9. package/docs/agents/wave-launcher-role.md +4 -3
  10. package/docs/agents/wave-security-role.md +40 -0
  11. package/docs/concepts/context7-vs-skills.md +1 -1
  12. package/docs/concepts/what-is-a-wave.md +56 -6
  13. package/docs/evals/README.md +166 -0
  14. package/docs/evals/benchmark-catalog.json +663 -0
  15. package/docs/guides/author-and-run-waves.md +135 -0
  16. package/docs/guides/planner.md +5 -0
  17. package/docs/guides/terminal-surfaces.md +2 -0
  18. package/docs/plans/component-cutover-matrix.json +1 -1
  19. package/docs/plans/component-cutover-matrix.md +1 -1
  20. package/docs/plans/current-state.md +19 -1
  21. package/docs/plans/examples/wave-example-live-proof.md +435 -0
  22. package/docs/plans/migration.md +42 -0
  23. package/docs/plans/wave-orchestrator.md +46 -7
  24. package/docs/plans/waves/wave-0.md +4 -4
  25. package/docs/reference/live-proof-waves.md +177 -0
  26. package/docs/reference/migration-0.2-to-0.5.md +26 -19
  27. package/docs/reference/npmjs-trusted-publishing.md +6 -5
  28. package/docs/reference/runtime-config/README.md +14 -4
  29. package/docs/reference/sample-waves.md +87 -0
  30. package/docs/reference/skills.md +110 -42
  31. package/docs/research/agent-context-sources.md +130 -11
  32. package/docs/research/coordination-failure-review.md +266 -0
  33. package/docs/roadmap.md +6 -2
  34. package/package.json +2 -2
  35. package/releases/manifest.json +35 -2
  36. package/scripts/research/agent-context-archive.mjs +83 -1
  37. package/scripts/research/manifests/agent-context-expanded-2026-03-22.mjs +811 -0
  38. package/scripts/wave-orchestrator/adhoc.mjs +1331 -0
  39. package/scripts/wave-orchestrator/agent-state.mjs +358 -6
  40. package/scripts/wave-orchestrator/artifact-schemas.mjs +173 -0
  41. package/scripts/wave-orchestrator/clarification-triage.mjs +10 -3
  42. package/scripts/wave-orchestrator/config.mjs +48 -12
  43. package/scripts/wave-orchestrator/context7.mjs +2 -0
  44. package/scripts/wave-orchestrator/coord-cli.mjs +51 -19
  45. package/scripts/wave-orchestrator/coordination-store.mjs +26 -4
  46. package/scripts/wave-orchestrator/coordination.mjs +83 -9
  47. package/scripts/wave-orchestrator/dashboard-state.mjs +20 -8
  48. package/scripts/wave-orchestrator/dep-cli.mjs +5 -2
  49. package/scripts/wave-orchestrator/docs-queue.mjs +8 -2
  50. package/scripts/wave-orchestrator/evals.mjs +451 -0
  51. package/scripts/wave-orchestrator/feedback.mjs +15 -1
  52. package/scripts/wave-orchestrator/install.mjs +32 -9
  53. package/scripts/wave-orchestrator/launcher-closure.mjs +281 -0
  54. package/scripts/wave-orchestrator/launcher-runtime.mjs +334 -0
  55. package/scripts/wave-orchestrator/launcher.mjs +709 -601
  56. package/scripts/wave-orchestrator/ledger.mjs +123 -20
  57. package/scripts/wave-orchestrator/local-executor.mjs +99 -12
  58. package/scripts/wave-orchestrator/planner.mjs +177 -42
  59. package/scripts/wave-orchestrator/replay.mjs +6 -3
  60. package/scripts/wave-orchestrator/role-helpers.mjs +84 -0
  61. package/scripts/wave-orchestrator/shared.mjs +75 -11
  62. package/scripts/wave-orchestrator/skills.mjs +637 -106
  63. package/scripts/wave-orchestrator/traces.mjs +71 -48
  64. package/scripts/wave-orchestrator/wave-files.mjs +947 -101
  65. package/scripts/wave.mjs +9 -0
  66. package/skills/README.md +202 -0
  67. package/skills/provider-aws/SKILL.md +111 -0
  68. package/skills/provider-aws/adapters/claude.md +1 -0
  69. package/skills/provider-aws/adapters/codex.md +1 -0
  70. package/skills/provider-aws/references/service-verification.md +39 -0
  71. package/skills/provider-aws/skill.json +50 -1
  72. package/skills/provider-custom-deploy/SKILL.md +59 -0
  73. package/skills/provider-custom-deploy/skill.json +46 -1
  74. package/skills/provider-docker-compose/SKILL.md +90 -0
  75. package/skills/provider-docker-compose/adapters/local.md +1 -0
  76. package/skills/provider-docker-compose/skill.json +49 -1
  77. package/skills/provider-github-release/SKILL.md +116 -1
  78. package/skills/provider-github-release/adapters/claude.md +1 -0
  79. package/skills/provider-github-release/adapters/codex.md +1 -0
  80. package/skills/provider-github-release/skill.json +51 -1
  81. package/skills/provider-kubernetes/SKILL.md +137 -0
  82. package/skills/provider-kubernetes/adapters/claude.md +1 -0
  83. package/skills/provider-kubernetes/adapters/codex.md +1 -0
  84. package/skills/provider-kubernetes/references/kubectl-patterns.md +58 -0
  85. package/skills/provider-kubernetes/skill.json +48 -1
  86. package/skills/provider-railway/SKILL.md +118 -1
  87. package/skills/provider-railway/references/verification-commands.md +39 -0
  88. package/skills/provider-railway/skill.json +67 -1
  89. package/skills/provider-ssh-manual/SKILL.md +91 -0
  90. package/skills/provider-ssh-manual/skill.json +50 -1
  91. package/skills/repo-coding-rules/SKILL.md +84 -0
  92. package/skills/repo-coding-rules/skill.json +30 -1
  93. package/skills/role-cont-eval/SKILL.md +90 -0
  94. package/skills/role-cont-eval/adapters/codex.md +1 -0
  95. package/skills/role-cont-eval/skill.json +36 -0
  96. package/skills/role-cont-qa/SKILL.md +93 -0
  97. package/skills/role-cont-qa/adapters/claude.md +1 -0
  98. package/skills/role-cont-qa/skill.json +36 -0
  99. package/skills/role-deploy/SKILL.md +90 -0
  100. package/skills/role-deploy/skill.json +32 -1
  101. package/skills/role-documentation/SKILL.md +66 -0
  102. package/skills/role-documentation/skill.json +32 -1
  103. package/skills/role-implementation/SKILL.md +62 -0
  104. package/skills/role-implementation/skill.json +32 -1
  105. package/skills/role-infra/SKILL.md +74 -0
  106. package/skills/role-infra/skill.json +32 -1
  107. package/skills/role-integration/SKILL.md +79 -1
  108. package/skills/role-integration/skill.json +32 -1
  109. package/skills/role-research/SKILL.md +58 -0
  110. package/skills/role-research/skill.json +32 -1
  111. package/skills/role-security/SKILL.md +60 -0
  112. package/skills/role-security/skill.json +36 -0
  113. package/skills/runtime-claude/SKILL.md +60 -1
  114. package/skills/runtime-claude/skill.json +32 -1
  115. package/skills/runtime-codex/SKILL.md +52 -1
  116. package/skills/runtime-codex/skill.json +32 -1
  117. package/skills/runtime-local/SKILL.md +39 -0
  118. package/skills/runtime-local/skill.json +32 -1
  119. package/skills/runtime-opencode/SKILL.md +51 -0
  120. package/skills/runtime-opencode/skill.json +32 -1
  121. package/skills/wave-core/SKILL.md +107 -0
  122. package/skills/wave-core/references/marker-syntax.md +62 -0
  123. package/skills/wave-core/skill.json +31 -1
  124. package/wave.config.json +35 -6
  125. package/skills/role-evaluator/SKILL.md +0 -6
  126. package/skills/role-evaluator/skill.json +0 -5
@@ -1,5 +1,36 @@
1
1
  {
2
2
  "id": "role-research",
3
3
  "title": "Research Role",
4
- "description": "Research-agent norms for focused evidence gathering."
4
+ "description": "Guides the research agent through scoped evidence gathering, source classification, finding conversion to wave implications, and escalation triggers.",
5
+ "activation": {
6
+ "when": "Attach when the agent is gathering scoped evidence and converting findings into wave implications.",
7
+ "roles": [
8
+ "research"
9
+ ],
10
+ "runtimes": [],
11
+ "deployKinds": []
12
+ },
13
+ "termination": "Stop when findings are source-grounded, scoped, and translated into actionable implications.",
14
+ "permissions": {
15
+ "network": [],
16
+ "shell": [],
17
+ "mcpServers": []
18
+ },
19
+ "trust": {
20
+ "tier": "repo-owned"
21
+ },
22
+ "evalCases": [
23
+ {
24
+ "id": "research-opencode",
25
+ "role": "research",
26
+ "runtime": "opencode",
27
+ "expectActive": true
28
+ },
29
+ {
30
+ "id": "implementation-opencode",
31
+ "role": "implementation",
32
+ "runtime": "opencode",
33
+ "expectActive": false
34
+ }
35
+ ]
5
36
  }
@@ -0,0 +1,60 @@
1
+ # Security Review Role
2
+
3
+ Use this skill when the agent is the wave's dedicated security reviewer.
4
+
5
+ ## Core Rules
6
+
7
+ - Start with a threat model. Identify trust boundaries, attacker-controlled inputs, sensitive assets, approval-sensitive actions, and external execution paths before concluding anything.
8
+ - Default to report-only work. Route fixes to the owning agent unless the prompt explicitly gives you additional implementation ownership.
9
+ - Fail closed on unresolved blocking findings. Do not mark the wave clear while findings or approvals remain open.
10
+ - Prefer exact exploit paths, exact affected files or surfaces, and exact owners over broad warnings.
11
+ - Re-read the shared summary, inbox, and board projection before final disposition.
12
+
13
+ ## Workflow
14
+
15
+ Execute these steps in order:
16
+
17
+ 1. **Collect context** -- read the shared summary, inbox, board projection, owned report path, and the landed artifacts touched by the wave.
18
+ 2. **Threat model the diff** -- map trust boundaries, untrusted inputs, privileged actions, data sinks, secrets exposure, and cross-agent or external integrations.
19
+ 3. **Review high-risk patterns** -- inspect authn/authz, command execution, file access, secret handling, unsafe deserialization, external calls, logging, and approval-sensitive flows.
20
+ 4. **Check regressions** -- verify that new changes do not weaken existing controls or bypass prior approval and validation paths.
21
+ 5. **Route findings** -- for each issue, name the exact file or surface, the exploit or failure mode, the severity, and the owning agent expected to fix it.
22
+ 6. **Record approvals** -- explicitly list approval-sensitive actions that still require human or policy sign-off.
23
+ 7. **Emit disposition** -- append the report sections in order and finish with one final `[wave-security]` marker.
24
+
25
+ ## Review Checklist
26
+
27
+ - [ ] Trust boundaries are identified for every newly touched external input or tool call.
28
+ - [ ] High-impact actions are guarded by explicit approval or clearly documented policy.
29
+ - [ ] Secrets, tokens, credentials, and sensitive data are not exposed in prompts, logs, or artifacts.
30
+ - [ ] Inter-agent or external-system inputs are treated as untrusted and validated before use.
31
+ - [ ] Command, file, and network access paths are constrained to the minimum required scope.
32
+ - [ ] Security-sensitive changes have an exact owner and an exact fix or approval path.
33
+ - [ ] The final disposition is consistent with the findings and approval counts.
34
+
35
+ ## Output Contract
36
+
37
+ Write the report with these sections in order:
38
+
39
+ 1. `Threat Model`
40
+ 2. `Risky Surfaces`
41
+ 3. `Findings`
42
+ 4. `Required Approvals`
43
+ 5. `Requested Fixes`
44
+ 6. `Final Disposition`
45
+
46
+ Emit exactly one final marker:
47
+
48
+ ```
49
+ [wave-security] state=<clear|concerns|blocked> findings=<n> approvals=<n> detail=<short-note>
50
+ ```
51
+
52
+ - `clear`: use only when no unresolved findings or approvals remain.
53
+ - `concerns`: use when remaining issues are advisory for this wave and do not block progression.
54
+ - `blocked`: use when the wave must stop before integration.
55
+
56
+ ## Tool Discipline
57
+
58
+ - Prefer local evidence over external browsing unless the task explicitly requires live verification.
59
+ - Use the narrowest tools available. Read, search, and local verification come before broader exploration.
60
+ - Do not spawn helper agents or route work through external systems unless the prompt explicitly requires it.
@@ -0,0 +1,36 @@
1
+ {
2
+ "id": "role-security",
3
+ "title": "Security Review Role",
4
+ "description": "Guides the wave security reviewer through threat-model-first review, exact finding routing, approval tracking, and fail-closed disposition rules.",
5
+ "activation": {
6
+ "when": "Attach when the agent is responsible for wave-level security review before integration closure.",
7
+ "roles": [
8
+ "security"
9
+ ],
10
+ "runtimes": [],
11
+ "deployKinds": []
12
+ },
13
+ "termination": "Stop when the security disposition is clear, blocked, or explicitly downgraded to advisory concerns with named follow-up.",
14
+ "permissions": {
15
+ "network": [],
16
+ "shell": [],
17
+ "mcpServers": []
18
+ },
19
+ "trust": {
20
+ "tier": "repo-owned"
21
+ },
22
+ "evalCases": [
23
+ {
24
+ "id": "security-claude",
25
+ "role": "security",
26
+ "runtime": "claude",
27
+ "expectActive": true
28
+ },
29
+ {
30
+ "id": "integration-claude",
31
+ "role": "integration",
32
+ "runtime": "claude",
33
+ "expectActive": false
34
+ }
35
+ ]
36
+ }
@@ -1,6 +1,65 @@
1
1
  # Claude Runtime
2
2
 
3
- - Treat appended system prompt guidance and the compiled task prompt as one combined contract.
3
+ <!-- CUSTOMIZE: Add project-specific tool restrictions, MCP server names, or prompt assembly conventions below. -->
4
+
5
+ ## Core Rules
6
+
7
+ - Treat appended system prompt guidance and the compiled task prompt as one combined contract. Both are binding.
4
8
  - Keep the final answer aligned with the exact gate or ownership requirement for the run.
5
9
  - Preserve Wave marker syntax exactly when emitting structured status lines.
6
10
  - Prefer concise, explicit evidence summaries over long narrative explanations.
11
+ - Re-read shared state (summary, inbox, board projection) before major decisions and before final output.
12
+ - Do not infer deliverable completion from intent. Completion requires landed proof artifacts.
13
+
14
+ ## Tool Profile
15
+
16
+ You have full tool access in Claude runtime sessions:
17
+
18
+ - **Read** -- read files from the workspace.
19
+ - **Edit** -- apply targeted edits to owned files.
20
+ - **Write** -- create new files when required by the task.
21
+ - **Bash** -- run shell commands for builds, tests, verification, and git operations.
22
+ - **Grep** -- search file contents by pattern.
23
+ - **Glob** -- find files by name pattern.
24
+ - **Agent** -- spawn parallel sub-agents for research or independent subtasks.
25
+ - **WebSearch / WebFetch** -- retrieve external documentation or verify live endpoints when the task requires it.
26
+ - **MCP** -- invoke project-configured MCP servers (e.g., Railway MCP, context7).
27
+
28
+ Use the narrowest tool for each job. Prefer Grep over Bash grep. Prefer Read over cat. Use Agent for parallel research to avoid context bloat in the main thread.
29
+
30
+ <!-- CUSTOMIZE: List restricted tools or additional MCP servers available in your project here. -->
31
+
32
+ ## Prompt Contract
33
+
34
+ The effective contract for a Claude runtime session is assembled from three layers:
35
+
36
+ 1. **System prompt** -- platform-level instructions appended by the runtime.
37
+ 2. **Compiled task prompt** -- the wave-orchestrator-generated prompt containing role, exit contracts, file ownership, and shared context.
38
+ 3. **Appended skill guidance** -- this file and any other resolved skills.
39
+
40
+ All three layers are binding. When they conflict, prefer the compiled task prompt for scope and deliverables, and prefer skill guidance for procedural rules.
41
+
42
+ ## Output Format
43
+
44
+ - Emit structured markers exactly as defined in wave-core. Parsers depend on the format.
45
+ - Each marker must appear on its own line with no surrounding decoration.
46
+ - Only emit markers for your assigned role. Do not emit markers owned by other roles.
47
+ - Prefer concise evidence over narrative. Name the exact file, test, command, or artifact.
48
+ - When summarizing verification results, lead with the conclusion, then the evidence, then caveats.
49
+
50
+ ## Context Management
51
+
52
+ - Re-read the shared summary and inbox before starting work and before emitting final markers.
53
+ - Use Agent for parallel research tasks that would otherwise consume main-thread context.
54
+ - Avoid pasting large file contents into reasoning when a targeted Grep or Read with offset suffices.
55
+ - When context grows large, summarize intermediate findings into a working note rather than re-reading raw sources.
56
+ - Do not re-read files you have already read in the current session unless the file may have changed.
57
+
58
+ ## Customization
59
+
60
+ <!-- CUSTOMIZE: Override or extend any section above. Common additions:
61
+ - Project-specific MCP server names and usage patterns
62
+ - Additional output format requirements
63
+ - Custom tool restrictions or approval workflows
64
+ - Context size budget or parallel agent limits
65
+ -->
@@ -1,5 +1,36 @@
1
1
  {
2
2
  "id": "runtime-claude",
3
3
  "title": "Claude Runtime",
4
- "description": "Claude-specific execution norms inside the Wave harness."
4
+ "description": "Configures Claude runtime behavior: tool profile, combined prompt contract, marker syntax preservation, and context management norms.",
5
+ "activation": {
6
+ "when": "Attach when the selected runtime is Claude so the agent follows Claude tool and system-prompt conventions.",
7
+ "roles": [],
8
+ "runtimes": [
9
+ "claude"
10
+ ],
11
+ "deployKinds": []
12
+ },
13
+ "termination": "Stop when Claude-specific prompt and tool-mode constraints have been applied for the current attempt.",
14
+ "permissions": {
15
+ "network": [],
16
+ "shell": [],
17
+ "mcpServers": []
18
+ },
19
+ "trust": {
20
+ "tier": "repo-owned"
21
+ },
22
+ "evalCases": [
23
+ {
24
+ "id": "integration-claude",
25
+ "role": "integration",
26
+ "runtime": "claude",
27
+ "expectActive": true
28
+ },
29
+ {
30
+ "id": "integration-codex",
31
+ "role": "integration",
32
+ "runtime": "codex",
33
+ "expectActive": false
34
+ }
35
+ ]
5
36
  }
@@ -1,6 +1,57 @@
1
1
  # Codex Runtime
2
2
 
3
- - Treat the compiled task prompt as the authoritative assignment.
3
+ <!-- CUSTOMIZE: Add project-specific sandbox paths, allowed network targets, or codex CLI flags below. -->
4
+
5
+ ## Core Rules
6
+
7
+ - Treat the compiled task prompt as the authoritative assignment. It is the single source of scope and deliverables.
4
8
  - Keep terminal work concise and deterministic where possible.
5
9
  - Use repo-local files and generated overlays before broad external lookup.
6
10
  - Preserve required structured markers exactly in terminal output.
11
+ - Do not assume interactive input is available. All commands must run non-interactively.
12
+
13
+ ## Tool Profile
14
+
15
+ Codex sessions operate through terminal-only execution:
16
+
17
+ - **Shell commands** -- your primary interface. All verification, builds, tests, and file operations happen through the terminal.
18
+ - **`--add-dir` bundles** -- the orchestrator may provide additional directories as readable context. These appear as local paths in the sandbox.
19
+ - **File I/O** -- read and write files through standard shell tools (cat, sed, tee, etc.).
20
+ - **No interactive prompts** -- stdin is not connected. Commands requiring user input will hang or fail. Use flags like `-y`, `--non-interactive`, or `--batch` where available.
21
+ - **No MCP servers** -- MCP tools are not available in Codex sessions.
22
+
23
+ ## Prompt Contract
24
+
25
+ The compiled task prompt is the single authority for a Codex session:
26
+
27
+ 1. **Compiled task prompt** -- contains role assignment, exit contracts, file ownership, shared context, and all coordination state.
28
+ 2. **Added directories** -- supplementary context provided via `--add-dir`. Treat as read-only reference material.
29
+ 3. **Appended skill guidance** -- this file and any other resolved skills.
30
+
31
+ All context is in the prompt and added directories. There is no system prompt layer beyond what Codex provides natively.
32
+
33
+ ## Output Format
34
+
35
+ - Emit structured markers exactly as defined in wave-core. Place each marker on its own line in terminal output.
36
+ - Use deterministic, reproducible commands. Prefer explicit paths and flags over relying on shell state.
37
+ - When running verification commands, capture and report the exact output. Do not paraphrase.
38
+ - Final output must include all required markers for your role before the session ends.
39
+
40
+ ## Sandbox Constraints
41
+
42
+ - **Network** -- may be restricted or unavailable depending on Codex configuration. Do not assume outbound network access unless the task explicitly requires it.
43
+ - **Repo-local preference** -- prefer files already in the repo or provided via `--add-dir` over fetching external resources.
44
+ - **No persistent state** -- each session starts clean. Do not rely on artifacts from previous sessions unless they are committed to the repo.
45
+ - **Filesystem scope** -- write only to paths within the workspace. The sandbox may reject writes outside the project root.
46
+ - **External APIs** -- avoid calling external APIs unless the task explicitly requires live verification. If network is unavailable, record the gap as a proof limitation.
47
+
48
+ <!-- CUSTOMIZE: List allowed network targets or external API endpoints for your project here. -->
49
+
50
+ ## Customization
51
+
52
+ <!-- CUSTOMIZE: Override or extend any section above. Common additions:
53
+ - Allowed outbound network targets
54
+ - Project-specific --add-dir paths and their contents
55
+ - Custom sandbox filesystem restrictions
56
+ - Pre-installed tools available in the Codex sandbox
57
+ -->
@@ -1,5 +1,36 @@
1
1
  {
2
2
  "id": "runtime-codex",
3
3
  "title": "Codex Runtime",
4
- "description": "Codex-specific execution norms inside the Wave harness."
4
+ "description": "Configures Codex runtime behavior: terminal-only execution, compiled prompt contract, sandbox constraints, and deterministic output norms.",
5
+ "activation": {
6
+ "when": "Attach when the selected runtime is Codex so the agent follows terminal-first Codex execution constraints.",
7
+ "roles": [],
8
+ "runtimes": [
9
+ "codex"
10
+ ],
11
+ "deployKinds": []
12
+ },
13
+ "termination": "Stop when Codex-specific execution and output constraints have been applied for the current attempt.",
14
+ "permissions": {
15
+ "network": [],
16
+ "shell": [],
17
+ "mcpServers": []
18
+ },
19
+ "trust": {
20
+ "tier": "repo-owned"
21
+ },
22
+ "evalCases": [
23
+ {
24
+ "id": "implementation-codex",
25
+ "role": "implementation",
26
+ "runtime": "codex",
27
+ "expectActive": true
28
+ },
29
+ {
30
+ "id": "implementation-claude",
31
+ "role": "implementation",
32
+ "runtime": "claude",
33
+ "expectActive": false
34
+ }
35
+ ]
5
36
  }
@@ -1,5 +1,44 @@
1
1
  # Local Runtime
2
2
 
3
+ <!-- CUSTOMIZE: Add project-specific smoke validation targets, artifact paths, or local test commands below. -->
4
+
5
+ ## Core Rules
6
+
3
7
  - The local executor is a smoke surface, not a substitute for real external integrations.
4
8
  - Focus on prompt shape, file ownership, and artifact expectations.
5
9
  - Do not claim live deploy or external-environment proof from local smoke execution alone.
10
+ - Treat local validation as a pre-flight check. It catches structural errors, not runtime correctness.
11
+
12
+ ## Scope Limitations
13
+
14
+ The local runtime cannot prove certain categories of state:
15
+
16
+ - **No live deploy proof** -- local execution cannot verify that a service is running in Railway, AWS, Kubernetes, or any remote environment.
17
+ - **No external state proof** -- local execution cannot confirm database state, DNS propagation, certificate validity, or third-party API health.
18
+ - **No real executor sessions** -- local smoke runs do not invoke Claude, Codex, or OpenCode. They validate the prompt and artifacts that would be sent to those runtimes.
19
+ - **No network-dependent verification** -- health checks, endpoint tests, and webhook confirmations require a real runtime with network access.
20
+
21
+ When a deliverable requires any of the above, record the gap explicitly. Do not approximate.
22
+
23
+ ## Smoke Validation Checklist
24
+
25
+ When running a local smoke validation, verify each of the following:
26
+
27
+ 1. **Prompt structure** -- the compiled task prompt is valid, contains all required sections (role, exit contracts, file ownership, shared context), and is within size limits.
28
+ 2. **File ownership declarations** -- every file listed in ownership exists in the repo or has a clear creation expectation. No ownership conflicts between agents.
29
+ 3. **Deliverable paths** -- every exit contract deliverable references a concrete path or artifact. No dangling references.
30
+ 4. **Marker syntax** -- all marker templates in the prompt match the expected format from wave-core. Parsers will reject malformed markers.
31
+ 5. **Skill resolution** -- all skills referenced in the wave definition resolve to existing skill directories with valid `skill.json` and `SKILL.md` files.
32
+ 6. **Context bundle integrity** -- if overlays or context bundles are generated, they exist at the declared paths and are non-empty.
33
+ 7. **Role assignment consistency** -- each agent has exactly one role, and the role matches a known role skill.
34
+
35
+ Report each check as pass, fail, or skip with a one-line reason.
36
+
37
+ ## Customization
38
+
39
+ <!-- CUSTOMIZE: Override or extend any section above. Common additions:
40
+ - Project-specific artifact paths to validate
41
+ - Additional structural checks for your wave definitions
42
+ - Custom prompt size limits
43
+ - Local test commands to run as part of smoke validation
44
+ -->
@@ -1,5 +1,36 @@
1
1
  {
2
2
  "id": "runtime-local",
3
3
  "title": "Local Runtime",
4
- "description": "Local smoke-executor norms."
4
+ "description": "Configures local smoke-executor behavior: scope limitations, prompt shape validation, and smoke checklist for dry-run verification.",
5
+ "activation": {
6
+ "when": "Attach when the selected runtime is local smoke validation so the agent stays within local proof limits.",
7
+ "roles": [],
8
+ "runtimes": [
9
+ "local"
10
+ ],
11
+ "deployKinds": []
12
+ },
13
+ "termination": "Stop when local smoke validation boundaries and limitations are explicit for the current attempt.",
14
+ "permissions": {
15
+ "network": [],
16
+ "shell": [],
17
+ "mcpServers": []
18
+ },
19
+ "trust": {
20
+ "tier": "repo-owned"
21
+ },
22
+ "evalCases": [
23
+ {
24
+ "id": "documentation-local",
25
+ "role": "documentation",
26
+ "runtime": "local",
27
+ "expectActive": true
28
+ },
29
+ {
30
+ "id": "documentation-claude",
31
+ "role": "documentation",
32
+ "runtime": "claude",
33
+ "expectActive": false
34
+ }
35
+ ]
5
36
  }
@@ -1,6 +1,57 @@
1
1
  # OpenCode Runtime
2
2
 
3
+ <!-- CUSTOMIZE: Add project-specific opencode.json settings, agent prompt conventions, or file overlay paths below. -->
4
+
5
+ ## Core Rules
6
+
3
7
  - Treat injected instructions and the selected agent prompt as authoritative.
4
8
  - Keep edits and summaries tightly scoped to the assigned files and closure target.
5
9
  - Prefer explicit repo files and generated overlays over ad hoc runtime assumptions.
6
10
  - Preserve Wave marker syntax exactly in output and logs.
11
+ - Do not modify files outside your declared ownership without explicit coordination.
12
+
13
+ ## Tool Profile
14
+
15
+ OpenCode sessions are edit-focused with the following capabilities:
16
+
17
+ - **Agent prompt** -- the primary instruction set, configured in `opencode.json` or passed at invocation. Defines the agent's persona and constraints.
18
+ - **`--file` flags** -- specific files provided to the session as editable context. These are your primary workspace.
19
+ - **File reading** -- read project files to gather context for edits.
20
+ - **File editing** -- apply targeted changes to owned files. Edits should be minimal and scoped.
21
+ - **Shell execution** -- run commands for builds, tests, and verification within the project directory.
22
+ - **No MCP servers** -- MCP tools are not available in OpenCode sessions.
23
+
24
+ ## Prompt Contract
25
+
26
+ OpenCode sessions have a dual-authority prompt structure:
27
+
28
+ 1. **Agent prompt** -- the opencode agent configuration that defines behavioral rules and persona. Set in `opencode.json` or at invocation.
29
+ 2. **Injected instructions** -- the wave-orchestrator-compiled prompt containing role, exit contracts, file ownership, and shared context.
30
+ 3. **Appended skill guidance** -- this file and any other resolved skills.
31
+
32
+ Both the agent prompt and injected instructions are authoritative. When they conflict on scope or deliverables, prefer the injected instructions (the compiled task prompt). When they conflict on behavioral rules, prefer the agent prompt.
33
+
34
+ ## Output Format
35
+
36
+ - Emit structured markers exactly as defined in wave-core. Place each marker on its own line.
37
+ - Only emit markers for your assigned role.
38
+ - Keep edit descriptions concise. Name the file, the change, and the reason.
39
+ - When reporting verification results, include the exact command and its output.
40
+ - Preserve marker syntax in both terminal output and any log files generated.
41
+
42
+ ## Edit Discipline
43
+
44
+ - Scope edits tightly to the assigned files listed in file ownership.
45
+ - Prefer targeted replacements over full file rewrites.
46
+ - When an edit depends on understanding adjacent code, read the relevant context first.
47
+ - If a needed change falls outside your ownership, record it as a follow-up request naming the owning agent, the file, and the change.
48
+ - Generated overlays (context bundles, summaries) are read-only reference. Do not edit overlay files.
49
+
50
+ ## Customization
51
+
52
+ <!-- CUSTOMIZE: Override or extend any section above. Common additions:
53
+ - Project-specific opencode.json agent configurations
54
+ - Additional --file paths commonly provided
55
+ - Edit scope restrictions for sensitive files
56
+ - Custom output format requirements
57
+ -->
@@ -1,5 +1,36 @@
1
1
  {
2
2
  "id": "runtime-opencode",
3
3
  "title": "OpenCode Runtime",
4
- "description": "OpenCode-specific execution norms inside the Wave harness."
4
+ "description": "Configures OpenCode runtime behavior: injected instructions, file attachment contract, edit-focused workflow, and marker preservation norms.",
5
+ "activation": {
6
+ "when": "Attach when the selected runtime is OpenCode so the agent follows file-attachment and edit-focused OpenCode conventions.",
7
+ "roles": [],
8
+ "runtimes": [
9
+ "opencode"
10
+ ],
11
+ "deployKinds": []
12
+ },
13
+ "termination": "Stop when OpenCode-specific attachment and editing rules have been applied for the current attempt.",
14
+ "permissions": {
15
+ "network": [],
16
+ "shell": [],
17
+ "mcpServers": []
18
+ },
19
+ "trust": {
20
+ "tier": "repo-owned"
21
+ },
22
+ "evalCases": [
23
+ {
24
+ "id": "deploy-opencode",
25
+ "role": "deploy",
26
+ "runtime": "opencode",
27
+ "expectActive": true
28
+ },
29
+ {
30
+ "id": "deploy-codex",
31
+ "role": "deploy",
32
+ "runtime": "codex",
33
+ "expectActive": false
34
+ }
35
+ ]
5
36
  }
@@ -1,7 +1,114 @@
1
1
  # Wave Core
2
2
 
3
+ <!-- CUSTOMIZE: Add project-specific coordination channels, artifact locations, or naming conventions below. -->
4
+
5
+ ## Core Rules
6
+
3
7
  - Re-read the compiled shared summary, inbox, and board projection before major decisions and before final output.
4
8
  - Treat file ownership, exit contracts, and structured markers as hard requirements.
5
9
  - Post coordination records for meaningful progress, blockers, decisions, and handoffs.
6
10
  - Make gaps explicit with exact files, exact fields, and exact follow-up owners.
7
11
  - Do not infer closure from intent alone. Closure requires proof artifacts and consistent shared state.
12
+ - Silence is not evidence. If a deliverable is not mentioned in landed artifacts, it is not done.
13
+ - When two sources conflict, prefer the one backed by landed code or durable proof over the one backed by prose.
14
+
15
+ ## Coordination Protocol
16
+
17
+ 1. Read the shared summary and your inbox at the start of every major step.
18
+ 2. Post a coordination record when any of these occur:
19
+ - meaningful progress on an exit contract deliverable
20
+ - a blocker is discovered or resolved
21
+ - a decision changes scope, ownership, or interface
22
+ - a handoff to another agent is needed
23
+ - a helper assignment is opened or resolved
24
+ - a clarification is routed or answered
25
+ 3. Each coordination record must include: agent id, timestamp context, topic, and actionable detail.
26
+ 4. Do not batch coordination. Post records as events occur so downstream agents see them promptly.
27
+ 5. When a record references another agent, name that agent explicitly.
28
+ 6. Coordination records are append-only. Do not edit or delete previous records; post corrections as new records.
29
+ 7. When you receive an inbox message that requires action, acknowledge it with a coordination record before proceeding.
30
+
31
+ ## Ownership & Boundaries
32
+
33
+ - Only modify files you own. File ownership is declared in the wave definition under each agent.
34
+ - If you need a change in a file you do not own, open a follow-up request naming the owning agent, the exact file, and the exact change needed.
35
+ - Shared-plan docs (current-state.md, component matrix, roadmap) are owned by the documentation steward, not implementation agents.
36
+ - Implementation-specific docs (inline comments, subsystem READMEs) stay with the implementation owner.
37
+ - When ownership is ambiguous, post a coordination record requesting clarification before editing.
38
+ - Helper assignments create temporary cross-boundary access. They remain blocking until the linked follow-up resolves.
39
+ - Cross-lane dependencies require explicit dependency tickets. Do not assume another lane's state without a resolved ticket.
40
+
41
+ ## Proof Requirements
42
+
43
+ - Every exit contract deliverable must have a corresponding proof artifact: a passing test, a generated file, a durable summary, or an explicit structured marker.
44
+ - Generic claims ("tests pass", "works correctly") are not proof. Name the exact test file, command, or artifact.
45
+ - Component promotions require evidence that the component actually reached the declared level, not just that adjacent code landed.
46
+ - Runtime-facing proof must be real evidence (logs, health checks, build output), not future-work notes.
47
+ - Proof must be durable. Transient output (terminal scrollback, ephemeral logs) is not proof unless captured into a file.
48
+ - When proof cannot be produced within the wave, record the gap explicitly with the reason and the follow-up owner.
49
+
50
+ ## Closure Checklist
51
+
52
+ A wave is closable only when all nine conditions are satisfied:
53
+
54
+ 1. **Exit contracts pass** -- every agent's declared exit contract deliverables are present and backed by proof artifacts.
55
+ 2. **Deliverables exist within ownership** -- each deliverable lives in files owned by the agent that produced it.
56
+ 3. **Component proof/promotions pass** -- promoted components reached their declared target level with evidence.
57
+ 4. **Helper assignments resolved** -- every helper assignment posted during the wave has a linked resolution.
58
+ 5. **Dependency tickets resolved** -- all inbound cross-lane dependency tickets are resolved or explicitly deferred.
59
+ 6. **Clarification follow-ups resolved** -- every routed clarification chain has a linked follow-up that is closed.
60
+ 7. **cont-EVAL satisfies targets** -- if the wave includes cont-EVAL, the eval marker shows `satisfied` with matching target and benchmark ids.
61
+ 8. **Integration recommends closure** -- the integration marker shows `ready-for-doc-closure` and is not contradicted by later evidence.
62
+ 9. **Documentation and cont-QA pass** -- doc closure marker is `closed` or `no-change`, and the cont-QA verdict is `PASS` with a matching gate marker.
63
+
64
+ If any condition is not met, the wave remains open. Do not approximate closure.
65
+
66
+ Closure runs in staged order:
67
+ 1. Implementation and proof (all implementation agents).
68
+ 2. cont-EVAL (if present) -- must report `satisfied` before integration runs.
69
+ 3. Integration -- must report `ready-for-doc-closure` before documentation and cont-QA run.
70
+ 4. Documentation -- must report `closed` or `no-change`.
71
+ 5. cont-QA -- final verdict. Only PASS allows the wave to close.
72
+
73
+ Do not skip stages. Each stage depends on the prior stage completing.
74
+
75
+ ## Structured Markers Reference
76
+
77
+ Emit markers exactly as shown. Parsers depend on the format.
78
+
79
+ | Marker | Format |
80
+ |---|---|
81
+ | `[wave-gate]` | `[wave-gate] architecture=<pass\|concerns\|blocked> integration=<pass\|concerns\|blocked> durability=<pass\|concerns\|blocked> live=<pass\|concerns\|blocked> docs=<pass\|concerns\|blocked> detail=<text>` |
82
+ | `[wave-eval]` | `[wave-eval] state=<satisfied\|needs-more-work\|blocked> targets=<n> benchmarks=<n> regressions=<n> target_ids=<csv> benchmark_ids=<csv> detail=<text>` |
83
+ | `[wave-integration]` | `[wave-integration] state=<ready-for-doc-closure\|needs-more-work> claims=<n> conflicts=<n> blockers=<n> detail=<text>` |
84
+ | `[wave-doc-closure]` | `[wave-doc-closure] state=<closed\|no-change\|delta> paths=<comma-separated-paths> detail=<text>` |
85
+ | `[infra-status]` | `[infra-status] kind=<conformance\|role-drift\|dependency\|identity\|admission\|action> target=<surface> state=<checking\|setup-required\|setup-in-progress\|conformant\|drift\|blocked\|failed\|action-required\|action-approved\|action-complete> detail=<text>` |
86
+ | `[deploy-status]` | `[deploy-status] state=<deploying\|healthy\|failed\|rolled-back> service=<name> detail=<text>` |
87
+
88
+ - Every marker must appear on a single line.
89
+ - The `detail` field is free text but should be concise (under 120 characters).
90
+ - Only the role that owns the marker type should emit it. Do not emit markers for other roles.
91
+
92
+ Marker ownership:
93
+
94
+ | Marker | Emitted by |
95
+ |---|---|
96
+ | `[wave-gate]` | cont-QA role |
97
+ | `[wave-eval]` | cont-EVAL role |
98
+ | `[wave-integration]` | Integration role |
99
+ | `[wave-doc-closure]` | Documentation role |
100
+ | `[infra-status]` | Infra role |
101
+ | `[deploy-status]` | Deploy role |
102
+
103
+ When you encounter a marker in the coordination log, treat it as the authoritative state from that role. If a role emits multiple markers during a wave, the last one supersedes earlier ones.
104
+
105
+ <!-- CUSTOMIZE: Add project-specific marker types or extend existing formats here. -->
106
+
107
+ ## Customization
108
+
109
+ <!-- CUSTOMIZE: Override or extend any section above. Common additions:
110
+ - Project-specific coordination record format
111
+ - Additional closure conditions beyond the nine listed
112
+ - Custom marker types for project-specific workflows
113
+ - Ownership rules for monorepo sub-packages
114
+ -->