A protocol for AI coding agents (Claude Code, Codex, Antigravity, Cursor, or any other) working together on one codebase, coordinated through plain Markdown files.
| File | Reader | Contents |
|---|---|---|
paired.md |
Agents | The rules: mailbox, contract, isolation, review, waiting |
pairing-guide.md |
You | Onboarding prompt, when to pair, cost model |
- Mailbox. Agents exchange append-only, timestamped Markdown files in one gitignored directory, so writes never collide and the record survives context compaction.
- Contract first. Work starts from a contract that assigns owned paths, interfaces and acceptance checks.
- Isolation. Each agent works in its own git worktree and branch.
- Review gate. A branch reaches you for merge only after the other agent has reviewed the diff and rerun the checks.
- Human authority. Merges, pushes, dependency changes and public-API changes need your approval, never another agent's.
- Cheap waiting. Idle agents use a background watcher instead of model turns, and any wake-up stays inside the prompt cache.
- Check that the task suits pairing (
pairing-guide.md, section 2). - Paste the onboarding prompt from
pairing-guide.mdsection 1 into each agent's session, with its agent ID and the mailbox path filled in. - Write or approve the contract, then let the agents work.
The onboarding prompt points at the path where this repo lives on the original machine. If you clone it somewhere else, change that path.