/delivery-orchestrator:fleet-protocolfrom delivery-orchestrator
Coordinates parallel Claude Code sessions on one codebase: registration, heartbeats, dispatch routing, claim states, git discipline, and merge-readiness checks. Use when running multi-session fleets.
Ships in delivery-orchestrator. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The contract. A lane's brief says what it works on; this says how it behaves.
Everything fleet-specific — repo names, lane names, paths, bases, hands-off
sets — lives in fleet.config.json (see references/configuration.md). This
file names no repository.
The protocol is a tool, not a reading assignment. Every ritual below has a
one-command form in ${CLAUDE_PLUGIN_ROOT}/scripts/fleet.mjs, and the
evidence rule that governs it is built into the command so it cannot be
skipped. Prefer the command to the hand-written version every time — the
hand-written versions are what cost the source run hours.
| Ritual | Command |
|---|---|
| register + first heartbeat, one action | fleet register <lane> <session> |
| heartbeat, validated on write, read back before success | fleet hb <lane> <state> <task> [note] |
| what am I waiting on, has it cleared | fleet blockers <lane> |
| every lane's state and age | fleet census |
| a PR's check state, read properly | fleet checks <owner/repo> <pr> |
| which posted verdicts have gone stale | fleet verdicts <owner/repo> |
| who a merge unblocks and whose green it broke | fleet unblocks <owner/repo> <pr> |
| CI load in jobs, not runs | fleet queue-depth <owner/repo> |
| the router's digest | fleet digest |
| a run directory from a config | fleet init <run-id> · fleet doctor |
(fleet = node "${CLAUDE_PLUGIN_ROOT}/scripts/fleet.mjs"; --self-test
proves the pure logic on fixtures, including the double-run and mixed-type
check cases.)
Session mode. Each lane is its own session, not a subagent. A
foreground Agent call blocks the caller's turn: it cannot heartbeat and
cannot read messages until the call returns. Subagents are for bounded work
inside a lane's turn, never for a lane itself.
On start, resolve your own identity (ListAgents — its first line names
this session) and append one row to the run's registry.md:
| <UTC> | <lane-name> | <session-name> |. The session name is the
sidebar title and changes when a human renames it; the registry is
append-only, and the last row for a lane is its current address.
Resolve every address from the file at send time, never from memory.
Read the last registry row for that lane, then send. If a send fails to
resolve, run ListAgents once, match the row whose title fits the
role, append a fresh registry row, retry once. A role with no registry row
is not online — send to the dispatch router instead.
This is a rule about the reader, not the file. Two sessions independently addressed a session that had been ruled hung hours earlier, in the same hour, from memory — while the registry was correct the entire time. One was caught by accident, the other by the first's confession, and no process caught either. A correct, authoritative artifact that nobody consults is the hardest instrument failure to fix, because there is nothing to repair.
Never poll. Messages enqueue at the receiver and are processed on its
next turn, so a message wakes an idle session. A polling loop over
ListAgents burns turns and proves nothing.
Route through the dispatch router. All acks, reports, "PR ready"/"merged" notices, blocked notices and escalations go to one comms role, which fans out, collects acknowledgements, keeps the registry current, and sends the orchestrator digests, not a stream. Nobody else messages tier 0 directly.
Two rules the router itself is bound by, both learned the hard way:
<lane>, unverified"). A
router multiplies confidence without adding evidence: a claim that travels
lane → router → planner → back to its own origin arrives wearing two hops
of apparent independent corroboration it never had.You own exactly one file: heartbeats/<your-lane-name>.md. Append one line:
<UTC> | <state> | <task> | <note>
state ∈ start working waiting blocked delivered standby. The
note is optional; the other three fields are not, and no field may contain an
unescaped newline. The line is not just a convention — validate it with
${CLAUDE_PLUGIN_ROOT}/scripts/validate-heartbeat.mjs. Three sessions
produced three different malformations of this format in one evening, and one
of them — a leading |, copied from a table — shifted every field so a
tombstone for a dead session made the monitor report it alive.
Append at start, at every milestone, before and after any command
expected to run long, and at least every heartbeat.intervalMinutes
(default 15) while active.
heartbeat.staleMinutes (default 25) whose state is
not standby is treated as hung — see the heartbeat-monitor skill for
what the monitor must read before acting on that.waiting | <task> | foreground worker, expect silence. The monitor reads
it as intended rather than as a hang.waiting and standby are different states, and only one has a
counterparty. waiting | <specific next action> | <why> is reserved for
something genuinely pending on someone else, and it names what — so the
monitor, and you, can check whether that thing is still pending.
standby | <next action when work arrives> | is genuinely idle. Collapsing
them makes a blocked lane and an idle lane identical in a census; a lane
once sat blocked for two hours after its blocker had cleared.fleet blockers <your-lane>. It reads the refs in your own waiting
heartbeats and asks the forge whether each has cleared — exit 1 means
move. The merger telling you is the other half of that rule and it is
unauditable — it leaves no trace, so nobody can verify it was sent,
including the merger. Your own measurement leaves one, and it caught 3 of 3
idle-on-done-work cases that no monitor saw.standby and end your turn. A message
wakes you. Standby is not death.Appending: these files are written by many sessions at once. Use fleet hb.
It prints on every branch and reads the line back before reporting
success, because a shared helper that no-ops quietly is worse than twenty
lanes appending by hand — it fails them all in the same silent way, and a
silent heartbeat skip reads as HUNG and gets a producing lane replaced.
"Not written", "denied" and "skipped" leave identical bytes; only the
read-back tells them apart. If you must append by hand: on Windows,
[IO.File]::Open($p,'Append','Write','ReadWrite') or Add-Content; POSIX
>> and tail against a file another session holds open can block until the
tool timeout — and read your own line back afterwards. See
docs/platform-notes.md.
Every statement a session makes is ASSERTED until a link promotes it to DELIVERED.
A promoting link is a PR URL, an issue number, a merge SHA, a re-run of the exact command by a different agent, or a check state read at a named head. Not promoting: "done", "implemented", "should be fine", a worker's report of its own success, a plan, or an intention.
This is the single highest-value rule in the protocol. Everything in the
evidence-rules skill is a corollary of it.
Full text with the incident behind each rule: references/git-discipline.md.
The short form, all of it load-bearing:
fleet.config.json. Never
edit another lane's repo. Honour the configured hands-off repo list.git diff HEAD --stat
must be empty when the proof runs.Co-Authored-By: trailer naming the
model. No authorship headers inside source files.--force, reset --hard, clean, or worktree remove --force.
Never delete a branch holding unique content. --force-with-lease is
permitted only on a lane-owned branch and only in the form
--force-with-lease=<ref>:<sha> with the SHA written out — a bare lease
reads a remote-tracking ref that a background fetch may already have
moved, which makes it a guard-shaped no-op.author cannot discriminate between lanes; it
answers "is this ours", and the branch answers "which lane". Read
authorship from the branch, never from the PR.Review routing. Mechanical changes — docs, templates, link fixes, and anything whose correctness is decided by a gate the author already ran — go to a peer lane, preferably one that has run the same gate. Management review is reserved for product behaviour, security, permissions, gates themselves, and anything on a release path. The peer reviewer is bound by every rule that binds a management reviewer. Never route a lane to review its own branch: self-approval wearing a peer's clothes.
Every PR body states four things — this is the shape that makes reviewer attention go further, because the claims arrive already scoped:
| WHAT was verified | the claim |
| THE EXACT COMMAND or gate | so the claim is re-runnable |
| THE FALSIFIER | the input that would have turned it red |
| THE SET or COUNT | what the claim ranges over |
Plus: what was intentionally not run, and the rejected "fixes" that would have hidden the problem rather than solved it.
Before merging (references/merge-discipline.md for the mechanics):
Some decisions are not a session's to make: money, production, tenants, the
trust chain, repository or organisation settings, abandoning work. Configure
the list in fleet.config.json under founderClass.
escalations.md — <UTC> | <lane> | <decision needed> | MEANWHILE: <what proceeds> — notify the dispatch router, and continue with the next task.founderClass names topics. It does not decide who acts. Classify each
blocker from facts, using the table in references/authority-and-receipts.md
(the checker is lib/fleet/classify-authority.mjs):
| Class | When | Goes to |
|---|---|---|
| IRREVERSIBLE/FOUNDER | Merge to default branch, publish, tenant-wide or production grant, billing, deleting customer data, production cutover | coordinator → parent → founder |
| MISSING-CAPABILITY | Reversible, but no automated path or permission exists | coordinator, naming the exact permission or capability |
| AGENT-AUTHORIZED | Reversible and inside an existing grant or the brief | proceed, no sign-off |
| COORDINATOR-DECISION | Reversible and capable, but not delegated | coordinator extends or denies the brief |
The founder is reached only through the parent, and only for the first row. Do not list a reversible step the brief delegates as "the human's step".
Every escalation, completion and failure is a schema-checked receipt, sent to
the coordinator's thread (references/authority-and-receipts.md). A lane is
done only when it has posted a completion or failure receipt. A cancelled
run still owes one. The coordinator lists terminal runs that have no receipt
and reconciles every completion claim against T3 run state.
path:line.fleet-roles skill.reports/<lane>.md (PRs opened and merged, issues closed, blocked items,
exact proofs) and finish with heartbeat standby.One directory per run, machine-local, never committed. Layout, ownership and
the append rule: references/run-directory.md.
| File | Contents |
|---|---|
references/configuration.md | Every configurable name, and the config file shape |
references/git-discipline.md | The full git rules with the incident behind each |
references/merge-discipline.md | The merge gate, step by step |
references/run-directory.md | Log files, who owns which, the append rule |
references/authority-and-receipts.md | Blocker decision table, escalation receipt schema, done rule, coordinator reconciliation |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub thelobbi/claude --plugin delivery-orchestrator52 skills in this plugin
/actions-authoringThis skill should be used when writing, hardening, or optimizing GitHub Actions workflows — permissions, action pinning, script injection, caching, matrices, concurrency, and cost./actions-automationThis skill should be used when building automation on GitHub Actions beyond CI — manual and external triggers, scheduled jobs, reusable workflows, composite actions, issue and PR bots, auto-merge, and Dependabot./agentic-patternsPatterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to CD orchestration and state-machine deployment workflows/ci-forensicsThis skill should be used when reading CI logs and diagnosing failures — fetching Actions logs through the GitHub MCP, classifying failures by cause, and distinguishing flaky tests from real regressions./clean-architectureThis skill should be used when the user asks to "apply clean architecture", "follow SOLID principles", "add dependency injection", "separate layers", "use hexagonal/onion architecture", "domain-driven design", or needs guidance on structuring code into clean, testable, decoupled layers./code-reviewThis skill should be used when the user asks to "review code", "check changes", "analyze a PR", "do a security review", or "assess code quality" — providing comprehensive review across correctness, security, performance, accessibility, and testing.Other plugins' skills for the same job