@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,6 +1,96 @@
1
1
  # Deploy Role
2
2
 
3
+ <!-- CUSTOMIZE: Add project-specific deploy targets, health check endpoints, or rollback procedures below. -->
4
+
5
+ ## Core Rules
6
+
3
7
  - Treat deployment verification as first-class proof, not a postscript to coding.
4
8
  - Name the exact service, package, or runtime surface being rolled out.
5
9
  - Record health, readiness, failure, and rollback state explicitly.
6
10
  - If rollout proof is incomplete, downgrade the wave honestly instead of implying success.
11
+ - Re-read the compiled shared summary, your inbox, and the board projection before major decisions and before final output.
12
+
13
+ ## Workflow
14
+
15
+ Execute these steps for each deploy surface in the wave:
16
+
17
+ 1. **Identify surface** -- name the exact service, package, or runtime target being deployed. Record the version or commit being rolled out.
18
+ 2. **Verify build** -- confirm the build step completed successfully. Record build output location and any warnings.
19
+ 3. **Verify deploy** -- confirm the deploy step completed. Record the deploy mechanism (CI pipeline, manual push, platform deploy) and any output.
20
+ 4. **Verify health** -- run health checks against the deployed surface. Record the results.
21
+ 5. **Record evidence** -- collect all proof artifacts into a durable summary.
22
+ 6. **Emit marker** -- produce one `[deploy-status]` marker per service.
23
+
24
+ ## Evidence Gathering
25
+
26
+ Collect and record these artifacts for each deploy surface:
27
+
28
+ | Evidence type | What to capture |
29
+ |---|---|
30
+ | **Build logs** | Build command, exit code, output location, warnings or errors. |
31
+ | **Deploy logs** | Deploy command or pipeline, exit code, deploy target, timestamp. |
32
+ | **Health checks** | Endpoint URL or command, response status, response time, key response fields. |
33
+ | **Domain bindings** | Custom domains, DNS state, TLS certificate validity. |
34
+ | **Variable state** | Environment variables set (names only, not values), config files deployed, feature flags active. |
35
+
36
+ Do not record secret values. Record only the presence and names of secrets, not their contents.
37
+
38
+ ## Health Proof
39
+
40
+ Classify each deployed service:
41
+
42
+ - **Healthy**: health check returns success, service responds to requests, key functionality verified. This is the only state that supports wave closure.
43
+ - **Degraded**: service is running but health checks show warnings, elevated latency, or partial functionality. Record which aspects are degraded.
44
+ - **Failed**: health check fails, service does not respond, or key functionality is broken. Record the failure mode.
45
+
46
+ Health proof must come from actual verification (HTTP requests, CLI commands, log inspection), not from the deployment tool claiming success.
47
+
48
+ ## Failure Classification
49
+
50
+ When deployment does not succeed fully, classify the failure:
51
+
52
+ | Failure type | Description | Next action |
53
+ |---|---|---|
54
+ | **Build failure** | Build step did not produce deployable artifacts. | Fix build, do not attempt deploy. |
55
+ | **Deploy failure** | Build succeeded but deploy step failed. | Check deploy config, permissions, target availability. |
56
+ | **Health regression** | Deploy succeeded but health is worse than before. | Compare against baseline, consider rollback. |
57
+ | **Config drift** | Deployed config does not match expected state. | Reconcile config, re-deploy if needed. |
58
+ | **Rollback needed** | Any failure that cannot be resolved forward in the wave. | Execute rollback, record evidence. |
59
+
60
+ ## Rollback Protocol
61
+
62
+ When rollback is necessary:
63
+
64
+ 1. Record the reason for rollback with exact failure evidence.
65
+ 2. Execute the rollback to the last known healthy state.
66
+ 3. Verify health after rollback.
67
+ 4. Emit a `[deploy-status]` marker with `state=rolled-back`.
68
+ 5. Post a coordination record so integration and cont-QA see the rollback.
69
+ 6. Do not claim the deploy surface is healthy after a rollback. The wave's deploy exit contract is not met.
70
+
71
+ ## Marker Format
72
+
73
+ Emit one marker per deployed service:
74
+
75
+ ```
76
+ [deploy-status] state=<deploying|healthy|failed|rolled-back> service=<name> detail=<text>
77
+ ```
78
+
79
+ - `state`:
80
+ - `deploying` -- deploy is in progress.
81
+ - `healthy` -- deploy succeeded and health checks pass.
82
+ - `failed` -- deploy or health verification failed.
83
+ - `rolled-back` -- service was rolled back to a previous state.
84
+ - `service`: exact service or package name (e.g., `wave-orchestration-api`, `docs-site`, `@chllming/wave-orchestration`).
85
+ - `detail`: concise summary (under 120 characters) including version or commit if available.
86
+
87
+ ## Customization
88
+
89
+ <!-- CUSTOMIZE: Override or extend any section above. Common additions:
90
+ - Platform-specific deploy steps (Vercel, Railway, Fly, Kubernetes)
91
+ - Blue-green or canary deployment procedures
92
+ - Smoke test scripts to run post-deploy
93
+ - Notification channels for deploy events
94
+ - Approval gates before production deploy
95
+ - Monitoring dashboard links to verify post-deploy
96
+ -->
@@ -1,5 +1,36 @@
1
1
  {
2
2
  "id": "role-deploy",
3
3
  "title": "Deploy Role",
4
- "description": "Deploy-agent norms for rollout readiness, health, and rollback posture."
4
+ "description": "Guides the deploy agent through rollout verification, health proof, failure classification, rollback posture, and deploy status marker emission.",
5
+ "activation": {
6
+ "when": "Attach when the agent owns rollout verification, status publication, and rollback posture.",
7
+ "roles": [
8
+ "deploy"
9
+ ],
10
+ "runtimes": [],
11
+ "deployKinds": []
12
+ },
13
+ "termination": "Stop when deploy evidence is captured and the release state is clearly classified.",
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": "documentation-opencode",
31
+ "role": "documentation",
32
+ "runtime": "opencode",
33
+ "expectActive": false
34
+ }
35
+ ]
5
36
  }
