Making adversarial agents play nice.
An open protocol for LLM agents that disagree, negotiate, and build consensus — without an orchestrator telling them what to do.
Most multi-agent frameworks assume a boss. One model plans, others execute, and failure cascades before anyone catches it. Turnfile inverts that: peer agents own their lanes, counter-recommendations are first-class, and a human arbitrates — without copy-paste relay duty.
Why Turnfile exists
Pairwise relays and fragmented context create delay. Collaboration state drifts when multiple agents edit shared files without a strict contract. Most frameworks optimize for local speed but under-optimize collaborative intelligence quality. Turnfile is a Structured Negotiation of Autonomous Peers (SNAP) — consent-based, peer multi-LLM collaboration with human-on-the-loop governance and public auditability.
Peers, no hierarchy
Agents propose within owned lanes. No orchestrator commands another model. File-level ownership prevents merge conflicts before they happen.
Adversarial by design
Counter-recommendations are first-class. Disagreement is signal, not error — it surfaces before action and produces better outcomes than silent compliance.
Audit-visible by default
Every decision lives in plain markdown. Mailbox messages, worklogs, and the Turnfile itself are recoverable without specialized tooling.
What Turnfile rejects — and what it chooses instead
| Common pattern | Turnfile’s answer |
|---|---|
| Orchestrator-led pipelines | Peer agents with owned lanes |
| Shared-memory merge hell | File-level lane ownership |
| Silent consensus | Counter-recommendations as first-class events |
| Hidden state in runtime memory | Append-only markdown, readable without tools |
| Human as copy-paste relay | Human as arbiter, holding intent and veto |
| Provider-locked runtimes | Runtime-agnostic across Claude, Codex, and beyond |
Run your own session
Turnfile is a protocol standard, not a centralized runtime. You clone the repo, copy the working-session templates, and point each agent at its onboarding guide. The shared Turnfile and mailbox coordinate the work; the human maintainer arbitrates.
Clone and scaffold
git clone https://github.com/snapsynapse/turnfile cd turnfile # Copy the working-session templates cp -r templates/working-session/ my-session/ # Each agent reads its onboarding guide # docs/LLM_ONBOARDING.md # skills/claude-opus_4.6/SKILL.md # skills/codex_5.3/SKILL.md
No SDK, no runtime to install. The protocol lives in markdown and YAML.
Validate coordination state
npm install # ajv + js-yaml only # Lint the Turnfile against the JSON Schema node tools/turnfile-lint.mjs # Check mailbox invariants node tools/validate-mailbox-invariants.mjs # Verify PRD promotion gates node tools/validate-prd-promotion.mjs
Validators are plain Node scripts. No hidden orchestrator, no network calls.
The core protocol files
# Invariant rules + handoff format docs/PROTOCOL_CORE.md # Mailbox format + 5-status lifecycle docs/NOTIFICATION_PROTOCOL.md # Escalation + counter-recommendations docs/CONFLICT_RESOLUTION.md # Maintainer role + approval bands docs/HUMAN_GOVERNANCE.md
The 12 promoted PRDs
# Protocol contracts (see docs/prds/) PRD-003 Message lifecycle + SLA PRD-004 Maintainer decision contract PRD-005 Protocol data schema PRD-006 Session promotion pipeline PRD-007 Trust + provenance layer PRD-008 Cross-sandbox handoff PRD-009 Cross-document reconciliation PRD-010 Shared-file transaction locking PRD-011 Session resumption PRD-012 Protocol skills pack PRD-013 Turnfile coordination format PRD-014 Session closeout + boot handoff
See it in action
The inception archive is the unedited record of two LLM agents — Claude Opus 4.6 and OpenAI Codex 5.3 — building this protocol together across 11 sessions. No human wrote their messages. No orchestrator commanded them. Zero file collisions.
Start with WORKLOG.md for the session-by-session narrative, or jump straight to MAILBOX.md to read the actual agent-to-agent messages — proposals, reviews, and counter-recommendations.