3 Types of Debt with AI Assisted Software Development
We are living in a revolutionary age with AI in software development. Features that took a month to develop now can be done in a week, any incident in our systems is always addressed first with a prompt to our AI agent to check the problem. Proofs of concept have become trivial to do, and testing new ideas can be done in the blink of an eye. Nevertheless, this new era brings with it new types of challenges: new and updated types of debt we must pay when features are coming to light faster than our heads can process new information.
Tech Debt, evolved
If you thought that tech debt has been solved with AI, I have bad news. It is true that AI assisted development usually makes sound design decisions when implementing changes, but if the agent has free rein to implement changes we risk accumulating a more pervasive type of tech debt in the system. Less so at the localized task level design: the AI agent will usually make good calls at that level with the code it was given to work in.
This falls apart at the module and architectural levels.
The reality is that AI agents are trained to accomplish the task given at any cost. Rarely is the time when the agent, by its own behaviour, rejects a task or asks for reframing when it’s abundantly clear that it’s trying to fit a piece that does not belong to the current puzzle. In those cases the AI agent will try to implement the feature changing as little of the current system as possible. A shrewd human, conversely, will notice quickly that the new feature does not belong to the current system to begin with, and a refactor of the surrounding architecture will fit better so the implementation can go through with minimal complexity overhead.
If we let the AI take over the driver’s seat, the system starts losing cohesion, and will become more and more complex over time. Refactors and rewrites are needed to maintain the system healthy, it is a living creature, but those are often overlooked by the AI because it will always prefer to accomplish the task at hand: it is trapped in a local maximum. When development was an expensive task, the cohesion and complexity were kept in check by the slow nature of the implementation1. At a different scale of speed, this no longer holds true.
In the following simulation (you can read the excellent essay where it comes from), we have 4 systems and we start adding more features to them. The nodes represent every component and the links between them are dependencies, the color of the node is the dominant paradigm, and its size represents the size of the component. A feature is a set of components (new and old). The simulation is 5000 steps, on the left cohesion is taken little into account and on the right the implementations try to stay cohesive with the rest of the system.
Enable JavaScript to play the interactive simulation.
Source: The Decoherence Trap
It’s easy to see how the right side of the simulation creates a more cohesive and less complex software (up to a certain point, where we enter the overengineering terrain, but still more approachable than non-coherent counterparts). If you watch the simulation you will notice times when lots of nodes change color or move at the same time to different places to have different dependencies: these are the refactors. When we fight for the system to be cohesive these refactors happen often (the right side changes color and shape much more often than the left side). This is what I was referring to “this piece does not belong to the puzzle”, when that happens we need to change the puzzle, not try to fit the piece.
The reason why we want the system to be coherent and with low complexity can be seen in the graph from the simulation. After the 5000 steps, the systems that were kept more cohesive delivered more features, and the ones less cohesive started stalling their delivery because they spent too many steps searching in the dependency maze.
Probably every developer out there has started a project where they’ve noticed these patterns emerge by themselves. If we full vibe code our way out, we will soon reach a point where the system design does not make sense anymore for what we are trying to build, and the AI agent will continue to try to do the smallest change possible, making the system more complex and less cohesive. Further commitments to this project will only make the agent become less and less effective in its work until a breaking point where the system is too complex for the AI to work with.
What will happen when the AI cannot make changes to our software anymore? Chaos ensues.
Cognitive Debt, a newcomer
Cognitive debt is the difference in knowledge about how a system works and how well it is understood by the people responsible for it. When software was created in an artisanal way, these people knew its inner workings because they were working with its code daily. Developing new features was slow, fixing bugs required extensive investigation, the architecture of the system was created with the insights of working with it every day. This forced maintainers to keep a high level of system knowledge.
Today, instead, features are developed in the blink of an eye, fixing bugs is as simple as pointing the AI agent to look at it and the architecture more than once is whatever the agent recommends as the best way forward. Engineers no longer work with the code as much and they don’t have the luxury of time in the implementation phase for their thoughts to accommodate in their heads anymore. The result is a feeling of losing control of the system you are responsible for: you start having gaps in your knowledge. This is clear when you ask very intricate questions about the inner workings of their system to teams that use lots of AI assisted software: they don’t know the answers to all of the questions and when looking for them they are surprised about features their own system had they were unaware of.
What is the problem, though? If AI is doing the heavy lifting of development work, why should the people responsible for it know its inner workings? Despite what you might think, this is a very important question2. If we look at the history of software development we see how the languages started very low level (assembly, C) and developed to higher level languages (like python or javascript), almost no one today working for a typical company in our industry manages register memory or pointers, those were automated away in the higher level languages. Could this be the next step in this abstraction? Will there be a future where looking at the code will be the same as managing CPU register memory?
Today we cannot state with absolute certainty how the future will look like. Right now, I can confidently say that having good knowledge of how the system works, even if developed mainly by an AI agent, is still very beneficial to maintain good quality software. Even though the agent will do mostly good work at the code level, some cracks in its logic still exist today, and a knowledgeable operator will steer it in the correct direction. I would err on the safe side for now.
We still need to maintain good knowledge of how our systems work at low level, even when code is created cheaply.
Intent Debt, exacerbated
This is the knowledge gap between what a system does and why it was created to behave that way. This is a type of debt that already existed before in companies, because handling it usually involves cross-team communication between departments: a business need creates the need to develop a new feature; if engineers are unaware of this original need, intent debt starts appearing. The same can happen with a separation between architectural decisions and development decisions. The result is that people will have the wrong insights into the real needs of the software they maintain, making it more difficult, risky and expensive to create new features or fix problems in a given system. Mistakes are the norm if this debt is not paid: this is why big companies have so many “alignment” meetings.
Nonetheless, this problem usually belonged only to big companies, where the specialization of its staff was very big, so the intent of any initiative often was not communicated properly to the lower levels of the organization. With the advent of AI, I have experienced this problem even working as a solo developer, which is something I’ve never thought possible.
The reason for this is, again, the speed of development. Because new features are pumped through the development pipeline so fast, even if I’m the only one working in a project, after a couple of weeks I forgot why some features were developed altogether. There is no mature phase in our thinking because new ideas can be implemented incredibly fast. We lack the natural barriers to create new features that are really deemed important.

