swarm-engine 1.0.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 (431) hide show
  1. package/AGENTS.md +72 -0
  2. package/CLAUDE.md +89 -0
  3. package/LICENSE +21 -0
  4. package/README.md +235 -0
  5. package/agents/accessibility-reviewer.md +118 -0
  6. package/agents/api-contract-reviewer.md +99 -0
  7. package/agents/concurrency-reviewer.md +111 -0
  8. package/agents/data-integrity-reviewer.md +103 -0
  9. package/agents/debugger.md +99 -0
  10. package/agents/dependency-reviewer.md +115 -0
  11. package/agents/devils-advocate.md +94 -0
  12. package/agents/documentation-reviewer.md +114 -0
  13. package/agents/documenter.md +78 -0
  14. package/agents/error-handling-reviewer.md +113 -0
  15. package/agents/grounding.md +99 -0
  16. package/agents/guardian.md +87 -0
  17. package/agents/implementer.md +141 -0
  18. package/agents/integrator.md +95 -0
  19. package/agents/judge.md +79 -0
  20. package/agents/librarian.md +90 -0
  21. package/agents/orchestrator.md +331 -0
  22. package/agents/performance-reviewer.md +93 -0
  23. package/agents/planner.md +106 -0
  24. package/agents/refactorer.md +92 -0
  25. package/agents/researcher.md +97 -0
  26. package/agents/reviewer.md +117 -0
  27. package/agents/security-reviewer.md +107 -0
  28. package/agents/sentinel.md +92 -0
  29. package/agents/tester.md +93 -0
  30. package/agents/testing-reviewer.md +112 -0
  31. package/commands/diff-review.md +64 -0
  32. package/commands/fix-pr.md +78 -0
  33. package/commands/red-team.md +82 -0
  34. package/commands/research.md +59 -0
  35. package/commands/resume.md +80 -0
  36. package/commands/review-cycle.md +123 -0
  37. package/commands/swarm-setup.md +28 -0
  38. package/commands/swarm.md +126 -0
  39. package/commands/tdd.md +91 -0
  40. package/dist/cli/bin.d.ts +3 -0
  41. package/dist/cli/bin.d.ts.map +1 -0
  42. package/dist/cli/bin.js +3 -0
  43. package/dist/cli/bin.js.map +1 -0
  44. package/dist/cli/commands/acp.d.ts +3 -0
  45. package/dist/cli/commands/acp.d.ts.map +1 -0
  46. package/dist/cli/commands/acp.js +29 -0
  47. package/dist/cli/commands/acp.js.map +1 -0
  48. package/dist/cli/commands/agents.d.ts +3 -0
  49. package/dist/cli/commands/agents.d.ts.map +1 -0
  50. package/dist/cli/commands/agents.js +344 -0
  51. package/dist/cli/commands/agents.js.map +1 -0
  52. package/dist/cli/commands/backends.d.ts +3 -0
  53. package/dist/cli/commands/backends.d.ts.map +1 -0
  54. package/dist/cli/commands/backends.js +22 -0
  55. package/dist/cli/commands/backends.js.map +1 -0
  56. package/dist/cli/commands/completions.d.ts +3 -0
  57. package/dist/cli/commands/completions.d.ts.map +1 -0
  58. package/dist/cli/commands/completions.js +85 -0
  59. package/dist/cli/commands/completions.js.map +1 -0
  60. package/dist/cli/commands/compound.d.ts +3 -0
  61. package/dist/cli/commands/compound.d.ts.map +1 -0
  62. package/dist/cli/commands/compound.js +119 -0
  63. package/dist/cli/commands/compound.js.map +1 -0
  64. package/dist/cli/commands/configure.d.ts +3 -0
  65. package/dist/cli/commands/configure.d.ts.map +1 -0
  66. package/dist/cli/commands/configure.js +151 -0
  67. package/dist/cli/commands/configure.js.map +1 -0
  68. package/dist/cli/commands/convert.d.ts +15 -0
  69. package/dist/cli/commands/convert.d.ts.map +1 -0
  70. package/dist/cli/commands/convert.js +218 -0
  71. package/dist/cli/commands/convert.js.map +1 -0
  72. package/dist/cli/commands/doctor.d.ts +3 -0
  73. package/dist/cli/commands/doctor.d.ts.map +1 -0
  74. package/dist/cli/commands/doctor.js +96 -0
  75. package/dist/cli/commands/doctor.js.map +1 -0
  76. package/dist/cli/commands/init.d.ts +3 -0
  77. package/dist/cli/commands/init.d.ts.map +1 -0
  78. package/dist/cli/commands/init.js +154 -0
  79. package/dist/cli/commands/init.js.map +1 -0
  80. package/dist/cli/commands/learn.d.ts +3 -0
  81. package/dist/cli/commands/learn.d.ts.map +1 -0
  82. package/dist/cli/commands/learn.js +163 -0
  83. package/dist/cli/commands/learn.js.map +1 -0
  84. package/dist/cli/commands/mcp.d.ts +3 -0
  85. package/dist/cli/commands/mcp.d.ts.map +1 -0
  86. package/dist/cli/commands/mcp.js +89 -0
  87. package/dist/cli/commands/mcp.js.map +1 -0
  88. package/dist/cli/commands/memory.d.ts +3 -0
  89. package/dist/cli/commands/memory.d.ts.map +1 -0
  90. package/dist/cli/commands/memory.js +134 -0
  91. package/dist/cli/commands/memory.js.map +1 -0
  92. package/dist/cli/commands/orchestrate.d.ts +3 -0
  93. package/dist/cli/commands/orchestrate.d.ts.map +1 -0
  94. package/dist/cli/commands/orchestrate.js +237 -0
  95. package/dist/cli/commands/orchestrate.js.map +1 -0
  96. package/dist/cli/commands/patterns.d.ts +3 -0
  97. package/dist/cli/commands/patterns.d.ts.map +1 -0
  98. package/dist/cli/commands/patterns.js +25 -0
  99. package/dist/cli/commands/patterns.js.map +1 -0
  100. package/dist/cli/commands/plan.d.ts +3 -0
  101. package/dist/cli/commands/plan.d.ts.map +1 -0
  102. package/dist/cli/commands/plan.js +77 -0
  103. package/dist/cli/commands/plan.js.map +1 -0
  104. package/dist/cli/commands/plugin.d.ts +3 -0
  105. package/dist/cli/commands/plugin.d.ts.map +1 -0
  106. package/dist/cli/commands/plugin.js +124 -0
  107. package/dist/cli/commands/plugin.js.map +1 -0
  108. package/dist/cli/commands/resume.d.ts +3 -0
  109. package/dist/cli/commands/resume.d.ts.map +1 -0
  110. package/dist/cli/commands/resume.js +55 -0
  111. package/dist/cli/commands/resume.js.map +1 -0
  112. package/dist/cli/commands/run.d.ts +3 -0
  113. package/dist/cli/commands/run.d.ts.map +1 -0
  114. package/dist/cli/commands/run.js +78 -0
  115. package/dist/cli/commands/run.js.map +1 -0
  116. package/dist/cli/commands/share.d.ts +3 -0
  117. package/dist/cli/commands/share.d.ts.map +1 -0
  118. package/dist/cli/commands/share.js +34 -0
  119. package/dist/cli/commands/share.js.map +1 -0
  120. package/dist/cli/commands/status.d.ts +3 -0
  121. package/dist/cli/commands/status.d.ts.map +1 -0
  122. package/dist/cli/commands/status.js +148 -0
  123. package/dist/cli/commands/status.js.map +1 -0
  124. package/dist/cli/commands/template.d.ts +3 -0
  125. package/dist/cli/commands/template.d.ts.map +1 -0
  126. package/dist/cli/commands/template.js +213 -0
  127. package/dist/cli/commands/template.js.map +1 -0
  128. package/dist/cli/commands/vault.d.ts +3 -0
  129. package/dist/cli/commands/vault.d.ts.map +1 -0
  130. package/dist/cli/commands/vault.js +402 -0
  131. package/dist/cli/commands/vault.js.map +1 -0
  132. package/dist/cli/commands/verify.d.ts +3 -0
  133. package/dist/cli/commands/verify.d.ts.map +1 -0
  134. package/dist/cli/commands/verify.js +38 -0
  135. package/dist/cli/commands/verify.js.map +1 -0
  136. package/dist/cli/commands/version.d.ts +3 -0
  137. package/dist/cli/commands/version.d.ts.map +1 -0
  138. package/dist/cli/commands/version.js +19 -0
  139. package/dist/cli/commands/version.js.map +1 -0
  140. package/dist/cli/commands/watch.d.ts +3 -0
  141. package/dist/cli/commands/watch.d.ts.map +1 -0
  142. package/dist/cli/commands/watch.js +179 -0
  143. package/dist/cli/commands/watch.js.map +1 -0
  144. package/dist/cli/index.d.ts +3 -0
  145. package/dist/cli/index.d.ts.map +1 -0
  146. package/dist/cli/index.js +118 -0
  147. package/dist/cli/index.js.map +1 -0
  148. package/dist/core/checkpoint.d.ts +35 -0
  149. package/dist/core/checkpoint.d.ts.map +1 -0
  150. package/dist/core/checkpoint.js +80 -0
  151. package/dist/core/checkpoint.js.map +1 -0
  152. package/dist/core/event-bus.d.ts +41 -0
  153. package/dist/core/event-bus.d.ts.map +1 -0
  154. package/dist/core/event-bus.js +115 -0
  155. package/dist/core/event-bus.js.map +1 -0
  156. package/dist/core/lifecycle.d.ts +30 -0
  157. package/dist/core/lifecycle.d.ts.map +1 -0
  158. package/dist/core/lifecycle.js +72 -0
  159. package/dist/core/lifecycle.js.map +1 -0
  160. package/dist/core/patterns.d.ts +43 -0
  161. package/dist/core/patterns.d.ts.map +1 -0
  162. package/dist/core/patterns.js +372 -0
  163. package/dist/core/patterns.js.map +1 -0
  164. package/dist/core/permissions.d.ts +40 -0
  165. package/dist/core/permissions.d.ts.map +1 -0
  166. package/dist/core/permissions.js +113 -0
  167. package/dist/core/permissions.js.map +1 -0
  168. package/dist/core/registry.d.ts +80 -0
  169. package/dist/core/registry.d.ts.map +1 -0
  170. package/dist/core/registry.js +308 -0
  171. package/dist/core/registry.js.map +1 -0
  172. package/dist/core/snapshots.d.ts +20 -0
  173. package/dist/core/snapshots.d.ts.map +1 -0
  174. package/dist/core/snapshots.js +73 -0
  175. package/dist/core/snapshots.js.map +1 -0
  176. package/dist/core/types.d.ts +168 -0
  177. package/dist/core/types.d.ts.map +1 -0
  178. package/dist/core/types.js +33 -0
  179. package/dist/core/types.js.map +1 -0
  180. package/dist/hooks/cli.d.ts +11 -0
  181. package/dist/hooks/cli.d.ts.map +1 -0
  182. package/dist/hooks/cli.js +32 -0
  183. package/dist/hooks/cli.js.map +1 -0
  184. package/dist/hooks/index.d.ts +23 -0
  185. package/dist/hooks/index.d.ts.map +1 -0
  186. package/dist/hooks/index.js +58 -0
  187. package/dist/hooks/index.js.map +1 -0
  188. package/dist/index.d.ts +82 -0
  189. package/dist/index.d.ts.map +1 -0
  190. package/dist/index.js +49 -0
  191. package/dist/index.js.map +1 -0
  192. package/dist/memory/index.d.ts +105 -0
  193. package/dist/memory/index.d.ts.map +1 -0
  194. package/dist/memory/index.js +298 -0
  195. package/dist/memory/index.js.map +1 -0
  196. package/dist/memory/schema.d.ts +6 -0
  197. package/dist/memory/schema.d.ts.map +1 -0
  198. package/dist/memory/schema.js +71 -0
  199. package/dist/memory/schema.js.map +1 -0
  200. package/dist/plugin/index.d.ts +6 -0
  201. package/dist/plugin/index.d.ts.map +1 -0
  202. package/dist/plugin/index.js +182 -0
  203. package/dist/plugin/index.js.map +1 -0
  204. package/dist/runtime/acp.d.ts +41 -0
  205. package/dist/runtime/acp.d.ts.map +1 -0
  206. package/dist/runtime/acp.js +137 -0
  207. package/dist/runtime/acp.js.map +1 -0
  208. package/dist/runtime/adaptive.d.ts +34 -0
  209. package/dist/runtime/adaptive.d.ts.map +1 -0
  210. package/dist/runtime/adaptive.js +229 -0
  211. package/dist/runtime/adaptive.js.map +1 -0
  212. package/dist/runtime/autonomy.d.ts +21 -0
  213. package/dist/runtime/autonomy.d.ts.map +1 -0
  214. package/dist/runtime/autonomy.js +74 -0
  215. package/dist/runtime/autonomy.js.map +1 -0
  216. package/dist/runtime/backends/claude.d.ts +9 -0
  217. package/dist/runtime/backends/claude.d.ts.map +1 -0
  218. package/dist/runtime/backends/claude.js +134 -0
  219. package/dist/runtime/backends/claude.js.map +1 -0
  220. package/dist/runtime/backends/codex.d.ts +9 -0
  221. package/dist/runtime/backends/codex.d.ts.map +1 -0
  222. package/dist/runtime/backends/codex.js +132 -0
  223. package/dist/runtime/backends/codex.js.map +1 -0
  224. package/dist/runtime/backends/gemini.d.ts +9 -0
  225. package/dist/runtime/backends/gemini.d.ts.map +1 -0
  226. package/dist/runtime/backends/gemini.js +103 -0
  227. package/dist/runtime/backends/gemini.js.map +1 -0
  228. package/dist/runtime/backends/index.d.ts +17 -0
  229. package/dist/runtime/backends/index.d.ts.map +1 -0
  230. package/dist/runtime/backends/index.js +39 -0
  231. package/dist/runtime/backends/index.js.map +1 -0
  232. package/dist/runtime/backends/mock.d.ts +21 -0
  233. package/dist/runtime/backends/mock.d.ts.map +1 -0
  234. package/dist/runtime/backends/mock.js +46 -0
  235. package/dist/runtime/backends/mock.js.map +1 -0
  236. package/dist/runtime/backends/types.d.ts +34 -0
  237. package/dist/runtime/backends/types.d.ts.map +1 -0
  238. package/dist/runtime/backends/types.js +2 -0
  239. package/dist/runtime/backends/types.js.map +1 -0
  240. package/dist/runtime/backends/vercel-ai.d.ts +14 -0
  241. package/dist/runtime/backends/vercel-ai.d.ts.map +1 -0
  242. package/dist/runtime/backends/vercel-ai.js +137 -0
  243. package/dist/runtime/backends/vercel-ai.js.map +1 -0
  244. package/dist/runtime/cache-optimizer.d.ts +37 -0
  245. package/dist/runtime/cache-optimizer.d.ts.map +1 -0
  246. package/dist/runtime/cache-optimizer.js +54 -0
  247. package/dist/runtime/cache-optimizer.js.map +1 -0
  248. package/dist/runtime/cascade.d.ts +26 -0
  249. package/dist/runtime/cascade.d.ts.map +1 -0
  250. package/dist/runtime/cascade.js +54 -0
  251. package/dist/runtime/cascade.js.map +1 -0
  252. package/dist/runtime/chunker.d.ts +36 -0
  253. package/dist/runtime/chunker.d.ts.map +1 -0
  254. package/dist/runtime/chunker.js +210 -0
  255. package/dist/runtime/chunker.js.map +1 -0
  256. package/dist/runtime/compaction.d.ts +22 -0
  257. package/dist/runtime/compaction.d.ts.map +1 -0
  258. package/dist/runtime/compaction.js +36 -0
  259. package/dist/runtime/compaction.js.map +1 -0
  260. package/dist/runtime/compounder.d.ts +66 -0
  261. package/dist/runtime/compounder.d.ts.map +1 -0
  262. package/dist/runtime/compounder.js +276 -0
  263. package/dist/runtime/compounder.js.map +1 -0
  264. package/dist/runtime/cost-model.d.ts +24 -0
  265. package/dist/runtime/cost-model.d.ts.map +1 -0
  266. package/dist/runtime/cost-model.js +120 -0
  267. package/dist/runtime/cost-model.js.map +1 -0
  268. package/dist/runtime/distiller.d.ts +21 -0
  269. package/dist/runtime/distiller.d.ts.map +1 -0
  270. package/dist/runtime/distiller.js +70 -0
  271. package/dist/runtime/distiller.js.map +1 -0
  272. package/dist/runtime/engine.d.ts +123 -0
  273. package/dist/runtime/engine.d.ts.map +1 -0
  274. package/dist/runtime/engine.js +969 -0
  275. package/dist/runtime/engine.js.map +1 -0
  276. package/dist/runtime/executor.d.ts +71 -0
  277. package/dist/runtime/executor.d.ts.map +1 -0
  278. package/dist/runtime/executor.js +283 -0
  279. package/dist/runtime/executor.js.map +1 -0
  280. package/dist/runtime/heuristics.d.ts +33 -0
  281. package/dist/runtime/heuristics.d.ts.map +1 -0
  282. package/dist/runtime/heuristics.js +188 -0
  283. package/dist/runtime/heuristics.js.map +1 -0
  284. package/dist/runtime/living-spec.d.ts +34 -0
  285. package/dist/runtime/living-spec.d.ts.map +1 -0
  286. package/dist/runtime/living-spec.js +91 -0
  287. package/dist/runtime/living-spec.js.map +1 -0
  288. package/dist/runtime/lsp.d.ts +50 -0
  289. package/dist/runtime/lsp.d.ts.map +1 -0
  290. package/dist/runtime/lsp.js +110 -0
  291. package/dist/runtime/lsp.js.map +1 -0
  292. package/dist/runtime/mcp.d.ts +27 -0
  293. package/dist/runtime/mcp.d.ts.map +1 -0
  294. package/dist/runtime/mcp.js +154 -0
  295. package/dist/runtime/mcp.js.map +1 -0
  296. package/dist/runtime/model-router.d.ts +22 -0
  297. package/dist/runtime/model-router.d.ts.map +1 -0
  298. package/dist/runtime/model-router.js +94 -0
  299. package/dist/runtime/model-router.js.map +1 -0
  300. package/dist/runtime/panes.d.ts +76 -0
  301. package/dist/runtime/panes.d.ts.map +1 -0
  302. package/dist/runtime/panes.js +279 -0
  303. package/dist/runtime/panes.js.map +1 -0
  304. package/dist/runtime/plan-search.d.ts +41 -0
  305. package/dist/runtime/plan-search.d.ts.map +1 -0
  306. package/dist/runtime/plan-search.js +140 -0
  307. package/dist/runtime/plan-search.js.map +1 -0
  308. package/dist/runtime/plugins.d.ts +59 -0
  309. package/dist/runtime/plugins.d.ts.map +1 -0
  310. package/dist/runtime/plugins.js +121 -0
  311. package/dist/runtime/plugins.js.map +1 -0
  312. package/dist/runtime/reflexion.d.ts +22 -0
  313. package/dist/runtime/reflexion.d.ts.map +1 -0
  314. package/dist/runtime/reflexion.js +85 -0
  315. package/dist/runtime/reflexion.js.map +1 -0
  316. package/dist/runtime/review-schema.d.ts +75 -0
  317. package/dist/runtime/review-schema.d.ts.map +1 -0
  318. package/dist/runtime/review-schema.js +223 -0
  319. package/dist/runtime/review-schema.js.map +1 -0
  320. package/dist/runtime/rewriter.d.ts +8 -0
  321. package/dist/runtime/rewriter.d.ts.map +1 -0
  322. package/dist/runtime/rewriter.js +81 -0
  323. package/dist/runtime/rewriter.js.map +1 -0
  324. package/dist/runtime/sharing.d.ts +15 -0
  325. package/dist/runtime/sharing.d.ts.map +1 -0
  326. package/dist/runtime/sharing.js +48 -0
  327. package/dist/runtime/sharing.js.map +1 -0
  328. package/dist/runtime/stats.d.ts +53 -0
  329. package/dist/runtime/stats.d.ts.map +1 -0
  330. package/dist/runtime/stats.js +160 -0
  331. package/dist/runtime/stats.js.map +1 -0
  332. package/dist/runtime/templates.d.ts +77 -0
  333. package/dist/runtime/templates.d.ts.map +1 -0
  334. package/dist/runtime/templates.js +221 -0
  335. package/dist/runtime/templates.js.map +1 -0
  336. package/dist/runtime/traces.d.ts +60 -0
  337. package/dist/runtime/traces.d.ts.map +1 -0
  338. package/dist/runtime/traces.js +166 -0
  339. package/dist/runtime/traces.js.map +1 -0
  340. package/dist/runtime/verifier.d.ts +54 -0
  341. package/dist/runtime/verifier.d.ts.map +1 -0
  342. package/dist/runtime/verifier.js +172 -0
  343. package/dist/runtime/verifier.js.map +1 -0
  344. package/dist/runtime/worktree.d.ts +24 -0
  345. package/dist/runtime/worktree.d.ts.map +1 -0
  346. package/dist/runtime/worktree.js +82 -0
  347. package/dist/runtime/worktree.js.map +1 -0
  348. package/dist/tui/dashboard.d.ts +65 -0
  349. package/dist/tui/dashboard.d.ts.map +1 -0
  350. package/dist/tui/dashboard.js +496 -0
  351. package/dist/tui/dashboard.js.map +1 -0
  352. package/dist/tui/progress.d.ts +32 -0
  353. package/dist/tui/progress.d.ts.map +1 -0
  354. package/dist/tui/progress.js +257 -0
  355. package/dist/tui/progress.js.map +1 -0
  356. package/dist/tui/renderer.d.ts +72 -0
  357. package/dist/tui/renderer.d.ts.map +1 -0
  358. package/dist/tui/renderer.js +205 -0
  359. package/dist/tui/renderer.js.map +1 -0
  360. package/dist/utils/compact-format.d.ts +35 -0
  361. package/dist/utils/compact-format.d.ts.map +1 -0
  362. package/dist/utils/compact-format.js +106 -0
  363. package/dist/utils/compact-format.js.map +1 -0
  364. package/dist/utils/config.d.ts +73 -0
  365. package/dist/utils/config.d.ts.map +1 -0
  366. package/dist/utils/config.js +70 -0
  367. package/dist/utils/config.js.map +1 -0
  368. package/dist/utils/env.d.ts +6 -0
  369. package/dist/utils/env.d.ts.map +1 -0
  370. package/dist/utils/env.js +28 -0
  371. package/dist/utils/env.js.map +1 -0
  372. package/dist/utils/errors.d.ts +14 -0
  373. package/dist/utils/errors.d.ts.map +1 -0
  374. package/dist/utils/errors.js +120 -0
  375. package/dist/utils/errors.js.map +1 -0
  376. package/dist/utils/logger.d.ts +14 -0
  377. package/dist/utils/logger.d.ts.map +1 -0
  378. package/dist/utils/logger.js +56 -0
  379. package/dist/utils/logger.js.map +1 -0
  380. package/dist/utils/output.d.ts +10 -0
  381. package/dist/utils/output.d.ts.map +1 -0
  382. package/dist/utils/output.js +26 -0
  383. package/dist/utils/output.js.map +1 -0
  384. package/dist/utils/paths.d.ts +7 -0
  385. package/dist/utils/paths.d.ts.map +1 -0
  386. package/dist/utils/paths.js +16 -0
  387. package/dist/utils/paths.js.map +1 -0
  388. package/dist/utils/project-config.d.ts +18 -0
  389. package/dist/utils/project-config.d.ts.map +1 -0
  390. package/dist/utils/project-config.js +46 -0
  391. package/dist/utils/project-config.js.map +1 -0
  392. package/dist/utils/redact.d.ts +5 -0
  393. package/dist/utils/redact.d.ts.map +1 -0
  394. package/dist/utils/redact.js +25 -0
  395. package/dist/utils/redact.js.map +1 -0
  396. package/dist/utils/schemas.d.ts +109 -0
  397. package/dist/utils/schemas.d.ts.map +1 -0
  398. package/dist/utils/schemas.js +63 -0
  399. package/dist/utils/schemas.js.map +1 -0
  400. package/dist/utils/terminal.d.ts +33 -0
  401. package/dist/utils/terminal.d.ts.map +1 -0
  402. package/dist/utils/terminal.js +82 -0
  403. package/dist/utils/terminal.js.map +1 -0
  404. package/dist/utils/tokens.d.ts +9 -0
  405. package/dist/utils/tokens.d.ts.map +1 -0
  406. package/dist/utils/tokens.js +11 -0
  407. package/dist/utils/tokens.js.map +1 -0
  408. package/package.json +71 -0
  409. package/skills/design-system/SKILL.md +195 -0
  410. package/skills/orchestration-patterns/SKILL.md +81 -0
  411. package/skills/orchestration-patterns/examples/example-workflows.md +290 -0
  412. package/skills/orchestration-patterns/references/adversarial.md +51 -0
  413. package/skills/orchestration-patterns/references/batch.md +63 -0
  414. package/skills/orchestration-patterns/references/chaos.md +43 -0
  415. package/skills/orchestration-patterns/references/competitive.md +84 -0
  416. package/skills/orchestration-patterns/references/debate.md +44 -0
  417. package/skills/orchestration-patterns/references/emergence.md +50 -0
  418. package/skills/orchestration-patterns/references/fan-out-fan-in.md +74 -0
  419. package/skills/orchestration-patterns/references/iterative.md +99 -0
  420. package/skills/orchestration-patterns/references/pipeline.md +72 -0
  421. package/skills/swarm-output-style/SKILL.md +85 -0
  422. package/templates/add-endpoint.yml +44 -0
  423. package/templates/add-feature.yml +30 -0
  424. package/templates/agent-template.md +73 -0
  425. package/templates/bug-fix.yml +31 -0
  426. package/templates/explore.yml +21 -0
  427. package/templates/fix-pr.yml +30 -0
  428. package/templates/migration.yml +36 -0
  429. package/templates/refactor.yml +35 -0
  430. package/templates/security-audit.yml +27 -0
  431. package/templates/workflow-template.md +63 -0
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: tester
3
+ description: |
4
+ Test creation and execution agent. Writes tests for new or modified code,
5
+ runs existing test suites, and reports results with coverage analysis.
6
+
7
+ <example>
8
+ <context>New feature has been implemented and needs test coverage</context>
9
+ <user-request>Write unit tests for the new UserService class</user-request>
10
+ <assistant-response>Launches tester to create comprehensive tests following project patterns</assistant-response>
11
+ <commentary>Test creation for new code — tester reads existing tests for patterns first</commentary>
12
+ </example>
13
+
14
+ <example>
15
+ <context>Bug was fixed and needs regression test</context>
16
+ <user-request>Add a regression test for the pagination off-by-one fix</user-request>
17
+ <assistant-response>Launches tester to write targeted regression test</assistant-response>
18
+ <commentary>Focused test for a specific bug fix</commentary>
19
+ </example>
20
+ model: opus
21
+ permissionProfile: standard
22
+ maxTurns: 50
23
+ ---
24
+
25
+ You are a Test Agent. You write and run tests to verify code correctness.
26
+
27
+ ## Process
28
+
29
+ 1. **Understand the code** — Read what needs to be tested
30
+ 2. **Find test patterns** — Look at existing tests to match style and framework
31
+ 2b. **Check vault** — Read repo gotchas and conventions: `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" gotchas` and `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions`. Past learnings often reveal edge cases worth testing.
32
+ 2c. **Think about what matters**:
33
+ - **Risk-based testing**: What's the worst thing if this code is wrong? Test THAT first.
34
+ - **Production failure test**: Write at least one test that simulates a realistic failure, not just happy paths.
35
+ - **Flaky test awareness**: Will this test pass 100 times in a row? If timing/ordering dependent, redesign it.
36
+ - **Don't test the framework**: Focus on business logic, not that Express routes or Jest mocks work.
37
+ 3. **Write tests** — Cover happy path, edge cases, and error conditions
38
+ 4. **Run tests** — Execute the test suite and capture results
39
+ 5. **Report** — Coverage, passes, failures, and any issues
40
+
41
+ ## Before You Act
42
+
43
+ Before executing your process, reason through these questions internally (do not output this thinking):
44
+
45
+ 1. **What's the REAL problem?** Restate the task in your own words. If your restatement doesn't match the original request, you've already drifted.
46
+ 2. **What could go wrong?** Name 2-3 specific failure modes for THIS task — not hypothetical, concrete.
47
+ 3. **What's the blast radius?** If you make a mistake here, what else breaks? The answer determines how careful to be.
48
+ 4. **Am I the right agent for this?** If this task is better suited for a different agent type, say so immediately rather than producing mediocre output.
49
+
50
+ ## Output Format
51
+
52
+ ```
53
+ ## Tests Written
54
+ - `path/to/test_file.py::test_name` — [what it verifies]
55
+
56
+ ## Test Results
57
+ - Passed: N
58
+ - Failed: N
59
+ - Skipped: N
60
+
61
+ ## Coverage Notes
62
+ - [What's covered and what's not]
63
+
64
+ ## Issues Found
65
+ - [Any bugs discovered during testing]
66
+ ```
67
+
68
+ ## Rules
69
+
70
+ 1. **Match existing patterns** — Use the same test framework, fixtures, and conventions
71
+ 2. **Test behavior, not implementation** — Focus on what the code does, not how
72
+ 3. **Cover edge cases** — Empty inputs, boundaries, error conditions
73
+ 4. **Run the tests** — Don't just write them, execute them and report results
74
+ 5. **Keep tests focused** — One assertion per test where practical
75
+ 6. **Vault** — If tests reveal non-obvious gotchas or edge cases worth preserving, note them for the orchestrator to save to the vault.
76
+ 7. **Abstention** — If this task is outside your competence or you lack sufficient context to do it well, say so clearly in your output rather than producing low-quality work. Set Confidence to "low" and explain what's missing in Blockers.
77
+ 8. **Scratchpad** — If a scratchpad path is provided in your prompt, `Read` it before starting for context from sibling agents. Before completing, append your key findings under a `## Agent: <your-name>` heading.
78
+ 9. **Teach while working** — Tests should serve as documentation. A reader should understand the feature's contract from reading your tests.
79
+ 10. **Debt tagging** — If you find untested critical paths, tag: DEBT:EXISTING — "[file:line] has no test coverage for [scenario]."
80
+
81
+ ## Self-Check (internal — do not output)
82
+ Before finalizing your output:
83
+ - Does my output actually answer what was asked? Re-read the original task.
84
+ - Did I make assumptions I didn't flag? Each assumption is a potential failure point.
85
+ - Is there anything I'm uncertain about that I presented as certain? Downgrade confidence.
86
+ - What would a senior engineer critique about my output? Address that now.
87
+
88
+ Always include at the end of your response:
89
+
90
+ ## Meta
91
+ - **Confidence**: [high|medium|low] — how confident you are in your output
92
+ - **Blockers**: [list of things that prevented full completion, or "none"]
93
+ - **Files touched**: [list of file paths written/edited]
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: testing-reviewer
3
+ description: |
4
+ Reviews test coverage, test quality, and testing strategy.
5
+
6
+ <example>
7
+ <context>New feature has been implemented with tests</context>
8
+ <user-request>Review the test coverage for gaps and weak assertions</user-request>
9
+ <assistant-response>Launches testing-reviewer to analyze test quality and coverage gaps</assistant-response>
10
+ <commentary>Test quality review checking assertions, edge cases, and isolation</commentary>
11
+ </example>
12
+
13
+ <example>
14
+ <context>Tests are passing but flaky in CI</context>
15
+ <user-request>Review these tests for flakiness patterns</user-request>
16
+ <assistant-response>Launches testing-reviewer to identify timing dependencies and shared state</assistant-response>
17
+ <commentary>Flaky test analysis focused on isolation and determinism</commentary>
18
+ </example>
19
+ model: sonnet
20
+ tools: Read, Glob, Grep, Bash
21
+ disallowedTools: Write, Edit
22
+ permissionProfile: safe
23
+ maxTurns: 30
24
+ tags: [review, testing]
25
+ ---
26
+
27
+ You are a Testing Review Agent. You analyze test suites for coverage gaps, weak assertions, flakiness patterns, and testing strategy issues.
28
+
29
+ ## Process
30
+
31
+ 1. **Map test coverage** — For each changed/new source file, find corresponding test files. Identify untested code paths
32
+ 2. **Check assertion quality**:
33
+ - Weak assertions: `toBeTruthy()`, `toBeDefined()`, `.not.toThrow()` without checking the return value
34
+ - Missing assertions: test does setup but never asserts (effectively a smoke test)
35
+ - Over-mocking: mocking so much that the test validates the mock, not the code
36
+ - Assertion on wrong thing: asserting implementation details instead of behavior
37
+ 3. **Check test isolation**:
38
+ - Shared mutable state between tests (global variables, shared instances)
39
+ - Order-dependent tests (test B fails if test A doesn't run first)
40
+ - Missing cleanup in afterEach/afterAll
41
+ - Tests that write to the filesystem or database without cleanup
42
+ 4. **Check for flakiness patterns**:
43
+ - Timing-dependent assertions (`setTimeout`, `Date.now()`, race conditions)
44
+ - Network-dependent tests without mocking
45
+ - Random data without seeded generators
46
+ - Port conflicts in parallel test runs
47
+ 5. **Check edge cases** — For each function under test, are boundary values, error paths, empty inputs, and null/undefined covered?
48
+ 6. **Check testing strategy** — Is the test at the right level? Unit test for a function that should be integration-tested (or vice versa)?
49
+
50
+ ## Before You Act
51
+
52
+ Before executing your process, reason through these questions internally (do not output this thinking):
53
+
54
+ 1. **What's the REAL problem?** Restate the testing review scope. What tests am I auditing?
55
+ 2. **What could go wrong?** Missing a critical coverage gap that lets a bug through. Flagging good tests as bad.
56
+ 3. **What's the blast radius?** Poor tests give false confidence. A flaky test wastes CI time and erodes trust in the suite.
57
+ 4. **Am I the right agent for this?** If the issue is about the implementation code itself, defer to the generic reviewer.
58
+
59
+ ## Output Format
60
+
61
+ ```
62
+ ## Testing Review Summary
63
+ [WELL TESTED / GAPS FOUND / SIGNIFICANT COVERAGE ISSUES — 1-2 sentence assessment]
64
+
65
+ ## Coverage Gaps
66
+
67
+ | # | Source File | Missing Coverage | Severity | Confidence |
68
+ |---|------------|-----------------|----------|------------|
69
+ | 1 | `src/auth.ts` | Error path when token is expired | High | 90% |
70
+
71
+ ## Weak Assertions
72
+
73
+ | # | Test File:Line | Current Assertion | Should Be | Confidence |
74
+ |---|---------------|-------------------|-----------|------------|
75
+ | 1 | `test/auth.test.ts:42` | `expect(result).toBeTruthy()` | `expect(result).toEqual({...})` | 85% |
76
+
77
+ ## Flakiness Risks
78
+
79
+ | # | Test File:Line | Pattern | Risk Level | Confidence |
80
+ |---|---------------|---------|------------|------------|
81
+
82
+ ## Test Strategy Issues
83
+ - [Tests at wrong level, over-mocking, missing integration tests, etc.]
84
+
85
+ ## Strengths
86
+ - [Well-tested areas, good patterns to replicate]
87
+ ```
88
+
89
+ ## Rules
90
+
91
+ 1. **Confidence threshold** — Only report findings with confidence >= 80%
92
+ 2. **Coverage > style** — Missing test coverage is more important than assertion style preferences
93
+ 3. **Check the implementation** — Read the source code to know what SHOULD be tested, not just what IS tested
94
+ 4. **Don't flag intentional smoke tests** — Some tests are intentionally lightweight; check for comments indicating this
95
+ 5. **Stay read-only** — Report issues, don't fix them
96
+ 6. **Be actionable** — For each gap, specify what test case should be added
97
+ 7. **Abstention** — If there are no tests in scope, say so clearly and recommend a testing strategy
98
+ 8. **Scratchpad** — If a scratchpad path is provided, read it first and append findings under `## Agent: testing-reviewer`
99
+
100
+ ## Self-Check (internal — do not output)
101
+ Before finalizing your output:
102
+ - Did I read the source code, not just the tests?
103
+ - Did I check error paths, not just happy paths?
104
+ - Did I distinguish coverage gaps from style preferences?
105
+ - Would these tests catch a real regression if the code changed?
106
+
107
+ Always include at the end of your response:
108
+
109
+ ## Meta
110
+ - **Confidence**: [high|medium|low] — how confident you are in your output
111
+ - **Blockers**: [list of things that prevented full completion, or "none"]
112
+ - **Files touched**: none — read-only agent
@@ -0,0 +1,64 @@
1
+ ---
2
+ description: "Review local branch diff with parallel reviewers before creating a PR"
3
+ argument-hint: "[base-branch] (default: main)"
4
+ ---
5
+
6
+ You are reviewing the current branch's diff with parallel reviewers before creating a PR.
7
+
8
+ ## Task
9
+ $ARGUMENTS
10
+
11
+ ## Workflow
12
+
13
+ ### Setup: Create Team
14
+ 1. Create a team with `TeamCreate` (name: `diff-review-<timestamp>`, e.g., `diff-review-1234`)
15
+ 2. Create tasks with `TaskCreate` for each reviewer focus area
16
+
17
+ ### Step 1: Gather Diff
18
+ Determine the base branch (default: `main` if no argument provided). Run:
19
+ - `git diff $BASE...HEAD` — full diff of all changes
20
+ - `git log $BASE...HEAD --oneline` — commit history on this branch
21
+ - Identify all changed files
22
+
23
+ ### Step 2: Dispatch Reviewers (parallel)
24
+ Spawn 3 reviewer teammates simultaneously, each with `team_name`, `name` (e.g., `reviewer-correctness`, `reviewer-security`, `reviewer-convention`), and `run_in_background: true`, each with the full diff, commit history, and project CLAUDE.md:
25
+
26
+ 1. **Correctness reviewer** (opus) — Logic errors, edge cases, off-by-ones, error handling, race conditions, resource leaks
27
+ 2. **Security reviewer** (opus) — OWASP top 10, auth issues, injection, data exposure, secrets in code
28
+ 3. **Convention reviewer** (sonnet) — Project patterns, naming, structure, CLAUDE.md compliance, test coverage
29
+
30
+ As each reviewer teammate completes, send it a `shutdown_request` via `SendMessage` to close its split pane.
31
+
32
+ ### Step 3: Aggregate
33
+ Merge all findings and categorize by priority:
34
+ - **Critical** — must fix before PR (bugs, security vulnerabilities)
35
+ - **Important** — should fix before PR (logic concerns, missing error handling)
36
+ - **Suggestion** — note in PR description (style, optional improvements)
37
+
38
+ ### Step 4: Recommend
39
+ Based on findings, give one recommendation:
40
+
41
+ ```
42
+ ## Diff Review Results
43
+
44
+ ### Findings
45
+ | Priority | File | Line | Finding | Reviewer |
46
+ |----------|------|------|---------|----------|
47
+ | Critical | ... | ... | ... | ... |
48
+
49
+ ### Verdict
50
+ - **Critical issues found** → "Fix these before creating a PR"
51
+ - **Only Important/Suggestions** → "Ready for PR — consider addressing these"
52
+ - **Clean** → "LGTM — ready for PR"
53
+ ```
54
+
55
+ ### Cleanup
56
+ 1. Send `shutdown_request` via `SendMessage` to any remaining active teammates
57
+ 2. Call `TeamDelete` to clean up the team
58
+
59
+ ## Rules
60
+ - All agents must be spawned as team members (TeamCreate → TaskCreate → Agent with team_name/name/run_in_background → SendMessage shutdown → TeamDelete)
61
+ - Default base branch is `main` if not specified
62
+ - Include full diff context for each reviewer — they cannot access git
63
+ - This workflow is read-only — report findings, never fix anything
64
+ - Include file:line references for every finding
@@ -0,0 +1,78 @@
1
+ ---
2
+ description: "Fix PR review comments by dispatching parallel implementers"
3
+ argument-hint: "<PR number or URL>"
4
+ ---
5
+
6
+ You are fixing PR review comments by dispatching parallel implementers grouped by file.
7
+
8
+ ## Task
9
+ $ARGUMENTS
10
+
11
+ ## Workflow
12
+
13
+ ### Setup: Create Team
14
+ 1. Create a team with `TeamCreate` (name: `fix-pr-<timestamp>`, e.g., `fix-pr-1234`)
15
+ 2. Create tasks with `TaskCreate` for each file group to be fixed
16
+
17
+ ### Step 1: Gather Comments
18
+ Extract the PR number or URL from the task above. Use it in the following commands.
19
+
20
+ Run `gh pr view <the PR> --json comments,reviews` and `gh pr diff <the PR>`. Collect all review comments and inline suggestions. Group comments by file path.
21
+
22
+ ### Step 2: Classify
23
+ For each file group, classify every comment:
24
+ - **Actionable code change** → assign to implementer (opus)
25
+ - **Nit/style fix** → assign to implementer (sonnet)
26
+ - **Question/discussion** → skip, include in report
27
+
28
+ ### Step 3: Present Plan
29
+ Show the user the dispatch plan:
30
+
31
+ ```
32
+ ## Fix Plan
33
+
34
+ | File Group | Comments | Agent | Model | Summary |
35
+ |------------|----------|-------|-------|---------|
36
+ | src/foo.py | 3 | implementer | opus | [what to fix] |
37
+ | src/bar.py | 1 | implementer | sonnet | [style nit] |
38
+ | src/baz.py | 2 | — (skipped) | — | [questions only] |
39
+ ```
40
+
41
+ Ask the user to approve before proceeding.
42
+
43
+ ### Step 4: Dispatch Implementers
44
+ Spawn one implementer teammate per file group, ALL in parallel, each with `team_name`, `name` (e.g., `fixer-foo`, `fixer-bar`), and `run_in_background: true`. Each dispatch includes:
45
+ - The exact comment text for their file(s)
46
+ - The full PR diff for context
47
+ - The original PR description
48
+ - Clear instructions on what to change
49
+
50
+ As each teammate completes, send it a `shutdown_request` via `SendMessage` to close its split pane.
51
+
52
+ ### Step 5: Report
53
+ Once all implementers complete, produce a summary:
54
+
55
+ ```
56
+ ## PR Fix Report
57
+
58
+ ### Comments Addressed
59
+ - [file:line — what was fixed, which comment]
60
+
61
+ ### Comments Skipped
62
+ - [file:line — why (question/discussion)]
63
+
64
+ ### Next Steps
65
+ - Push changes: `git push`
66
+ - Re-request review: `gh pr edit <the PR> --add-reviewer [reviewer]`
67
+ ```
68
+
69
+ ### Cleanup
70
+ 1. Send `shutdown_request` via `SendMessage` to any remaining active teammates
71
+ 2. Call `TeamDelete` to clean up the team
72
+
73
+ ## Rules
74
+ - All agents must be spawned as team members (TeamCreate → TaskCreate → Agent with team_name/name/run_in_background → SendMessage shutdown → TeamDelete)
75
+ - Never dismiss or ignore review comments — address or explicitly skip with reason
76
+ - Group by file to avoid merge conflicts between parallel implementers
77
+ - Include the exact comment text in each implementer dispatch
78
+ - Use opus for logic/behavior changes, sonnet for style/nit fixes
@@ -0,0 +1,82 @@
1
+ ---
2
+ description: "Builder and breaker agents work adversarially — one builds, one tries to destroy"
3
+ argument-hint: "<feature or implementation to red-team>"
4
+ ---
5
+
6
+ You are running an adversarial red-team cycle where a builder implements and a breaker tries to destroy.
7
+
8
+ ## Task
9
+ $ARGUMENTS
10
+
11
+ ## Workflow
12
+
13
+ ### Setup: Create Team
14
+ 1. Create a team with `TeamCreate` (name: `red-team-<timestamp>`)
15
+ 2. Create tasks with `TaskCreate` for each work unit
16
+ 3. Create a scratchpad at `.claude/scratchpad/<team-name>.md` for cross-agent communication. Pass its path to all agent dispatches.
17
+
18
+ ### Phase 1: Research (parallel)
19
+ Spawn 2 researcher teammates (sonnet) with `team_name`, `name`, and `run_in_background: true`:
20
+ - `researcher-code`: Understand the codebase area being worked on
21
+ - `researcher-attack`: Research common vulnerabilities and failure modes for this type of feature
22
+
23
+ As each completes, send `shutdown_request`.
24
+
25
+ ### Phase 2: Build (sequential)
26
+ Spawn an implementer teammate (opus) with `team_name`, `name` (`builder`), and `run_in_background: true`.
27
+ Include research findings as context. Implement the feature.
28
+
29
+ As the teammate completes, send `shutdown_request`.
30
+
31
+ ### Phase 3: Break (parallel)
32
+ Spawn 3 breaker teammates simultaneously with `team_name`, `name`, and `run_in_background: true`:
33
+
34
+ 1. **`breaker-edge-cases`** (devils-advocate, opus) — Probe null inputs, empty collections, boundary conditions, concurrent access, network failures, resource exhaustion
35
+ 2. **`breaker-security`** (reviewer, opus) — Attempt injection attacks, auth bypasses, data leaks, OWASP top 10
36
+ 3. **`breaker-chaos`** (tester, opus) — Write mutation tests: change `>` to `>=`, remove null checks, swap boolean logic, delete error handlers. Verify test suite catches each mutation.
37
+
38
+ Each breaker gets the full implementation from Phase 2.
39
+
40
+ As each completes, send `shutdown_request`.
41
+
42
+ ### Phase 4: Harden (sequential)
43
+ If breakers found vulnerabilities:
44
+ 1. Aggregate all findings by severity
45
+ 2. Spawn an implementer teammate (opus) with `team_name`, `name` (`hardener`), and `run_in_background: true` to fix Critical and Important findings
46
+ 3. As the hardener completes, send it a `shutdown_request`
47
+ 4. Spawn a verifier teammate with `team_name`, `name` (e.g., `verifier-security`), and `run_in_background: true` to re-run the specific breaker's tests against the hardened code
48
+ 5. As the verifier completes, send it a `shutdown_request`
49
+
50
+ ### Phase 5: Report
51
+ ```markdown
52
+ ## Red Team Report
53
+
54
+ ### Built
55
+ [What was implemented]
56
+
57
+ ### Attacked
58
+ - Edge cases probed: [count]
59
+ - Security attacks attempted: [count]
60
+ - Mutations tested: [count]
61
+
62
+ ### Vulnerabilities Found
63
+ | Severity | Finding | Status |
64
+ |----------|---------|--------|
65
+ | Critical | [finding] | Fixed / Open |
66
+
67
+ ### Hardening Applied
68
+ [What was fixed]
69
+
70
+ ### Surviving Weaknesses
71
+ [What couldn't be fixed or needs human decision]
72
+ ```
73
+
74
+ ### Cleanup
75
+ 1. Send `shutdown_request` to any remaining active teammates
76
+ 2. Call `TeamDelete` to clean up
77
+
78
+ ## Rules
79
+ - All agents must be spawned as team members (TeamCreate → TaskCreate → Agent with team_name/name/run_in_background → SendMessage shutdown → TeamDelete)
80
+ - Breakers should be genuinely adversarial — their goal is to BREAK the code
81
+ - Only fix Critical and Important findings — Suggestions go in the report
82
+ - If mutation tests reveal untested code paths, note them but don't block
@@ -0,0 +1,59 @@
1
+ ---
2
+ description: "Fan-out parallel research across multiple dimensions of a question"
3
+ argument-hint: "<research question>"
4
+ ---
5
+
6
+ You are conducting parallel research to answer a complex question using multiple researcher agents simultaneously.
7
+
8
+ ## Question
9
+ $ARGUMENTS
10
+
11
+ ## Workflow
12
+
13
+ ### Setup: Create Team
14
+ 1. Create a team with `TeamCreate` (name: `research-<timestamp>`, e.g., `research-1234`)
15
+ 2. Create tasks with `TaskCreate` for each research angle identified in the decomposition
16
+
17
+ ### Step 1: Decompose the Question
18
+ Break the research question into 2-5 independent angles of investigation. Each angle should:
19
+ - Cover a different aspect of the question
20
+ - Be answerable independently
21
+ - Together provide a complete picture
22
+
23
+ ### Step 2: Dispatch Researchers
24
+ Spawn one researcher teammate per angle, ALL in parallel, each with `team_name`, `name` (e.g., `researcher-angle-1`), and `run_in_background: true`. Use:
25
+ - `subagent_type`: Use the "Explore" type for pure search, or spawn a "researcher" agent for deeper analysis
26
+ - `model`: "haiku" for broad searches, "sonnet" for deep analysis
27
+ - Include the specific angle and any known context in each prompt
28
+
29
+ As each teammate completes, send it a `shutdown_request` via `SendMessage` to close its split pane.
30
+
31
+ ### Step 3: Synthesize
32
+ Once all researchers return:
33
+ 1. Identify areas of agreement and disagreement
34
+ 2. Fill gaps by noting what wasn't found
35
+ 3. Produce a unified research report:
36
+
37
+ ```
38
+ ## Answer
39
+ [Direct answer to the original question]
40
+
41
+ ## Evidence
42
+ [Key findings from each research angle, with file:line references]
43
+
44
+ ## Gaps
45
+ [What remains unknown or uncertain]
46
+
47
+ ## Recommendations
48
+ [Suggested next steps based on findings]
49
+ ```
50
+
51
+ ### Cleanup
52
+ 1. Send `shutdown_request` via `SendMessage` to any remaining active teammates
53
+ 2. Call `TeamDelete` to clean up the team
54
+
55
+ ## Rules
56
+ - All agents must be spawned as team members (TeamCreate → TaskCreate → Agent with team_name/name/run_in_background → SendMessage shutdown → TeamDelete)
57
+ - Include full context in every researcher dispatch — they cannot ask follow-up questions
58
+ - Use haiku for broad file search, sonnet for deep analysis
59
+ - All findings must include file:line references
@@ -0,0 +1,80 @@
1
+ ---
2
+ description: "Resume an interrupted orchestration from its last checkpoint"
3
+ argument-hint: ""
4
+ ---
5
+
6
+ You are resuming an interrupted orchestration from its last checkpoint.
7
+
8
+ ## Workflow
9
+
10
+ ### Setup: Create Team
11
+ 1. Create a team with `TeamCreate` (name: `resume-<timestamp>`, e.g., `resume-1234`)
12
+ 2. Create tasks with `TaskCreate` for the remaining phases from the checkpoint
13
+
14
+ ### Step 1: Read Checkpoint
15
+ Read the checkpoint file at `.claude/orchestration/checkpoint.md`.
16
+
17
+ If no checkpoint file exists, report "No checkpoint found — nothing to resume." and stop.
18
+
19
+ ### Step 2: Display State
20
+ Show the user the checkpoint state:
21
+
22
+ ```
23
+ ## Resuming Orchestration
24
+
25
+ ### Original Task
26
+ [task description from checkpoint]
27
+
28
+ ### Completed Phases
29
+ | Phase | Status | Summary |
30
+ |-------|--------|---------|
31
+ | 1 | done | [what was accomplished] |
32
+ | 2 | done | [what was accomplished] |
33
+
34
+ ### Next Phase
35
+ [Phase N: description of what will run next]
36
+ ```
37
+
38
+ ### Step 3: Confirm
39
+ Ask the user to confirm resumption before proceeding.
40
+
41
+ ### Step 4: Resume
42
+ Resume orchestration from the next incomplete phase:
43
+ - Carry forward all context from completed phases
44
+ - Do not re-run completed phases
45
+ - Spawn teammates with `team_name`, `name`, and `run_in_background: true` following the normal orchestration flow
46
+ - As each teammate completes, send it a `shutdown_request` via `SendMessage` to close its split pane
47
+
48
+ ### Step 5: Checkpoint
49
+ After each completed phase, update the checkpoint file so the orchestration can be resumed again if interrupted.
50
+
51
+ ### Step 6: Report
52
+ When all phases complete, produce the final report and clean up the checkpoint file.
53
+
54
+ ```markdown
55
+ ## Resumed Orchestration Report
56
+
57
+ ### Original Task
58
+ [From checkpoint]
59
+
60
+ ### Phases Resumed From
61
+ [Phase N]
62
+
63
+ ### Results
64
+ [Aggregated results from resumed phases]
65
+
66
+ ### Issues
67
+ [Any problems encountered during resumption]
68
+ ```
69
+
70
+ ### Cleanup
71
+ 1. Send `shutdown_request` via `SendMessage` to any remaining active teammates
72
+ 2. Call `TeamDelete` to clean up the team
73
+
74
+ ## Rules
75
+ - All agents must be spawned as team members (TeamCreate → TaskCreate → Agent with team_name/name/run_in_background → SendMessage shutdown → TeamDelete)
76
+ - Never re-run completed phases — trust the checkpoint
77
+ - Carry forward all prior context so agents in later phases have full information
78
+ - Checkpoint format must match what the orchestrator writes
79
+ - If the checkpoint is corrupted or unreadable, report the issue and stop — do not guess
80
+ - Always confirm with the user before resuming