@chllming/wave-orchestration 0.6.3 → 0.7.0

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 (112) hide show
  1. package/CHANGELOG.md +57 -1
  2. package/README.md +39 -7
  3. package/docs/agents/wave-orchestrator-role.md +50 -0
  4. package/docs/agents/wave-planner-role.md +39 -0
  5. package/docs/context7/bundles.json +9 -0
  6. package/docs/context7/planner-agent/README.md +25 -0
  7. package/docs/context7/planner-agent/manifest.json +83 -0
  8. package/docs/context7/planner-agent/papers/cooperbench-why-coding-agents-cannot-be-your-teammates-yet.md +3283 -0
  9. package/docs/context7/planner-agent/papers/dova-deliberation-first-multi-agent-orchestration-for-autonomous-research-automation.md +1699 -0
  10. package/docs/context7/planner-agent/papers/dpbench-large-language-models-struggle-with-simultaneous-coordination.md +2251 -0
  11. package/docs/context7/planner-agent/papers/incremental-planning-to-control-a-blackboard-based-problem-solver.md +1729 -0
  12. package/docs/context7/planner-agent/papers/silo-bench-a-scalable-environment-for-evaluating-distributed-coordination-in-multi-agent-llm-systems.md +3747 -0
  13. package/docs/context7/planner-agent/papers/todoevolve-learning-to-architect-agent-planning-systems.md +1675 -0
  14. package/docs/context7/planner-agent/papers/verified-multi-agent-orchestration-a-plan-execute-verify-replan-framework-for-complex-query-resolution.md +1173 -0
  15. package/docs/context7/planner-agent/papers/why-do-multi-agent-llm-systems-fail.md +5211 -0
  16. package/docs/context7/planner-agent/topics/planning-and-orchestration.md +24 -0
  17. package/docs/evals/README.md +96 -1
  18. package/docs/evals/arm-templates/README.md +13 -0
  19. package/docs/evals/arm-templates/full-wave.json +15 -0
  20. package/docs/evals/arm-templates/single-agent.json +15 -0
  21. package/docs/evals/benchmark-catalog.json +7 -0
  22. package/docs/evals/cases/README.md +47 -0
  23. package/docs/evals/cases/wave-blackboard-inbox-targeting.json +73 -0
  24. package/docs/evals/cases/wave-contradiction-conflict.json +104 -0
  25. package/docs/evals/cases/wave-expert-routing-preservation.json +69 -0
  26. package/docs/evals/cases/wave-hidden-profile-private-evidence.json +81 -0
  27. package/docs/evals/cases/wave-premature-closure-guard.json +71 -0
  28. package/docs/evals/cases/wave-silo-cross-agent-state.json +77 -0
  29. package/docs/evals/cases/wave-simultaneous-lockstep.json +92 -0
  30. package/docs/evals/cooperbench/real-world-mitigation.md +341 -0
  31. package/docs/evals/external-benchmarks.json +85 -0
  32. package/docs/evals/external-command-config.sample.json +9 -0
  33. package/docs/evals/external-command-config.swe-bench-pro.json +8 -0
  34. package/docs/evals/pilots/README.md +47 -0
  35. package/docs/evals/pilots/swe-bench-pro-public-full-wave-review-10.json +64 -0
  36. package/docs/evals/pilots/swe-bench-pro-public-pilot.json +111 -0
  37. package/docs/evals/wave-benchmark-program.md +302 -0
  38. package/docs/guides/planner.md +48 -11
  39. package/docs/plans/context7-wave-orchestrator.md +20 -0
  40. package/docs/plans/current-state.md +8 -1
  41. package/docs/plans/examples/wave-benchmark-improvement.md +108 -0
  42. package/docs/plans/examples/wave-example-live-proof.md +1 -1
  43. package/docs/plans/examples/wave-example-rollout-fidelity.md +340 -0
  44. package/docs/plans/wave-orchestrator.md +62 -11
  45. package/docs/plans/waves/reviews/wave-1-benchmark-operator.md +118 -0
  46. package/docs/reference/coordination-and-closure.md +436 -0
  47. package/docs/reference/live-proof-waves.md +25 -3
  48. package/docs/reference/npmjs-trusted-publishing.md +3 -3
  49. package/docs/reference/proof-metrics.md +90 -0
  50. package/docs/reference/runtime-config/README.md +61 -0
  51. package/docs/reference/sample-waves.md +29 -18
  52. package/docs/reference/wave-control.md +164 -0
  53. package/docs/reference/wave-planning-lessons.md +131 -0
  54. package/package.json +5 -4
  55. package/releases/manifest.json +18 -0
  56. package/scripts/research/agent-context-archive.mjs +18 -0
  57. package/scripts/research/manifests/agent-context-expanded-2026-03-22.mjs +17 -0
  58. package/scripts/research/sync-planner-context7-bundle.mjs +133 -0
  59. package/scripts/wave-orchestrator/artifact-schemas.mjs +232 -0
  60. package/scripts/wave-orchestrator/autonomous.mjs +7 -0
  61. package/scripts/wave-orchestrator/benchmark-cases.mjs +374 -0
  62. package/scripts/wave-orchestrator/benchmark-external.mjs +1384 -0
  63. package/scripts/wave-orchestrator/benchmark.mjs +972 -0
  64. package/scripts/wave-orchestrator/clarification-triage.mjs +78 -12
  65. package/scripts/wave-orchestrator/config.mjs +175 -0
  66. package/scripts/wave-orchestrator/control-cli.mjs +1123 -0
  67. package/scripts/wave-orchestrator/control-plane.mjs +697 -0
  68. package/scripts/wave-orchestrator/coord-cli.mjs +360 -2
  69. package/scripts/wave-orchestrator/coordination-store.mjs +211 -9
  70. package/scripts/wave-orchestrator/coordination.mjs +84 -0
  71. package/scripts/wave-orchestrator/dashboard-renderer.mjs +38 -3
  72. package/scripts/wave-orchestrator/dashboard-state.mjs +22 -0
  73. package/scripts/wave-orchestrator/evals.mjs +23 -0
  74. package/scripts/wave-orchestrator/executors.mjs +3 -2
  75. package/scripts/wave-orchestrator/feedback.mjs +55 -0
  76. package/scripts/wave-orchestrator/install.mjs +55 -1
  77. package/scripts/wave-orchestrator/launcher-closure.mjs +4 -1
  78. package/scripts/wave-orchestrator/launcher-runtime.mjs +24 -21
  79. package/scripts/wave-orchestrator/launcher.mjs +796 -35
  80. package/scripts/wave-orchestrator/planner-context.mjs +75 -0
  81. package/scripts/wave-orchestrator/planner.mjs +2270 -136
  82. package/scripts/wave-orchestrator/proof-cli.mjs +195 -0
  83. package/scripts/wave-orchestrator/proof-registry.mjs +317 -0
  84. package/scripts/wave-orchestrator/replay.mjs +10 -4
  85. package/scripts/wave-orchestrator/retry-cli.mjs +184 -0
  86. package/scripts/wave-orchestrator/retry-control.mjs +225 -0
  87. package/scripts/wave-orchestrator/shared.mjs +26 -0
  88. package/scripts/wave-orchestrator/swe-bench-pro-task.mjs +1004 -0
  89. package/scripts/wave-orchestrator/traces.mjs +157 -2
  90. package/scripts/wave-orchestrator/wave-control-client.mjs +532 -0
  91. package/scripts/wave-orchestrator/wave-control-schema.mjs +309 -0
  92. package/scripts/wave-orchestrator/wave-files.mjs +17 -5
  93. package/scripts/wave.mjs +27 -0
  94. package/skills/repo-coding-rules/SKILL.md +1 -0
  95. package/skills/role-cont-eval/SKILL.md +1 -0
  96. package/skills/role-cont-qa/SKILL.md +13 -6
  97. package/skills/role-deploy/SKILL.md +1 -0
  98. package/skills/role-documentation/SKILL.md +4 -0
  99. package/skills/role-implementation/SKILL.md +4 -0
  100. package/skills/role-infra/SKILL.md +2 -1
  101. package/skills/role-integration/SKILL.md +15 -8
  102. package/skills/role-planner/SKILL.md +39 -0
  103. package/skills/role-planner/skill.json +21 -0
  104. package/skills/role-research/SKILL.md +1 -0
  105. package/skills/role-security/SKILL.md +2 -2
  106. package/skills/runtime-claude/SKILL.md +2 -1
  107. package/skills/runtime-codex/SKILL.md +1 -0
  108. package/skills/runtime-local/SKILL.md +2 -0
  109. package/skills/runtime-opencode/SKILL.md +1 -0
  110. package/skills/wave-core/SKILL.md +25 -6
  111. package/skills/wave-core/references/marker-syntax.md +16 -8
  112. package/wave.config.json +45 -0
