Two years ago, AI in legacy modernization meant a chatbot on top of an old system. In 2026 it means something more specific: tools that read a COBOL or Java monolith nobody has documented, explain what it does, draft a translation to a modern stack, and generate the tests to prove the translation holds. The vendors now ship this as product. AWS Transform for mainframe became generally available in May 2025, and GitHub Copilot's app modernization for Java and .NET followed in September 2025.
The demand is obvious. In its July 2025 review, the US Government Accountability Office found eight of the eleven most critical federal legacy systems running on outdated languages, and only three of ten flagged modernizations completed in six years. Gartner predicted in late 2023 that by 2027 generative AI would be used to explain legacy applications and build replacements, cutting modernization costs by 70%, while warning in the same breath that "generative AI is not going to be free."
This article is about the gap between those two statements: where AI actually moves a modernization program, which tools do what, what the early results look like, and where the technology still fails. It assumes you know the basics of modernization; those are in our legacy application modernization guide. If you want to see how we apply this with clients, our legacy modernization services page lists the engagement models.
Scale your business effortlessly with modernized IT solutions
Key Legacy Application Issues AI Is Pointed At
The problems modernization addresses have not changed; what AI changes is the cost of the first and most expensive step, understanding the system.
Obsolete stack. Languages and frameworks that are unsupported and hard to hire for. In ManpowerGroup's 2026 Talent Shortage survey, engineering skills rank among the hardest to find even for mainstream stacks; for COBOL, PL/I, or classic ASP the pool is a handful of specialists. No documentation. The logic lives in the code and in the memory of one or two people. This is the problem AI addresses best.
Scalability limits. Monoliths that scale only vertically and batch windows that no longer fit the business day.
Integration friction. No APIs, point-to-point file exchanges, manual re-keying.
Security exposure. Unpatched components; IBM's Cost of a Data Breach Report 2026 puts the average breach at a record $4.99 million and AI-driven attacks up 56%, which cuts both ways for a legacy estate. Technical debt. Years of patches with no coherent design. CISQ estimated accumulated US technical debt at $1.52 trillion.
Why companies still defer the work is in how outdated legacy systems slow down business growth. The short version: understanding the system costs senior-engineer months before any change can be made, and that cost is the one AI has started to cut.
The Role of Artificial Intelligence in Modernization: Where It Actually Helps
Six uses have moved from demos to delivery.
1. Understanding and documenting the existing code
The biggest win. Large language models read code at a scale no team can, produce explanations of what each module does, map call graphs and dependencies, and extract business rules into readable form. On AWS Transform, the specialized agents "analyze code, generate documentation, decompose monolithic applications, and transform legacy code," per AWS's launch post. For a system with no documentation, this turns a three-month archaeology phase into weeks, and it is the part of the work where the output is easiest to verify: an engineer who knows the domain can tell quickly whether an explanation is right.
2. Translating code between languages and frameworks
COBOL to Java, JCL to orchestration, DB2 to PostgreSQL, Java 8 to Java 21, .NET Framework to .NET. AWS Transform converts COBOL, JCL, and DB2 to Java and Postgres; GitHub Copilot app modernization handles assessment, automated transformations, dependency updates, and containerization for Java and .NET upgrades. The output is a draft, not a release. Our experience and the published data agree: the draft is where senior review becomes more important, not less. Veracode's testing found 45% of AI-generated code samples contained security flaws, and a 2025 METR study of experienced developers on mature codebases found them 19% slower with AI tools while believing they were faster. Translation drafts need the same review a junior engineer's pull request would get, on a much larger volume.
3. Generating tests and the safety net
Modernization without a test harness is a bet that nothing important was undocumented. AI generates characterization tests from existing behavior, test data, and test plans at a pace that used to be the project's bottleneck; AWS notes that mainframe testing typically consumes over 50% of project duration and added automated test plan and script generation in December 2025. Generated tests still need a human to confirm they test the right thing, but the writing is no longer the constraint.
4. Data migration and cleansing
Decades of data with inconsistent formats, undocumented codes, and duplicates. AI profiles the data, proposes mappings, flags anomalies, and drafts transformation rules. Reconciliation after migration still has to be automated and run in rehearsals; AI shortens the design of the rules, not the discipline of applying them.
5. Modernization planning
Dependency maps, decomposition proposals (which functions become services, in what order), and effort estimates grounded in the actual code rather than in interviews. This is the input to the modernization roadmap, and it is better than it was, with one caveat: the model proposes, the architect decides. The trade-offs of the deeper options it will propose are in re-architecting legacy applications: main risks and benefits.
6. Operations after cutover
AIOps on the modernized system: anomaly detection in logs and metrics, incident correlation, capacity forecasting. Useful, mature, and not specific to modernization; it is what the modernized system makes possible.
What AI does not do: it does not decide whether to modernize, it does not know your business rules better than the people who run the process, and it does not remove the need for the assessment, the safety net, and the incremental delivery that make programs succeed. DORA's 2025 research, summarized by InfoQ, is the clearest statement of the pattern: AI adoption now correlates with higher throughput and with rising delivery instability, and the teams that convert one into the other are the ones with strong testing and fast feedback.
The 2026 Toolset
Tool
What it does
Fits when
Caveat
AWS Transform for mainframe
Agentic analysis, documentation, decomposition, COBOL/JCL/DB2 to Java/Postgres, test generation; refactor, replatform, and reimagine patterns unified and code transformation at no cost since March 2026
IBM z/OS estates moving to AWS
Target is AWS; generated Java needs restructuring and review
GitHub Copilot app modernization
Assessment, automated code transformation, dependency and build updates, containerization for Java and .NET; IDE upgrade experience generally available
Java and .NET upgrades, Azure-oriented deployment
Framework upgrades, not architecture change; review required
IBM watsonx Code Assistant for Z
Code explanation, COBOL to Java translation, test generation for mainframe applications
Organizations staying on or near the mainframe
Vendor-specific; validate translations with the same rigor
General coding assistants (Copilot, Cursor, Claude)
Code explanation, refactoring drafts, test drafts, documentation on any stack
Every program, every phase
Output quality varies by context given; 46% of developers distrust accuracy in the 2025 Stack Overflow survey
Static analysis with AI assistance (SonarQube, CodeScene, and similar)
Debt hotspots, complexity, duplication, security findings; AI-assisted explanations and fixes
Assessment phase and continuous modernization
Finds symptoms; prioritization is still a judgment call
Vendor claims about speed, such as AWS's "years to months," are vendor claims. The reliable pattern across tools is the same: large gains in understanding and drafting, small gains in verification, and verification is where the risk lives.
Successful Examples of AI-Driven Legacy Application Modernization
Financial sector
JPMorgan Chase integrated large language models into payment validation screening, cutting processing time and false positives in a core legacy-adjacent workflow, as described in the bank's own account. Citigroup has used AI in compliance operations since 2019 and now applies LLMs to analyze regulations across the countries it operates in, per Computer Weekly and Bloomberg. The pattern in both: AI first went into the processes around the legacy core, and the modernization of the core followed once the organization had learned to govern AI output.
Mainframe estates
Kyndryl's 2024 State of Mainframe Modernization survey of 500 senior leaders found 86% deploying or planning generative AI on the mainframe, and 96% moving workloads to the cloud, averaging 36% of their workloads. The mainframe is where AI-assisted modernization is furthest along, for a simple reason: it is where the documentation gap and the skills gap are both widest.
Healthcare
Healthcare systems combine legacy platforms, strict regulation, and high-value data, which is why AI adoption there has concentrated on clinical and operational layers before touching core records systems. Mayo Clinic's generative AI deployments on top of its EHR platform, announced in late 2023, are the typical shape. The constraints that apply to the core systems are in modernizing legacy systems in healthcare.
How we use it
At Devico, AI enters a modernization program in the assessment phase and stays through delivery, in three places: generating a first draft of documentation and dependency maps for systems that have none, drafting characterization tests around existing behavior before any change, and producing translation or refactoring drafts that senior engineers review against those tests. It does not replace the architect's decomposition decisions or the incremental delivery model. The engineers doing the review are the scarce resource; how we find them is on our page for hiring AI engineers, and what changes when AI roles join a program through augmentation is in staff augmentation for AI projects.
Best Practices for Implementing AI in Legacy Application Modernization
Start with understanding, not translation. Use AI to document and map the system first. The output is cheap to verify and makes every later step better.
Build the safety net before generating code. Characterization tests, monitoring, pipeline, rollback. Generated code without generated tests is volume, not progress.
Review every generated change as if a junior wrote it. Because in terms of accountability, nobody did. Review for correctness and design, not style. The debt that accumulates when teams skip this is the subject of the hidden cost of AI-generated code technical debt.
Use AI for technical debt triage, not only for new code. Static analysis plus AI explanation finds the hotspots; the program to work them down is on our technical debt management page.
Keep architecture decisions human. Decomposition proposals are input. The architect owns the target state and approves each increment's design.
Give the tools context. Models perform on the context they are given: domain glossary, architecture notes, coding standards, examples of the target style. A translation prompt with no context produces code in the model's style, not yours.
Measure with the DORA four. Lead time, deployment frequency, change failure rate, recovery time. If the first two rise and the third rises with them, the AI is generating instability, and the fix is review and tests, not more generation.
Pitfalls to Avoid in App Modernization
Poor preparation. Pointing a translation tool at a system nobody has assessed produces a modern-looking copy of the same problems. Assessment first; the method is in the roadmap linked above.
Incorrect choices. Treating "AI can translate it" as a reason to rebuild. Rebuild remains the most expensive and most abandoned strategy; AI lowers the cost of the draft, not the risk of the cutover. Pick the least invasive strategy that removes the immediate risk.
Inconsistency of team and goals. A team told to "use AI to go faster" without a definition of done, review rules, and metrics will go faster into rework. Agree the goals and the quality gates before the tools.
Trusting benchmarks over your codebase. Vendor speedups are measured on vendor samples. Run a two-week pilot on one real module, measure review time and defect rate, and extrapolate from that.
Challenges in Implementing AI in Legacy Application Modernization
Skills. You need engineers who know the legacy stack, engineers who know the target stack, and engineers who can judge AI output. Few people are all three; teams are.
Data quality and access. AI tools need the code, the data schemas, and the documentation that exists. Getting them access to a regulated estate is a security project in itself.
Security and intellectual property. Source code leaving the organization's boundary into a vendor's model is a contract question before it is a technical one: data processing terms, retention, and training exclusions need to be explicit.
Incorrect output that looks correct. The failure mode specific to generative AI: plausible code that is wrong in ways tests catch and reviews miss, or the reverse. The mitigation is both.
Cost control. Token-based and usage-based pricing scales with codebase size; AWS dropping its lines-of-code pricing in March 2026 is a sign the market is moving, but pilots should measure cost per module before committing.
Process integration. Generated artifacts have to flow through the same review, pipeline, and release process as human-written ones, or they bypass the controls the program depends on.
AI in Legacy Application Modernization: Future Trends and Predictions
Agentic pipelines. The 2025 generation of tools, AWS Transform's agents and GitHub's modernization agent among them, chains analysis, transformation, and test generation with human checkpoints. Expect the checkpoints to become the product differentiator, because that is where trust is decided.
Specification-driven rebuilds. AWS's "reimagine" pattern, added in December 2025, extracts business logic into a specification that coding agents then rebuild from. If it works at scale, it changes the economics of the rebuild strategy specifically, the one that has always been hardest to justify.
Price compression. Code transformation offered at no cost by a hyperscaler, as AWS did in March 2026, shifts the cost of modernization from the tool to the review and the cloud bill. Programs should plan budgets accordingly.
Verification as the bottleneck. With generation cheap, the scarce input becomes senior engineers who can judge output and the test infrastructure that catches what they miss. Hiring for that skill is a different exercise from hiring for coding; the formats are in how to vet developers in the AI era.
Gartner's 70% by 2027. The prediction is plausible for the understanding-and-drafting share of the work and implausible for the whole program. A sensible planning assumption for 2026 is a material reduction in assessment and translation effort, little change in testing and cutover effort, and more review effort than before. Where the field is heading more broadly is in legacy modernization trends.
5 trends in legacy modernization
Wrapping It Up
AI has changed legacy modernization in one specific way: understanding and drafting, the slowest and most expensive early steps, are now fast and cheap. It has not changed the steps that decide whether programs succeed: assessment, a test safety net, incremental delivery, and senior review. Teams that use AI to do more of the first and none less of the second are shipping modernizations in a fraction of the time. Teams that skip the second are generating technical debt at machine speed.
If you have a system that nobody fully understands and a modernization that keeps slipping, that is exactly where AI-assisted assessment pays off first. Describe the system to us: stack, size, and what the business cannot do because of it, and we will propose an assessment with an AI-assisted documentation pass as the first increment.
Transform your legacy systems to boost efficiency and innovation
Frequently Asked Questions
Mainly to understand and document existing code, translate between languages and frameworks, generate tests and test data, profile and map data for migration, and propose decomposition for planning. In every case the output is a draft that engineers verify.
Tools such as AWS Transform for mainframe and IBM's watsonx Code Assistant for Z produce Java translations of COBOL applications at scale. The translations need restructuring and review, and the testing effort to prove equivalence remains the largest part of the project.
It cuts the cost of assessment, documentation, and code drafting substantially. Testing, cutover, and review effort stay roughly the same or rise. Gartner predicted a 70% reduction in modernization costs by 2027; a realistic 2026 assumption is a large saving on the early phases and little on the later ones.
Plausible but incorrect generated code, security flaws in generated output, source code leaving the organization's boundary, usage-based costs that scale with codebase size, and teams generating faster than they can review. Tests, review, contracts, and pilots mitigate each.
AWS Transform for mainframe, GitHub Copilot app modernization for Java and .NET, IBM watsonx Code Assistant for Z, general coding assistants such as Copilot, Cursor, and Claude, and AI-assisted static analysis tools such as SonarQube and CodeScene.