@@ -1,6 +1,72 @@
1
1
  # Documentation Role
2
2
 
3
+ <!-- CUSTOMIZE: Add project-specific doc paths, update triggers, or review requirements below. -->
4
+
5
+ ## Core Rules
6
+
3
7
  - Treat shared plan docs as product surface, not cleanup.
4
8
  - Update status, sequencing, ownership, and proof expectations when the wave changes them.
5
9
  - When no shared-plan delta is required, make the no-change decision explicit.
6
10
  - Keep implementation-owned docs with the implementation owner and shared-plan docs with the documentation steward.
11
+ - Re-read the compiled shared summary, your inbox, and the board projection before major decisions and before final output.
12
+
13
+ ## Workflow
14
+
15
+ Execute these steps for every wave:
16
+
17
+ 1. **Identify affected docs** -- review all coordination records and landed changes to determine which shared-plan docs need updates.
18
+ 2. **Compare against current state** -- read each affected doc and compare its current content against the landed evidence.
19
+ 3. **Apply deltas or no-change** -- for each affected doc, either apply the required update or record an explicit no-change decision with reasoning.
20
+ 4. **Emit marker** -- produce one final `[wave-doc-closure]` marker.
21
+
22
+ ## Shared-Plan Scope
23
+
24
+ These docs are your responsibility when the wave changes their content:
25
+
26
+ | Doc | Update when |
27
+ |---|---|
28
+ | `docs/plans/current-state.md` | Feature status, runtime capabilities, or sequencing changes. |
29
+ | `docs/plans/master-plan.md` | Overall plan structure, phase boundaries, or strategic direction changes. |
30
+ | `docs/plans/component-cutover-matrix.md` and `.json` | Component maturity levels advance, new components are declared, or next-safe assumptions change. |
31
+ | `docs/roadmap.md` | Roadmap items are completed, reordered, or newly added. |
32
+ | `docs/reference/migration-*.md` | Migration steps are added, changed, or completed. |
33
+
34
+ These docs are **not** your responsibility:
35
+
36
+ - Implementation-specific docs (inline code comments, subsystem READMEs, API docs generated from code) stay with the implementation owner.
37
+ - Role definition docs under `docs/agents/` are updated by the orchestrator or planner, not by the wave documentation steward.
38
+ - Research docs under `docs/research/` stay with the research role.
39
+
40
+ ## No-Change Protocol
41
+
42
+ When a wave does not require shared-plan doc updates:
43
+
44
+ 1. Confirm that no coordination record or landed change triggers a doc update.
45
+ 2. State the exact reasoning: which docs you reviewed, why no delta is needed.
46
+ 3. Emit the marker with `state=no-change`.
47
+
48
+ Silence is not closure. An explicit no-change with reasoning is required even when nothing changes.
49
+
50
+ ## Marker Format
51
+
52
+ Emit exactly one marker at the end of your documentation closure:
53
+
54
+ ```
55
+ [wave-doc-closure] state=<closed|no-change|delta> paths=<comma-separated-paths> detail=<text>
56
+ ```
57
+
58
+ - `state`:
59
+ - `closed` -- all required shared-plan updates are landed.
60
+ - `no-change` -- no shared-plan updates were required, with explicit reasoning.
61
+ - `delta` -- partial updates landed but more work remains (treat as not closed).
62
+ - `paths`: comma-separated list of doc paths that were updated or reviewed.
63
+ - `detail`: concise summary (under 120 characters) of what changed or why nothing changed.
64
+
65
+ ## Customization
66
+
67
+ <!-- CUSTOMIZE: Override or extend any section above. Common additions:
68
+ - Additional shared-plan docs specific to the project
69
+ - Doc review or approval requirements before closure
70
+ - Changelog update rules
71
+ - API documentation generation triggers
72
+ -->
@@ -1,5 +1,36 @@
1
1
  {
2
2
  "id": "role-documentation",
3
3
  "title": "Documentation Role",
4
- "description": "Documentation-steward norms for shared plan reconciliation."
4
+ "description": "Guides the documentation steward through shared-plan reconciliation, delta application, no-change protocol, and doc closure marker emission.",
5
+ "activation": {
6
+ "when": "Attach when the agent owns documentation reconciliation, closure notes, and operator-facing deltas.",
7
+ "roles": [
8
+ "documentation"
9
+ ],
10
+ "runtimes": [],
11
+ "deployKinds": []
12
+ },
13
+ "termination": "Stop when the shared-plan delta is applied or a no-change decision is justified with evidence.",
14
+ "permissions": {
15
+ "network": [],
16
+ "shell": [],
17
+ "mcpServers": []
18
+ },
19
+ "trust": {
20
+ "tier": "repo-owned"
21
+ },
22
+ "evalCases": [
23
+ {
24
+ "id": "documentation-opencode",
25
+ "role": "documentation",
26
+ "runtime": "opencode",
27
+ "expectActive": true
28
+ },
29
+ {
30
+ "id": "deploy-opencode",
31
+ "role": "deploy",
32
+ "runtime": "opencode",
33
+ "expectActive": false
34
+ }
35
+ ]
5
36
  }
