Normalize markdown formatting after the latest main updates.\n\nChecks: python3 scripts/layered_soul.py validate .; npx --yes prettier@3 --check '**/*.md'; git diff --check.
2.8 KiB
2.8 KiB
Colibri Multi-Agent Handoff Pattern
Protocol
All agents (Hermes, Claude, Codex) coordinate through .agent-handoff.md in the
Colibri repo. The file is the single source of truth for cross-agent context
transfer. Commit messages cite it; agents read it on startup.
Entry format
Each handoff entry follows this shape:
### YYYY-MM-DDTHH:MM:SSZ - Short descriptor
- **Agent From**: name (host/platform)
- **Agent To**: name (host/platform)
- **Focus Area**: one-line scope
- **Context**: 2-3 sentences of what changed / why this handoff exists
- **Steps**: numbered, copy-pasteable commands with expected output
- **Context Files**: list of files the receiving agent should read first
Verification rules
- Test counts: always from
cargo test --workspaceoutput, never--list - Clippy:
cargo clippy --workspace --all-targets -- -D warningsmust be clean - Platform: Codex (osa/FreeBSD) owns FreeBSD validation. Hermes/Claude (Linux) push for it.
- Baseline: record exact commit hash, test count, crate count
Relay pattern
Agent A (build + push)
→ Agent B (pull, verify, act, push)
→ Agent C (pull, verify, act, push)
→ back to A
Each relay includes:
- Pull latest:
git pull --ff-only origin main - Verify:
cargo fmt --check && cargo clippy && cargo test --workspace - Act on the handoff steps
- Push results
- Update
.agent-handoff.mdwith outcome
Platform split
| Agent | Host | OS | Role |
|---|---|---|---|
| Hermes | debby | Debian 13 | Build, code, push |
| Claude | domedog | Ubuntu 24.04 | Build, code, review |
| Codex | osa | FreeBSD 15 | FreeBSD validation, ISO builds |
Codex is the only agent that can run FreeBSD-specific commands (pkg, service,
kldload), validate cargo test on real FreeBSD, and build ISOs.
ISO build handoff (specific pattern)
When Codex needs to build Colibri for ISO consumption:
- Hermes/Claude push Colibri changes to main
- Handoff entry with exact build steps:
cargo build --workspace --release - Codex pulls, builds, verifies 4 binaries (daemon, colibri, smoke-agent, tui)
- Codex runs ISO preflight:
FEATURE_COLIBRI=YES ./build.sh --skip-fetch cargo cleanonly AFTER ISO build consumes the binaries- Codex reports: commit hash, binary sizes, FreeBSD version, ISO preflight result
Pitfalls
- SSH agent dies on tmux restart:
ssh-add ~/.ssh/codeberg-clawdiebefore push - Codeberg SSH drops: retry, don't assume push failed
- Test count inflation:
--listovercounts; usecargo test --workspaceoutput - Bash heredoc corruption: use
write_filefor function definitions with command names - DaemonConfig field additions: grep
DaemonConfig {to find all constructors