Fixing AI technical debt isn’t a code problem, it’s a conversation problem. Sharma Vedula on the architectural talk teams skip, and why it’s the real bottleneck.

The Hardest Part of Cleaning Up an AI-Assisted Codebase Isn’t the Code

Short answer: Once a team has diagnosed why an AI-assisted codebase got messy, duplicated functions, unreviewed dependencies, the instinct is to schedule a cleanup sprint and start merging code. That’s not where the time actually goes. The slow part is getting the team to sit down and have the architectural conversation they skipped the first time around, because that conversation is exactly what AI coding tools made it easy to avoid.

Diagnosis is the easy half

Diagnosing an AI-assisted codebase that’s accumulated debt isn’t trivial, but it’s mechanical. Look at how many implementations of the same function exist, how dependencies got approved, whether anyone reviews AI-generated code against what’s already in the repo. Those are things a team can find by looking, and once found, they’re not particularly controversial. Nobody argues that five versions of the same helper function is fine.

The harder problem shows up once the diagnosis is done and it’s time to actually fix it.

Sharma Vedula, Head of Solutions at Data Society, has watched teams get the diagnosis right and then stall for weeks on the remediation, for a reason that has nothing to do with the code itself:
“The part that takes the longest isn’t the technical cleanup. It’s getting the team to slow down enough to have the architectural conversation they skipped the first time.”
Sharma Vedula, Head of Solutions, Data Society

Why the conversation got skipped in the first place

That architectural conversation didn’t disappear by accident. AI coding tools removed the natural friction that used to force it. Before, when writing a new feature meant spending real time understanding how the existing system worked, engineers had more opportunities to bump into architectural questions along the way and raise them before shipping. AI coding tools compress that time dramatically, which is a genuine benefit, but it also means the moments that used to trigger “wait, should we talk about how this should actually fit together” now slide by unnoticed. The code ships, it works, and the conversation that should have preceded a bigger structural decision just never happens.

Multiply that across a team shipping fast for months, and you don’t get one skipped conversation. You get dozens of small architectural decisions made implicitly, by whichever engineer happened to be prompting an AI assistant that day, none of them coordinated with each other.

Why merging code doesn’t fix this

Once duplication and unreviewed dependencies are visible, the appealing move is to treat it as a merge-and-refactor problem: pick the best of the five implementations, delete the other four, audit the dependency list, ship the cleanup. That work matters, but it treats the symptom as if it were the whole disease.

The five implementations existed because the team never agreed, out loud, on how that piece of functionality should be structured, who owns it, or where it belongs in the system. Merging them into one doesn’t create that agreement. It just picks a winner, often somewhat arbitrarily, and the next time a similar situation comes up, without a shared architectural understanding in place, it can easily happen again. The code gets cleaner. The condition that produced the mess doesn’t change.

What actually takes the time

Getting a team to have the architectural conversation it skipped is slower than a merge for a specific reason: it requires people to stop moving forward and agree on something together, which is a fundamentally different kind of work than writing code, and one that AI tools don’t accelerate at all.

It means getting the engineers who each built a version of the same function into the same room and asking why they made the choices they made, not to assign blame, but to surface the actual constraints and assumptions each of them was working from. It means someone making a real decision about ownership and structure that the team will follow going forward, not just for the current cleanup, but for the next feature too. And it means accepting that this conversation was going to have to happen eventually. The AI tools didn’t create the need for architectural alignment. They just made it possible to defer it much longer than teams could defer it before, which is exactly why the deferred conversation feels so much bigger by the time it finally happens.

Making room for the conversation you keep skipping

Teams that get better at this don’t try to eliminate the need for architectural conversations. They build in checkpoints where the conversation has to happen before it can be skipped again.

That can look like a lightweight architecture review triggered whenever a new pattern shows up more than once across the codebase, treating the second implementation of a similar thing as the signal to stop and align, rather than waiting for the fifth. It can mean designating clear ownership over key parts of the system, so there’s always a specific person whose job includes noticing when new code drifts from an agreed structure. And it means treating the slowdown itself as the point, not a failure mode. A team that pauses to have a fifteen-minute architectural conversation before four more engineers independently solve the same problem has spent far less time than the team that skips it and cleans up the resulting mess three months later.

Frequently asked questions

Why is fixing AI technical debt slower than the initial coding itself?

Because the fix isn’t really a coding task. It requires a team to align on architecture and ownership decisions they skipped while shipping quickly, and reaching that alignment takes coordinated discussion, not code changes, which AI tools don’t speed up.

Does merging duplicate AI-generated code fix the underlying problem?

No. Merging duplicate implementations removes the immediate symptom but doesn’t address why the team never agreed on structure or ownership in the first place. Without that conversation, similar duplication is likely to recur.

Why do architectural conversations get skipped when teams use AI coding tools?

AI tools remove the natural friction that used to force engineers to engage with existing code and system design before shipping. That friction used to surface architectural questions organically; without it, those questions can go unasked for a long time.

How can a team avoid needing a large architectural conversation later?

By treating the second occurrence of a similar pattern in the codebase as a trigger to pause and align, rather than waiting until duplication has spread across many implementations before addressing it.

Who should own the architectural conversation a team skipped?

Ideally a person with clear ownership over the relevant part of the system, someone whose role includes noticing drift from agreed structure and calling for alignment before it compounds further.

Next steps

Cleaning up an AI-assisted codebase looks like a code problem from a distance. Up close, the bottleneck is a conversation a team never had time for while it was busy shipping. Data Society’s AI Advisory work helps engineering teams make room for that conversation before the fifth implementation shows up, and AI upskilling programs build the shared architectural fluency that makes it productive when it happens.

Don’t wanna miss any Data Society Resources?

Stay informed with Data Society Resources—get the latest news, blogs, press releases, thought leadership, and case studies delivered straight to your inbox.

Data: Resources

Get the latest updates on AI, data science, and our industry insights. From expert press releases, Blogs, News & Thought leadership. Find everything in one place.

View All Resources