opencode-swarm-plugin 0.43.0 → 0.44.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 (208) hide show
  1. package/bin/cass.characterization.test.ts +422 -0
  2. package/bin/swarm.serve.test.ts +6 -4
  3. package/bin/swarm.test.ts +68 -0
  4. package/bin/swarm.ts +81 -8
  5. package/dist/compaction-prompt-scoring.js +139 -0
  6. package/dist/contributor-tools.d.ts +42 -0
  7. package/dist/contributor-tools.d.ts.map +1 -0
  8. package/dist/eval-capture.js +12811 -0
  9. package/dist/hive.d.ts.map +1 -1
  10. package/dist/index.d.ts +12 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +7728 -62590
  13. package/dist/plugin.js +23833 -78695
  14. package/dist/sessions/agent-discovery.d.ts +59 -0
  15. package/dist/sessions/agent-discovery.d.ts.map +1 -0
  16. package/dist/sessions/index.d.ts +10 -0
  17. package/dist/sessions/index.d.ts.map +1 -0
  18. package/dist/swarm-orchestrate.d.ts.map +1 -1
  19. package/dist/swarm-prompts.d.ts.map +1 -1
  20. package/dist/swarm-review.d.ts.map +1 -1
  21. package/package.json +17 -5
  22. package/.changeset/swarm-insights-data-layer.md +0 -63
  23. package/.hive/analysis/eval-failure-analysis-2025-12-25.md +0 -331
  24. package/.hive/analysis/session-data-quality-audit.md +0 -320
  25. package/.hive/eval-results.json +0 -483
  26. package/.hive/issues.jsonl +0 -138
  27. package/.hive/memories.jsonl +0 -729
  28. package/.opencode/eval-history.jsonl +0 -327
  29. package/.turbo/turbo-build.log +0 -9
  30. package/CHANGELOG.md +0 -2255
  31. package/SCORER-ANALYSIS.md +0 -598
  32. package/docs/analysis/subagent-coordination-patterns.md +0 -902
  33. package/docs/analysis-socratic-planner-pattern.md +0 -504
  34. package/docs/planning/ADR-001-monorepo-structure.md +0 -171
  35. package/docs/planning/ADR-002-package-extraction.md +0 -393
  36. package/docs/planning/ADR-003-performance-improvements.md +0 -451
  37. package/docs/planning/ADR-004-message-queue-features.md +0 -187
  38. package/docs/planning/ADR-005-devtools-observability.md +0 -202
  39. package/docs/planning/ADR-007-swarm-enhancements-worktree-review.md +0 -168
  40. package/docs/planning/ADR-008-worker-handoff-protocol.md +0 -293
  41. package/docs/planning/ADR-009-oh-my-opencode-patterns.md +0 -353
  42. package/docs/planning/ROADMAP.md +0 -368
  43. package/docs/semantic-memory-cli-syntax.md +0 -123
  44. package/docs/swarm-mail-architecture.md +0 -1147
  45. package/docs/testing/context-recovery-test.md +0 -470
  46. package/evals/ARCHITECTURE.md +0 -1189
  47. package/evals/README.md +0 -768
  48. package/evals/compaction-prompt.eval.ts +0 -149
  49. package/evals/compaction-resumption.eval.ts +0 -289
  50. package/evals/coordinator-behavior.eval.ts +0 -307
  51. package/evals/coordinator-session.eval.ts +0 -154
  52. package/evals/evalite.config.ts.bak +0 -15
  53. package/evals/example.eval.ts +0 -31
  54. package/evals/fixtures/compaction-cases.ts +0 -350
  55. package/evals/fixtures/compaction-prompt-cases.ts +0 -311
  56. package/evals/fixtures/coordinator-sessions.ts +0 -328
  57. package/evals/fixtures/decomposition-cases.ts +0 -105
  58. package/evals/lib/compaction-loader.test.ts +0 -248
  59. package/evals/lib/compaction-loader.ts +0 -320
  60. package/evals/lib/data-loader.evalite-test.ts +0 -289
  61. package/evals/lib/data-loader.test.ts +0 -345
  62. package/evals/lib/data-loader.ts +0 -281
  63. package/evals/lib/llm.ts +0 -115
  64. package/evals/scorers/compaction-prompt-scorers.ts +0 -145
  65. package/evals/scorers/compaction-scorers.ts +0 -305
  66. package/evals/scorers/coordinator-discipline.evalite-test.ts +0 -539
  67. package/evals/scorers/coordinator-discipline.ts +0 -325
  68. package/evals/scorers/index.test.ts +0 -146
  69. package/evals/scorers/index.ts +0 -328
  70. package/evals/scorers/outcome-scorers.evalite-test.ts +0 -27
  71. package/evals/scorers/outcome-scorers.ts +0 -349
  72. package/evals/swarm-decomposition.eval.ts +0 -121
  73. package/examples/commands/swarm.md +0 -745
  74. package/examples/plugin-wrapper-template.ts +0 -2426
  75. package/examples/skills/hive-workflow/SKILL.md +0 -212
  76. package/examples/skills/skill-creator/SKILL.md +0 -223
  77. package/examples/skills/swarm-coordination/SKILL.md +0 -292
  78. package/global-skills/cli-builder/SKILL.md +0 -344
  79. package/global-skills/cli-builder/references/advanced-patterns.md +0 -244
  80. package/global-skills/learning-systems/SKILL.md +0 -644
  81. package/global-skills/skill-creator/LICENSE.txt +0 -202
  82. package/global-skills/skill-creator/SKILL.md +0 -352
  83. package/global-skills/skill-creator/references/output-patterns.md +0 -82
  84. package/global-skills/skill-creator/references/workflows.md +0 -28
  85. package/global-skills/swarm-coordination/SKILL.md +0 -995
  86. package/global-skills/swarm-coordination/references/coordinator-patterns.md +0 -235
  87. package/global-skills/swarm-coordination/references/strategies.md +0 -138
  88. package/global-skills/system-design/SKILL.md +0 -213
  89. package/global-skills/testing-patterns/SKILL.md +0 -430
  90. package/global-skills/testing-patterns/references/dependency-breaking-catalog.md +0 -586
  91. package/opencode-swarm-plugin-0.30.7.tgz +0 -0
  92. package/opencode-swarm-plugin-0.31.0.tgz +0 -0
  93. package/scripts/cleanup-test-memories.ts +0 -346
  94. package/scripts/init-skill.ts +0 -222
  95. package/scripts/migrate-unknown-sessions.ts +0 -349
  96. package/scripts/validate-skill.ts +0 -204
  97. package/src/agent-mail.ts +0 -1724
  98. package/src/anti-patterns.test.ts +0 -1167
  99. package/src/anti-patterns.ts +0 -448
  100. package/src/compaction-capture.integration.test.ts +0 -257
  101. package/src/compaction-hook.test.ts +0 -838
  102. package/src/compaction-hook.ts +0 -1204
  103. package/src/compaction-observability.integration.test.ts +0 -139
  104. package/src/compaction-observability.test.ts +0 -187
  105. package/src/compaction-observability.ts +0 -324
  106. package/src/compaction-prompt-scorers.test.ts +0 -475
  107. package/src/compaction-prompt-scoring.ts +0 -300
  108. package/src/dashboard.test.ts +0 -611
  109. package/src/dashboard.ts +0 -462
  110. package/src/error-enrichment.test.ts +0 -403
  111. package/src/error-enrichment.ts +0 -219
  112. package/src/eval-capture.test.ts +0 -1015
  113. package/src/eval-capture.ts +0 -929
  114. package/src/eval-gates.test.ts +0 -306
  115. package/src/eval-gates.ts +0 -218
  116. package/src/eval-history.test.ts +0 -508
  117. package/src/eval-history.ts +0 -214
  118. package/src/eval-learning.test.ts +0 -378
  119. package/src/eval-learning.ts +0 -360
  120. package/src/eval-runner.test.ts +0 -223
  121. package/src/eval-runner.ts +0 -402
  122. package/src/export-tools.test.ts +0 -476
  123. package/src/export-tools.ts +0 -257
  124. package/src/hive.integration.test.ts +0 -2241
  125. package/src/hive.ts +0 -1628
  126. package/src/index.ts +0 -935
  127. package/src/learning.integration.test.ts +0 -1815
  128. package/src/learning.ts +0 -1079
  129. package/src/logger.test.ts +0 -189
  130. package/src/logger.ts +0 -135
  131. package/src/mandate-promotion.test.ts +0 -473
  132. package/src/mandate-promotion.ts +0 -239
  133. package/src/mandate-storage.integration.test.ts +0 -601
  134. package/src/mandate-storage.test.ts +0 -578
  135. package/src/mandate-storage.ts +0 -794
  136. package/src/mandates.ts +0 -540
  137. package/src/memory-tools.test.ts +0 -195
  138. package/src/memory-tools.ts +0 -344
  139. package/src/memory.integration.test.ts +0 -334
  140. package/src/memory.test.ts +0 -158
  141. package/src/memory.ts +0 -527
  142. package/src/model-selection.test.ts +0 -188
  143. package/src/model-selection.ts +0 -68
  144. package/src/observability-tools.test.ts +0 -359
  145. package/src/observability-tools.ts +0 -871
  146. package/src/output-guardrails.test.ts +0 -438
  147. package/src/output-guardrails.ts +0 -381
  148. package/src/pattern-maturity.test.ts +0 -1160
  149. package/src/pattern-maturity.ts +0 -525
  150. package/src/planning-guardrails.test.ts +0 -491
  151. package/src/planning-guardrails.ts +0 -438
  152. package/src/plugin.ts +0 -23
  153. package/src/post-compaction-tracker.test.ts +0 -251
  154. package/src/post-compaction-tracker.ts +0 -237
  155. package/src/query-tools.test.ts +0 -636
  156. package/src/query-tools.ts +0 -324
  157. package/src/rate-limiter.integration.test.ts +0 -466
  158. package/src/rate-limiter.ts +0 -774
  159. package/src/replay-tools.test.ts +0 -496
  160. package/src/replay-tools.ts +0 -240
  161. package/src/repo-crawl.integration.test.ts +0 -441
  162. package/src/repo-crawl.ts +0 -610
  163. package/src/schemas/cell-events.test.ts +0 -347
  164. package/src/schemas/cell-events.ts +0 -807
  165. package/src/schemas/cell.ts +0 -257
  166. package/src/schemas/evaluation.ts +0 -166
  167. package/src/schemas/index.test.ts +0 -199
  168. package/src/schemas/index.ts +0 -286
  169. package/src/schemas/mandate.ts +0 -232
  170. package/src/schemas/swarm-context.ts +0 -115
  171. package/src/schemas/task.ts +0 -161
  172. package/src/schemas/worker-handoff.test.ts +0 -302
  173. package/src/schemas/worker-handoff.ts +0 -131
  174. package/src/skills.integration.test.ts +0 -1192
  175. package/src/skills.test.ts +0 -643
  176. package/src/skills.ts +0 -1549
  177. package/src/storage.integration.test.ts +0 -341
  178. package/src/storage.ts +0 -884
  179. package/src/structured.integration.test.ts +0 -817
  180. package/src/structured.test.ts +0 -1046
  181. package/src/structured.ts +0 -762
  182. package/src/swarm-decompose.test.ts +0 -188
  183. package/src/swarm-decompose.ts +0 -1302
  184. package/src/swarm-deferred.integration.test.ts +0 -157
  185. package/src/swarm-deferred.test.ts +0 -38
  186. package/src/swarm-insights.test.ts +0 -214
  187. package/src/swarm-insights.ts +0 -459
  188. package/src/swarm-mail.integration.test.ts +0 -970
  189. package/src/swarm-mail.ts +0 -739
  190. package/src/swarm-orchestrate.integration.test.ts +0 -282
  191. package/src/swarm-orchestrate.test.ts +0 -548
  192. package/src/swarm-orchestrate.ts +0 -3084
  193. package/src/swarm-prompts.test.ts +0 -1270
  194. package/src/swarm-prompts.ts +0 -2077
  195. package/src/swarm-research.integration.test.ts +0 -701
  196. package/src/swarm-research.test.ts +0 -698
  197. package/src/swarm-research.ts +0 -472
  198. package/src/swarm-review.integration.test.ts +0 -285
  199. package/src/swarm-review.test.ts +0 -879
  200. package/src/swarm-review.ts +0 -709
  201. package/src/swarm-strategies.ts +0 -407
  202. package/src/swarm-worktree.test.ts +0 -501
  203. package/src/swarm-worktree.ts +0 -575
  204. package/src/swarm.integration.test.ts +0 -2377
  205. package/src/swarm.ts +0 -38
  206. package/src/tool-adapter.integration.test.ts +0 -1221
  207. package/src/tool-availability.ts +0 -461
  208. package/tsconfig.json +0 -28
