Skip to content
PKResources
Course outline

The CTO's playbook for AI coding agents · Module 3: Spec-driven development at scale

Spec review is the new design review

Agents multiply the code your org produces, but reviewer hours don't scale. Move the hard review upstream to the spec, decide who reviews what, and watch PR review get lighter.

Lesson 11 / 20 · ⏱ 8 min

When agents start shipping, the first bottleneck most orgs hit is not generation. It’s review. PR queues grow, senior engineers drown in diffs, and the reviews that do happen get shallower. Adding reviewers doesn’t fix it. Moving the expensive judgment earlier does.

A wrong decision caught in a 30-line spec costs a comment. The same decision caught in a 900-line agent diff costs a rewrite, or worse, gets waved through because nobody has the energy.

Where the judgment goes

Code-firstPR review: design, intent and code at onceSpec-firstspec review: intentPR: verifysavedreviewing intentreviewing codeillustrative, not measured
Same total review effort, different placement. Spec-first review front-loads judgment, so PR review becomes verification against agreed criteria.

The review flow

  1. 1

    Day 0

    Author drafts the spec

    Often with an agent's help. Tier set by the written triggers. Open questions listed, not hidden.

  2. 2

    Minutes

    Agent pre-check

    An agent reads the spec plus repo context and lists ambiguities, missing criteria and conflicts with existing conventions. The author fixes those before a human sees it.

  3. 3

    Same day

    Human spec review

    Reviewers check intent, scope, constraints and criteria. Tier 1 is async and light; tier 3 is a short meeting with the owner and security or platform.

  4. 4

    Gate

    Approve and freeze

    Status goes to approved. Agents now plan and build against it. Changes to scope reopen the spec, not the PR.

  5. 5

    After build

    PR verification

    The PR links the spec. Reviewers check that each criterion is met and tested, and look for anything outside scope. Design debates here are a signal the spec review missed something.

Who reviews what

Role Reviews in the spec Reviews in the PR
Product or requester Problem, scope, acceptance criteria Demo or preview against criteria
Tech lead or code owner Approach, constraints, fit with architecture Criteria covered by tests, nothing out of scope
Security or platform (tier 3) Data flows, permissions, rollout and rollback Only the flagged sensitive areas
Peer engineer Clarity: could an agent build this without guessing? Readability and maintainability of the diff

The spec review checklist

Give reviewers five questions, not fifty:

  1. Is the problem real and stated in user terms?
  2. Is “out of scope” explicit enough to stop an agent wandering?
  3. Is every acceptance criterion testable by a machine or a quick manual check?
  4. Are constraints and non-negotiables listed, or linked from shared context?
  5. Are there open questions an agent would have to guess at? If yes, not approved.

What to watch

Track a few signals in the first quarter: median PR review time, share of PRs reopened for design reasons, and how often scope changes after approval. If design debates keep showing up in PRs, your spec reviews are too shallow. If specs take longer to approve than code takes to write, they’re too heavy.

🧠 Spec review in practice

Score: 0 / 4

  1. 1. A PR thread turns into a long debate about whether the feature should support bulk edits. What does that tell you?

  2. 2. What's the main job of PR review once specs are reviewed upstream?

  3. 3. A spec has an open question about how refunds interact with discounts. What should happen?

  4. 4. Which signal suggests spec review has become too heavy?

Before you move on

✅ Key takeaways

0 / 4 completed