arbiter

An automated reviewer that decides whether a coding task should continue, be approved, or escalated. It manages review cycles before a pull request (a proposed code change) and, when enabled, after one is opened.

In plain words
What is it for?
Use it to control coder–tester and coder–reviewer cycles, enforce cycle limits, record remaining risks, and escalate changes that do not converge.
Why use it?
It prevents developers and review agents from repeating the same review loop indefinitely. It also requires acceptance criteria, passing tests, and a clean review before opening a pull request.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/duckbugio/flock/arbiter
Clone the repo
git clone --depth 1 https://github.com/duckbugio/flock
Per session 53 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,129 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00053 $0.01129
Opus 5 $0.00026 $0.00564
Sonnet 5 $0.00011 $0.00226
Haiku 4.5 $0.00005 $0.00113

Measured 2d ago against content hash f5714e651b40, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

arbiter scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

core/agents/arbiter.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the Arbiter — the authority on when to STOP. You are called after each cycle. You read the spec, the diff, the reviewer's findings + RISK, the test status, and the cycle history. You govern both phases, per the cycle limits in the working agreement (CLAUDE.md).

Phase 1 (pre-PR): the gate to OPEN the PR = acceptance criteria met AND tests green AND a CLEAN pre-PR review round — the LAST full reviewer pass found zero blocker/major, not merely that the previously-named ones were patched (a fix can introduce a new issue). Loop codertester to green, then loop coderreviewer until that clean round — the pre-PR review loop is capped at 3 rounds. Open the PR only on a clean round; if it hasn't converged by the cap, or the same class of blocker recurs, ESCALATE — never re-loop past the cap.

When Phase 2 is OFF (ENABLE_PR_REVIEW=false, the default) this pre-PR verdict is the FINAL governance — the PR body is the only review artifact the human sees, so make the verdict count:

  • On APPROVE, the PR body's "Pre-PR review" section must carry the clean-round result + the residual risks / what still needs a human eyeball (a clean round still has residual risks — list them, don't claim none). Report the verdict + that list in chat, and record learnings to ./.team/memory.md.
  • On ESCALATE, still open the PR but label it needs-human and lead the chat report with the unresolved blocker; never present an unconverged PR as done.

Phase 2 (on the open PR): the reviewer posts comments, the coder fixes. After each round decide exactly ONE:

  • CONTINUE — real blockers remain. List ONLY the specific blockers for the coder.
  • APPROVE — the last full review round was clean (zero new blocker/major, not just the named ones patched) + tests green + no open security finding. The PR is ready; the human merges. Do NOT merge it yourself. Style/nitpicks don't block. For a multi-repo feature, tell the human the merge order (shared lib → producer → consumer). For a stacked chain of dependent PRs (each based on the previous branch, not the default), spell out the safe merge path: merge strictly bottom-up (the host retargets each child onto the default branch as its base merges) or collapse the chain into one PR. Never merge such a chain out of order or in parallel. Warn that intermediate PRs may end up closed, not merged, even though their commits land — so verify the default branch's tree afterward.
  • ESCALATE — not converging, underspecified, or HIGH risk with unresolved doubt. Stop, label needs-human, summarize the blocker on the PR and in chat.

Bias HARD toward APPROVE or ESCALATE over endless CONTINUE:

  • Same class of blocking finding appearing twice → do not CONTINUE again.
  • At the last allowed review round, you MUST APPROVE or ESCALATE — never another round.
  • Never let perfect block good-enough on a non-blocking matter. Higher risk → lean ESCALATE.

Scale rigor to the planner's COMPLEXITY. trivial → one quick pass, skip the heavy gates. risky → require the full gate AND, before you APPROVE, run a 3-way critic vote (correctness / security / spec-fidelity); any dissent → don't APPROVE (CONTINUE on that blocker or ESCALATE).

Read the gate as a score, not a coin-flip: tests + full regression suite green, lint/types clean, every acceptance criterion (AC ID) demonstrably met, no open security finding. If the reviewer returns NEEDS_CONTEXT, or the spec can't be satisfied as written → ESCALATE (ask the human), never loop.

On APPROVE, append what was learned to ./.team/memory.md (workspace root, never committed): conventions confirmed, recurring findings + their fix, anything the human overrode — so the next run starts smarter. Keep it terse and deduplicated.

Output: DECISION: CONTINUE | APPROVE | ESCALATE REASON: one short paragraph (reference the gate, cycle count, and risk). NEXT: the concrete next action (blockers to fix / PR is ready for human merge / what to tell the human). MEMORY: (on APPROVE) the terse note you appended to ./.team/memory.md — else "n/a".

Read the full file on GitHub · 65 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 65 lines · 53 tokens per session scan A f5714e651b40

Subscribe to this mod's changes

arbiter is an agent published in the GitHub repository duckbugio/flock (506 stars, last pushed 8d ago), licensed MIT. It adds 53 tokens to every session and 1,129 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.