@@ -21,6 +21,7 @@ import {
21
21
  truncate,
22
22
  writeJsonAtomic,
23
23
  } from "./shared.mjs";
24
+ import { safeQueueWaveControlEvent } from "./wave-control-client.mjs";
24
25
 
25
26
  function sanitizeToken(value) {
26
27
  const token = String(value || "")
@@ -59,6 +60,7 @@ export function createFeedbackRequest({
59
60
  orchestratorId,
60
61
  question,
61
62
  context,
63
+ recordTelemetry = false,
62
64
  }) {
63
65
  ensureDirectory(feedbackRequestsDir);
64
66
  const requestId = buildRequestId({ lane, wave, agentId });
@@ -83,6 +85,31 @@ export function createFeedbackRequest({
83
85
  }
84
86
  writeJsonAtomic(filePath, payload);
85
87
  });
88
+ if (recordTelemetry) {
89
+ try {
90
+ const lanePaths = buildLanePaths(lane);
91
+ safeQueueWaveControlEvent(lanePaths, {
92
+ category: "feedback",
93
+ entityType: "human_input",
94
+ entityId: requestId,
95
+ action: "requested",
96
+ source: "orchestrator",
97
+ actor: orchestratorId || "orchestrator",
98
+ recordedAt: now,
99
+ identity: {
100
+ lane,
101
+ wave,
102
+ agentId,
103
+ runKind: lanePaths.runKind,
104
+ runId: lanePaths.runId,
105
+ },
106
+ tags: ["feedback", "human-input"],
107
+ data: payload,
108
+ });
109
+ } catch {
110
+ // Best-effort telemetry only.
111
+ }
112
+ }
86
113
  return { requestId, filePath, payload };
87
114
  }
