Zero Labs
Industry News / AI

AI Can Write Better Code Than Me. I Still Need to Know What It Does.

Source · Towards AI By Daniel Seidewitz

From the publisher’s feed, collected in the ZeroLabs newsroom.

At work I know the codebase. On my side projects, I have to decide which parts I still need to understand.I work for an IT services company, and I’m currently on a long-running client project. I spend eight hours a day in that codebase, and even though it’s large, I know it well. That kind of familiarity is what lets me judge what a coding agent implements, ask for a targeted refactoring, or notice when a domain model doesn’t fit.This article was drafted with AI assistance from my notes and ideas. The projects, experiences and opinions are my own.My side projects are a different story. Unwrap and smallsymbols are already more than 100,000 lines each, including the tooling, and I don’t have another eight hours a day for them. Agents write the code, so I’ve had to find ways to understand it at least roughly and stay on top of it. If I’m honest, I really “know” only a fraction of it. On a project of that size, that’s the bargain: the agents can write the code, but I still have to decide what I need to understand.The interesting problem, at this point, isn’t only who writes better code. It’s who still knows what the system actually does.Not a story about bad codeThis isn’t the failure I wrote about in My Coding Agent Passed Every Test. The Code Was Wrong., where the tests were green and the logic was wrong, and it isn’t the one in The Better AI Gets at Coding, the Less Code It Should Write., where the agent bypassed an abstraction I already had. The code I’m talking about here can be perfectly fine; the gap is in my understanding.The software can run just fine without me having a mental model of why it behaves as it does. I think of that gap as a kind of understanding debt. Even if AI already writes better code than I would in the same hours, that doesn’t give me the knowledge I have at work. Better code doesn’t automatically mean a better mental model. That knowledge used to arrive as a byproduct of implementing, and now I have to build it on purpose.Specs don’t remove decisions. They delegate them.The hope behind this is older than coding agents. It showed up as UML and model-driven development: describe the system at a higher level and let the details be generated. It showed up again in domain-specific languages and low-code. Now it arrives as markdown specifications that a coding agent is supposed to implement. In every version, the promise is the same. You say what the system should do, and an automated step takes care of how.GitHub Spec Kit puts the current version bluntly: specifications “become executable, directly generating working implementations rather than just guiding them.” Each phase produces a markdown artifact that feeds the next. I don’t use Spec Kit myself, but I do use plans, and they help without taking the decisions off my plate.A current feature in Unwrap is persistent workflow state. When you open a ZIP file, the scan produces facts and results, such as column profiles of a CSV table, and those should be persisted so that reopening the same files doesn’t take as long. In Cursor, the agent wanted to build that persistence detached from my whole scan pipeline. I sharpened the plan so that persistence would be a cache for individual pipeline steps, which decide what they persist and reload.To make that call, I only needed a rough sense that the pipeline exists, what steps it has, and how it works. The plan didn’t eliminate the design decision; I still had to make it, and it only became real once it landed in the code. If I had tried to write every such decision into a specification, the spec would have started to look like a programming language, and I would have lost the abstraction I was hoping for.Three levels of understandingI can’t know 100,000-plus lines the way I know a codebase I sit in for eight hours a day, so I have to decide, deliberately, how much understanding each part is worth.Some of the architecture I still want to own, and the persistence feature is that kind of work. A plan is enough to steer it, as long as I know the shape of the pipeline. I don’t need every line, but I do need the decision about where the cache lives, because that will shape what follows.For other parts, I watch the behavior and leave the code with the agent. In the same scan pipeline, the profiling and detection details can swallow a lot of attention, and I don’t try to hold that implementation in my head. Instead I set up benchmarks that mainly watch the quality of the heuristics, things like detection rates. Performance I cover with separate tests. If the scan results stay good and get better, the code can stay the agent’s responsibility.And then there are parts I leave almost entirely to the agents. The virtual scroll in the table viewer is one of those. I let them do the implementation, and of course I tried to read the code afterwards. Honestly, I understood maybe half of it, at most.You don’t need to understand all the code. You should decide which parts you need to know.That still bugs me sometimes. I’d like to understand everything, the way I did when I wrote the code myself. But that isn’t really the choice in front of me. I can keep developing and improving Unwrap, or I can spend the next months trying to understand code that already exists, and I can’t do both with the hours I have.I’m not pretending I “know the codebase” the way I do at work. What I’m doing is choosing, case by case: some parts are worth building a mental model for, others I can judge by a measurable outcome, and a few I can let go of. On projects that don’t get eight hours a day, making that choice is the work.The mental model used to come for freePeter Naur made this point long before coding agents, in Programming as Theory Building (1985). The primary aim of programming, he argued, is not to produce programs, but for programmers to build a theory of how the program handles the matters at hand. Documentation and specifications are, in his words, an “auxiliary, secondary product.” The theory has “primacy over … program texts, user documentation, and additional documentation such as specifications.”Naur was writing about human teams, not agents, but the useful part still holds: a program that runs is not the same thing as the understanding you need in order to change it intelligently. That understanding used to form while you implemented. When an agent writes the code, you can end up with software that works and a person who never built the theory. Building it after the fact takes time I won’t spend on everything, which is why the triage isn’t an accident: it’s how I keep building.You have to chooseAt work, the mental model is still a byproduct of time spent in the code; on the side projects, it isn’t. I’d still rather understand everything, but I don’t have the hours for that if I also want the projects to move. So for each part I decide how much I need to know, whether that’s enough to steer the design, enough to measure the behavior, or sometimes less than I’d like.You don’t need to understand all the code, but you should decide, on purpose, which parts you need to know. Eight hours a day gives you the theory almost for free; the rest of the time, you have to choose.AI Can Write Better Code Than Me. I Still Need to Know What It Does. was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.