Modernize the constraint, not the entire estate

Old code is not automatically a business problem. Slow change, unsupported dependencies and fragile data flows are. Use AI to investigate and test a legacy application, but make the investment decision around a specific constraint and a credible route to retiring the old work.

An old computer terminal upgraded into modern cloud services with AI

A modernization brief worth funding

  • Name the business constraint before choosing a new architecture.
  • Choose an approach per application: retire, retain, rehost, replatform, refactor or replace.
  • Treat AI-generated explanations and tests as hypotheses to verify.
  • People still own architecture, correctness and approval of every change.
  • A fixed scope per module and on-time decommissioning keep budgets in check.

Age is a poor prioritization metric

A stable application with a supportable runtime may deserve to stay exactly where it is. A newer system that prevents a required product change may deserve immediate attention. Describe the constraint in operational terms: a release needs manual reconciliation, a dependency has no supported upgrade path, or a customer workflow cannot tolerate the current recovery time.

For each candidate, record business criticality, change frequency, support risk and dependencies. Compare the cost of leaving it alone with the cost and disruption of intervention. Avoid a single score that hides a veto: an unsupported security-critical dependency may need action even when the application has few users.

Choose the smallest intervention that removes the constraint

These approaches are alternatives, not maturity levels. Rehosting can satisfy a data-center exit without fixing difficult code. Replacing a commodity function can be more sensible than translating it. Refactoring is justified when the ability to change that function matters enough to carry the migration risk.

ApproachWhat it meansWhen to use it
RetireSwitch it offLittle-used applications whose function is covered elsewhere
RetainLeave it as it is for nowStable systems with low cost and low business change
RehostMove to the cloud largely unchanged (“lift and shift”)Quick exit from a data center; optimize later
ReplatformMove with small changes, such as a managed database or containersCut operations effort without a rewrite
RefactorRestructure the code, for example into modular servicesSystems that change often or block AI and new features
ReplaceMove to SaaS or a packaged product such as an ERPCommodity functions where custom code adds no value

Prove a migration path with one vertical slice

Choose a slice that includes a real business rule, a data boundary and an operational dependency. A simple screen rewrite proves little about a batch process that closes the books. Define acceptance with the people who use and support the system before generating code.

  1. Inventory. List applications with their owners, users, costs, dependencies and technical risks.
  2. Score. Rate each on business value, cost to run and technical risk, then choose an approach from the table above.
  3. Understand the code with AI. AI tools can read legacy code, explain it, map dependencies and draft missing documentation for engineers to verify.
  4. Build a safety net. Generate tests around current behavior, with AI assistance, before changing anything.
  5. Pilot one module. Modernize a single module end to end to prove the approach, the timeline and the run cost.
  6. Modernize in fixed-scope sprints. Module by module, behind the tests, with automated deployment.
  7. Migrate data carefully. Reconcile records between old and new systems before switching over.
  8. Optimize run costs. Rightsize the new platform and review it monthly with FinOps.
  9. Decommission. Turn off the old system to capture the savings.

Use AI as an investigator, not an authority

Ask an assistant to explain an unfamiliar routine, then follow its claimed dependencies in the code and runtime. Generated tests can reproduce an existing bug, and a plausible dependency diagram can omit configuration-driven behavior. Combine characterization tests with approved business examples; agreement with the old program is evidence of compatibility, not proof of correctness.

AI helps withPeople still own
Explaining unfamiliar or undocumented codeArchitecture and sequencing decisions
Drafting documentation and dependency mapsVerifying that documentation is correct
Generating unit and integration testsDeciding what behavior is correct
Suggesting refactors and code translationsReviewing, testing and approving every change
Writing migration and data-mapping scriptsData reconciliation and sign-off

Budget for the overlap and the exit

Record the temporary cost of running old and new paths, including reconciliation, support and duplicate infrastructure. Decide which system owns writes during cutover. If both can change the same records, specify how conflicts are resolved before attempting live synchronization.

  • Fix the scope of each module after the assessment, instead of open-ended effort.
  • Start with the modules that unlock the most value or cost the most to run.
  • Estimate run costs before migration and measure them after.
  • Retire old workloads only after data, rollback, record-retention and support obligations are satisfied; prolonged dual running can erase expected savings.

What completion should mean

A module is not finished when the new code deploys. It is finished when users accept the result, operational ownership has transferred, data reconciles and the old path can be retired safely. Put those exit conditions in the plan alongside feature acceptance. AI may help produce the change; disciplined retirement makes the investment real.

Frequently asked questions

Can AI rewrite our legacy system automatically?

No. AI speeds up understanding, testing and refactoring, but engineers must design, review and test every change.

Should we rewrite from scratch?

Rarely. Incremental modernization behind tests is lower risk than a big-bang rewrite.

How long does modernization take?

It depends on size and approach. An assessment gives you a roadmap, a fixed scope per module and dates.

Do you modernize ERP systems too?

Yes, including moving from legacy ERP to Odoo or ERPNext. See modernization.

More questions? See all FAQs →

Quasphere team

Quasphere team

Written by the FinOps practitioners, cloud and DevOps engineers and applied AI engineers who deliver this work for our clients. About Quasphere.

Start with the constraint you need to remove

Discuss the application, its dependencies and the evidence needed for a safe first slice.