Lesson 0003 · ~12 minutes
One skill: separate the protocol delivery machine from the discipline graph (packs + role ## Handoff) — and know when an agent must not re-forward.
You can answer “why did cleaner message architect?” by pointing at a
pack chain and a role prompt — not at handoffd.
Open pack-pipelines.html for chain diagrams + the “should I send?” stepper. Use this page for the compact model and quiz.
Lesson 2 was the file graph (outbox → inbox). This lesson is the role graph: which agent is allowed/expected to message which other agent after finishing work.
That discipline lives in
swarmforge/roles/<role>.prompt (especially
## Handoff) plus constitution
handoffs.prompt
and the chain rules in
handoff-protocol.md.
Runnable branches are not just install flavors — they are different role graphs:
Customization for your rewrite often starts here: change the graph and the prompts; keep the file protocol.
Protocol policy (enforced by agent obedience, not by the daemon):
After finishing the inbound task, always send a
git_handoff to the next role — even if only
formatting/manifest churn changed. Keeps the pipeline moving.
End-of-chain multi-recipient handoff (e.g. QA complete): each
recipient merge_and_process and
does not re-forward that message down the chain.
Some roles (e.g. four-pack architect) say: if no functional changes,
done_with_current without forwarding. Read ## Handoff
for the pack you run — don’t assume pure “always.”
| Meaning | Signal |
|---|---|
| This inbox item is done | done_with_current (optional prior send) |
| I have nothing to do right now | NO_TASK from ready — idle, not product done |
| This feature/job is complete | End-of-chain broadcast + human/specifier loop |
| Tear down processes | Human closes cleanup window — outside handoff protocol |
Role prompts also list Owns / Does Not Own (e.g. coder does not run mutation/CRAP/DRY). That reduces “everyone rewrites everything” without a central scheduler. For a rewrite, treat ownership tables as first-class config next to the chain edges.
After cleaner finishes cleanup in six-pack, what primarily decides that architect is next?
QA sends a completion git_handoff to all other roles. What should a recipient do with chain forwarding?
ready_for_next prints NO_TASK. What does that mean?
For a custom swarm in your rewrite, where do you first change “who talks to whom”?
Read
handoff-protocol.md
· Chain forwarding and
Terminal broadcast. Then open one pack’s
roles/*.prompt ## Handoff sections under
/tmp/swarm-forge-packs/six-pack/ (or two-pack if you prefer
the short loop).