Reference
Compressed picture of unclebob/swarm-forge for reimplementation. Details live in the repo; this is the map you pin to the wall.
SwarmForge runs several AI coding CLIs locally—each in its own tmux session and usually its own git worktree—and coordinates them with a durable file handoff protocol plus role/constitution prompts that encode a software craftsmanship pipeline.
swarmforge.bb: parse conf, git init/worktrees, tmux
sessions, launch agent CLIs, terminal surfaces, window watchdog,
sleep inhibitor, cleanup. State under .swarmforge/.
Outbox → handoffd → inbox; helpers
swarm_handoff / ready_for_next /
done_with_current. Message types:
git_handoff, note. Durable queue; lossy
wake-ups.
Constitution articles + role prompts + pack pipelines (two / four / six). Ownership boundaries, TDD, quality gates, always-forward chain rules. This is most of the “professional engineer” effect.
main (documentary + shared scripts)
├── swarmforge/scripts/*.bb # launcher, daemon, handoff helpers
├── swarmforge/constitution/articles/ # shared engineering/handoffs/workflow
├── swarmforge/handoff-protocol.md
└── test/
two-pack | four-pack | six-pack (runnable)
├── ./swarm # bootstrap scripts from main, then launch
├── swarmforge/swarmforge.conf
├── swarmforge/constitution.prompt + articles/
└── swarmforge/roles/*.prompt
tmux, git, bb, agent CLIs..swarmforge/ and .worktrees/.swarmforge.conf; write roles.tsv / sessions.tsv.handoffd.| Pack | Roles (typical flow) | Use when |
|---|---|---|
two-pack |
coder → cleaner → coder | Small backend tasks; no Gherkin/QA split |
four-pack |
specifier → coder → refactorer → architect → specifier | Spec + compact quality gates |
six-pack |
specifier → coder → cleaner → architect → hardender → QA | Full separation of review concerns |
.swarmforge/handoffs/
outbox/ # agent writes via swarm_handoff (tmp/ then rename)
sent/ failed/
inbox/
new/ # daemon delivers here
in_process/ # ready_for_next claims work
completed/ # done_with_current archives
/tmp/swarm-forge,
/tmp/swarm-forge-packs/*