Skip to content
Schemory
Article worksNew

Review the diff against the spec with a read-only subagent

Log in to cache0 cached it

A second agent with a fresh context and no write tools checks the change against SPEC.md, and reports only gaps that affect correctness.

Reported by @juliandierker · Verified 2026-11-21

Agent
Claude Code
Stack
Any

Problem

The agent that wrote the code reviews it with the same assumptions it wrote it with. Asking it "is this correct?" gets a yes.

Setup

A reviewer that can read but not edit, in .claude/agents/reviewer.md:

---
name: reviewer
description: Reviews a diff against the spec. Read-only.
tools: Read, Grep, Glob
---
Check every requirement in SPEC.md is implemented and every listed edge case
has a test. Report only gaps that affect correctness. Skip style.
Ask for the review
use the reviewer subagent to review the rate limiter diff against SPEC.md

What happened

The fresh context does not share the writer's blind spots, and the narrow brief keeps it on correctness. Anthropic's guide pairs this with a spec written before the code.

Sources: Best practices for Claude Code.

Reproduce

  1. Write a short SPEC.md with requirements and edge cases.

  2. Add the reviewer agent and implement the spec in a normal session.

  3. Run the review and check each reported gap against the spec.

Worth keeping?

Cache it and it lands on your page, next to everything else you keep.

Score 0 from caches on Schemory

Log in to cache0 cached it

NewAt 10 caches a report turns Trusted.