Skip to content
Software Quality

The Drift Check: A Framework for Catching AI Code Problems Early

Updated

Knowledge on this page was mainly distilled from 2X AI Coding Speed, Without the Slop.

AI coding tools produce output fast, but the time saved often disappears into review and cleanup. The drift check is a lightweight framework for interrupting bad momentum while the AI is still working, not after the branch has sprawled.

The Four Types of Drift

Each type targets a different way AI-generated code quietly goes wrong:

  1. Scope drift. The change grew wider than the request. A button fix became a refactor. A one-file task became a mini migration.
  2. Abstraction drift. The model introduced a wrapper, helper, service, hook, or pattern your codebase did not need five minutes ago. AI loves symmetry; your codebase has to live with consequences.
  3. Seam drift. A local change is now pulling in distant files, glue code, or extra dependencies. Most long-term pain enters through seams.
  4. Story drift. The model cannot explain in plain language why this approach fits your constraints and what tradeoff it chose. Once the explanation goes generic, judgment has left the room.

Practical Interrupts

Ask for a plan before code. Cap diff size. Make the model name the invariant it is preserving. Ask what it decided not to change. Ask why a new dependency beats the primitives you already have. Ask for the whole task restated in one sentence before it touches anything.

These are not rituals. They keep smell close to execution and prevent you from becoming a human parser for machine enthusiasm.

Q&A

What is the drift check in AI-assisted coding?

The drift check is a four-part framework you run while the AI is still working, not after review. It checks for scope drift (change grew wider than the request), abstraction drift (unnecessary new patterns), seam drift (local changes pulling in distant files), and story drift (the model cannot explain its tradeoffs in plain language). The goal is to interrupt bad momentum early rather than absorb it during review.

Why does reviewing every line of AI-generated code fail at scale?

Reading every line makes you personally absorb the full surface area of the model's output. Once that output gets large enough, your leverage collapses and fatigue causes structural mistakes to slip through anyway. The alternative is reviewing at pressure points: deep reading for high-consequence code (auth, billing, migrations, permissions) and strategic reading (file shape, diff size, style consistency) for everything else.

What is execution smell in AI-generated code?

Execution smell is compressed pattern recognition that something is going wrong before you can fully diagnose it. Signs include more side paths than the job should need, explanations that sound polished but slide past your actual constraints, and local fixes that reach into many files. It shows up as drift: a copy change that asks for a new abstraction, or a tiny feature that suddenly needs a new dependency.

How do you avoid micromanaging the AI with drift checks?

The drift check only works if it stays small and consequential. Once you start interrupting every wobble, the model turns from a thinking partner into a nervous intern waiting for approval. The check should target pressure points, not provide theater. If you find yourself intervening on every response, you are over-controlling rather than directing.

What evidence exists that AI coding tools can slow developers down?

A 2025 METR study followed 16 experienced open-source developers on 246 real tasks in repositories they already knew. Despite expecting AI to help, they measured a 19% slowdown. Separately, GitClear's 2025 report on 211 million changed lines (2020 through 2024) found more copy-pasted code and less refactored code over that period. Neither result is a universal verdict, but both illustrate how overhead can shift from typing into prompting, waiting, reviewing, and cleanup.

Where should taste show up in an AI-assisted coding workflow?

Taste has to arrive earlier than it did in manual coding. In the old workflow, you wrote code, stepped back, and judged it. With AI, taste needs to operate while the shape is still soft and the model can be redirected. This means preventing a hundred lines of eager wrongness rather than cleaning them up afterward. Holding the product in your head matters more than prompt craft.

What kinds of AI-generated code still deserve line-by-line review?

Authentication, billing, permissions, migrations, concurrency, deletion flows, and unfamiliar libraries all deserve deep reading every time. These are areas with hard-to-reverse consequences where a subtle mistake compounds. The point of the drift check is not to stop being careful but to stop spending the same level of care on low-risk code that could be reviewed strategically.