88
115
 
@@ -93,6 +120,7 @@ export function answerFeedbackRequest({
93
120
  response,
94
121
  operator = "human-operator",
95
122
  force = false,
123
+ recordTelemetry = false,
96
124
  }) {
97
125
  const lockPath = path.join(feedbackStateDir, "requests.lock");
98
126
  let answeredPayload = null;
@@ -117,6 +145,31 @@ export function answerFeedbackRequest({
117
145
  };
118
146
  writeJsonAtomic(filePath, answeredPayload);
119
147
  });
148
+ if (recordTelemetry) {
149
+ try {
150
+ const lanePaths = buildLanePaths(answeredPayload?.lane || DEFAULT_WAVE_LANE);
151
+ safeQueueWaveControlEvent(lanePaths, {
152
+ category: "feedback",
153
+ entityType: "human_input",
154
+ entityId: answeredPayload.id,
155
+ action: "answered",
156
+ source: "operator",
157
+ actor: operator,
158
+ recordedAt: answeredPayload?.updatedAt || toIsoTimestamp(),
159
+ identity: {
160
+ lane: answeredPayload?.lane || DEFAULT_WAVE_LANE,
161
+ wave: answeredPayload?.wave ?? null,
162
+ agentId: answeredPayload?.agentId || null,
163
+ runKind: lanePaths.runKind,
164
+ runId: lanePaths.runId,
165
+ },
166
+ tags: ["feedback", "human-input", "answered"],
167
+ data: answeredPayload,
168
+ });
169
+ } catch {
170
+ // Best-effort telemetry only.
171
+ }
172
+ }
120
173
  return answeredPayload;
121
174
  }
122
175
 
@@ -292,6 +345,7 @@ export async function runFeedbackCli(argv) {
292
345
  orchestratorId: options.orchestratorId,
293
346
  question: options.question,
294
347
  context: options.context,
348
+ recordTelemetry: true,
295
349
  });
296
350
  console.log(`[wave-human-feedback] created ${result.requestId}`);
297
351
  console.log(`file: ${path.relative(REPO_ROOT, result.filePath)}`);
@@ -316,6 +370,7 @@ export async function runFeedbackCli(argv) {
316
370
  response: options.response,
317
371
  operator: options.operator,
318
372
  force: options.force,
373
+ recordTelemetry: true,
319
374
  });
320
375
  console.log(`[wave-human-feedback] answered ${options.id}`);
321
376
  return;
@@ -5,6 +5,9 @@ import {
5
5
  applyContext7SelectionsToWave,
6
6
  loadContext7BundleIndex,
7
7
  } from "./context7.mjs";
8
+ import {
9
+ PLANNER_CONTEXT7_TEMPLATE_PATHS,
10
+ } from "./planner-context.mjs";
8
11
  import { buildLanePaths, ensureDirectory, PACKAGE_ROOT, readJsonOrNull, REPO_ROOT, writeJsonAtomic } from "./shared.mjs";
9
12
  import { fetchLatestPackageVersion } from "./package-update-notice.mjs";
