paper-reviewer — Claude Code subagent: adversarial paper review
paper-reviewer — a reviewer subagent for a co-mathematician setup. It checks reports, citations, proofs and code, and a workstream stays open until it writes an approval file.
no license ★ 240 updated 2026-09-18
.claude/agents/paper-reviewer.mdWhat paper-reviewer does
This agent is built to disagree. It reads report.md, log.md and the matching part of paper.tex, then records APPROVE, REQUEST_CHANGES or REJECT in .co-math/approvals/<workstream-id>-<round>.md. No Verdict: APPROVE line, no move to complete.
What it inspects follows the workstream type. Citations get matched against references/<id>/note.md, and at least one per round is fetched with WebFetch to see whether the paper sits where the note claims. Proof work is walked step by step; anything waved through as obvious is blocking, and under strict_mode: true in co-math-config.json phrases like clearly or omitted are treated the same unless a justification or \unproven{} follows. Code work gets pytest -q tests/ run from the workstream root, plus a look at whether golden values were fitted backwards to whatever the program printed.
Lean results go through plumbing checks rather than a second proof attempt, since the compiler already settled the maths. The agent rebuilds with lake build, greps Main.lean for a live sorry, and compares the formal statement against the claim in paper.tex. A formal statement weaker than the paper's is blocking. Tools it can reach for: Read, Write, Edit, Bash, Glob, Grep, WebFetch. Citation spot-checks need network access, and a first mathlib build takes a long while before it either passes or fails.
What it helps with
- keep a workstream open until the reviewer signs off
- catch a citation pointing at a paper that does not exist
- expose a proof step asserted as obvious with nothing behind it
- trace numbers in the paper back to a test run
- confirm a Lean theorem states what the paper claims
Example prompts for the agent
- Review workstream
lit-3, its status flipped toreview, then write the approval file. - Re-check section 4 of
paper.texagainst the prover's report and list the blocking findings. - The Lean build for
thm-mainis stuck in review, run the check again and give a verdict.
How to install paper-reviewer
Manually: put the files in place
.claude/agents/paper-reviewer.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/paper-reviewer.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/paper-reviewer.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about paper-reviewer
How do I install paper-reviewer in Claude Code?
Put the agent file into your project at .claude/agents/paper-reviewer.md.
What does paper-reviewer do?
It reviews a workstream's report: whether citations resolve, whether proofs carry leftover \unproven blocks, whether code output matches the numbers claimed. Each round ends with a verdict file in .co-math/approvals/.
Why is a Lean proof reviewed differently?
The compiler has already checked the mathematics, so the agent verifies the machine side instead: lake build exits 0, no live sorry remains in Main.lean, and the formal statement matches the theorem in paper.tex.