Swarm roles
Who is in a swarm: the swarm lead and its workers, each with one of eight roles named after the jobs of worker bees. The icon beside each role is the one Otto shows beside that sender's messages.
A swarm
A swarm is one task run by a swarm lead and its workers. The swarm lead splits the task into sub-tasks and gives each sub-task one role. Workers are recorded in the swarm and its Hive view, not as tasks of their own; the swarm's task shows how many are done. Each worker runs one sub-task on its own branch, several at a time within the swarm's budget, and reports when it is done. The swarm lead reads the reports, merges the work into its own branch and lands that branch.
Building work runs as a swarm by default. Every swarm that builds has at least a builder, a guard and a nurse: a plan that changes code without all three is refused. A question, an investigation or a docs task runs as one session instead.
Swarms run on a Mac, or on a session host where a Mac allows them.
At a glance
| Role | Its job | Commits |
|---|---|---|
| scout | Planner / researcher | No |
| builder | Developer | Yes |
| nurse | Tester | Yes, when it fixes or adds something |
| guard | Reviewer | No |
| cleaner | Tech debt / refactor | Yes |
| undertaker | Dead-code removal | Yes |
| fanner | Performance / infra | Yes |
| attendant | Docs / briefings | Yes |
The swarm lead
A session of its own, in its own worktree, started with /otto:supervise. It writes the plan: the sub-tasks, the role of each, which ones wait for which. The project's Keeper approves the plan when the Keeper started the swarm, or on a session host when the project has a Keeper; otherwise you do. Then it runs the plan on its own: it starts the workers, steers them, merges what they commit, starts the guard and the nurse on the merged work, and lands the branch with /otto:finalize-worktree. It posts its plan, its progress, what blocks it and "ready to land" to the project's channel.
The worker roles
scout
Planner / researcher. Explores the code, a question or the options before anyone builds, and reports what it found and what it recommends. Commits nothing.
When: first, when the approach is still open or the code is large or new to the builders. The swarm lead plans the builders after its report and hands each builder its share of the scout's map.
builder
Developer. Builds what its brief asks for, with tests, and commits it.
When: in every swarm that builds. Several builders run side by side when their pieces touch different files; pieces that touch the same files wait for one another.
nurse
Tester. Tries the merged work on the real path where it can — a mock of an outside service does not count — adds tests, fixes small obvious bugs and reports the rest precisely. Its report ends with a verdict: passed, failed or unreachable, whether it reached the real path, and, for a fix, whether its tests fail without the fix. It commits what it fixes or adds; a nurse that tests and finds nothing to change commits nothing, and its report is its work.
When: in every swarm that builds, after the builders it tests are merged. A plan with no nurse is not approved.
guard
Reviewer. Reads the swarm's diff for bugs and inconsistencies and reports each finding with its file and line. Commits nothing.
When: in every swarm that builds, after the builders are merged. The swarm lead sends its findings back to a builder or fixes them before it lands.
cleaner
Tech debt / refactor. Refactors and pays down tech debt without changing what the code does; the tests pass before and after.
When: when the work is a refactor, or before builders who would all have to read one very large file: the cleaner splits it first and they wait for it.
undertaker
Dead-code removal. Removes dead code, unused files, flags and dependencies, proving each one unused before it goes.
When: when a task retires something, or after a change leaves old code behind.
fanner
Performance / infra. Works on speed, the build, CI and infrastructure, measuring before and after.
When: when the work is about how fast or how reliably something runs, or about how it is built and deployed.
attendant
Docs / briefings. Writes and updates docs, decisions and briefings so they match the code.
When: usually last, once the builders are merged.
Older role names
Plans from before the bee names still work: coder is a builder, tester a nurse, reviewer a guard and other a scout.
See also
- Architecture: how the Keeper, the swarm lead and the workers fit with sessions, tasks and hosts.