Do you understand the AI-written code you merge?
You have probably been handed a fix by an AI tool and had to decide whether to trust it. Joshua Barretto's essay, dated 28 November, is about that moment. He argues engineers should understand the systems they build, not
You have probably been handed a fix by an AI tool and had to decide whether to trust it. Joshua Barretto's essay, dated 28 November, is about that moment. He argues engineers should understand the systems they build, not accept answers they cannot explain. His example is a senior colleague who solved a bug that seemed impossible, using deep knowledge that was hard won. He tells junior engineers to fight for the space to learn. He also warns that systems too complex to understand push people toward faith instead of reasoning.
I land here. He is right that you must understand what you ship. I disagree on where the failure sits. The failure is merging without review. Merging code you do not understand is not a new mistake, and it goes wrong the same way whether the code came from a forum, a colleague or a tool. The tool makes it faster and easier, so the habit matters more. It does not change the rule.
I also want to be fair about what the essay is. It is opinion. It offers no new data on how often AI-written changes cause trouble, and I have none either. So I do not read it as proof that AI tools make engineers worse. I read it as a good argument about a habit, and I judge it on the argument. I am optimistic about these tools. I just do not take on trust anything I cannot explain.
The first thing I would check is whether I can explain the change in my own words. Not the description the tool wrote. Mine. If I can't say what the change does and why it is the right place to make it, I do not understand it yet, and reading it a second time is not enough. The second thing I would check is what it could break. I look at who calls the code, what data flows through it, and what happens on an odd input. The third is a test that fails without the change. If the test passes with and without it, then either the test is weak or the change does nothing, and both are worth knowing before it merges.
If this were my stack, I would start with the smallest rule that can work. Every pull request that contains AI-written code gets one added requirement. The author writes a few sentences saying what the change does and what it could break, without pasting the tool's own summary. It costs a few minutes. It also exposes quickly the cases where nobody understands the change. I would not ban the tools. I want the speed. I would just refuse to let speed replace review.
For juniors, I would protect time to read the code around a change and trace it by hand. That is the space the essay says to fight for, and it is the only way I know to build the kind of knowledge the senior colleague in the essay had. A tool can give you an answer. It cannot give you the years of context that let you see why an answer is wrong.
There are things that would change my mind. If I saw data showing that review of AI-written changes catches almost nothing, because the code is too large or too strange for a person to check, I would accept that understanding at the line level is not realistic. I would then push for stronger tests and tighter limits on how big a change can be. If I saw evidence that teams with explain-it rules ship no better than teams without them, I would drop my own rule. I have neither today, and the essay supplies neither.
I would rather make predictions you can hold me to. In the next 3 to 12 months, I expect more teams to write rules asking authors to explain AI-written diffs before they merge. By 2031, I expect that to be a standard line in most serious review checklists. If neither happens, I was wrong about how seriously teams take this problem.
The essay gives juniors one instruction, and I think it is the right one. Fight for the space to learn. So I will ask you directly: what would you need to see in a change before you were willing to merge code you did not write?
Sources:
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.