Reference · Interactive
Step through a single git_handoff from coder → cleaner.
Watch directories, headers, and the agent loop light up together.
Use Next / Prev (or ← → keys) on the stepper below.
Then scroll for the static maps (topology, lossy vs durable). Everything
here matches handoff-protocol.md and the helper scripts.
Two roles, two worktrees, one daemon that owns delivery and wake-ups. Agents never send work over tmux themselves.
Own git branch under .worktrees/… (or master). Writes
draft → outbox/. Later sees file in
sent/.
Polls every outbox. Copies into recipient
inbox/new/. Lossy tmux wake-up. Archives to
sent/ or failed/.
Claims with ready_for_next
(new → in_process. Finishes with
done_with_current → completed.
Scenario: coder finished a slice, committed, hands off to cleaner
(two-pack style). Black chip = the .handoff file.
.swarmforge/handoffs/ · SWARMFORGE_ROLE=coder
.swarmforge/handoffs/ · SWARMFORGE_ROLE=cleaner
Highlighted = this step’s action Green border = file present Token = .handoff
Chips light up as writers add them. Agents only draft the first row’s
fields for a git_handoff.
ready_for_next → TASK or NO_TASK
Use PAYLOAD only; ignore extra wake-ups
Commit + swarm_handoff (sender side)
done_with_current then ready again
Write draft headers; run swarm_handoff.sh
File appears in outbox/ (body generated)
Copy → cleaner inbox/new/ + headers
Wake-up text via tmux; move original → sent/
ready_for_next → in_process
Do owned work (merge / clean / tests…)
done_with_current → completed + ready
This is the design trick that makes a TUI rewrite easy: swap the left column; keep the right column’s semantics.
send-keys (today).swarmforge/handoffs/ready_for_nextFor task mode, each handoff is one token moving through three inbox folders. Ambiguous shapes (two in_process files) are errors — helpers refuse to “fix” them.
ready_for_next
inbox/new ──────────────────────► inbox/in_process
│ │
│ (sorted by filename) │ done_with_current
│ ▼
│ inbox/completed
│
└── if empty after ready → print NO_TASK
restart rule: always ready_for_next
· one file already in in_process → re-print it (resume)
· else take first from new/
Batch mode (later lesson): equal-priority files move together into a
batch_* directory under in_process/.