Lesson 0001 · ~12 minutes
One skill: explain the system as runtime + handoff protocol + discipline — so a Rust/TS rewrite targets the right seams instead of “reimplement all the shell.”
After the quiz, you can sketch SwarmForge on a whiteboard in under a minute and point at which layer a TUI rewrite would replace.
From the project README: SwarmForge is a local, tmux-based agent orchestration platform. It does not train models and does not host agents in the cloud. It coordinates several AI coding CLIs that work on the same project without stepping on each other.
Isolation is physical and social at once:
If you only remember “multi-agent tmux,” you will miss the half that makes the system interesting for a rewrite: the protocol and the discipline layer.
For reimplementation, treat SwarmForge as three stacked products. The original repo mixes them in shell + Babashka; you do not have to keep that packaging.
Processes and OS glue: parse
swarmforge.conf, create worktrees, open tmux sessions,
launch claude/codex/copilot/grok,
open terminal windows, watchdog, sleep prevention, cleanup. Code
lives mainly in
swarmforge/scripts/swarmforge.bb.
Durable file mail: agents write validated drafts → outbox →
handoffd copies
into inboxes → agents claim with
ready_for_next and finish with
done_with_current. Spec:
handoff-protocol.md.
Behavior law: layered constitution articles + per-role prompts + pack pipelines (two/four/six). This is why the README claims “reliable, professional software engineers” — not because of fancy IPC alone.
A TS TUI can replace most of the runtime surface (multi Terminal windows, even tmux) if it still isolates roles and delivers wake-ups. A Rust rewrite should treat the protocol as the domain core. Discipline is mostly data — prompts and pack configs — and is your main customization surface.
The
main
branch is documentary + shared machinery. The workflows
you actually drop into a project live on
pack branches:
| Branch | Shape | Typical chain |
|---|---|---|
two-pack |
Fast backend loop | coder → cleaner → coder |
four-pack |
Spec + compact gates | specifier → coder → refactorer → architect → … |
six-pack |
Full quality split | specifier → coder → cleaner → architect → hardender → QA |
Each pack carries swarmforge.conf, role prompts, and local
constitution. The ./swarm wrapper downloads scripts from
main when the local swarmforge/scripts/ tree
is missing, then launches the launcher. That split matters for
customization: change a pack to change workflow; change main scripts to
change the platform.
You do not need every flag yet. Keep this ordered list; later lessons expand each step from the real code.
swarmforge/swarmforge.conf (topology)..worktrees/ (unless master/none)..swarmforge/handoffs/.PATH.
After that, agents follow the constitution loop: accept handoffs, do
owned work, commit, send the next git_handoff. The chain
always forwards intermediate work even for “no functional change” —
that is discipline encoded as protocol policy (details in later
lessons).
Equal-length choices on purpose. Answer from memory before opening the system map.
Which layer is the handoff daemon (handoffd) primarily
part of?
You want to run a real four-agent Gherkin workflow in a product repo. What do you install?
For a TypeScript TUI rewrite, which statement matches the three-layer map?
How do roles primarily pass real work downstream in the design?
Read the top of the official
README — Intent, Branches, What SwarmForge Does
(through “Core Features”). Then skim the opening of
handoff-protocol.md
(“Goal” + “Summary” only). Local mirrors:
/tmp/swarm-forge/README.md and
/tmp/swarm-forge/swarmforge/handoff-protocol.md.
Mission: understand deeply enough to migrate and customize. Today you only earned the map. Next lessons will walk the protocol state machine, the launcher’s worktree/tmux decisions, and pack role ownership — then a migration boundary map for Rust vs TS+TUI.