Now, with AI, previously expensive tasks are cheap.

And because this happens even at the individual level, within a team we can also see cracks of intent between its members. If we are talking about a big organization (which were the ones that mainly had this problem), this evolves to levels never seen before: different teams will be working on the same things at the same time, wasting resources in duplicating or triplicating solutions to solved problems.
This directly feeds into the complexity monster we talked about in the tech debt section, exacerbating its consequences.
Conclusion
AI made code cheap, but it didn’t make software cheap3. There are new challenges that arise in the new era of agentic development: the risks of complexity explosion and big knowledge gaps of the inner workings and original needs of our systems. To address those, we need to create a robust framework in the whole software development process.
It is obvious that there is a lot of work around the process that needs to be done to handle this. When implementation is easy, a disciplined, strict process is its harness. A strong development process will be the difference between surviving by using the new power responsibly or moving towards a disruptive complexity collapse.
In the next blog post we will talk about actions we can take to minimize the risks of this new paradigm.
-
This problem is not exclusive to agentic software development, it was always there. We all know stories about companies that have spaghetti code and the problems it brought to the development process. What is important to understand is that the scale now is completely different: we can produce spaghetti code at industrial scale, complexity exponentially explodes as a consequence. ↩︎
-
It’s important because not knowing the inner workings of the system does not invalidate the problems of tech debt. We could perfectly end up in a situation where the code is fully generated by the AI agent but we need to work to maintain complexity in check. The tech debt problem refers to an agentic collapse of complexity, separate from cognitive debt. In a hypothetical future scenario where all the code is always created via AI agents and it’s invariably better than ours, then cognitive debt is no longer a concern, but tech debt still is. ↩︎
-
If making software is at some point solved by AI, then it means we have reached the singularity. ↩︎