Skip to content

Harness adapters

Every teammate runs the same check. Only the wiring differs.

Teammate Harness Adapter
Clahadore Claude Code Hook (wired): PreToolUse → fleet-preflight hook-pretool; PostToolUse on tabs_create_mcp, select_browser, switch_browser → hook-posttool. Install: install.ps1 -WireClaudeHook
Cedric Codex / ChatGPT (codex exec) Codex has no pre-tool hook. Add the rule block below to ~/.codex/AGENTS.md (via fleet-constitution), and run Codex with --sandbox workspace-write so destructive commands need the CLI gate
Jenny Gemini / agy (agy-wrap) Same rule block in the agy system prompt (fleet-constitution target). agy-wrap.ps1 can pre-scan the prompt with fleet-preflight check (class Secrets, verb prompt) before sending
Gronktayvius Grok (UsageGovernor.exe grok-exec) Review seats are read-only (memory review-seat-must-not-write), so only the Secrets prompt pre-scan applies
Susie Franny Muse (muse exec) Read-only seat, no --yolo: Secrets prompt pre-scan. If ever given write tools: the same rule block as Cedric
Joffrey Jev Not an actor. Joffrey is layer 2 of the check

Rule block for harnesses without hooks

Paste this verbatim. fleet-constitution renders it into each CLI's config.

PRE-ACTION CHECK (FLT-306). Before any of these actions, build a preflight JSON and run
`C:\Tools\fleet-preflight\fleet-preflight.exe check --file <path>`:
  money/billing/purchase/IAM/OAuth; navigating or typing in a browser tab; delete, force-push,
  reset --hard, dropping a database, killing a process, uninstalling; merge/land/push to a
  protected branch; sending email/messages, publishing, DNS, prod deploys; writing anything that
  could hold a secret.
Exit 20 (Block) is final: do not retry, rephrase or route around it. Tell Andrew.
Exit 10 (Warn): show Andrew the printed code and wait for his yes before acting.
Any other exit code, a crash, or a missing exe: treat it as Block.
An empty, failed or ambiguous identity reading is a Block. Read it again; never guess.
Read observedIdentity from the producer (gcloud config get-value account, the browser's signed-in
profile, gh api user) within 10 minutes, and set identitySource.kind = "Producer".
Register PIDs you spawn: `fleet-preflight own-pid <pid> --proof "<how>"`. Never kill by name.
Never reboot. Never hand-edit .env.

Shell wrapper (any harness)

$exe = 'C:\Tools\fleet-preflight\fleet-preflight.exe'
if (-not (Test-Path $exe)) { throw 'preflight did not run: exe missing (treat as Block)' }
$global:LASTEXITCODE = -1
try { $out = @($preflightJson | & $exe check) } catch { throw "preflight did not run: $_ (treat as Block)" }
$verdict = $out | Select-Object -First 1
switch ($LASTEXITCODE) {
  0       { 'proceed' }
  10      { throw "surface to Andrew and wait for his yes: $verdict" }
  20      { throw "blocked: $verdict" }
  default { throw "preflight failed (exit $LASTEXITCODE): treat as Block" }
}

Only exit 0 proceeds. A missing exe, a crash or any unknown exit code is a Block: fail closed. Exit 10 always stops for Andrew's yes. The JSON you checked must match the action you then take, field for field. Any change needs a new check.

Landing gate integration

council-code-review should, after the seats return, emit a landing preflight (sha, required seats, approvals by sha, suiteGreenSha from gh run list on that sha, waivers, open findings) and run check. A Proceed (never with --no-jev) writes the receipt, keyed by the full sha. The Claude Code hook looks for that receipt before a push to master. Today a missing receipt raises Warn:LandingReceiptMissing, not a Block. Until council-code-review emits the landing preflight (follow-up work, not done in FLT-306), a receipt is not push authorization on its own: the review gate still is.