Lesson 0003 · ~12 minutes

Pack pipelines: who sends, who stops

One skill: separate the protocol delivery machine from the discipline graph (packs + role ## Handoff) — and know when an agent must not re-forward.

Win for this lesson

You can answer “why did cleaner message architect?” by pointing at a pack chain and a role prompt — not at handoffd.

Visual first

Open pack-pipelines.html for chain diagrams + the “should I send?” stepper. Use this page for the compact model and quiz.

1. Two graphs, not one

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.

2. Packs are workflow shapes

Runnable branches are not just install flavors — they are different role graphs:

two coder ⇄ cleaner
four specifier → coder → refactorer → architect → specifier
six specifier → … → hardender → QA → broadcast merge-only

Customization for your rewrite often starts here: change the graph and the prompts; keep the file protocol.

3. Always-forward vs merge-only

Protocol policy (enforced by agent obedience, not by the daemon):

Intermediate in the chain

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.

Terminal broadcast recipient

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.

Prompt exceptions exist

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.”

4. “Finished” is three different words

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

5. Ownership keeps agents from thrashing

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.

Check yourself

Question 1

After cleaner finishes cleanup in six-pack, what primarily decides that architect is next?

Question 2

QA sends a completion git_handoff to all other roles. What should a recipient do with chain forwarding?

Question 3

ready_for_next prints NO_TASK. What does that mean?

Question 4

For a custom swarm in your rewrite, where do you first change “who talks to whom”?

Primary source

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).

Ask the teacher Want the next lesson on launcher / worktrees / tmux (runtime layer), or on batch receive mode? Say which fits your rewrite first.