03. 07. 2026 Marco Berlanda AI, Development

Why AI Will Make Refactoring More Important, Not Less

For a long time, software development had a fairly comforting structure: you had a problem, you wrote some code, you shipped it, and then you moved on to the next problem while quietly pretending the previous one wouldn’t come back to haunt you at all. Mission accomplished.

That model is starting to break, not because we suddenly got worse at building software, but because we are getting dramatically better and faster at changing it.

The hidden cost, namely “tech debt” in most cases it’s always been something comparable to rust for a metal structure: it slowly but surely grows over time, years, but then gets to a point where you cannot ignore it anymore. And as we all know, usually the cost of fixing it then, is always higher than maintenance over time.

But this is where the analogy dies, because you very rarely change a metal structure over time, unlike software. So there’s a truth between the lines: the real cost of software is changing it.

We optimized for writing code, not living with it

Traditional software development is optimized around one expensive activity: implementation.

Everything in the process exists to make writing code manageable: you gather requirements so you don’t write the wrong code. You design so you don’t write the chaotic code. You test so you don’t confidently ship the wrong code. You review so you can collectively agree on the code you’re about to regret later.

And then, once all that is done, you ship it and hope assume the story is over. But of course, it isn’t!

Because software doesn’t really get to a “done” or “finished” state, it just accumulates decisions (and consequences) within itself. Also, those decisions either stay flexible or slowly turn into concrete (“It’s temporary I swear, I’ll refactor it next sprint!”)

That second state is what we politely call technical debt, which is a nice way of saying “it’s a problem for future me”.

More precisely, technical debt is anything that increases the cost of future change. It might be messy architecture, duplicated logic, unclear domain boundaries, missing tests, outdated documentation, or that one service that nobody touches because everyone is afraid it might destroy everything we hold dear.

The important point is that none of it necessarily hurts you today. It hurts your future self, who is always significantly less optimistic and slightly more tired.

Can AI save us?

A common assumption is that AI simply accelerates development. You describe what you want, and it writes the code faster than any human could, ideally without needing coffee breaks or a psichologist.


That part is mostly true, but incomplete in a very interesting way…


Because AI doesn’t remove the development process. It reshapes where the difficulty sits.
A simplified traditional flow looks like this:

Understand problem -> Design -> Implement -> Test -> Ship

In an AI-assisted world, we already see a shift:

Understand problem -> Describe intent -> AI implements -> Human reviews -> Ship

But if you extend that logic far enough, something more radical appears:

Business intent -> AI explores solutions -> AI implements -> AI tests -> AI documents-> Human validates outcome -> Ship

At that point, the human is no longer primarily writing software. The human is steering it. And that could change everything.

Because the bottleneck is no longer “how fast can we implement this feature?” It becomes “how clearly can we express what we actually want, and how safely can we evaluate what the system produced?”

Which is a very different skill set, and slightly less compatible with stupidly heroically rewriting a payment system at 2 a.m. because “it felt cleaner that way.”

Technical debt becomes context debt

Here’s where things get interesting in a slightly uncomfortable way.

AI does not eliminate the importance of architecture. It amplifies it.

If you think of an AI agent working on a codebase, it is constantly doing something very human-like, but at scale: building a mental model of the system before making changes.

Now imagine giving that agent a codebase where:

  • the same concept is implemented in five different ways
  • naming conventions shift depending on who last touched the file
  • business rules are scattered across services like confetti
  • documentation exists, but mostly as a historical artifact from a happier timeline

The AI will still try to work. It will just spend more effort understanding the system than improving it (if you’re lucky) but also since AI strives for consistency, so it might try to add new stuff or features just like it was added before (including all downsides, ugggh), and then another AI will flag it as “not ok” (right @Copilot reviewer?) and on it goes..

But don’t fret, that is where a new framing becomes useful!

Technical debt stops being only about maintenance cost. It becomes context debt.

So, how much context does a system require before any safe change can be made?

Since AI systems (just like humans, when they bother to check) are bounded by context, the more noise, duplication, and inconsistency you introduce, the harder it becomes to reason about the system reliably. Even if the AI is fast, it is still operating under cognitive constraints. It is just a very fast thinker who’s been lied to, essentially.

From code-centric to intent-centric development

If you zoom out, the biggest change AI introduces is not automation. It is translation (not THAT translation, hear me out first)

We are moving from:

“Humans translate intent into code.”

to:

“Humans express intent, and systems handle translation.”

