--- name: swarm description: "Use when a person asks to swarm, delegate or parallelize work without a plan ('swarm this', 'run a swarm on…', 'get a few agents on it'), or when a task in front of you splits into independent parts or is long enough to hand off: then propose a swarm in one line, workers and why, and open it only on a yes. Runs a task swarm on the board: this session orchestrates, N swarm-worker agents take the tasks posted to them, report, and take the next, for as long as the person keeps giving work, on call or under a protocol (build-verify: builders, then verifiers walking the running product, looped until it holds). Produces the run on the board and the workers' results and merges. Not for work an approved plan covers (execute-plan), a discussion of seats (brainswarm), or a task small enough to do yourself." --- # Swarm **You orchestrate; the workers do the work.** The `orchestrate` skill holds the protocols, the run's proposal, dispatch, briefs and how findings are weighed; the `swarm-board` skill holds the board, its orchestrator side in its `references/orchestrator.md`, read before opening. Here: what a task swarm adds. There is no plan behind it: **a task is a post on the board** (the `orchestrate` skill's `references/tasks.md`), whatever the task is. ## Proposing one Not asked, but the work splits into parts or must be seen working: offer it as the `next-step` skill says, the protocol filled in. On a no, do it yourself. ## Setting it up **Propose the run as the `orchestrate` skill's *Propose the run* says**, built on the closest example (build-verify when the work must be seen working; a prototype phase first when it adds or changes a screen (charter `prototype:`), an architecture phase when its modules and entries must be settled before any code (charter `architecture:`), the prototype first when both; none for workers on call), with: how many workers (3 to start from, reconsidered against the estimate of the work as *Propose the run* says) and each one's area; under build-verify, the verifiers (sized from the verify's steps), their focus, source and port range, whether only one instance can run; the loop; each seat's model and effort (Opus; builders `low`, verifiers `medium`); **the branch** their work merges into, a new `swarm/` off the current branch by default. ## Open and dispatch 1. Create the branch, push it, and leave it checked out nowhere (detach the main checkout): a worker fast-forwards it from the worktree its join makes. 2. A seats file, one row per worker, `w1` … `w`, role `worker`, and under build-verify one per verifier, `v1` … `v`, role `verifier`, area ``, and its own port range in its brief; then `$S open --kind task --group --title "" --seats --onto ` with `--protocol ` when it runs one, or `--protocol none` for a swarm with no phases on purpose, and start your link as it prints; under a protocol, open its first phase before the first task post. Give the person the board's URL. 3. **Every worker at once** on the plugin's `swarm-worker` agent (`subagent_type: "swarmstorm:swarm-worker"`), no `isolation` (its join makes its worktree), as the `orchestrate` skill dispatches. The brief holds no task (`` is the CLI as you run it, the `swarm-board` skill's `$S`, written out in full): ```markdown You are worker `` of task swarm run `` on ``. Your join makes your worktree from `` and prints its path; merge into ``. **Prepare**, in that worktree: ``. Load the `swarm-board` skill and read its `references/worker.md`. Join now, with this line verbatim: ` join --run --seat --doing "joining" --as /`, then wait for the tasks posted to you. ``` Under build-verify, every verifier at once too, on the plugin's `verifier` agent (`subagent_type: "swarmstorm:verifier"`), no `isolation`: ```markdown You are verifier `` of task swarm run `` on ``, protocol build-verify, focus ``, ports `` for your own instance<, one instance only: walk it in your phase's turn>. **Source**: -` skill | instructed: each verify phase's message gives your steps>. Load the `swarm-board` skill and read its `references/worker.md`. Join now, with this line verbatim: ` join --run --seat --doing "joining" --as /`; each verify phase's message scopes your pass. ``` With a prototype or an architecture phase given to seats, their members too, no `isolation`, unless the charter gives the phase to you: a prototyper on the plugin's `prototyper` agent (`subagent_type: "swarmstorm:prototyper"`), an architect on its `architect` agent (`subagent_type: "swarmstorm:architect"`): ```markdown You are the `` of task swarm run `` on ``, protocol `` with a phase, reading the code on ``. Load the `swarm-board` skill and read its `references/worker.md`. Join now, with this line verbatim: ` join --run --seat --doing "joining" --as /`; the phase's message gives your scope. ``` ## Giving work - **One post per task, to one worker**: `$S post "@w2 " --as /orchestrator`. A task says what to do, the context the worker lacks (the files, the decisions already taken, what not to touch), and **done when** (a command that exits 0, or what is observed). - **Split so workers do not collide**: different files where you can; two tasks on one file are one task, or the workers settle it on the board. - **The person keeps giving work**: each request becomes tasks for the workers waiting; a worker's report frees it for the next. ## A report Read it and acknowledge it at once in one post to its worker (`@wN received`, or what to fix); a worker that hears nothing does not know the task is closed. Re-run its done-when yourself on the merged branch before you tell the person it is done. A finding is weighed as the `orchestrate` skill's *Findings* says. Tell the person, in a few lines, what landed. ## Under build-verify The phases, the verify message, the judged table and the loop are the protocol's: the `orchestrate` skill's `references/protocols/build-verify/protocol.md`, read before the first phase. A task is posted as above; build 1 holds the work asked, every later build the judged table's rows that stand. ## With a prototype or an architecture phase Each phase, its seats and when it reopens are the `orchestrate` skill's `references/prototype-phase.md` and `references/architecture-phase.md`, read before the first phase; the prototype runs first when both. The protocol's phases then run as above, every task quoting the accepted architecture's entries and citing the prototype's screens it builds. ## Closing When the person says so, or propose it once every worker waits and nothing is left: `$S close --run `. Then the summary: what each task delivered, the branch and its commits, and the choice that is the person's, a pull request or a merge into their branch. Never delete a branch.