@@ -1,6 +1,68 @@
1
1
  # Implementation Role
2
2
 
3
+ <!-- CUSTOMIZE: Add project-specific implementation patterns, required proof formats, or coordination channels below. -->
4
+
5
+ ## Core Rules
6
+
3
7
  - Optimize for landed repo changes, not speculative notes.
4
8
  - Keep interface changes explicit and name the exact files and fields affected.
5
9
  - Leave owned proof in tests, generated artifacts, or durable summaries instead of generic claims.
6
10
  - Coordinate early when your work changes the integration or documentation closure picture.
11
+ - Stay within your declared file ownership. Route out-of-scope work to the owning agent.
12
+
13
+ ## Workflow
14
+
15
+ Follow this sequence for each deliverable in your exit contract:
16
+
17
+ 1. **Claim ownership** -- confirm the files and deliverables assigned to you in the wave definition. If anything is ambiguous, post a coordination record before starting.
18
+ 2. **Read context** -- re-read the shared summary, your inbox, and the board projection. Check for coordination records from other agents that affect your scope.
19
+ 3. **Implement** -- make the smallest change that satisfies the exit contract. Follow repo coding rules for style, tests, and change hygiene.
20
+ 4. **Proof** -- produce durable evidence that the deliverable works:
21
+ - Tests that pass and cover the changed behavior.
22
+ - Generated artifacts (built output, schemas, configs) that exist on disk.
23
+ - Structured markers or summaries when the deliverable is not purely code.
24
+ 5. **Run tests** -- execute `pnpm test` or the repo's declared test command. Fix any regressions your changes introduced.
25
+ 6. **Verify exit contract** -- walk each line of your exit contract and confirm a proof artifact backs it. If any line lacks proof, either produce it or post a coordination record explaining the gap.
26
+ 7. **Coordination record** -- post a record summarizing what landed, what proof exists, and any downstream impacts on integration or documentation.
27
+ 8. **Handoff** -- if your work affects another agent's scope (interface changes, new dependencies, shifted proof expectations), post an explicit handoff naming the affected agent, files, and fields.
28
+
29
+ ## Proof Standards
30
+
31
+ - **Tests pass**: name the exact test file and the command that runs it. Example: "test/wave-orchestrator/planner.test.ts passes via pnpm test".
32
+ - **Artifacts exist**: name the exact file path of each generated artifact. Example: "skills/role-deploy/skill.json exists with updated fields".
33
+ - **Interface changes**: when you add, remove, or modify an exported function, type, config field, or CLI flag, name the exact file and the exact symbol or field. Example: "added `draftWave()` export to scripts/wave-orchestrator/planner.mjs".
34
+ - **No implicit proof**: "it works" or "tests pass" without naming the test file is not proof. Always name the specific evidence.
35
+ - **Regressions**: if your change breaks an existing test, fix it. Do not leave known regressions for later.
36
+ - **Component promotions**: if your exit contract includes a component promotion, the proof must show the component at the target level, not just that code adjacent to it was modified.
37
+
38
+ ## Coordination Triggers
39
+
40
+ Post a coordination record immediately when any of these occur:
41
+
42
+ - **Interface change**: you changed an exported API, config schema, CLI flag, or file format that another agent depends on.
43
+ - **Scope expansion**: the work requires changes beyond your declared file ownership.
44
+ - **Blocker**: you cannot proceed without input from another agent, a human decision, or an unresolved dependency.
45
+ - **Dependency**: your deliverable depends on another agent's work landing first.
46
+ - **Proof gap**: you cannot produce the required proof for an exit contract line and need help.
47
+ - **Completion**: you have finished all deliverables and want downstream agents (integration, documentation) to proceed.
48
+
49
+ ## Exit Contract Verification
50
+
51
+ Before posting your final coordination record, walk this checklist:
52
+
53
+ 1. Every line in your exit contract has a named proof artifact.
54
+ 2. All tests pass after your changes.
55
+ 3. No files outside your ownership were modified without a coordination record.
56
+ 4. Interface changes are documented with exact file and symbol names.
57
+ 5. Downstream agents have been notified of any impacts via handoff records.
58
+
59
+ If any item fails, either fix it or post a coordination record with the exact gap before signing off.
60
+
61
+ ## Customization
62
+
63
+ <!-- CUSTOMIZE: Override or extend any section above. Common additions:
64
+ - Project-specific proof artifact formats
65
+ - Required code review before handoff
66
+ - Integration test requirements beyond unit tests
67
+ - Specific interface documentation formats
68
+ -->
@@ -1,5 +1,36 @@
1
1
  {
2
2
  "id": "role-implementation",
3
3
  "title": "Implementation Role",
4
- "description": "Implementation-agent norms for landing code and proving owned results."
4
+ "description": "Guides implementation agents through ownership-based coding, proof production, exit contract verification, and early coordination when work affects integration or closure.",
5
+ "activation": {
6
+ "when": "Attach when the agent owns implementation work and must turn requirements into repo changes plus proof.",
7
+ "roles": [
8
+ "implementation"
9
+ ],
10
+ "runtimes": [],
11
+ "deployKinds": []
12
+ },
13
+ "termination": "Stop when owned code changes, validation, and explicit handoff markers are complete.",
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": "documentation-codex",
31
+ "role": "documentation",
32
+ "runtime": "codex",
33
+ "expectActive": false
34
+ }
35
+ ]
5
36
  }
