AI Joe
← Blog· Engineering Reality

The Silent Drift That Turns Specs Into Suggestions

October 4, 2026

Why it matters: AI-generated code can look clean, pass review, and still quietly violate the rules you gave it, because the violation hides inside code that looks like good engineering.

The Details:

  • Drift does not start at line one. Early functions follow the spec closely because it sits fresh in context. Three or four functions in, the code already written becomes a stronger pull than the original document, and the model starts matching its own prior output instead of your rules.

  • Where a spec goes quiet, the model does not leave a gap. It fills silence with whatever is statistically common in its training data: a duplicate gets merged instead of rejected, a bad input gets swallowed by a broad exception handler instead of failing hard. Each invented behavior looks like a sensible default, which is exactly why reviewers wave it through.

  • A human reader hits ambiguity and asks a clarifying question. A model trained to produce answers never does; it picks the most typical interpretation and ships it. That difference means specs written for people are not automatically safe for AI, even when every sentence reads identically.

  • Three small fixes close most of the gap: number every requirement so the model has a checklist instead of fading prose, write explicit "do not" constraints next to the two or three tempting wrong interpretations, and require each function to be tagged with the requirement number it satisfies. Untagged code is invented behavior, caught in review instead of discovered in production.

Bottom Line: A specification only controls the code for as long as someone keeps checking the code against it; stop checking, and the spec becomes a suggestion.

Enjoy this article?

Listen to the Claude Code Conversations radio show or join the community.