Fleet coordination

From IgorGanapolsky/ThumbGate · View interactive version

Fleet coordination is an AI agent skill from the GitHub repository IgorGanapolsky/ThumbGate. Mandatory coordination contract for ANY agent working in IgorGanapolsky/ThumbGate. Runs automatically at session start (SessionStart hook). Before mutating shared repository or vault state, verify no other live agent owns this checkout, has an active vault claim on ThumbGate, or holds a Linear issue

How to use this skill

Skill file

Fleet Coordination — ThumbGate

ThumbGate is worked by several agents (Claude Code, Codex, grok, Gemini,

Hermes) fed from the same broadcast prompt, on the same checkout host.

Coordination is not optional: the repo ruleset and single-writer lease exist

because two agents once mutated the same checkout concurrently and wiped each

other's work (incident 2026-08-11, see AGENTS.md "Single-Writer Checkout Lease").

The contract

Before ANY state mutation (git checkout/clean/reset, branch/worktree creation,

push, PR open/merge, vault write), complete these checks:

  1. Checkout lease — only one live session owns a checkout.

Claim: THUMBGATE_SESSION_AGENT=<session-id> node scripts/session-lease.js claim

Verify: node scripts/session-lease.js check

Exit 1 = another live agent owns it. Use git worktree add instead.

  1. Vault claims — ~/Documents/AI-Agent-Sync/Agent-Jobs/running/*.md

touching ThumbGate belong to other agents unless stale (>7d, dead PID).

  1. Vault dirty state — 180+ uncommitted files is normal; never git add -A

there. Stage only your own file.

  1. Linear ownership — issues in In Progress/In Review with a ThumbGate

title are claimed. Do not start overlapping work; claim your own issue first.

  1. Herdr live panes — when the gateway is up, same-cwd agents are live

collision risk.

  1. Open PR census — never duplicate an open PR or its review threads.

The one-command sweep

bash .claude/scripts/session-bootstrap/fleet-coordination-check.sh

Prints every surface above in one pass (read-only). SessionStart hook already

runs it; if you did not see its output this session, run it before the first

mutation.

Write-back rules (your own file only)

agent kind — check its mtime first. Prefer a dated file under

Handoffs/<date>-<topic>.md when in doubt. Commit only your file with

git add <your-file> and open a PR (branch protection applies there too).

another agent can see ownership.

Failure mode this prevents

Two agents, same repo, both "helpful": one force-checkouts main and cleans,

wiping the other's untracked work; the other git add -As the debris into the

wrong branch. The lease + claim + census above make that collision visible

before it happens.

Concurrent Agent-State writes (HARD)

Never write to Agent-State/<other-agent>.md. Each session appends only its own Agent-State/<this-agent>.md (or Handoffs/*<this-agent>*). Two same-kind sessions must use distinct filenames (e.g. grok.md vs grok-<session>.md) or an atomic claim/lease before overwrite.

Session handoff (omp.sh, do not install)

A handoff is a saved state-and-next file. Starting a new session keeps the previous one. A child does not inherit the parent transcript and writes files the parent does not write. Observation is view-only. Do not install omp or open a link that can prompt or interrupt the host.

npx thumbgate omp-coordination-honesty --json --map-only
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.