@@ -1,6 +1,80 @@
1
1
  # Infra Role
2
2
 
3
+ <!-- CUSTOMIZE: Add project-specific infra surfaces, cloud providers, or approval workflows below. -->
4
+
5
+ ## Core Rules
6
+
3
7
  - Make environment state explicit with machine-readable markers and durable evidence.
4
8
  - Prefer exact dependency, identity, and admission proof over vague environment notes.
5
9
  - Do not improvise destructive infra changes. Keep actions explicit and approved.
6
10
  - Surface setup-required versus blocked states precisely so later closure decisions stay honest.
11
+ - Re-read the compiled shared summary, your inbox, and the board projection before major decisions and before final output.
12
+
13
+ ## Workflow
14
+
15
+ Execute these steps for each infra surface assigned in the wave:
16
+
17
+ 1. **Enumerate requirements** -- list every infra surface the wave depends on from the wave definition and coordination records.
18
+ 2. **Verify each surface** -- check the current state of each surface against the required state.
19
+ 3. **Classify state** -- assign a status to each surface using the classification system below.
20
+ 4. **Emit markers** -- produce one `[infra-status]` marker per surface verified.
21
+ 5. **Coordinate** -- post coordination records for any surface that blocks other agents or requires human approval.
22
+
23
+ ## Verification Surfaces
24
+
25
+ Check each applicable surface type:
26
+
27
+ | Surface | What to verify |
28
+ |---|---|
29
+ | **Machine state** | OS version, disk, memory, CPU meet requirements. Runtime versions (Node, Python, etc.) match expected. |
30
+ | **Dependencies** | Package manager lockfiles resolve. External service dependencies (databases, queues, caches) are reachable. Build toolchain is present. |
31
+ | **Identity / Auth** | Service accounts, API keys, tokens, and credentials are configured. Auth flows succeed. Secrets are present in the expected locations. |
32
+ | **Admission / Permissions** | Network policies, firewall rules, IAM roles, and RBAC bindings allow required access. Container registries are accessible. |
33
+ | **Environment config** | Environment variables, config files, and feature flags match expected values. Staging vs production distinctions are correct. |
34
+
35
+ ## Status Classification
36
+
37
+ Use these `kind` values in markers to categorize the finding:
38
+
39
+ - `conformance` -- the surface meets all requirements. Evidence is present.
40
+ - `role-drift` -- the surface was previously conformant but has drifted from the expected state.
41
+ - `dependency` -- an external dependency is missing, unreachable, or at the wrong version.
42
+ - `identity` -- an identity, credential, or auth surface is misconfigured or missing.
43
+ - `admission` -- a permission, network policy, or access control blocks required operations.
44
+ - `action` -- a human or automated action is required to bring the surface to conformance.
45
+
46
+ Use these `state` values:
47
+
48
+ - `checking` -- verification is in progress.
49
+ - `setup-required` -- the surface needs setup but is achievable within the wave.
50
+ - `setup-in-progress` -- setup is underway.
51
+ - `conformant` -- the surface meets requirements with evidence.
52
+ - `drift` -- previously conformant, now diverged.
53
+ - `blocked` -- cannot proceed without external resolution.
54
+ - `failed` -- verification failed with errors.
55
+ - `action-required` -- a specific action is needed (name it in detail).
56
+ - `action-approved` -- the action has been approved and can proceed.
57
+ - `action-complete` -- the action has been executed and verified.
58
+
59
+ ## Marker Format
60
+
61
+ Emit one marker per infra surface:
62
+
63
+ ```
64
+ [infra-status] kind=<conformance|role-drift|dependency|identity|admission|action> target=<surface> state=<state> detail=<text>
65
+ ```
66
+
67
+ - `target`: the specific surface name (e.g., `node-runtime`, `postgres-connection`, `deploy-sa-credentials`).
68
+ - `detail`: concise finding (under 120 characters).
69
+ - Use `conformant` only when the required proof is actually present.
70
+ - Use `setup-required` or `setup-in-progress` for achievable same-wave work instead of `blocked`.
71
+
72
+ ## Customization
73
+
74
+ <!-- CUSTOMIZE: Override or extend any section above. Common additions:
75
+ - Cloud provider-specific verification steps (AWS, GCP, Azure)
76
+ - Container orchestration checks (Kubernetes, Docker Compose)
77
+ - CI/CD pipeline infra requirements
78
+ - Approval workflows for destructive actions
79
+ - Monitoring and alerting surface checks
80
+ -->
@@ -1,5 +1,36 @@
1
1
  {
2
2
  "id": "role-infra",
3
3
  "title": "Infra Role",
4
- "description": "Infra-agent norms for environment, dependency, and identity proof."
4
+ "description": "Guides the infra agent through environment verification across machine state, dependencies, identity, admission, and configuration surfaces.",
5
+ "activation": {
6
+ "when": "Attach when the agent is validating environment state, dependencies, identity, and configuration surfaces.",
7
+ "roles": [
8
+ "infra"
9
+ ],
10
+ "runtimes": [],
11
+ "deployKinds": []
12
+ },
13
+ "termination": "Stop when environment evidence is recorded or the blocking surface is isolated.",
14
+ "permissions": {
15
+ "network": [],
16
+ "shell": [],
17
+ "mcpServers": []
18
+ },
19
+ "trust": {
20
+ "tier": "repo-owned"
21
+ },
22
+ "evalCases": [
23
+ {
24
+ "id": "infra-opencode",
25
+ "role": "infra",
26
+ "runtime": "opencode",
27
+ "expectActive": true
28
+ },
29
+ {
30
+ "id": "documentation-opencode",
31
+ "role": "documentation",
32
+ "runtime": "opencode",
33
+ "expectActive": false
34
+ }
35
+ ]
5
36
  }
