AI coding tools are the biggest shift in how we build software that I’ve seen in thirty years. I use them every day, and I’m not going back. But somewhere along the way, a lot of us started letting the AI do more than the typing. We started letting it do the thinking, too.
This post is about what we lose when that happens: the system design, the context and the judgment that keep a codebase healthy long after the demo. It’s also about how to keep the speed without giving those up.
Oops! All Legacy!
We used to call code “legacy” when the people who understood it were gone. You’d open a file, see a name in the blame you didn’t recognize, and just accept that nobody who’s still around knew why that if statement was there. That took years to happen. Now it takes about as long as a pull request.
The difference is that nobody had to leave. The person who merged it described a feature, the AI produced something that worked, the tests went green, and that was that. There was never an expert to lose. It’s legacy the day it’s merged.
LGTM, Robot
So how does code end up with zero experts on day one? We stop pushing back. The AI hands us a diff, it looks reasonable, the tests are green, and we approve it. LGTM.
When the thinking goes, the first casualties are the things nobody puts in a ticket: system design, separation of concerns, maintainability. The stuff that doesn’t show up in a demo but decides whether you’re still happy with the code in six months.
I get why it happens. There’s a deadline. There’s always a deadline. And shipping feels great. You type a sentence, you get a feature, you get that little hit of dopamine, and you do it again. Why would you slow down to think about module boundaries when the thing works?
Because garbage in, garbage out still applies. A vague prompt gets you plausible code. Code that compiles and passes the tests it wrote for itself. Plausible is not the same thing as good, and the difference is exactly the part you skipped thinking about.
Surely We Know Better
Well, you might be surprised (and don’t call me Shirley).
Now, I don’t have any hard numbers, but experience has shown me that senior-level engineers are just as likely to do this as anyone else. And we know better. We’ve preached separation of concerns. We’ve lived through the rewrites. And we still type “add this feature,” skim the diff and hit merge because it’s Friday and the tests passed.
I can be confident in my assessment because I’ve fallen for it myself. The allure of moving at the speed of thought is intoxicating. After years of coming up with an idea and then laboriously typing out the syntax to make it real, suddenly the idea was enough. I leaned on the AI harder and harder, chasing that hit of getting things out the door, until I realized I’d stopped holding my own work to the standards I’ve preached for my whole career. I had to take back control and make sure my principles of quality software were still the ones being followed, not just whatever came out of the prompt.
Turns out I’m not alone. A study from Microsoft and Carnegie Mellon of 319 knowledge workers found that “higher confidence in GenAI is associated with less critical thinking, while higher self-confidence is associated with more critical thinking.” The more we trust the tool, the less we check it. The people who did check the AI’s work were the ones confident in their own skills. Senior engineers have those skills; we just have to use them.
Then there are people without an engineering background who are now shipping code. That’s not their fault. Nobody taught them what good looks like, and nobody gave them the guardrails. Some of that is on leadership, but a lot of it is on us. Somebody once took the time to show each of us what good looks like. Now it’s our turn to do the same for them, sitting down together and explaining why the code should look the way it does.
A Familiar Story
If you’ve been around AI-assisted teams for a while, you’ve probably seen some version of this.
It starts out great. Greenfield app, a clear plan, and the AI follows it beautifully. Clean structure and sensible boundaries.
Then more people join. Each of them understands the system at a surface level, and almost entirely through the AI. Their prompts look like “add this feature” and “I want to see this on the screen.” Nobody is reading the code. Why would they? It works.
Fast forward a few months. The repo now has three different languages in it. There are thousand-line files full of loose functions with no cohesion and no obvious reason to live where they live. If you remember the old arguments about goto and spaghetti code, congratulations: functions in a pile are the new goto.
The plan didn’t fail, though. It just had no steward. Nobody held the picture of what the system was supposed to be, so every change pulled it a little further from that picture, and nobody noticed until it was gone.
Some Assembly Required

