The vast majority of large organizations still have at least one critical system running on code that nobody in the organization actually understands. It could be a COBOL claims engine or a VB6 desktop app that the finance team relies on every single day. It works, so it’s not going to be changed. Year on year, it gets harder and more expensive to change.

AI-powered legacy code modernization is the practice of using AI to read, explain, refactor, translate, and test legacy code faster than a team could do by hand. The aim is to break the cycle of ever-increasing maintenance costs and risks.

The pressure to adopt it is very real. In an October 2025 Pegasystems survey of over 500 IT decision-makers, 78% said the time, money, and effort they were spending on maintaining their legacy applications could be better spent. Just 9% said their transformation work had actually put them in a position to retire or replace all of their legacy applications.

The vast majority of leaders have already made up their minds about the need to modernize. What they’re now asking is how much of the work AI can actually do without altering the business rules that are baked into the code. For a large proportion of the work, the answer is yes, AI can do it. The only thing that needs to be retained is the engineer’s responsibility for intent and verification.

This guide looks at where AI is currently delivering value, where it’s still not up to the mark, and how you can run a faster program without introducing new risk.

Key Takeaways

  • AI-powered tools use LLMs, coding agents, and static analysis to understand, document, refactor, test, and translate legacy code much faster than would be possible by hand, while maintaining the existing business logic.
  • From code comprehension and business logic extraction to code translation, test generation, and dependency upgrades, AI reduces manual work and helps developers work more efficiently.
  • Combine AI assistants, autonomous coding agents, and deterministic tools to get more reliable modernization outcomes. AI does the complex reasoning, and deterministic tools do the consistent, repeatable transformations.
  • AI-generated code must be reviewed by developers, validated against business rules, security tested, and proven behaviourally equivalent to the original.
  • Organizations should start with a well-defined pilot module, document the existing behavior, modernize in small steps, validate the outputs, and then progressively roll out the process across the rest of the legacy codebase.

What Is Legacy Code?

Legacy code is code that the business still relies on but can’t easily or safely change. It’s the code that runs the core bits of business (billing, claims, payroll, order processing, etc.) and it’s been in production for years or even decades.

Age in itself doesn’t make code legacy. In Working Effectively with Legacy Code, Michael Feathers defines it as simply code without tests. In reality, legacy code tends to have a number of characteristics in common:

  • It’s in languages or frameworks that are obsolete or rarely taught these days (COBOL, VB6, PowerBuilder, AngularJS, etc.).
  • There’s virtually no documentation, and the original authors have long since left the company.
  • Automated test coverage is very low, so every change has risk.
  • Business rules are built directly into the code rather than being documented separately.
  • It’s tightly coupled to old databases, platforms, and hardware.

Legacy code isn’t bad code. It’s code that has implemented years of business decisions, and it still works. The aim of modernization is to preserve that behavior and move it onto a stack that the team can then own, secure, and extend.

How Do You Know When Your Legacy Code Needs Modernization?

Legacy code doesn’t usually say it needs modernizing. The signs are often in delivery metrics, audit findings, and hiring plans. Forrester forecast in October 2024 that 75% of technology decision-makers would view their technical debt as moderate or high severity by 2026, in part due to the complexity that new AI solutions introduce.

Check your codebase against these signals:

  • The runtime, framework, or vendor platform is out of support (or will be out of support within 2 years).
  • Only one or two people can safely touch the core modules.
  • Automated test coverage is too low to feel confident about refactoring.
  • Small changes take weeks as every release goes through a long manual regression cycle.
  • Security scans keep flagging any vulnerable dependencies that you can’t upgrade.
  • New integrations (APIs, cloud services, AI, etc.) all require some form of workaround or additional middleware.
  • Licensing, hosting, and support costs on the old platform are continuing to go up.

When a number of them apply at the same time, waiting will usually end up costing you more than just going ahead and doing it.

What Is AI-Powered Legacy Code Modernization?

AI-powered legacy code modernization uses large language models (LLMs), coding agents, and traditional static analysis to understand, document, restructure, and test the legacy code. The aim is to get that code onto a modern stack while preserving its behavior.

Gartner now has this as a separate software market. Their Peer Insights category for AI-augmented code modernization covers tools that bring together AI agents, generative AI, and deterministic analysis. The work they can do includes code and architecture analysis, documentation, dependency mapping, migration planning, and refactoring.

