A while ago I watched an AI agent copy the same pattern into three new places. Nothing wrong with the pattern. It worked, and it was easy to read.

My first reaction was to ask for deduplication. Maybe extract an abstraction while we were at it. Not because the code was bad. It just triggered my inner software crafter.

Then a second thought: we’re not in that world anymore.

Who was that cleanup for, though? I’ve started to think leaving a mess has become a reasonable bet. Every month, cleaning it up gets cheaper. The model you’ll use next spring will tidy that code in an afternoon, as long as something tells it what it must not break.

That’s true for most of the mess. Not all of it.

Who were the rules for?

Think about the code quality rules we’ve been preaching for decades. Short functions. Good names. No duplication. Small files.

Why do they exist?

Because of us. Our heads are tiny. We juggle a handful of things at once, we forget what we wrote last Tuesday, and we get lost somewhere around line 200 of a function. Even programming languages are a favor to us. Computers never cared about nicely named variables.

Many code quality rules are accommodations for a human reader.

And that reader is leaving. On my team, whoever reads, changes, and rewrites most of the code is already an AI agent, and I’d bet yours isn’t far behind. Agents find every exact copy of a block in seconds, if they think to look. Three identical copies of a pattern don’t confuse them.

Some rules still help agents, sure. An agent finds code by searching for names, so a function called handleStuff hurts it too. And copies that drift apart hurt everyone. Three date helpers that each format dates slightly differently mean your users see three date formats.

Agents have their own version of our limits. They forget everything between sessions, and they get sloppier the more you feed them. But re-reading costs them seconds and a few cents. A lot of what we polish fixes a problem that’s expensive for us and cheap for them.

So debt against those rules gets cheaper every month.

Not all debt was for the reader

Here’s the thing, though. Some debt never had anything to do with how readable the code is.

  • Data. Five years of production rows shaped by a bad data model. The fix is a migration nobody can afford to get wrong.
  • Contracts. A public API, an event other teams consume. Somebody you don’t control built on top of it. (If you own every consumer, an agent can migrate them all in one go. That’s just code again.)
  • Domain rules. What a “customer” is. When an invoice is final. What happens when a refund fails halfway.

None of these are accommodations for a human reader. They’re about the real world. A better model doesn’t make them cheaper to change, because the cost was never typing.

And agents make them worse. An agent treats whatever’s already there as the way things are done here. One bad call in the data model becomes the template for the next ten features, faster than any human team ever copied it. Small patterns multiply too, but three copies are cheap to undo. A data model isn’t.

So, who is this rule for?

That’s the question I’d ask in every code review now. Who is this rule for?

If it’s for the human reader, relax. Three copies of the same pattern are fine. Someone still reviews the diff, but nobody has to live in that code for the next five years. Ship it. Nobody will check whether it ever got cleaned up. Most of us already don’t.

If it’s for the real world, slow down. Be more careful than before. That’s where the debt piles up now.

Where the care goes

Code was never the asset. Now that the mess is this cheap to clean up, it’s just harder to pretend.

The asset is what has to stay true no matter who rewrites the code, or how often. An invoice never gets paid twice. A refund either happens or it doesn’t.

You can write those down in a doc the agent reads and then ignores. Or you can turn them into checks a machine runs on every change, like one that fails the moment an invoice can get paid twice. (One the agent can’t quietly delete, ideally.) That’s what feedback loops are for: telling an AI agent it broke something before a customer finds out.

What I don’t know

Agents probably have more quality rules of their own, ones we haven’t figured out yet. I don’t know what they look like. Nobody does yet.

I’m pretty sure a lot of what we called tech debt was a tax we paid for human readers. The readers are leaving. The real world isn’t.