Skip to content

Blog

YAGNI still holds, for a different reason

Cheap code tempts teams to generate the flexible version just in case. But writing was never the only cost. Reading, debugging, and changing the code still cost a human, and YAGNI now protects those.

Written by

Specification and review

Published: 13 August 2026 Updated: 2 min read

The oldest rule in software is “you ain’t gonna need it.” Build the simple thing, not the flexible thing, until a real need shows up. I had a quiet worry that agents would kill it.

Why agents seemed to make YAGNI obsolete

The logic seemed sound. YAGNI existed because abstractions were expensive to write. An agent writes the abstract version as fast as the simple one, for the same few dollars. So why not take the flexible version every time? It is free now.

I watched a team run exactly that experiment for a quarter. It did not go the way the logic predicted.

Writing was never the only cost

Here is what they missed, and what I missed. Writing was never the only cost of code. It was just the visible one.

  • Reading cost. Every line is a line a human reads later, at a confused moment, under time pressure.
  • Debugging cost. An abstraction hides where the bug lives. More layers, longer hunt.
  • Changing cost. A wrong abstraction is harder to remove than no abstraction. It has callers now.
  • Test cost. A flexible interface has more paths, and every path needs a test that means something.

Agents made writing cheap. They made the other four costs worse, not better, because there is now more code, generated faster, for a human to hold in their head.

YAGNI now guards comprehension

So YAGNI did not die. It changed which cost it protects. It used to guard your engineering hours. Now it guards your comprehension, the scarcest thing on an agentic team. The factory floods you with code, and YAGNI is one of the gates that keeps the flood readable.

The test to give an agent and a reviewer

Can you point at a real, existing reason this abstraction needs to be here? A second caller that exists today, a requirement already written down?

If the honest answer is “an agent might need it later,” that is not a reason. That is a guess. And the agent can generate the abstraction later too, the day the second caller is real, with the evidence in hand. Cheap to write then, cheap to write now. There is no rush.

Start simple, even when the agent offers complex. Let the pattern earn its place by showing up twice. Refactor on evidence, not prediction.

Has cheap generation made your team build more “just in case,” and is anyone reading all of it?

Further reading

  1. Architects already solved non-determinism with eventual consistency Architects reject AI-generated code because it is non-deterministic. They solved that exact problem a decade ago in their event-driven systems, and the saga pattern shows where the correctness comes from. 1 min readShort post
  2. Agents stall on unclear requirements, and a spec file fixes it A pilot team blamed the agent until it looked at what the agent was handed. The fix was one spec file in the repo, with QA's test cases written before any code. 1 min readShort post
  3. Verification in a Software Factory When generating code gets cheap, a Factory's throughput depends on how well the system can establish that a change is acceptable, safe, and worth shipping. 3 min read

All 23 posts on Specification and review

ClientsClient work

Test the constraint in your system

The Factory Readiness Assessment connects this research to your value stream, your data, and the next decision.

Training on this topic: Agentic Engineering for Developers and QA
See the assessment

Want to check one team first? The self-check: twelve yes or no questions, three minutes, instant result, no account. Take the self-check