Let’s consider an analogy. Just the typical furniture-based analogy that every post on AI should include.
Imagine you’ve got a table. Somebody needs it to hold more weight, so they add a leg in the middle. Then something wobbles, so they drive a dozen screws through the top. Then there’s another request, and another, and eventually you’ve got thirty-some legs held on with whatever fasteners were nearby and a generous amount of glue.
Does it stand? Technically, yes. It’s also really heavy, a few of those legs are already working loose, and good luck pushing a chair under it. Then a new requirement comes in: we need to seat twenty people. Now all those legs are in the way, so somebody starts pulling them out, and the whole thing starts to tip over.
That’s the difference between verification and validation. Verification asks, “Does it do what was asked?” Validation asks, “Is this the right thing to build, and the right way to build it?” Right now we’ve got agents building the code and agents reviewing the code, and every check comes back green. The table stands. But nobody in that loop is asking whether we should have built a table this way.
So where’s the human in that loop? Asking that question is the job, and it always has been.
Naming the Debt
Other people have been circling this too, and they’ve given it better names than I would have.
An MIT Media Lab study, Your Brain on ChatGPT, calls it cognitive debt. People who wrote essays with an LLM showed the weakest brain connectivity of the groups tested, and afterward they struggled to accurately quote their own essays. Fair warning, it’s a preprint with 54 participants, but it lines up with what I see every day.
Margaret-Anne Storey uses “cognitive debt” for the team version: a team slowly losing its shared understanding of a system until nobody can reason about it or change it safely.
Storey also names how we get there, borrowing a term from Wharton researchers Steven Shaw and Gideon Nave: cognitive surrender. It means adopting the AI’s output with minimal scrutiny. That’s different from handing a task to a linter or a type checker, where you’re still doing the thinking. Worse, it inflates confidence even when the AI is wrong, so the team feels it understands the system better than it does. That’s the LGTM moment from earlier, with a name.
Addy Osmani calls the code side of it comprehension debt, the gap between how much code exists and how much of it any human actually understands. He puts it well: “Making code cheap to generate doesn’t make understanding cheap to skip.”
And there’s data on the code side, too. GitClear’s analysis of 211 million changed lines from 2020 to 2024 found that cloned code went from 8.3% to 12.3% of changes, while refactored code fell from 25% to under 10%. Copy and paste overtook refactoring for the first time.
The nasty part is that these feed each other. Less understanding leads to worse prompts, worse prompts lead to more code nobody understands, and around we go.
You Had to Be There
Here’s the part I think most conversations about AI coding miss.
The most important context in any system was never written down. Why did we split that service in two? What did the customer actually mean when they asked for “real-time”? Which outage taught us never to retry that call without a backoff? That knowledge lives in people’s heads and in the scar tissue of a team.
If it’s not in the prompt, the plan or the repo, the AI can’t use it. It will happily fill the gap with something reasonable, and reasonable is how you end up re-creating the outage you already had.
Storey has another name for this: intent debt, the missing or decaying record of the reasoning, goals and constraints that are supposed to guide how both humans and AI agents change a system. I like the term because it puts the burden where it belongs: the AI can’t own the context, so somebody has to carry it in.
Same as It Ever Was
So what can we do about it? Something pretty boring, honestly.
Every contributor acting like an engineer who cares about quality, no matter what tool happens to be in their hands.
In practice, that means encoding our best practices up front, in the requirements, in the prompts, in the plans, in the AI code review rules. Tell the AI what good looks like before it starts, not after it’s built thirty legs.
But if you don’t know what good looks like, how are you supposed to tell a machine to build it? You can’t. So every engineer in the loop has to know, and right now too many of them are sitting it out. That’s stewardship: holding the picture of what the system is supposed to be and pushing back when a change pulls away from it. It’s not one person’s job. It’s the job.
Done right, the humans own the context, the requirements and the definition of good. The AI does the heavy lifting. Reading every line used to be the bar, but at AI speed it doesn’t scale. The new bar is that you understand what you ship and can explain how it works to the next person without opening a chat window. If nobody can, you shipped legacy code.
If we’re not reading every line, where does the understanding live? The tempting answer is code review. The trouble is that review looks at one change at a time, and every one of those thirty-some legs would have passed.
So it has to happen earlier, before the tickets exist. The team decides what shape the system is and where its boundaries are, including the things it must never do, and writes it down so it doesn’t live in anyone’s head.
Then quality goes into the definition of done, so every ticket gets held to it. And every time you catch the AI drifting from the design, you fix the agent instructions too, so the next ticket doesn’t make the same mistake. Do that enough and the instructions start to look a lot like your best practices. The reviewing agent should read those same instructions, too, so one fix polices quality when the code gets built and again when it gets reviewed.
That frees up the humans to review by risk. A copy change gets a glance and a payment flow gets a real read. Either way, the thinking happened before the AI wrote a line.
Measure Twice, Prompt Once
Code used to take years to become legacy. The people had to leave first. Now it can happen in one pull request, with everyone still sitting right there.
I don’t blame the tool for that. A table saw will happily cut wherever you push the board. Somebody still has to measure, and I’ve got the scrap pile to prove it.
Use AI as a tool, not a replacement for your brain. You do the thinking, then the AI does the work.
Just like I did here.
A quick note on how this got written: I worked with AI to structure this article. It was a very interactive process, a lot of back and forth, with every line understood, and carefully crafted. Every thought and opinion in here is mine.