--- name: swarm description: "Fan out N parallel workers, drain them, and return one consolidated report. Use for /swarm, 'swarm this', or parallel coverage, races, gauntlets, and exploration fan-out." license: MIT metadata: adapted-from: "cursor/plugins/pstack/skills/swarm" version: "1.0.0" --- # Swarm Fan out N parallel workers. They may cover separate slices, race the same brief, or mix both. The parent waits, aggregates, and returns one report. Open a todo list with one entry per phase: Frame, Fan out, Aggregate, Report. ## Phase A: Frame 1. State the done predicate and the artifact or report the swarm must return. 2. Choose the shape: partition into slices, race N workers on identical briefs, or mix. For a race or mix, declare the selection rule up front (`first pass`, `rank all`, or `best-of`). 3. Set N from the user or derive it from the shape. 4. Route workers by role; Kiro selects the model. Give each worker its own writable output when it writes. When workers verify or measure specific commits, each brief names the exact SHAs and, for measurement, the method (sample count, what one sample is, order). The worker records both in its result. ## Phase B: Fan out Spawn all N workers in parallel via `invoke_sub_agent`. Every brief stands alone: goal, scope, exact slice or race arm, how to verify, what to report. Reports use `PASS`, `ISSUES`, or `BLOCKED` with evidence. A worker that can prove a defect reports `ISSUES` and lists every issue it can prove, not just the first. If a worker drops out, proceed with N-1 and note it. ## Phase C: Aggregate Read the terminal results. Drop a result that does not record the SHAs and method its brief required, and rerun that worker once; after a second miss, record a gap (a gap is not a pass). For coverage, every required slice needs a result. For a race, apply the selection rule declared up front. Do not paste raw worker dumps. Keep a compact result table, one-line evidenced issues, and explicit gaps or dropouts. ## Phase D: Report Return one consolidated report with the table, issue one-liners, gaps or dropouts, and the race rule when used.