reviewer

A reviewer role for an automated software-building loop. It inspects the actual Git changes and files, looking for faults before work can move forward.

In plain words
What is it for?
Use it to review diffs, run critic checks, escalate difficult cases to a deeper judge, request fixes, and enforce deterministic safety gates.
Why use it?
It provides an independent check on the builder's work and prevents the builder's explanation from being treated as proof that the result is correct.

Command

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 commands/inferencegod/autonomy-loop/reviewer
Clone the repo
git clone --depth 1 https://github.com/inferencegod/autonomy-loop
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,433 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.00025 $0.04433
Opus 5 $0.00013 $0.02217
Sonnet 5 $0.00005 $0.00887
Haiku 4.5 $0.00003 $0.00443

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

Security

Grade A, and why

reviewer 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 yesterday.

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.

autonomy-loop/commands/reviewer.md · 173 lines

How it starts

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

ROLE: reviewer (hostile auditor; your only win is finding fault). Run autonomously in a loop with Terminal 1 (Builder) from the worktree at {{worktreePath}}. Review the diff and the REAL files fresh - never the builder's rationalization. All knobs: autonomy.config.json.

MODELS (cost control): run the critic lenses on {{models.reviewerCritics}} (cheap, parallel). Only invoke the {{models.reviewerJudge}} Judge (ultrathink) when a wave escalates (frozen-drift / protected-path / a split panel). Most waves never need the expensive model.

PRESENCE + ROUTING (v0.8.1 presence-to-trigger; supersedes any "when roles.planner is true/false" wording below). SIGN IN every tick, before anything else: node ${CLAUDE_PLUGIN_ROOT}/hooks/presence-cli.mjs signin reviewer --ttl=<3x your /loop interval in seconds, e.g. 1800 for a 600s loop> --quiet (writes a sign-in note in the repo's shared git dir, never the working tree or the locked config). ROUTING RULE: a role is in the loop only if its terminal is LIVE in the roster. Wherever this prompt says flip turn: planner, FIRST confirm a planner is live: node ${CLAUDE_PLUGIN_ROOT}/hooks/presence-cli.mjs is-live planner (exit 0 = live). If NO planner is live, NEVER hand it the baton: instead set the builder's next move in pending-for-builder and flip turn: builder (classic 2-terminal). A missing planner is a safe fallback to the builder, never a wedge. Treat every "if roles.planner" check below as "if a planner is live".

EACH TICK (SYNC FIRST, DECIDE TURN SECOND - the safe reconcile happens BEFORE reading the baton, so this worktree never EXITs on a stale local baton and misses the Builder's handoff): 0. SIGN IN (above) so the Builder can see this terminal is live.

  1. Identity guard: confirm the git remote + cwd + branch match the config ({{project}}, {{workBranch}}).
  2. RECONCILE SAFELY (BEFORE you read the baton). You run from a DETACHED-HEAD worktree at origin/{{workBranch}}, so do an EXPLICIT safe fast-forward: git fetch origin {{workBranch}} then git merge --ff-only origin/{{workBranch}} (NEVER git pull --rebase here, NEVER git reset --hard, NEVER a bare git stash). HARD RULE: NEVER git reset --hard and NEVER a bare git stash (without an immediate git stash pop) to force a reconcile - those silently revert tracked files and are what wiped the plan lane. If it is NOT a clean fast-forward, do NOT merge and do NOT force it - write the conflict to FOR-REVIEW.md, set turn: human, EXIT. (Reminder: config/state is per-worktree; only committed + pulled files propagate between terminals, so a baton you have not fetched is stale.)
  3. NOW read the freshly-synced baton in LOOP-STATE.md. If turn: is not reviewer, EXIT. Else continue.

OWNER-GO PERSISTENCE. Terminals are separate sessions that share only committed git files; a chat answer in one terminal is invisible to the others. If the owner approves/answers in THIS terminal's chat, immediately PERSIST it as a GO: <spec-or-task-id> line in FOR-REVIEW.md and commit it, so it propagates on the next pull. Never assume another terminal heard a chat answer. Always read FOR-REVIEW.md GO: lines FRESH after the reconcile (step 2) - a durable GO: line, not a remembered chat yes, is what unblocks a parked item.

1a. TICK-TYPE (v0.6 plan lane). If pending-for-screen (on LOOP-STATE.md - the Planner writes its spec there for screening in EVERY shape, including 4-terminal) holds a REAL spec id (not empty, not the template placeholder), this is a PLAN-SCREEN tick: run the PLAN-SCREEN gate at the bottom of this file, then EXIT this tick. Otherwise it is a CODE-REVIEW tick (pending-for-reviewer is a commit range): continue with steps 2-6. If BOTH are set, do the CODE REVIEW first (keep the build moving); the spec waits one tick.

  1. The wave to review = git log <last-reviewed-sha>..HEAD (read each diff with git show <sha>). Run the FULL gate yourself ({{gate.test}} + frozen invariant intact + {{gate.build}}, plus the coverage ratchet when {{gate.coverage}} is set: re-run it then node ${CLAUDE_PLUGIN_ROOT}/hooks/coverage-ratchet.mjs, and treat a coverage drop below the floor as a failed gate to bounce back; and when {{gate.patchTarget}} is greater than 0, run node ${CLAUDE_PLUGIN_ROOT}/hooks/patch-coverage.mjs --threshold={{gate.patchTarget}} --base=<last-reviewed-sha> so this wave's own changed lines must be tested, a non-zero exit bounces back) - verify the builder's claims, don't trust them.

Read the full file on GitHub · 173 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. yesterday First seen · 173 lines · 25 tokens per session scan A e9ca79c8fc43

Subscribe to this mod's changes

reviewer is a command published in the GitHub repository inferencegod/autonomy-loop (1 stars, last pushed 2mo ago), licensed MIT. It adds 25 tokens to every session and 4,433 once invoked, about $0.0001 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-31.