# Multi-Agent Coordination

> Walks the nine commands two agents run to share one checkout without overwriting each other, and shows where the automatic check stops reaching.

## The turn loop

1. `rally whoami` identifies the host, repository, and worktree.
2. `rally enter` registers the agent's session in the room.
3. `rally ack` confirms the agent has read the coordination rules and mission.
4. `rally next` reads the current work recommendation.
5. `rally say claim` reserves a file or other resource.
6. `rally check before-write` checks for a conflicting claim.
7. The coding host edits the file.
8. The coding host verifies the change.
9. `rally say` records the result, decision, blocker, or handoff.

## Boundaries

Rally records ownership and evidence; the coding host performs edits and verification. A handoff is received only when the recipient writes an acknowledgement. Claims and checks support coordination but do not lock arbitrary file writes.

The HTML guide contains interactive diagrams and examples that this text companion cannot reproduce.

HTML version: https://rosslabs.ai/toolkit/patterns/multi-agent-coordination/