The practical shift is in who does the reading. In a classic legacy code modernization project, senior engineers spend months reading through the code and tracing code paths before anyone writes any new code. With AI, that entire first reading pass is effectively automated, and engineers are then left with the task of reviewing the findings and making decisions.

How It Differs from Manual Rewrites and Rule-Based Converters

  • Manual rewrite means the engineers just re-implement the system from scratch. It gives you full control, but it’s by far the slowest route, and you’re very likely to miss the undocumented rules.
  • Rule-based converters (transpilers) just translate line by line and produce a very predictable output. They’re fast, but the result tends to be a program in the new language that still follows the structure of the original, which makes it very difficult to maintain.
  • AI-powered hybrid approaches use AI to explain intent and suggest code that aligns with the conventions of the target language. Deterministic tools apply repeatable changes, and tests are run to ensure that the behavior hasn’t changed.

Insight: Measure success by behavior. If the new code produces the same results as the old code for the same inputs, it doesn’t need to be line-for-line the same as the old code.

Why Use AI for Legacy Code Modernization?

The hardest part of modernizing legacy code isn’t writing the new code at all. It’s getting to the point where you actually understand the old code well enough to be able to change it without breaking the business rules that are embedded in it. That work is almost always the preserve of a very small number of senior engineers, and so it’s slow, expensive, and difficult to scale.

AI changes that in three ways:

  • It cuts the reading time down: the AI can index the whole codebase and then explain any section of it, so the first reading pass no longer depends on you manually tracing through the code.
  • It produces more maintainable target code: Rather than just copying the structure of the source code, the AI can write code that conforms to the conventions of the target language.
  • It makes verification affordable: AI can write regression tests across the whole codebase, so we have a record of current behavior before anything changes.

Engineers remain responsible for intent and approval. AI takes on the bulk of the repetitive work that previously made these programs so slow to start. How much AI actually helps depends heavily on the stack you’re starting from.

Which Legacy Codebases Benefit Most from AI?

AI doesn’t help with every stack equally. It works best with languages that have a huge amount of public code and clear modern equivalents. It struggles with the rare dialects and the proprietary 4GLs. Set your expectations accordingly before you even start thinking about a legacy code migration. See the table below.

Legacy stack Common target AI fit Watch for
COBOL and PL/I on the mainframe Java or C# High for comprehension and documentation, and medium for translation Decimal arithmetic, JCL batch flows, CICS screens, shared copybooks
VB6, Delphi, PowerBuilder .NET or web front ends Medium to high UI and data-access logic mixed together, and third-party controls with no modern equivalent
.NET Framework 4.x Current .NET LTS release High WCF, Web Forms and Windows-only APIs
Java 8 or 11 Current Java LTS with Spring Boot 3 or later High, mostly through deterministic recipes The javax to jakarta namespace change and removed APIs
AngularJS Angular or React Medium Two-way binding patterns, custom directives, rewriting the test suite
PHP 5 and Python 2 Current PHP and Python 3 High String and bytes handling and removed extensions

What Legacy Code Problems Can AI Solve?

The overwhelming majority of modernization projects are held up by a lack of knowledge. The actual coding of the new software is rarely the bottleneck. AI is most effective as an assistant that fills the gaps, with the human making the final call at each stage. These are the five problems it is best at solving right now.

Understanding Undocumented Code

The first few weeks of any program are spent getting to grips with what already exists. The modern tools will take the codebase and parse it into a code knowledge graph of programs, call paths, data stores, and external interfaces. The LLM then answers the question against that graph via retrieval.

No human team can read a multi-million-line codebase in its entirety, but AI can index the whole thing and answer questions about any section. It can also explain to a developer what COBOL, RPG, or PowerBuilder code does even if they’ve never seen that language before.

Business rules (discounts, eligibility checks, rounding, etc.) typically only exist in the conditional statements themselves. Business rules extraction is the process of taking those rules out of the conditional statements and presenting them as rules that a business analyst can validate. A simple example would be a rule that any order above a certain value from a certain region would be exempt from manual review. The AI can produce these rules extremely quickly and, of course, link each one back to the line of code it was extracted from.

A subject matter expert then goes through and accepts, modifies, or rejects each rule. It’s that review process which makes the extracted rules safe to build on.

Mapping Dependencies