This is arguably subtle, but it completely flips the structure of work.

In a traditional model, code is the primary artifact. In an AI-native model, code becomes an intermediate representation of intent. Something closer to compiled behavior, other than handcrafted output.

Which leads to a slightly provocative idea. Are you seated? Ready?

Your codebase is no longer just software. It is a prompt for future changes.

Every naming decision, every abstraction boundary, every architectural shortcut is part of how you are “communicating” with future agents (human or machine, but especially machine since they’re less opinionated) who will modify it or build on top of it.

A clean architecture is not just easier to read. It is easier to reason about. And in an AI-driven workflow, “reasoning about the system” becomes the main activity, not writing it.

So, in layman’s terms. What does it mean?

It means that instead of worrying about micro implementations (where AI is most likely way better than you, sorry to say) programmers can finally take a step back and think about the system as a whole. Keep track of all the moving parts, not the circuitry, and make sure the evolution of the product is more coherent, parts work together seamlessly.

Bigger picture stuff basically.

The AI-native workflow (and why it feels unfamiliar)

If we take the idea seriously, an AI-native workflow starts to look less like software engineering and more like system orchestration:

The uncomfortable part is that humans move further away from implementation and closer to judgment.

You are no longer praised or rewarded for how quickly you can type a solution into existence. You are rewarded for how well you can decide whether that solution is correct, maintainable, and aligned with the actual goal (assuming you remember what the actual goal was after six meetings and a Teams thread split into multiple chats, with 143 unread messages).

So, life’s easier! No?

Well depends. You have better tools to do your work? Expectations raise too!

Which to be honest, I think it’s a great thing. Too many programmers forget that ultimately, whatever we develop is for somebody to use. Somebody that, quite frankly, doesn’t really care AT ALL about what beautiful code you put in there. Like not at all.

Why refactoring becomes even more important

There is a common fantasy that AI will reduce the need for refactoring because “it can just rewrite everything instantly.” This sentence alone, should tell you that whoever said this, never really tried. At all.

A well-structured system allows:

  • faster and safer AI-generated changes (and less token used!!!)
  • more reliable automated testing
  • clearer interpretation of business rules
  • reduced ambiguity in generated implementations

A messy system, on the other hand, does not become easier because the tool is smarter.

It becomes harder at higher speed, which is a particularly unpleasant combination, like putting a faster engine into a car with questionable brakes and hoping optimism counts as a safety feature!

The role of developers doesn’t disappear, it shifts

There is a predictable narrative that AI replaces developers. It is simple, emotionally satisfying, but ultimately wrong in a slightly boring way.

What actually happens is more interesting. (Plot twist!)

Developers move from being primary implementers to being system designers and evaluators. Less time writing boilerplate, more time shaping structure. Less focus on syntax, more focus on coherence.

That is not a reduction in importance. It is a change in surface area.

And ironically, it makes architecture, refactoring, documentation, and testing more valuable, not less. Because they are no longer just supporting human understanding. They become the scaffolding that allows AI systems to safely modify production software without turning it into interpretative art.

Closing thought: software becomes easier to change, not easier to write

For decades, we optimized software development around writing code efficiently. Alas, AI is changing the equation in a more uncomfortable but more interesting direction.

We are now optimizing for something else entirely:

how easily software can evolve.

Because in a world where code can be generated quickly, the scarce resource is no longer production capacity.

It is change capacity.

And in that world, technical debt is not a side problem or an engineering nuisance. It is a direct limiter of how effectively humans and AI can collaborate on evolving a system over time.

Or, put less politely (my specialty)

AI won’t kill technical debt, it will just make it impossible to hide.

Which will ultimately result in better, faster, more solid products.

AI is not a tool to simply integrate in our workflow, it IS the new workflow.

Now is our turn to make the best use possible of it.

These Solutions are Engineered by Humans

Did you find this article interesting? Does it match your skill set? Programming is at the heart of how we develop customized solutions. In fact, we’re currently hiring for roles just like this and others here at Würth IT Italy.

Marco Berlanda

Marco Berlanda

UX Front-end engineer by day, UX wizard by night, and an Interaction design ninja all the time. Always on the hunt for those ‘wow, didn’t see that coming!’ solutions to problems.

Author

Marco Berlanda

UX Front-end engineer by day, UX wizard by night, and an Interaction design ninja all the time. Always on the hunt for those ‘wow, didn’t see that coming!’ solutions to problems.

Leave a Reply

Your email address will not be published. Required fields are marked *

Archive