@@ -1,483 +0,0 @@
1
- {
2
- "meta": {
3
- "generated": "2025-12-25",
4
- "agent": "CalmLake",
5
- "cell": "opencode-swarm-plugin--ys7z8-mjlk7jstvch",
6
- "epic": "opencode-swarm-plugin--ys7z8-mjlk7js9bt1",
7
- "source_reports": [
8
- "evals/ARCHITECTURE.md",
9
- ".hive/analysis/eval-failure-analysis-2025-12-25.md",
10
- ".hive/analysis/session-data-quality-audit.md",
11
- "SCORER-ANALYSIS.md"
12
- ],
13
- "synthesis_date": "2025-12-25T19:00:00Z"
14
- },
15
- "executive_summary": {
16
- "status": "GOOD_WITH_TACTICAL_ISSUES",
17
- "overall_assessment": "Eval infrastructure is well-designed at the macro level with clean pipeline (CAPTURE → STORE → LOAD → EVAL → GATE → LEARN) but has tactical issues impacting usability. The 'failures' are actually code bugs, not systemic problems.",
18
- "key_strengths": [
19
- "Progressive gates prevent premature failures",
20
- "Real data integration grounds evals in reality",
21
- "Type-safe Zod schemas prevent garbage data",
22
- "Learning loop closes feedback cycle",
23
- "Clear separation of concerns (loaders, scorers, evals)"
24
- ],
25
- "critical_findings": [
26
- {
27
- "issue": "Two eval bugs causing false failures",
28
- "impact": "example.eval.ts at 0%, compaction-prompt at 53% (both fixable)",
29
- "priority": "P0"
30
- },
31
- {
32
- "issue": "4 unused scorers (250 LOC dead code)",
33
- "impact": "38% of coordinator-discipline.ts wasted, misleading coverage",
34
- "priority": "P0"
35
- },
36
- {
37
- "issue": "Data loader abstraction leak",
38
- "impact": "Hard to test, hard to extend, tight coupling",
39
- "priority": "P1"
40
- },
41
- {
42
- "issue": "No scorer versioning",
43
- "impact": "Can't improve scorers without breaking history",
44
- "priority": "P1"
45
- },
46
- {
47
- "issue": "Session filter too strict (2.9% pass rate)",
48
- "impact": "Most coordinator behavior invisible to evals",
49
- "priority": "P1"
50
- },
51
- {
52
- "issue": "LLM-as-judge has no budget controls",
53
- "impact": "Unbounded cost, network failures break evals",
54
- "priority": "P2"
55
- }
56
- ],
57
- "data_quality": "EXCELLENT",
58
- "data_quality_note": "The 3 passing coordinator sessions are gold-standard (6-9 hours, 20-24 worker spawns, 0 violations). High filter rate is by design, not poor data."
59
- },
60
- "recommendations": {
61
- "immediate_p0": [
62
- {
63
- "id": "REC-001",
64
- "title": "Fix example.eval.ts data/task mismatch",
65
- "issue": "Eval provides CellTree in data.output but task returns input string unchanged. Scorer receives 'Test task' string instead of JSON.",
66
- "source": "eval-failure-analysis",
67
- "effort": "5 minutes",
68
- "impact": "HIGH",
69
- "fix": "Remove output from data(), make task() return JSON.stringify(input) of CellTree",
70
- "files": ["evals/example.eval.ts"],
71
- "expected_outcome": "0% → 100% on example.eval.ts",
72
- "code_snippet": "task: async (input) => JSON.stringify(input)"
73
- },
74
- {
75
- "id": "REC-002",
76
- "title": "Make forbidden tools scorer case-insensitive",
77
- "issue": "Scorer checks /\\bEdit\\b/ but fixtures use 'edit' (lowercase). Zero matches on perfect fixture.",
78
- "source": "eval-failure-analysis",
79
- "effort": "5 minutes",
80
- "impact": "HIGH",
81
- "fix": "Add 'i' flag to all forbiddenTools regexes: /\\bedit\\b/i, /\\bwrite\\b/i",
82
- "files": ["src/compaction-prompt-scoring.ts:213-218"],
83
- "expected_outcome": "compaction-prompt: 53% → 70-80%",
84
- "code_snippet": "const forbiddenTools = [/\\bedit\\b/i, /\\bwrite\\b/i, /\\bbash\\b/i, /swarmmail_reserve/i, /git commit/i];"
85
- },
86
- {
87
- "id": "REC-003",
88
- "title": "Add missing forbidden tools to fixtures",
89
- "issue": "Fixtures mention 'edit, write, bash' but scorer checks 'Edit, Write, swarmmail_reserve, git commit'. Missing 2/5 tools.",
90
- "source": "eval-failure-analysis",
91
- "effort": "10 minutes",
92
- "impact": "MEDIUM",
93
- "fix": "Update all fixtures to include swarmmail_reserve and git commit in forbidden tools list",
94
- "files": ["evals/fixtures/compaction-prompt-cases.ts"],
95
- "expected_outcome": "Full tool coverage in compaction-prompt eval",
96
- "note": "Combine with REC-002 for maximum impact"
97
- },
98
- {
99
- "id": "REC-004",
100
- "title": "Remove or integrate 4 unused scorers",
101
- "issue": "researcherSpawnRate, skillLoadingRate, inboxMonitoringRate, blockerResponseTime defined but never used in any eval",
102
- "source": "scorer-analysis",
103
- "effort": "30 minutes (remove) OR 2 hours (integrate)",
104
- "impact": "MEDIUM",
105
- "fix_option_1": "Delete scorers + tests, update exports (recommended)",
106
- "fix_option_2": "Add to coordinator-session.eval.ts scorers array, tune weights",
107
- "files": ["evals/scorers/coordinator-discipline.ts:345-588", "evals/coordinator-session.eval.ts"],
108
- "expected_outcome": "Remove 250 LOC dead code OR expand coordinator metrics",
109
- "recommendation": "Remove - current 5-scorer set is sufficient for protocol adherence"
110
- }
111
- ],
112
- "high_priority_p1": [
113
- {
114
- "id": "REC-005",
115
- "title": "Relax default session filters",
116
- "issue": "Only 3/102 sessions (2.9%) pass strict filters. 97% filtered out are workers (expected) but also filters partial coordinator sessions.",
117
- "source": "session-data-quality-audit",
118
- "effort": "15 minutes",
119
- "impact": "HIGH",
120
- "fix": "Change defaults from {requireWorkerSpawn: true, requireReview: true} to {requireWorkerSpawn: false, requireReview: false}",
121
- "files": ["evals/lib/data-loader.ts"],
122
- "expected_outcome": "3 → ~28 sessions passing (27.5% pass rate)",
123
- "rationale": "Captures early-stage coordinator behavior, still filters worker-only sessions",
124
- "migration_path": "Add tiered filter presets: 'strict', 'moderate', 'lenient'"
125
- },
126
- {
127
- "id": "REC-006",
128
- "title": "Add session type detection filter",
129
- "issue": "70/102 sessions are worker completions (OUTCOME/subtask_success), not coordinator sessions. Need automatic exclusion.",
130
- "source": "session-data-quality-audit",
131
- "effort": "30 minutes",
132
- "impact": "HIGH",
133
- "fix": "Add isCoordinatorSession() filter that checks for DECISION events (decomposition_complete, worker_spawned, strategy_selected)",
134
- "files": ["evals/lib/data-loader.ts"],
135
- "expected_outcome": "Automatically filters worker-only sessions before quality criteria applied",
136
- "code_snippet": "function isCoordinatorSession(s: CoordinatorSession): boolean { return s.events.some(e => e.event_type === 'DECISION'); }"
137
- },
138
- {
139
- "id": "REC-007",
140
- "title": "Extract data source interface (EvalSource<T>)",
141
- "issue": "data-loader.ts knows about PGlite internals AND JSONL format. Violates single-responsibility.",
142
- "source": "architecture",
143
- "effort": "4-6 hours",
144
- "impact": "MEDIUM",
145
- "fix": "Create EvalSource interface, implement PGliteSource, JsonlSessionSource, FixtureSource adapters",
146
- "files": ["evals/lib/data-loader.ts", "evals/lib/sources/"],
147
- "expected_outcome": "Easier to test (mock sources), easier to extend (add CSV/S3 sources), explicit fallback strategy",
148
- "benefits": [
149
- "Sources testable in isolation",
150
- "Easy to add new sources (S3, API, CSV)",
151
- "Explicit fallback strategy (not hardcoded)",
152
- "Reduced coupling to storage format"
153
- ]
154
- },
155
- {
156
- "id": "REC-008",
157
- "title": "Add scorer versioning",
158
- "issue": "Scorer logic changes invalidate historical comparisons. Can't tell if score drop is regression or stricter scoring.",
159
- "source": "architecture",
160
- "effort": "3-4 hours",
161
- "impact": "HIGH",
162
- "fix": "Add version field to scorer metadata, track versions in eval history, filter baseline to compatible runs only",
163
- "files": ["evals/scorers/*.ts", "src/eval-gates.ts", "src/eval-history.ts"],
164
- "expected_outcome": "Can improve scorers without breaking history, clear attribution of score changes, A/B test new scorers",
165
- "schema_change": "interface EvalRunRecord { scorer_versions: Record<string, string> }"
166
- },
167
- {
168
- "id": "REC-009",
169
- "title": "Make session filters first-class and composable",
170
- "issue": "Quality criteria hardcoded in loader, can't experiment with different filter profiles",
171
- "source": "architecture",
172
- "effort": "2-3 hours",
173
- "impact": "MEDIUM",
174
- "fix": "Extract SessionFilter type, create filter library (minEvents, requireWorkerSpawn, etc.), use compose() at call site",
175
- "files": ["evals/lib/data-loader.ts", "evals/lib/filters.ts"],
176
- "expected_outcome": "Caller controls filtering (explicit, testable), easy to add new filters, can test partial compliance",
177
- "code_snippet": "const filter = filters.compose(filters.minEvents(3), filters.requireWorkerSpawn); const sessions = await load({ filter });"
178
- },
179
- {
180
- "id": "REC-010",
181
- "title": "Document weight rationale for composite scorers",
182
- "issue": "overallDiscipline, compactionQuality, overallCoordinatorBehavior have different weight distributions but no documented WHY",
183
- "source": "scorer-analysis",
184
- "effort": "30 minutes",
185
- "impact": "LOW",
186
- "fix": "Add comments explaining weight choices (based on failure impact, domain priorities)",
187
- "files": ["evals/scorers/coordinator-discipline.ts", "evals/scorers/compaction-scorers.ts", "evals/coordinator-behavior.eval.ts"],
188
- "expected_outcome": "Maintainers understand weight rationale, easier to tune in future",
189
- "example": "// Violations (30%): Breaking protocol causes immediate harm\n// Spawn (25%): Delegation is core coordinator job"
190
- }
191
- ],
192
- "medium_priority_p2": [
193
- {
194
- "id": "REC-011",
195
- "title": "Add LLM judge budget enforcement",
196
- "issue": "decompositionCoherence calls Claude for every test case. No cost controls, network failures fail entire eval.",
197
- "source": "architecture",
198
- "effort": "2-3 hours",
199
- "impact": "MEDIUM",
200
- "fix": "Add JUDGE_BUDGET {maxCalls, maxCost, maxLatency}, track usage, return fallback score on budget exhaustion",
201
- "files": ["evals/lib/llm.ts", "evals/scorers/index.ts"],
202
- "expected_outcome": "Predictable costs, graceful degradation on LLM failure, fast CI runs",
203
- "budget_suggestion": "maxCalls: 100, maxCost: 1.00 USD, maxLatency: 5000ms"
204
- },
205
- {
206
- "id": "REC-012",
207
- "title": "Improve baseline calculation (EMA, trimmed mean)",
208
- "issue": "Simple mean of all scores. Early bad runs drag down baseline forever. No time-based decay.",
209
- "source": "architecture",
210
- "effort": "3-4 hours",
211
- "impact": "MEDIUM",
212
- "fix": "Implement exponential moving average (EMA), trimmed mean, median strategies. Make baseline strategy configurable per eval.",
213
- "files": ["src/eval-gates.ts"],
214
- "expected_outcome": "Baseline adapts to improvements, robust to outliers, configurable per eval needs",
215
- "strategies": ["mean", "ema", "trimmed-mean", "median"]
216
- },
217
- {
218
- "id": "REC-013",
219
- "title": "Validate and document normalization thresholds",
220
- "issue": "timeToFirstSpawn uses EXCELLENT_MS=60s, POOR_MS=300s with no evidence these match reality. blockerResponseTime similar.",
221
- "source": "scorer-analysis",
222
- "effort": "2-3 hours (data gathering) + 1 hour (docs)",
223
- "impact": "LOW",
224
- "fix": "Gather real coordinator session data, plot distribution of spawn/response times, validate or adjust thresholds, document rationale",
225
- "files": ["evals/scorers/coordinator-discipline.ts"],
226
- "expected_outcome": "Evidence-based thresholds, documented assumptions, reproducible calibration process",
227
- "method": "Run 20+ real coordinator sessions, calculate percentiles (p50, p95), use for normalization"
228
- },
229
- {
230
- "id": "REC-014",
231
- "title": "Add LLM retry logic and response caching",
232
- "issue": "Single LLM call, no fallback on failure. No caching - repeated eval runs re-generate same decompositions.",
233
- "source": "architecture",
234
- "effort": "2-3 hours",
235
- "impact": "LOW",
236
- "fix": "Add exponential backoff retry wrapper, implement hash-based response cache (prompt → cached result)",
237
- "files": ["evals/lib/llm.ts"],
238
- "expected_outcome": "Resilient to network errors, faster repeat eval runs, reduced API costs",
239
- "cache_key": "hash(prompt + model) → cache.get() || generateText()"
240
- },
241
- {
242
- "id": "REC-015",
243
- "title": "Clarify reviewEfficiency vs reviewThoroughness relationship",
244
- "issue": "Both measure review behavior but can contradict (4 reviews / 2 workers = thorough 100%, efficient 50%)",
245
- "source": "scorer-analysis",
246
- "effort": "30 minutes",
247
- "impact": "LOW",
248
- "fix": "Add docstring explaining: thoroughness=quality gate (did they review?), efficiency=resource optimization (not over-reviewing)",
249
- "files": ["evals/scorers/coordinator-discipline.ts"],
250
- "expected_outcome": "Clear documentation of intentional complementary metrics",
251
- "future_enhancement": "Consider composite reviewQuality scorer balancing both (1:1 ratio = perfect)"
252
- },
253
- {
254
- "id": "REC-016",
255
- "title": "Add characterization tests for outcome scorers",
256
- "issue": "outcome-scorers.ts only has export verification tests, no unit tests for scoring logic",
257
- "source": "scorer-analysis",
258
- "effort": "2-3 hours",
259
- "impact": "LOW",
260
- "fix": "Add snapshot tests with known inputs: test('scopeAccuracy known input', () => { expect(result.score).toMatchSnapshot(); })",
261
- "files": ["evals/scorers/outcome-scorers.test.ts"],
262
- "expected_outcome": "Easier to debug scorer failures, catch regressions in scoring logic",
263
- "note": "Currently outcome scorers not used in any eval (waiting for real execution data)"
264
- }
265
- ],
266
- "long_term_p3": [
267
- {
268
- "id": "REC-017",
269
- "title": "Complete learning loop (retrieval integration)",
270
- "issue": "eval-learning.ts stores failures to semantic memory but never queries before eval runs",
271
- "source": "architecture",
272
- "effort": "4-6 hours",
273
- "impact": "HIGH",
274
- "fix": "Add queryEvalFailures() before prompt generation, inject past failures into LLM context with 'Avoid these patterns'",
275
- "files": ["src/eval-learning.ts", "evals/lib/llm.ts", "src/swarm-prompts.ts"],
276
- "expected_outcome": "LLM learns from past failures, avoids repeated mistakes, self-improving system",
277
- "integration_point": "Before generateDecomposition(), query semantic memory, append failures to prompt"
278
- },
279
- {
280
- "id": "REC-018",
281
- "title": "Add failure analysis and diff tooling",
282
- "issue": "Learning stores 'score dropped' but not WHY. No test case diff, no scorer output comparison.",
283
- "source": "architecture",
284
- "effort": "6-8 hours",
285
- "impact": "MEDIUM",
286
- "fix": "Implement analyzeFailure() to diff scorer outputs between runs, identify which test cases regressed, surface root cause signals",
287
- "files": ["src/eval-learning.ts", "src/eval-gates.ts"],
288
- "expected_outcome": "Automated root cause attribution, faster debugging, better semantic memory context",
289
- "output_format": "Which scorer dropped? Which test cases? What changed in code?"
290
- },
291
- {
292
- "id": "REC-019",
293
- "title": "Add CI/PR integration hooks",
294
- "issue": "Gates check but don't post results. No GitHub PR comments, no merge blocking.",
295
- "source": "architecture",
296
- "effort": "4-6 hours",
297
- "impact": "MEDIUM",
298
- "fix": "Implement postGateResultToGitHub() to comment on PRs with eval results, add merge protection rules",
299
- "files": ["src/eval-gates.ts", ".github/workflows/"],
300
- "expected_outcome": "Visible quality signals in PRs, automated merge protection, team awareness of regressions",
301
- "example": "✅ Evals passing (coordinator-session: 85%, swarm-decomposition: 78%)"
302
- },
303
- {
304
- "id": "REC-020",
305
- "title": "Performance optimization (parallel LLM, indexing)",
306
- "issue": "LLM evals slow (60-100s for 20 cases), JSONL parsing is linear scan",
307
- "source": "architecture",
308
- "effort": "6-8 hours",
309
- "impact": "MEDIUM",
310
- "fix": "Parallel LLM calls (10 concurrent = 10x faster), SQLite index on session_id/epic_id, incremental eval runs (only changed cases)",
311
- "files": ["evals/lib/llm.ts", "evals/lib/data-loader.ts", "evals/lib/compaction-loader.ts"],
312
- "expected_outcome": "Faster eval runs (60s → 10s), faster data loading, reduced CI time",
313
- "optimizations": ["Promise.all() for LLM calls", "SQLite FTS index", "git diff → affected evals"]
314
- },
315
- {
316
- "id": "REC-021",
317
- "title": "Add eval parameterization support",
318
- "issue": "Can't run same eval with different configs (max_subtasks=4 vs 8). Must copy-paste eval file.",
319
- "source": "architecture",
320
- "effort": "4-6 hours",
321
- "impact": "LOW",
322
- "fix": "Add evalite.parameterize() wrapper to test multiple config combinations in single eval file",
323
- "files": ["evals/swarm-decomposition.eval.ts", "evals/coordinator-session.eval.ts"],
324
- "expected_outcome": "DRY eval definitions, grid search optimal params, side-by-side strategy comparison",
325
- "example": "params: [{maxSubtasks: 4, strategy: 'file-based'}, {maxSubtasks: 8, strategy: 'feature-based'}]"
326
- },
327
- {
328
- "id": "REC-022",
329
- "title": "Add observability (dashboards, traces, cost tracking)",
330
- "issue": "No visibility into eval run performance, LLM costs, or score trends over time",
331
- "source": "architecture",
332
- "effort": "8-12 hours",
333
- "impact": "LOW",
334
- "fix": "Integrate Grafana + Prometheus for score dashboards, OpenTelemetry for trace collection, track LLM API costs",
335
- "files": ["src/eval-runner.ts", "src/observability/"],
336
- "expected_outcome": "Real-time eval health visibility, cost accountability, performance regression detection",
337
- "metrics": ["eval_run_duration", "llm_calls_total", "llm_cost_usd", "eval_score_gauge"]
338
- }
339
- ]
340
- },
341
- "current_scores": {
342
- "compaction-prompt": {
343
- "score": "53%",
344
- "status": "DEGRADED",
345
- "target": "70-80% (after REC-002, REC-003)",
346
- "blocker": "Case-sensitive regex + missing tools"
347
- },
348
- "example": {
349
- "score": "0%",
350
- "status": "BROKEN",
351
- "target": "100% (after REC-001)",
352
- "blocker": "Data/task structure mismatch"
353
- },
354
- "coordinator-session": {
355
- "score": "66%",
356
- "status": "FAIR",
357
- "target": "75-85% (after filter tuning)",
358
- "note": "Only 3/102 sessions passing strict filter (by design)"
359
- },
360
- "coordinator-behavior": {
361
- "score": "77%",
362
- "status": "GOOD",
363
- "target": "80-90%",
364
- "note": "Stable, no immediate issues"
365
- },
366
- "swarm-decomposition": {
367
- "score": "70%",
368
- "status": "GOOD",
369
- "target": "75-85%",
370
- "note": "LLM variance expected"
371
- },
372
- "compaction-resumption": {
373
- "score": "93%",
374
- "status": "EXCELLENT",
375
- "target": "90-95%",
376
- "note": "Well-calibrated"
377
- }
378
- },
379
- "implementation_roadmap": {
380
- "sprint_1_quick_wins": {
381
- "duration": "1-2 days",
382
- "goal": "Fix broken evals, remove dead code",
383
- "tasks": ["REC-001", "REC-002", "REC-003", "REC-004"],
384
- "expected_outcome": "example.eval.ts: 0% → 100%, compaction-prompt: 53% → 70-80%, remove 250 LOC dead code"
385
- },
386
- "sprint_2_foundation": {
387
- "duration": "1-2 weeks",
388
- "goal": "Improve data quality, add versioning",
389
- "tasks": ["REC-005", "REC-006", "REC-007", "REC-008", "REC-009", "REC-010"],
390
- "expected_outcome": "Session pass rate: 2.9% → 27.5%, scorer versioning enabled, cleaner abstractions"
391
- },
392
- "sprint_3_robustness": {
393
- "duration": "2-3 weeks",
394
- "goal": "Add reliability and observability",
395
- "tasks": ["REC-011", "REC-012", "REC-013", "REC-014", "REC-015", "REC-016"],
396
- "expected_outcome": "Budget controls, better baselines, documented thresholds, LLM resilience"
397
- },
398
- "sprint_4_intelligence": {
399
- "duration": "3-4 weeks",
400
- "goal": "Close learning loop, add CI integration",
401
- "tasks": ["REC-017", "REC-018", "REC-019"],
402
- "expected_outcome": "Self-improving evals via memory retrieval, automated PR feedback, root cause analysis"
403
- },
404
- "sprint_5_scale": {
405
- "duration": "4-6 weeks",
406
- "goal": "Optimize performance, add advanced features",
407
- "tasks": ["REC-020", "REC-021", "REC-022"],
408
- "expected_outcome": "10x faster eval runs, parameterized evals, production observability"
409
- }
410
- },
411
- "risk_assessment": {
412
- "high_risk": [
413
- {
414
- "area": "Scorer versioning (REC-008)",
415
- "risk": "Schema changes could break existing eval history",
416
- "mitigation": "Add migration script, test with copy of production data first"
417
- },
418
- {
419
- "area": "Data source refactor (REC-007)",
420
- "risk": "Large refactor could introduce regressions",
421
- "mitigation": "TDD approach, extract interface first, migrate one source at a time"
422
- }
423
- ],
424
- "medium_risk": [
425
- {
426
- "area": "Filter defaults change (REC-005)",
427
- "risk": "Changing defaults could break existing eval expectations",
428
- "mitigation": "Add preset system ('strict', 'moderate', 'lenient'), document migration"
429
- },
430
- {
431
- "area": "LLM judge budget (REC-011)",
432
- "risk": "Budget enforcement could cause eval failures if too strict",
433
- "mitigation": "Start with generous budget, tune down based on real usage"
434
- }
435
- ],
436
- "low_risk": [
437
- {
438
- "area": "Documentation improvements (REC-010, REC-015)",
439
- "risk": "Minimal risk, pure documentation",
440
- "mitigation": "None needed"
441
- },
442
- {
443
- "area": "Quick fixes (REC-001, REC-002, REC-003)",
444
- "risk": "Small code changes, easy to revert",
445
- "mitigation": "Test with existing fixtures first"
446
- }
447
- ]
448
- },
449
- "success_metrics": {
450
- "immediate": {
451
- "example_eval_score": "0% → 100%",
452
- "compaction_prompt_score": "53% → 70-80%",
453
- "dead_code_removed": "250 LOC",
454
- "test_coverage": "Maintained at current levels"
455
- },
456
- "short_term": {
457
- "session_pass_rate": "2.9% → 27.5%",
458
- "scorer_versioning": "Implemented and tracked",
459
- "abstraction_quality": "3 source adapters (PGlite, JSONL, Fixture)",
460
- "documentation_completeness": "All composite scorers have weight rationale"
461
- },
462
- "long_term": {
463
- "eval_run_time": "60s → 10s (6x improvement)",
464
- "llm_cost_predictability": "Budget enforcement at $1.00/run",
465
- "ci_integration": "GitHub PR comments with eval results",
466
- "learning_loop_closed": "Past failures injected into prompts"
467
- }
468
- },
469
- "quotes_from_literature": {
470
- "on_abstraction": "\"Deep modules provide powerful functionality yet have simple interfaces.\" - John Ousterhout, A Philosophy of Software Design (applies to REC-007 EvalSource interface)",
471
- "on_testing": "\"Tests are the documentation that never lies.\" - Kent Beck (applies to REC-016 characterization tests)",
472
- "on_refactoring": "\"Make the change easy, then make the easy change.\" - Kent Beck (applies to REC-007 data source refactor)",
473
- "on_measurement": "\"You can't manage what you don't measure.\" - Peter Drucker (applies to REC-022 observability)"
474
- },
475
- "conclusion": {
476
- "overall_health": "GOOD",
477
- "confidence": "HIGH",
478
- "summary": "The eval infrastructure is architecturally sound with clean pipeline design and progressive quality gates. Current 'failures' are tactical code bugs (case sensitivity, data/task mismatch) that are easily fixable. The 2.9% session pass rate is by design - filtering for gold-standard complete coordinator cycles. The 3 passing sessions are excellent examples with 20-24 worker spawns and 0 violations.",
479
- "priority_order": "Fix eval bugs first (REC-001, REC-002, REC-003), then remove dead code (REC-004), then improve abstractions (REC-005 through REC-010). Long-term items (learning loop, CI integration, performance) can be tackled incrementally.",
480
- "estimated_total_effort": "80-120 hours across 5 sprints",
481
- "next_immediate_action": "Start with Sprint 1 quick wins (1-2 days) to unblock eval scoring and remove dead code."
482
- }
483
- }