Hidden dependencies are by far the biggest cause of failure in a modernization project. AI can traverse call graphs and data flows across modules, identify every call to a deprecated library or API, and suggest a replacement for each one.

Version upgrades (e.g., Java 8 to a current LTS, .NET Framework to modern .NET) are largely mechanical. The recipe-based tools do the bulk of the work in a fairly consistent manner. The AI then deals with the bits that the recipes can’t deal with (custom wrappers around APIs that have been deprecated, etc.).

Translating and Refactoring

AI code refactoring is the process of re-organizing the code in the same language. This involves breaking up long procedures, removing dead code, and introducing clear interfaces. AI code translation is the process of moving code into a different language (e.g., COBOL to Java, VB6 to C#).

The main benefit over older converters is the quality of the generated code. A good AI-assisted translation will produce Java that is properly structured as Java (i.e., classes, exceptions, standard libraries, etc.) rather than Java that is just COBOL structure in Java syntax. The drawback is that the AI output isn’t fully repeatable, so every translated unit has to go through the same test suite as the original.

Generating Tests

Before you touch any legacy code, you need proof of what it actually does today. Characterization tests (a term Michael Feathers coined in Working Effectively with Legacy Code) record the current behavior as the expected result, including behavior that looks wrong. AI can generate them in quantities that no team could possibly write by hand.

One caveat: a generated test will pass against today’s code by design, so if today’s code has a bug, the test will now protect that bug. Any test that produces a result surprising to the business should be reviewed by the business before you treat it as correct.

Writing Documentation

Documentation is one of the safest uses of AI right now, because people read and check the output before acting on it. AI can generate module summaries, data flow descriptions, and interface notes for code that has absolutely no documentation. If you’re using AI to document legacy code, you want it to provide you with a plain English summary of each module, its inputs and outputs, and the conditions that cause it to behave differently.

What AI won’t fix: unclear system ownership and a business that can’t agree on the rules the AI has extracted. Those are management issues, and they hold up AI projects as much as they hold up manual projects.

Business Benefits of AI-Powered Legacy Code Modernization

The business case for AI-powered legacy code modernization is all about time. In March 2025, Airbnb’s engineering team laid out how they’d used LLMs to migrate nearly 3,500 React component test files from Enzyme to React Testing Library.

Users Can Spot AI-Written Essays

The team had estimated it would take 1.5 years of engineering time to do it by hand. With LLM-driven automation, the team finished in about six weeks, and a short manual pass cleaned up the remaining files.

Beyond speed, the benefits that matter to leadership are these:

  • AI does the initial draft of the documentation and the dependency maps so that we can start planning as soon as possible.
  • Knowledge that lived only in long-serving experts’ heads is captured as rules and documentation, so it stays with the business when they leave.
  • Tests generated up front give every subsequent release a regression baseline.
  • Modern stacks are easier to staff, patch, and run in the cloud.
  • Release speed and safety are both improved. In February 2026, Thoughtworks and IDC published research that found organizations with mature, AI-driven modernization released products and features 45% faster and had 48% less risk exposure.

Insight: In that very same IDC study of 500 large organizations, only 12% had moved to a continuous, AI-driven optimization model. The rest are still in the reactive modernization cycle, so teams that put that discipline in place now will be well ahead of the game.

Legacy Code Modernization Using AI: A 6-Step Process

Successful programs treat AI as a fast but junior contributor within a disciplined process. The six steps achieve the right balance between speed and control.

Human-Gated AI Workflow

  1. Inventory and map the system by indexing the codebase, listing the dependencies and integrations, and identifying any dead code so that nobody accidentally “modernizes” it.
  2. Pick a pilot module that has well-defined boundaries, real business value, and manageable risk. Both the architect and the business owner will have to agree on the scope.
  3. Capture the current behavior by writing tests that capture today’s behavior and by recording the production inputs and outputs so that you can replay them later.
  4. Transform the code in small slices by refactoring or translating one piece at a time behind a stable interface. The strangler fig pattern lets the old and new run together as traffic is gradually migrated to the new code.
  5. Verify the result by running the old and new versions on the same inputs and comparing the outputs. Add in static analysis, security scans, and a human review of every AI-authored change.
  6. Cut over and learn by doing: gradually shift traffic, with a rollback option always ready. Feed what you’ve learned back into the prompts, context files, and recipes for the next module.

How to Choose the Pilot Module

Your first module will set the bar for the whole program. A pilot that’s too easy says nothing; a pilot that’s too risky can kill the program off in its infancy. Plot your candidates against business value and technical risk.

Pilot Selection Value-Risk Matrix

Aim for the high-value, low-risk quadrant. There’s something in that quadrant that is important to the business, has well-defined interfaces, has very few upstream dependencies, and has an owner who can confirm the rules.

AI Tools for Legacy Code Modernization

There’s no one product that does it. Most solutions are a mix of three or four AI code modernization tools, each good at one thing. Adoption is definitely picking up. In April 2024, Gartner predicted that 75% of enterprise software engineers will be using AI code assistants by 2028 (up from under 10% in early 2023).

LLMs, Coding Agents, or Deterministic Tools: Which Does Each Job Best?

  • Deterministic tools (parsers, AST rewrites, recipe engines such as OpenRewrite) are appropriate for changes that need to be exactly the same everywhere. Deterministic code transformation will produce the same result every time it runs, which is obviously important to auditors and regulators.
  • LLMs are great for tasks that involve some degree of understanding and judgment, such as summarizing a module, suggesting a rewrite in the idiom of the target language, or writing tests.
  • AI coding agents are great at the kind of bounded, multi-file task where there’s a very clear definition of ‘done’ (e.g., upgrade one service until its test suite passes). You have to constrain them with limited repo access, mandatory review, and very small pull requests.

Guideline: Use deterministic tools when you want the same answer every time. Use LLMs when you want an explanation, and use agents only in situations where you can have a test suite that can automatically verify the result.

Best AI Tools for Legacy Code Modernization

The table below sets out the principal categories of tools, with example products in each.

Category What it does Examples Best for
AI coding assistants Explain, refactor, and test code inside the IDE GitHub Copilot, Amazon Q Developer Module-level work by your own developers
Mainframe modernization suites Analyze, refactor, and move COBOL and PL/I workloads BMC AMI DevX, Rocket Enterprise Suite, AveriSource Platform z/OS estates
Deterministic refactoring at scale Apply repeatable, recipe-based changes across many repositories Moderne (built on OpenRewrite) Language and framework upgrades
Code intelligence and visualization Map architecture, dependencies and data flows CAST Imaging, CoreStory Discovery and planning
Unit-test generation Write regression tests for existing code Diffblue Locking behavior before change
Autonomous coding agents Plan and carry out multi-file changes under review Devin AI, Blitzy Bounded tasks with clear tests

Most of the examples are taken from vendors in Gartner’s Peer Insights category (as viewed Nov 2026). They’re there to illustrate the various categories and in no way constitute an endorsement.

How to Choose a Tool

  • Where does your code go? Confirm the hosting options (vendor cloud, private tenancy, or on-premises) and the data retention terms.
  • Does it support your actual languages and dialects (including copybooks, JCL, and 4GL)?
  • Does it integrate with your IDE, repositories, and CI/CD pipeline?
  • Can you trace every single change back to a prompt or recipe and a named reviewer?
  • Is it priced per seat or per token? Can you cap the consumption?
  • Can you export your knowledge graph, prompts, and recipes if you move to a different vendor?

What Is the Role of Developers and Architects in AI-Driven Modernization?

AI shifts the engineering time away from reading and typing and towards deciding and checking. In any AI-driven legacy code modernization program, the people retain ownership of intent, judgment, and accountability. Here’s how that splits across the team:

  • Architects define the target architecture and the module boundaries. They determine what AI can touch and what code it can access, and they approve any changes to interfaces or data models.
  • Developers review every AI-generated change and deal with the edge cases the model gets wrong. They own the test suites and are responsible for curating the context that the AI works from (coding standards, examples, domain glossary, etc.).
  • Subject matter experts and QA have reviewed the extracted business rules and confirmed that the new code behaves exactly the same as the old.
  • Security and platform teams set the access controls for the AI tools and monitor what code leaves the network.

How the Human-AI-Human Model Divides Responsibility in Legacy Code Modernization

A very simple way to assign responsibility is to put every AI task between two human steps. Someone sets up the task, the AI does the bulk of the work, and then people check the result prior to it moving on.

AI Workflow : Human Setup and Review

The bulk of the effort is in the AI in the middle. Human time is spent on the two ends, where a mistake is very expensive. If a change fails review, it goes back to the AI with the reviewer’s comments and never makes it to production until it’s been verified.

How Can Organizations Ensure Quality and Security During AI-Assisted Modernization?

Speed is of no use if no one believes the output, and it’s clear developers are highly skeptical. The 2025 Stack Overflow Developer Survey found that 84% of respondents use or plan to use AI tools. That said, most are far more skeptical about the accuracy of those tools than about trusting them.

Developer Trust in AI Accuracy Survey

That’s the gap. Quality and security controls have to be in the program from the very first sprint, before any AI-generated code reaches a release branch. 

Quality Gates

  1. No merge will occur until the equivalence suite has passed.
  2. Static analysis and code quality checks are performed on every pull request, with the same thresholds applied to both AI and human code.
  3. AI-authored changes are labeled in the PR, and a named engineer reviews each one.
  4. The size of AI-generated PRs is limited so reviewers can actually read them.
  5. Parallel runs (or output comparison on production-like data) will confirm the result before cutover.

Security and IP Controls

Risk What it looks like Control
Hallucinated APIs Code calls methods or libraries that do not exist Compile and test gates, and dependency allow-lists
Silent logic drift Translated code rounds, sorts, or handles nulls differently Output comparison on production-like data
Tests that confirm old bugs Generated tests lock in existing defects Business review of any surprising expected result
Source code and IP exposure Proprietary code sent to an external model provider Private hosting or zero-retention terms, and contract review
License contamination Generated code closely matches copyleft-licensed code Code-similarity and license scanning in CI
Secrets in old code Hard-coded passwords and keys indexed by AI tools Scan and rotate secrets before indexing
Runaway usage costs Token-based pricing spikes during large batch runs Budgets, rate limits and per-team usage reports

How to Measure the Success of AI-Assisted Legacy Code Modernization?

Set baselines during the pilot, then track these six measures for every module:

  1. The behavioral equivalence rate is the % of recorded scenarios in which the new and old outputs are the same.
  2. The merge-without-rework rate is the % of AI changes that get merged with no rework at all (or with only trivial rework).
  3. The defect escape rate is the number of production defects per release that can be traced back to the modernized code.
  4. Test coverage change is the difference in coverage before and after modernization, per module.
  5. Cycle time per module is the calendar time between analysis and cut-over.
  6. Cost per thousand lines is the total of the people, tooling, and infrastructure cost divided by the number of thousand lines of code that have been modernized.

Report these alongside the delivery metrics (deployment frequency, change failure rate, etc.) so leadership can see the program’s value in business terms.

Challenges and Limitations of AI in Legacy Code Modernization (and How to Address Them)

AI is weakest when the context is outside the code. That’s where most teams run into trouble, so plan for each challenge below from day one..

Challenge Description How to Address It
Limited context on large codebases Very large monoliths exceed what an AI model can consider at once. Without a dependency map, it may miss effects that cross module boundaries. Map dependencies first. Then provide the model with one bounded module at a time, along with the interfaces it interacts with.
Inconsistent output Output varies between runs, making audits and reproducibility difficult. Log prompts, model versions, and results. Use deterministic tools for changes that must produce identical results every time.
No view of runtime context Job schedules, JCL, configuration files, and data quirks often explain behavior that cannot be understood from source code alone. Include these files in the AI’s working context and verify results by replaying recorded production inputs.
Weaker results on rare languages Quality drops with rare dialects, proprietary 4GLs, and heavily customized frameworks due to limited public training examples. Pilot on the specific dialect first, allocate additional review time, and consider tools designed for that platform.
No authority over business intent When a business rule appears incorrect, only the business team can determine whether it is a bug or an intentional exception. Assign every questionable rule to a named business owner and obtain sign-off before making code changes.

Developers feel these limits every day. In the 2025 Stack Overflow survey, 66% cited “AI solutions that are almost right but not quite” as their biggest pain point and 45.2% said debugging AI-generated code takes longer. Rework can be reduced with small pull requests, clear acceptance tests, and well-curated context files (e.g., coding standards, a domain glossary).

Security, IP, and cost risks (e.g., hallucinated APIs, source code exposure, runaway token spend) are all dealt with in the Quality & Security section above.

When Not to Use AI

  • Small codebases that one team could rewrite in a few weeks rarely justify AI, as the tool setup cost would likely outweigh the savings.
  • Systems you can’t run or test at all are of no use for AI adoption, as there’s no way to check that the output is correct.
  • Safety-critical or regulated logic must not be dealt with by AI without the availability of a domain expert to review and approve the rules that are extracted.
  • Applications that are already on the retirement list aren’t worth the investment in AI modernization.

Our Approaches to AI-Powered Legacy Code Modernization

At SparxIT, we treat AI-augmented legacy code modernization as an engineering discipline with AI baked in. Every engagement is run to the same five principles:

  1. We begin with an AI-driven code assessment that maps your codebase, dependencies, and highest-risk areas before we suggest any changes.
  2. We deliver a pilot first, proving speed and equivalence on one module against agreed metrics before we scale..
  3. Our experts use a hybrid toolchain that combines deterministic refactoring, LLM assistants, and supervised agents. We pick the right mix for your stack and your data rules.
  4. Our human-in-the-loop governance involves architects and your domain experts approving the scope, the rules, and every merge.
  5. We support continuous modernization so that once the core is modern, we keep it modern with automated upgrades and AI-assisted maintenance.

Not sure where to start? Our AI consulting team can review your codebase and propose a low-risk pilot tailored to your stack.

Next Steps for Your Legacy Code Modernization

Legacy code is full of the business decisions of the past few decades. AI lets teams read, explain, and move that code far faster than ever before, as long as we’ve got a disciplined process in place to prevent any behavioral drift.

Start with one module. Test it, observe its behavior, measure the outcome, and use that measurement to work out how far and how fast to scale. That’s the way to do it. AI-powered legacy code modernization takes a piece of software that’s been sitting still for a long time, possibly in a very high-risk state, and turns it into a series of small, verifiable outcomes.

For the wider strategy beyond the code, have a look at our guides on AI-assisted legacy modernization and legacy application modernization with AI.

Product Design

Partner with Experts

Frequently Asked Questions

Can AI convert COBOL to Java without any human review at all?

open-icon close-icon

AI can produce working Java for a large proportion of the COBOL programs. That said, the code absolutely has to be reviewed before it’s released. Decimal arithmetic, file handling, and any logic that’s dependent on JCL or CICS context are all potential areas of failure. Every program that’s been converted will require equivalence testing and the sign-off of a developer before it goes into production.

Is it safe to share your proprietary source code with AI tools?

open-icon close-icon

Yes, it can be safe with the right setup. Go for private or single-tenant deployments where you can, have zero retention terms, and a contractual obligation that your code won’t be used to train their models. Run a secret scan before any code is indexed, and if you have data residency requirements, make sure you know exactly where the data is hosted.

How long does an AI-powered legacy code modernization project take, and what is the driver of the cost?

open-icon close-icon

It’s all about code size and language, the amount of test coverage you already have, the state of the documentation, the number of integrations, the scope of compliance, the AI pricing model, and the reviewers you have available. The best figure is from a pilot. Take the time and cost per thousand lines from one representative module and scale that up to the whole codebase, then throw in a bit of contingency for the more difficult modules.

Will AI replace the developers on a modernization project?

open-icon close-icon

No, AI won’t replace developers on a modernization project. It changes what they do. They’re going to spend less time reading and typing and more time on review and testing and making the design decisions. Any program that reduces engineering capacity too early is going to lose the review capacity it needs in order to trust the output.

Which programming languages does AI modernize best?

open-icon close-icon

AI delivers the best results for the widely used languages that have a massive amount of public code behind them (Java, C#, JavaScript, Python, etc.). AI can explain COBOL quite well, but any translation from it would require a great deal of verification. The rarer the dialect and the more proprietary the 4GL, the harder it is to modernize with AI. The stack table earlier in this guide has the full comparison.

How do you verify that AI-refactored code behaves the same as the original?

open-icon close-icon

Use multiple layers of checking. Generate tests that capture the current behavior prior to any change, replay the recorded production inputs through both versions, and automatically compare the outputs. Then run both systems in parallel for a period and get the business owner to approve any of the remaining differences.

Do we need good documentation or test coverage before we start?

open-icon close-icon

No. AI can generate documentation and characterization tests from existing code. However, teams must run tests successfully and have subject matter experts review extracted business rules and unexpected results.