Independent memo — SAPHAN-1M. Marzec (“Wato”)
wato.org / protocolv0.1 · July 2026
Category: methodology
BATTLE-TESTED

The Saphan Protocol

A protocol for running fleets of coding-agent sessions — Claude Code and similar — on real, commercial software. Written rules, hard human gates, provable artifacts. Not a framework, not a harness: the methodology layer above them.

the series · the author · saphan.ai

1.The model, in one minute

The Protocol

How the fleet works: roles, the gate sequence, dispatch rules, order/status channels, proof-over-claims.

The Bridge

Where a project's truth lives: one repo per project — constitution (§1), tasks, decisions, conventions. No product code.

The Fleet

The parallel agent sessions doing the work: a master, executors, an independent adversarial review.

The fleet reports to the bridge.
The bridge is governed by the protocol.

Every agent session starts by reading the bridge; the fleet does the work; the bridge records what became true. Humans hold the gates.

2.Roles

RoleDoesNever
MASTERplans, writes executor briefs, creates worktrees, holds the ledgercodes, merges, reviews its own dispatch
EXECUTORimplements one task in its own worktree, commits locally, returns STOP-2 with actual artifactspushes, merges, touches worktree lifecycle
REVIEWadversarially checks an executor's return; recommends accept / conditions / rejectwrites code, designs anything
HUMANdecides at every gate; merges; owns anything irreversiblegets automated away

3.The gate sequence

STOP-1 (plan) → review → IMPL → STOP-2 (proof) → review → HUMAN MERGE

Gates are cheap, early human course-corrections — the protocol automates transport between them, never the judgment at them. A green test run proves determinism, not correctness: GREEN ≠ correctness. STOP-2 must show the actual artifact — the diff content, the rendered output, the live HTTP response — never an agent's summary of it.

4.The five dispatch rules

Each exists because its absence caused a real incident.

  1. ROLE-LOCK. Every executor brief opens by telling the session what it is — and what it is not. A session that thinks it's the master drifts into planning instead of coding.
  2. Tab = task file name. Five auto-titled tabs are indistinguishable; rename to the slug the moment you paste.
  3. Anti-cross-wire. The brief bounces itself if pasted into a session already bound to a different task or a dirty worktree.
  4. 1 session = 1 task. For the session's whole life. Fixes to an in-flight branch are continuations in the same session — a branch lives in exactly one worktree.
  5. Close signal. The executor's last line, only when truly done: 🟢 CLOSE-OK · slug · commit SHA · branch · worktree — you see it, you may close the tab.

5.What a constitution looks like

The hardest file in a bridge is AGENT.md §1 — the invariants no task may violate, each checkable against a diff. From the worked example (a fictional billing SaaS) that ships in the repo:

- 1.1 Never double-charge. Every charge path is idempotent end-to-end;
      a diff touching rating without an idempotency/property test is
      incomplete by definition.
- 1.2 The usage ledger is append-only. Corrections are compensating
      entries; alterations must remain detectable.
- 1.3 Fail-closed on charging, fail-open on display.
- 1.5 Billing math lives in one module. Duplicated money math is a §1
      violation even when the numbers are right today.

Every template in the repo ships with a filled *.example.md like this — read the example, write your own, delete the example.

6.Rules worth stealing on their own

Verify before you assert. Status claims (“done”, “deployed”, “collision”) require live evidence — a git log, a real build exit, a live HTTP status. Recalled memory is point-in-time: if it names a file or flag, re-verify against live code before relying on it.

Secrets not quoted. Names and prose are fine; values never — in any role, any artifact, any log.

Deterministic first. No model call where code suffices: deploy verification, PR pre-flight, build orchestration are algorithms, not conversations.

7.Provenance

Extracted from practice: this protocol shipped a commercial telco-security product, live at a mobile operator six months after development started — one person running the specialist half through agent fleets, alongside a classic team. Every hard rule comes from a real incident; the incident write-ups are the series.