Modernization Is Not Refactoring — And GenAI Doesn't Change That (Yet)

sleroy | Dec 21, 2025 min read

When organizations face technical debt and aging systems, a common reflex is to assume that modernization means refactoring everything.
This assumption has existed for years — but it is becoming even more widespread with the rise of Generative AI–powered coding assistants.

The reasoning often sounds simple:

“We have an old Java 8 application running on a custom framework. Let’s migrate it to the latest Spring Boot stack.”

On paper, this looks straightforward.
In reality, it rarely is.


The Illusion of the Perfect Migration Plan

Ask a GenAI assistant to help with such a migration, and you will often receive an impressively detailed response:

  • a multi-step plan
  • hundreds of refactoring actions
  • class-by-class transformations
  • framework-by-framework replacements

The problem is not the quality of the answer.
The problem is that this plan will almost never be applied as described.

Why?

  • The context window is too small to capture years of architectural decisions
  • Organizational constraints are missing
  • Runtime behavior and production incidents are invisible
  • Implicit coupling is not documented in code
  • Trade-offs made over time are lost

Modernization is not a purely technical exercise.
It is an accumulation of experience.


What Years of Modernization Actually Teach You

Teams that have worked on modernization projects — especially in mainframe ecosystems, proprietary platforms, or long-lived enterprise systems — know a hidden truth:

Refactoring is only one of many possible modernization strategies.

Depending on the system, the constraints, and the business risk, the right approach may be:

  • selective refactoring
  • introducing a compatibility runtime to minimize regression
  • building facades around legacy components
  • applying the Strangler Fig pattern to progressively extract functionality
  • isolating change at the boundaries rather than in the core
  • or sometimes… doing nothing for now

The best modernization decisions are often architectural, not syntactic.


Where GenAI Still Struggles

Even when combined with:

  • Retrieval-Augmented Generation (RAG)
  • knowledge graph databases
  • large-scale code indexing

GenAI still tends to focus on files, classes, and methods.

Architecture, however, is:

  • distributed across repositories
  • encoded in runtime behavior
  • expressed in deployment topology
  • reinforced by organizational structure
  • shaped by past failures and constraints

This is where GenAI currently struggles:
it sees code, but not always the system.


Encouraging Signals from the Industry

There is real progress happening.

Tools and platforms such as AWS Transform for Mainframe and Heirloom are moving beyond simple code translation. They start to reason in terms of:

  • system boundaries
  • execution models
  • dependency isolation
  • risk-controlled transformation paths

Similarly, companies like Sonar are increasingly investing in software architecture awareness, not just code quality.
This shift is critical if GenAI is to become a true modernization partner rather than a refactoring engine.


Modernization Is a System Problem

GenAI is already excellent at:

  • rewriting code
  • upgrading APIs
  • applying mechanical transformations

But modernization is about:

  • systems
  • architecture
  • risk management
  • evolution over time

Until GenAI can reason consistently at that level, experience remains irreplaceable.

The future is not GenAI instead of architects and modernization experts.
The future is GenAI guided by architectural intent.

And that changes everything.

comments powered by Disqus