Short answer
Coding agents make legacy modernization cheaper mainly by speeding up the slow parts: understanding undocumented code, writing characterization tests and executing repetitive migrations. A good workshop teaches teams to use agents for those steps while keeping migration incremental and verifiable, rather than attempting an AI-driven big-bang rewrite.
On this page
- The real cost of legacy is understanding it
- Three estates, three different starting points
- Workshop module 1: code archaeology
- Workshop module 2: characterization tests
- Workshop module 3: incremental migration patterns
- Workshop module 4: context for long-running modernization
- What not to do
- Planning the programme after the workshop
- Format
- FAQ
- Tools from the jocapps ecosystem
The real cost of legacy is understanding it
Most legacy estates are not hard because the code is old. They are hard because knowledge has evaporated. The original authors are gone, documentation is outdated, tests are thin or missing, and business rules hide in nested conditionals written decades ago. Every change is slow because nobody is confident about what else it affects.
Coding agents are well suited to exactly this problem. They read large amounts of code without fatigue, explain it in plain language and generate tests that pin down current behaviour. They are much less suited to deciding the target architecture or rewriting a core system in one go. The workshop we run at neooutput is built around that distinction.
Three estates, three different starting points
| Estate | Typical situation | Where agents help most |
|---|---|---|
| COBOL and mainframe | Batch jobs, copybooks, JCL, deep domain logic, scarce expertise | Explaining programs and data layouts, documenting business rules, generating test cases for target implementations |
| Older Java (pre-modular, old frameworks) | Large monoliths, outdated frameworks, XML configuration, application servers | Framework upgrades, dependency updates, extracting modules, test backfills |
| Legacy PHP | Mixed HTML and logic, no framework or an old one, global state | Introducing structure, adding tests around endpoints, step-by-step migration to a modern framework |
We adapt exercises to whichever estates the participants work with. Mixed groups work well because patterns transfer, but each pair works on code from its own system.
Workshop module 1: code archaeology
Participants ask an agent to map an unfamiliar part of the system: entry points, data flows, external dependencies and side effects. They then produce:
- A plain-language description of what a program or module does
- A list of business rules, each with a reference to where it is implemented
- Open questions the agent could not answer from the code alone
The third list is important. It shows where human domain knowledge is required and gives the team a concrete agenda for conversations with business experts. We stress verification: agents can misread unusual constructs, especially in older dialects or with heavy use of copybooks and macros.
Workshop module 2: characterization tests
Before changing legacy code, you need tests that capture what it does today, including its quirks. Agents are productive here:
- Identify a module with clear inputs and outputs
- Have the agent propose test cases from the code paths it finds
- Run the tests against the current implementation and record actual outputs
- Review which behaviours are intended and which are bugs worth preserving for now
For COBOL, where running tests locally may be difficult, teams can use agents to generate test data and expected results that are later run on the mainframe or used to validate a new implementation.
Workshop module 3: incremental migration patterns
We practise patterns that keep the system running while parts are replaced:
- Strangler pattern. New functionality is implemented outside the legacy system and requests are gradually routed to it.
- Branch by abstraction. Introduce an interface around a legacy component, then swap implementations behind it.
- Mechanical refactoring at scale. Repetitive changes across hundreds of files, such as framework API replacements, are ideal agent tasks when tests exist.
- Translation with equivalence testing. When code is translated to another language, run old and new against the same inputs and compare outputs.
Each pair implements one small step of one pattern on its own code, with tests passing before and after.
Workshop module 4: context for long-running modernization
Modernization projects run for months or years. Agents need persistent context: target architecture, naming conventions, migration status, rules about which old modules must not be touched. Participants write an AGENTS.md or CLAUDE.md that captures this, so every later session starts from the same understanding. The CLAUDE.md and AGENTS.md workshop builds on this if the team wants to go deeper.
What not to do
- Do not ask an agent to rewrite the whole system. The output may compile and still be wrong in thousands of subtle ways nobody can review.
- Do not skip the tests. Without characterization tests, you cannot tell whether a modernized module behaves the same.
- Do not trust explanations blindly. Have a domain expert confirm business rules before they become requirements for the new system.
- Do not let migration code bypass review. Large mechanical changes still need sampling and automated checks.
Planning the programme after the workshop
A realistic follow-up looks like this:
- Choose one bounded area as a pilot, ideally with active business demand
- Spend the first weeks on archaeology and characterization tests only
- Start migration steps once test coverage gives the team confidence
- Review velocity and defect rates after two to three months before scaling
Some organizations lack the capacity to run modernization alongside daily operations. In that case, OnlineAppCreator can take over defined parts of the work with AI Code Engineers and SLAs, using the same agentic methods. Test generation also deserves its own attention; our AI test automation workshop is a natural companion.
Format
neooutput runs this workshop over two days, on site or remote, in English or German. Participants bring access to the legacy code they work on and a way to run at least part of it or its tests. For organizations planning large programmes, we add a leadership session on sequencing and risk. If you are taking a wider view of how AI-built and legacy systems reach production, our article on AI prototype to production covers the gap from the other direction.
FAQ
Can coding agents understand COBOL?
Current models can read and explain a lot of COBOL, including common patterns and data definitions. Accuracy drops with unusual dialects and heavy macro use, so explanations must be verified by people who know the system.
Should we translate COBOL to Java with an agent?
Automated translation can be part of a strategy, but only with equivalence testing and a plan for making the result maintainable. Translated code that mirrors old structures may not be easier to work with.
How long does an agent-assisted modernization take?
That depends entirely on the estate. Agents mainly reduce time spent on understanding, testing and mechanical changes. Architecture decisions, data migration and business validation still take their time.
Do we need a running legacy environment for the workshop?
For archaeology, code access is enough. For characterization tests, some way to run code or its tests helps a lot, even if it is only a subset.