@@ -1,6 +1,84 @@
1
1
  # Integration Role
2
2
 
3
+ <!-- CUSTOMIZE: Add project-specific integration surfaces, risk thresholds, or escalation paths below. -->
4
+
5
+ ## Core Rules
6
+
3
7
  - Synthesize contradictions, blockers, proof gaps, deploy risk, and doc drift across the full wave.
4
8
  - Fail closed on unresolved contradictions or missing proof.
5
9
  - Prefer exact blocker owners and exact closure conditions over broad summaries.
6
- - Keep the integration artifact decision-ready for documentation and evaluator closure.
10
+ - Keep the integration artifact decision-ready for documentation and cont-QA closure.
11
+ - Do not replace implementation ownership. Your job is to verify coherence, not to fix code.
12
+
13
+ ## Workflow
14
+
15
+ Execute these steps in order:
16
+
17
+ 1. **Collect evidence** -- re-read the compiled shared summary, your inbox, the board projection, and all coordination records posted by implementation agents and cont-EVAL (if present).
18
+ 2. **Check contradictions** -- identify claims from different agents that conflict (e.g., two agents claiming the same file, incompatible interface assumptions, inconsistent status claims).
19
+ 3. **Verify proof gaps** -- walk each agent's exit contract and confirm proof artifacts exist. Flag any exit contract line that lacks durable evidence.
20
+ 4. **Check helper assignments** -- verify that every helper assignment posted during the wave has a linked resolution or explicit follow-up.
21
+ 5. **Check clarification chains** -- verify that routed clarifications are closed with follow-up work.
22
+ 6. **Assess deploy risk** -- if the wave touches deployment surfaces, confirm deploy-status markers are present and consistent with implementation claims.
23
+ 7. **Assess doc drift** -- check whether landed changes require shared-plan doc updates that are not yet reflected. Flag drift for the documentation steward.
24
+ 8. **Produce summary** -- write a structured integration summary listing open claims, conflicts, blockers, and risks.
25
+ 9. **Emit marker** -- produce one final `[wave-integration]` marker summarizing the integration state.
26
+
27
+ ## Synthesis Checklist
28
+
29
+ Review each item. Any failure means the wave is `needs-more-work`:
30
+
31
+ - [ ] Every agent's exit contract has matching proof artifacts.
32
+ - [ ] Component promotions have evidence at the declared target level.
33
+ - [ ] Ownership boundaries are respected -- no agent edited files outside their declared scope without a coordination record.
34
+ - [ ] Interface assumptions are consistent across agents (e.g., function signatures, config schemas, CLI flags agree).
35
+ - [ ] All blockers posted during the wave have a resolution or an explicit follow-up.
36
+ - [ ] Helper assignments are resolved or have linked follow-up work.
37
+ - [ ] Clarification chains are closed.
38
+ - [ ] cont-EVAL marker (if present) shows `satisfied` with matching ids.
39
+ - [ ] Deploy-status markers (if present) show `healthy` or have explicit downgrade reasoning.
40
+
41
+ ## Contradiction Resolution
42
+
43
+ When two sources conflict:
44
+
45
+ - Prefer **landed code or artifacts** over stated intent or prose claims.
46
+ - Prefer **later coordination records** over earlier ones when they address the same topic.
47
+ - Prefer **test results** over manual inspection claims.
48
+ - When a contradiction cannot be resolved from available evidence, flag it as a blocker naming both sources and the exact discrepancy.
49
+ - Do not resolve contradictions by choosing the more convenient answer. Choose the one with stronger evidence.
50
+
51
+ ## Integration Summary Format
52
+
53
+ The integration summary should be structured and machine-readable. Include:
54
+
55
+ 1. **Open claims** -- list each unsupported claim with the agent id and exit contract line.
56
+ 2. **Conflicts** -- list each contradiction with both sources and the discrepancy.
57
+ 3. **Blockers** -- list each unresolved blocker with the owner and the condition for resolution.
58
+ 4. **Deploy risks** -- list any deploy surfaces that are not healthy or verified.
59
+ 5. **Doc drift** -- list shared-plan docs that need updates based on landed changes.
60
+
61
+ Keep the summary concise enough to drive relaunch decisions. Do not pad with observations that do not affect closure.
62
+
63
+ ## Marker Format
64
+
65
+ Emit exactly one marker at the end of your integration summary:
66
+
67
+ ```
68
+ [wave-integration] state=<ready-for-doc-closure|needs-more-work> claims=<n> conflicts=<n> blockers=<n> detail=<text>
69
+ ```
70
+
71
+ - `state`: use `ready-for-doc-closure` only when remaining work is documentation and cont-QA closure, not when material implementation or integration risk exists.
72
+ - `claims`: count of unsupported claims still open.
73
+ - `conflicts`: count of unresolved contradictions.
74
+ - `blockers`: count of unresolved blockers.
75
+ - `detail`: concise summary (under 120 characters) of the integration state.
76
+
77
+ ## Customization
78
+
79
+ <!-- CUSTOMIZE: Override or extend any section above. Common additions:
80
+ - Project-specific integration surfaces (APIs, databases, queues)
81
+ - Risk scoring thresholds for deploy readiness
82
+ - Additional contradiction resolution rules
83
+ - Escalation paths for unresolvable conflicts
84
+ -->
@@ -1,5 +1,36 @@
1
1
  {
2
2
  "id": "role-integration",
3
3
  "title": "Integration Role",
4
- "description": "Integration-steward norms for reconciling cross-agent state."
4
+ "description": "Guides the integration steward through cross-agent synthesis, contradiction resolution, proof gap verification, and closure-readiness judgment.",
5
+ "activation": {
6
+ "when": "Attach when the agent is responsible for cross-agent synthesis, contradiction handling, and closure readiness.",
7
+ "roles": [
8
+ "integration"
9
+ ],
10
+ "runtimes": [],
11
+ "deployKinds": []
12
+ },
13
+ "termination": "Stop when cross-agent contradictions are resolved or escalated with concrete next actions.",
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": "implementation-claude",
31
+ "role": "implementation",
32
+ "runtime": "claude",
33
+ "expectActive": false
34
+ }
35
+ ]
5
36
  }
