Skip to content
matthewcm.dev

    ↑ ↓ move · ↵ open · tab scopeopen graph →

    Review Depth Follows Blast Radius

    When agents write most of the code, nobody can read every line with the same care. Match review depth to blast radius: deep-read infrastructure, carefully read shared code, proof-read isolated leaf code. Earn the right to read less with feature gates and proof in every PR, and remember that merge-ready isn't launch-ready.

    Seedtended planted 5 min read

    🌱 A rough idea, planted recently. Expect rough edges — it will grow.

    On this page

    Spend review attention where a mistake travels furthest: deep read infrastructure, careful read of shared code, proof read of isolated leaf code. Then earn the right to read less with feature gates and proof in every PR.

    This builds on John Kim’s video How I Review AI Code; the three tiers are my refinement of his trunk-and-leaf picture.

    Review depth follows blast radius: proof read isolated leaf code, careful read shared code, deep read infrastructure such as CI/CD, auth, secrets and migrations.

    The problem

    Agents mean far more code: more features, more tests, several agents running in parallel for one person. Nobody can review even their own output line by line any more. Two camps have formed: “if you’re still reading code, you’re too slow” and “agents still make basic mistakes, so read everything”. The useful answer is it depends: review is a gradient, and what the change can break sets where you are on it.

    The codebase is a tree

    • Trunk: entry points, infrastructure (networking, rendering, build), shared state that everything reads. If it breaks, the whole app breaks.
    • Leaves: code written in isolation or fully behind a feature gate: a new component, a new endpoint that isn’t wired in yet.

    Knowing your codebase is what makes this fast: you spot straight away when a diff touches a dangerous zone.

    Three review depths

    TierWhat lives hereReview depthWhat I check
    Infrastructure (trunk)CI/CD, infrastructure as code, auth, permissions, secrets, migrations, dependency changesDeep read: every line, run it if possible, a second reviewerLeast privilege, anything irreversible (data, state), rollback path, new dependencies
    Shared code (trunk)Libraries, shared state, shared components, API contracts, schemasCareful read: understand the change and its callersUngated behaviour changes to existing paths, backwards compatibility, downstream side effects
    Isolated leaf codeA gated screen, a single handler, a script with no dependantsProof read: skim for anything obviously off, trust the proofDoes it match the ticket; does it reach into shared areas

    The tier comes from the codebase, not the PR title. Label each PR by the highest tier it touches (CODEOWNERS or path rules do this automatically). A leaf PR that edits one shared file is a shared-code PR.

    Four questions that set the depth

    1. What’s the existing behaviour that must not change?
    2. If this goes wrong, how bad could it be?
    3. Can I roll it back? Is it behind a gate?
    4. Is it a one-way door? The harder it is to reverse, the longer I read.

    Make it safe to read less

    • Gate from the plan, not afterwards. Separate the new isolated code from where it plugs into the existing code, and put those integration points behind feature flags (a boolean is enough to start). Gated code is effectively leaf code until it’s switched on.
    • Proof in every PR, so the reviewer checks evidence instead of re-deriving the logic:
      • Tests. Skim the test names and assertions, and give the agent a rule against tests that assert nothing.
      • Runtime evidence: logs from the change actually running.
      • Visual evidence: a screenshot or short recording for anything visual.
      • A confidence level from the agent on each part of the change.
    • Agents check their own work while building, so the obvious mistakes are fixed before a human looks.
    • A PR template, so every PR has the same important parts. The summary should never be longer than the diff.

    Let machines take the nits

    Style comments and “how I’d have written it” aren’t worth human review time any more. Linting, type checks and an AI reviewer handle them, and with refactoring this cheap, arguing about taste in review doesn’t pay.

    For the AI reviewer, use a fresh, adversarial agent: one without the context of the session that wrote the code. An agent reviewing its own conversation anchors on it and marks its own homework. A scheduled agent can also babysit the PR, picking up review comments, fixing them, rerunning validation and pushing again, so you don’t have to.

    Merge-ready isn’t launch-ready

    Landing everything behind gates is the broad strokes: about 80 % of the work. The last 20 % takes about as long again, and it’s where human judgement and taste go. Audit the whole feature (agents help) for performance, bugs, security and how well it matches the spec, then refactor and polish.

    Then launch behind the gate with an experiment or a canary. Even without enough users for a meaningful A/B test, ramping traffic up gradually surfaces crashes and alerts while the blast radius is still small (Blue-Green Deployment).

    What I’d prioritise in an AI-assisted team

    This sits between two poles. One is “read everything”. The other is the case for verifying rather than reading at all (Don’t Read the Code? Verifying AI-Written Code). Blast radius tells you where on that line each change belongs.

    Open questions

    • Should infrastructure-tier changes ever be written by an agent, or only with an agent’s help?
    • How do you tell whether review attention is landing in the right place? Escaped defects and review time, per tier, is my first guess.
    • As models improve, what evidence should justify reading a tier less deeply?
    • #code-review
    • #ai-coding
    • #agents
    • #feature-flags
    • #blast-radius
    • #pull-requests
    • #ways-of-working

    ↪ Links to (7)