{"slug":"swarm-5","title":"swarm","summary":"Fan out N parallel workers, drain them, and return one report. Use for /swarm, 'swarm this', or parallel coverage, races, gauntlets, and exploration.","platform":"Cursor","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-10-21T17:44:26.26683Z","repo":{"url":"https://github.com/creedants/pstack-t3","stars":18,"forks":6,"license":"MIT","updatedAt":"2026-11-07T06:12:03Z"},"bodyHtml":"<hr>\n<h2>name: swarm\ndescription: \"Fan out N parallel workers, drain them, and return one report. Use for /swarm, 'swarm this', or parallel coverage, races, gauntlets, and exploration.\"\ndisable-model-invocation: true</h2>\n<h1>Swarm</h1>\n<p><a href=\"../pstack-runtime/SKILL.md#modes\">The runtime's Modes section</a> sets the mode lines of every brief this skill writes and how its spawns run in light mode.</p>\n<h2>Start</h2>\n<p>Open a todolist with one entry per phase before launching anything.</p>\n<ol>\n<li>Frame</li>\n<li>Fan out</li>\n<li>Aggregate</li>\n<li>Report</li>\n</ol>\n<h2>Phase A: Frame</h2>\n<ol>\n<li>State the done predicate and the artifact or report the swarm must return.</li>\n<li>Choose the shape. Partition into slices, race N workers on identical briefs, or mix both. For a race or mixed shape, declare <code>first pass</code>, <code>rank all</code>, or <code>best-of</code> before spawning.</li>\n<li>Pick the worker model from the <code>swarm workers</code> role. Call <code>orchestrator_capabilities</code>. Paste that tool result into this quoted heredoc. If the catalog result is large, save it to a temporary file with the host's file tool and pass that path to <code>--catalog</code>.</li>\n</ol>\n<pre><code>python3 &lt;pstack-runtime&gt;/scripts/roles.py show --cwd \"$PWD\" --catalog - --parent \"&lt;inheritedProviderInstanceId&gt;/&lt;inheritedModel&gt;\" --role \"swarm workers\" &lt;&lt;'JSON'\n&lt;the orchestrator_capabilities JSON&gt;\nJSON\n</code></pre>\n<p>The quoted heredoc sends the JSON unchanged. The command does not write the catalog into the repository, and parallel children do not share a file. It resolves the <code>swarm workers</code> role per <a href=\"../pstack-runtime/SKILL.md#roles\">the runtime's Roles section</a>. Every worker uses that seat. An <code>inherit</code> seat means omit <code>target</code> so the workers run on the parent model. If <code>delegate_task</code> rejects the target, apply the runtime's fallback and say which seat changed and why. For a model race, name each arm's target up front from <code>orchestrator_capabilities</code>, and report whether the arms' models actually differed. Pass the seat the role this step names, per the Subagents section of the poteto-mode skill.</p>\n<ol start=\"5\">\n<li>Give each worker its own writable output when it writes. A worker that writes to the repo while another writer may overlap gets its own git worktree per <a href=\"../pstack-runtime/SKILL.md#isolation\">the runtime's Isolation section</a>. When workers verify or measure commits, each brief names the exact SHAs. A measurement brief also names the method (sample count, what one sample is, order). The worker records both in its result.</li>\n</ol>\n<h2>Phase B: Fan out</h2>\n<p>Spawn all N workers in one message, one <code>delegate_task</code> call per worker, with <code>mode: \"async\"</code>, <code>role</code> <code>general</code> (or <code>review</code>, <code>research</code>, or <code>test</code> when the slice is only that), the step 4 <code>target</code> (omitted for <code>inherit</code>), and a stable <code>clientRequestId</code> such as <code>swarm-&lt;slug&gt;-&lt;n&gt;</code>. Retain every returned <code>taskId</code> in the todolist. Workers are local child tasks, so they can reach files, browsers, and auth on this machine.</p>\n<p>When a worker must start from a non-default branch, name that branch in the brief as the worktree's base. Uncommitted changes do not reach a new worktree, so commit or push first.</p>\n<p>Every brief stands alone. Include the goal, scope, exact slice or race arm, how to verify, and what to report. A worker that only reads gets a read-only brief that says \"do not edit files, commit, or push.\" A worker that writes code for a poteto-mode playbook also follows step 4 of <a href=\"../pstack-runtime/SKILL.md#delegation\">the runtime's Delegation section</a>: the poteto-agent persona first, the lines <code>roles.py mode --playbook &lt;name&gt; --attempt &lt;kind&gt;</code> prints for the playbook it serves, which start with <code>Playbook: playbooks/&lt;name&gt;.md</code>, and <code>roles.py check-brief</code> before <code>delegate_task</code>. Reports use <code>PASS</code>, <code>ISSUES</code>, or <code>BLOCKED</code> with evidence. A worker that can prove a defect reports <code>ISSUES</code> and lists every issue it can prove, not only the first.</p>\n<p>If a worker drops out, proceed with N-1 and note it.</p>\n<h2>Phase C: Aggregate</h2>\n<p>Collect each worker's result per <a href=\"../pstack-runtime/SKILL.md#delegation\">the runtime's Delegation step 5</a>. Read the terminal results. Drop a result that does not record the SHAs and method its brief names, and respawn that worker once as a fresh child. After a second miss, record a gap. A gap does not count as a pass. For coverage, every required slice needs a result. For a race, apply the selection rule declared up front. Use first pass, rank all, or best-of. Do not paste raw worker dumps.</p>\n<p>Remove worker worktrees after integrating them.</p>\n<h2>Phase D: Report</h2>\n<p>Return one consolidated in-chat report with the table, issue one-liners, gaps or dropouts, any seat that fell back, and the race rule when used.</p>\n","files":[{"path":"SKILL.md","sizeBytes":4558,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-11-08T21:45:55.003614Z","sha256":"55D598E191DF9B2D00C460C1F3BA2BFDA53BF070C022BBBFED1069C3D8D804C9","sizeBytes":2199},"review":null,"source":{"repositoryUrl":"https://github.com/creedants/pstack-t3","path":"t3/overrides/swarm","license":"MIT","commit":"dd15e6301eb6bbd04866a5091f50f801fbb2a5ed","subtreeSha":"41E2243433D631563CBBFDAF58A320C1E2E71313EE6B622EEFB3FE831C579089","lastSyncedAt":"2026-11-08T21:44:31.482089Z"},"reviewedAt":"2026-11-08T21:49:33.744421Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/creedants/pstack-t3/tree/main/t3/overrides/swarm"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install creedants-pstack-t3@llmmart"},{"target":"git","command":"git clone https://github.com/creedants/pstack-t3.git"}]}