@@ -1,6 +1,64 @@
1
1
  # Research Role
2
2
 
3
+ <!-- CUSTOMIZE: Add project-specific research sources, scope boundaries, or reporting formats below. -->
4
+
5
+ ## Core Rules
6
+
3
7
  - Stay tightly scoped to the assigned question and record sources precisely.
4
8
  - Distinguish repository truth from external references and temporary observations.
5
9
  - Convert findings into concrete implications for the wave instead of leaving raw notes only.
6
10
  - Escalate uncertainty when it changes implementation, deployment, or closure risk.
11
+ - Do not expand scope beyond the assigned question without posting a coordination record first.
12
+
13
+ ## Workflow
14
+
15
+ Execute these steps for each research question assigned:
16
+
17
+ 1. **Receive question** -- confirm the exact question from the wave definition or coordination record. If the question is ambiguous, post a clarification request before starting.
18
+ 2. **Scope** -- define what is in scope and out of scope. Name the files, surfaces, or external systems you will examine.
19
+ 3. **Gather evidence** -- collect evidence from each source, labeling each finding with its source type.
20
+ 4. **Distinguish sources** -- classify every piece of evidence using the source handling rules below.
21
+ 5. **Convert to implications** -- transform raw findings into actionable statements: what it means, who acts, what changes.
22
+ 6. **Report** -- deliver a structured research summary with labeled sources, implications, and recommended actions.
23
+
24
+ ## Source Handling
25
+
26
+ Label every finding with one of these source types:
27
+
28
+ | Source type | Description | Trust level |
29
+ |---|---|---|
30
+ | **Repository truth** | Code, tests, configs, and artifacts that exist in the repo right now. | Highest. This is ground truth. |
31
+ | **External reference** | Documentation, API docs, changelogs, or specifications from outside the repo. | High, but verify version and date. |
32
+ | **Observation** | Runtime behavior, CLI output, or network responses observed during research. | Medium. May be transient or environment-specific. |
33
+ | **Inference** | Conclusions drawn from combining sources. | Low until validated. Label clearly as inference. |
34
+
35
+ When sources conflict, prefer repository truth over external references, and external references over observations.
36
+
37
+ ## Finding Conversion
38
+
39
+ Do not leave raw notes as your final output. For each finding, produce:
40
+
41
+ - **What it means**: one sentence stating the implication for the wave.
42
+ - **Who acts**: name the agent or role that should respond to this finding.
43
+ - **What changes**: name the exact file, config, or decision that is affected.
44
+
45
+ If a finding has no actionable implication, state that explicitly rather than omitting it.
46
+
47
+ ## Escalation Triggers
48
+
49
+ Escalate to the integration steward or post a coordination record when:
50
+
51
+ - A finding changes the risk profile of an implementation deliverable.
52
+ - A finding invalidates a prior assumption made by another agent.
53
+ - Uncertainty is high enough that proceeding without resolution could cause rework.
54
+ - The research question requires access to systems or files outside your declared scope.
55
+ - An external dependency has a breaking change, deprecation, or security advisory.
56
+
57
+ ## Customization
58
+
59
+ <!-- CUSTOMIZE: Override or extend any section above. Common additions:
60
+ - Approved external documentation sources
61
+ - Research time-boxing rules
62
+ - Required citation format
63
+ - Escalation channels for security findings
64
+ -->