10
13
  import {
@@ -29,6 +32,7 @@ export const STARTER_TEMPLATE_PATHS = [
29
32
  "docs/agents/wave-cont-qa-role.md",
30
33
  "docs/agents/wave-cont-eval-role.md",
31
34
  "docs/agents/wave-integration-role.md",
35
+ "docs/agents/wave-planner-role.md",
32
36
  "docs/agents/wave-security-role.md",
33
37
  "docs/concepts/context7-vs-skills.md",
34
38
  "docs/concepts/operating-modes.md",
@@ -36,23 +40,48 @@ export const STARTER_TEMPLATE_PATHS = [
36
40
  "docs/concepts/what-is-a-wave.md",
37
41
  "docs/context7/bundles.json",
38
42
  "docs/evals/benchmark-catalog.json",
43
+ "docs/evals/external-benchmarks.json",
44
+ "docs/evals/external-command-config.sample.json",
45
+ "docs/evals/external-command-config.swe-bench-pro.json",
46
+ "docs/evals/wave-benchmark-program.md",
47
+ "docs/evals/pilots/README.md",
48
+ "docs/evals/pilots/swe-bench-pro-public-pilot.json",
49
+ "docs/evals/pilots/swe-bench-pro-public-full-wave-review-10.json",
50
+ "docs/evals/arm-templates/README.md",
51
+ "docs/evals/arm-templates/single-agent.json",
52
+ "docs/evals/arm-templates/full-wave.json",
53
+ "docs/evals/cases/README.md",
54
+ "docs/evals/cases/wave-hidden-profile-private-evidence.json",
55
+ "docs/evals/cases/wave-premature-closure-guard.json",
56
+ "docs/evals/cases/wave-silo-cross-agent-state.json",
57
+ "docs/evals/cases/wave-blackboard-inbox-targeting.json",
58
+ "docs/evals/cases/wave-contradiction-conflict.json",
59
+ "docs/evals/cases/wave-simultaneous-lockstep.json",
60
+ "docs/evals/cases/wave-expert-routing-preservation.json",
39
61
  "docs/guides/planner.md",
40
62
  "docs/guides/terminal-surfaces.md",
41
63
  "docs/plans/component-cutover-matrix.json",
42
64
  "docs/plans/component-cutover-matrix.md",
43
65
  "docs/plans/context7-wave-orchestrator.md",
44
66
  "docs/plans/current-state.md",
67
+ "docs/plans/examples/wave-example-live-proof.md",
45
68
  "docs/plans/master-plan.md",
46
69
  "docs/plans/migration.md",
47
70
  "docs/plans/wave-orchestrator.md",
48
71
  "docs/plans/waves/wave-0.md",
72
+ "docs/reference/live-proof-waves.md",
49
73
  "docs/reference/repository-guidance.md",
74
+ "docs/reference/sample-waves.md",
50
75
  "docs/reference/skills.md",
76
+ "docs/reference/wave-planning-lessons.md",
51
77
  "docs/reference/runtime-config/README.md",
52
78
  "docs/reference/runtime-config/codex.md",
53
79
  "docs/reference/runtime-config/claude.md",
54
80
  "docs/reference/runtime-config/opencode.md",
81
+ "docs/research/coordination-failure-review.md",
55
82
  "docs/research/agent-context-sources.md",
83
+ "docs/plans/examples/wave-benchmark-improvement.md",
84
+ ...PLANNER_CONTEXT7_TEMPLATE_PATHS,
56
85
  ];
57
86
  const REQUIRED_GITIGNORE_ENTRIES = [
58
87
  ".tmp/",
@@ -233,6 +262,19 @@ function gitignoreWarnings() {
233
262
  );
234
263
  }
235
264
 
265
+ function plannerRequiredPaths() {
266
+ return Array.from(
267
+ new Set(
268
+ [
269
+ "docs/agents/wave-planner-role.md",
270
+ "docs/reference/wave-planning-lessons.md",
271
+ "skills/role-planner/SKILL.md",
272
+ ...PLANNER_CONTEXT7_TEMPLATE_PATHS,
273
+ ].filter(Boolean),
274
+ ),
275
+ ).sort();
276
+ }
277
+
236
278
  export function runDoctor() {
237
279
  const errors = [];
238
280
  const warnings = [];
@@ -277,9 +319,21 @@ export function runDoctor() {
277
319
  errors.push(`Missing required Wave file: ${relPath}`);
278
320
  }
279
321
  }
322
+ const context7BundleIndex = loadContext7BundleIndex(lanePaths.context7BundleIndexPath);
323
+ const plannerPaths = plannerRequiredPaths();
324
+ for (const relPath of plannerPaths) {
325
+ if (!fs.existsSync(path.join(REPO_ROOT, relPath))) {
326
+ errors.push(`Missing planner file: ${relPath}`);
327
+ }
328
+ }
329
+ const plannerBundleId = String(config.planner?.agentic?.context7Bundle || "").trim();
330
+ if (plannerBundleId && !context7BundleIndex.bundles[plannerBundleId]) {
331
+ errors.push(
332
+ `planner.agentic.context7Bundle references unknown bundle "${plannerBundleId}".`,
333
+ );
334
+ }
280
335
  let parsedWaves = [];
281
336
  if (fs.existsSync(lanePaths.wavesDir)) {
282
- const context7BundleIndex = loadContext7BundleIndex(lanePaths.context7BundleIndexPath);
283
337
  parsedWaves = parseWaveFiles(lanePaths.wavesDir, { laneProfile: lanePaths.laneProfile })
284
338
  .map((wave) =>
285
339
  applyExecutorSelectionsToWave(wave, {
@@ -201,7 +201,7 @@ export async function runClosureSweepPhase({
201
201
  refreshWaveDashboardAgentStates(dashboardState, [runInfo], pendingAgentIds, (event) =>
202
202
  recordCombinedEvent(event),
203
203
  );
204
- monitorWaveHumanFeedbackFn({
204
+ const feedbackChanged = monitorWaveHumanFeedbackFn({
205
205
  lanePaths,
206
206
  waveNumber: wave.wave,
207
207
  agentRuns: [runInfo],
@@ -211,6 +211,9 @@ export async function runClosureSweepPhase({
211
211
  recordCombinedEvent,
212
212
  appendCoordination,
213
213
  });
214
+ if (feedbackChanged) {
215
+ refreshDerivedState?.(dashboardState?.attempt || 0);
216
+ }
214
217
  updateWaveDashboardMessageBoard(dashboardState, runInfo.messageBoardPath);
215
218
  flushDashboards();
216
219
  },
@@ -69,6 +69,7 @@ export async function launchAgentSession(lanePaths, params, { runTmuxFn }) {
69
69
  sharedSummaryText,
70
70
  inboxPath,
71
71
  inboxText,
72
+ promptOverride = "",
72
73
  orchestratorId,
73
74
  agentRateLimitRetries,
74
75
  agentRateLimitBaseDelaySeconds,
@@ -101,27 +102,29 @@ export async function launchAgentSession(lanePaths, params, { runTmuxFn }) {
101
102
  artifacts: skillArtifacts,
102
103
  };
103
104
  }
104
- const prompt = buildExecutionPrompt({
105
- lane: lanePaths.lane,
106
- wave,
107
- agent,
108
- orchestratorId,
109
- messageBoardPath,
110
- messageBoardSnapshot,
111
- sharedSummaryPath,
112
- sharedSummaryText,
113
- inboxPath,
114
- inboxText,
115
- context7,
116
- componentPromotions: resolvedWaveDefinition.componentPromotions,
117
- evalTargets: resolvedWaveDefinition.evalTargets,
118
- benchmarkCatalogPath: lanePaths.laneProfile?.paths?.benchmarkCatalogPath,
119
- sharedPlanDocs: lanePaths.sharedPlanDocs,
120
- contQaAgentId: lanePaths.contQaAgentId,
121
- contEvalAgentId: lanePaths.contEvalAgentId,
122
- integrationAgentId: lanePaths.integrationAgentId,
123
- documentationAgentId: lanePaths.documentationAgentId,
124
- });
105
+ const prompt =
106
+ String(promptOverride || "").trim() ||
107
+ buildExecutionPrompt({
108
+ lane: lanePaths.lane,
109
+ wave,
110
+ agent,
111
+ orchestratorId,
112
+ messageBoardPath,
113
+ messageBoardSnapshot,
114
+ sharedSummaryPath,
115
+ sharedSummaryText,
116
+ inboxPath,
117
+ inboxText,
118
+ context7,
119
+ componentPromotions: resolvedWaveDefinition.componentPromotions,
120
+ evalTargets: resolvedWaveDefinition.evalTargets,
121
+ benchmarkCatalogPath: lanePaths.laneProfile?.paths?.benchmarkCatalogPath,
122
+ sharedPlanDocs: lanePaths.sharedPlanDocs,
123
+ contQaAgentId: lanePaths.contQaAgentId,
124
+ contEvalAgentId: lanePaths.contEvalAgentId,
125
+ integrationAgentId: lanePaths.integrationAgentId,
126
+ documentationAgentId: lanePaths.documentationAgentId,
127
+ });
125
128
  const promptHash = hashAgentPromptFingerprint(agent);
126
129
  fs.writeFileSync(promptPath, `${prompt}\n`, "utf8");
127
130
  const launchSpec = buildExecutorLaunchSpec({