Capability
What can an AI agent do on legacy code?
An agent is a model with tools: it can open files, search, edit, run the build and read the failures. That loop is what separates it from a chat window. On a legacy codebase it is useful for a short list of jobs.
- Explaining unfamiliar code and drawing out the call paths, which shortens onboarding.
- Writing characterization tests that record what the code does today.
- Making a repetitive change across many files and fixing the compile errors that follow.
- Drafting a migration for one module so an engineer can judge the approach.
- Updating documentation to match what the code does.
Limits
Where do agents fail on legacy code?
The failures are predictable, which makes them manageable.
F-01Behavior defined by runtime configuration or by data in a database the agent cannot see.F-02Business rules that no test covers. The agent will not know the rule exists, so it can delete it.F-03Very large files and deep call chains, where the agent loses context and starts guessing.F-04Changes that compile and pass thin tests but alter results, such as rounding, date handling or character sets.F-05Languages and platforms with little public training material, which raises the error rate.
Controls
What controls keep agent output safe?
Step 01 of 05
Tests first
Write or extend tests before the agent touches the code. The tests are the specification it is held to.
Step 02 of 05
Small scope
One module or one change type per run, so the whole diff fits in a reviewer's head.
Step 03 of 05
Isolated environment
The agent works on a branch in a sandbox with no production credentials and no write access to shared systems.
Step 04 of 05
Automated gates
Build, tests, static analysis and dependency scanning run before a person reads anything.
Step 05 of 05
Named reviewer
A senior engineer reads the diff and signs it. Rejected output is rewritten by hand.
Choosing
Agent or deterministic tool: which for which job?
Deterministic tools such as OpenRewrite go first because they are repeatable. Agents cover what the recipes leave behind.
Better fit
RecipeWhyRule-shaped, same result every run
Better fit
Recipe first, agent for leftoversWhyMost changes are mechanical; a few need judgment
Better fit
Agent draft, engineer reviewWhyDepends on how your server is configured
Better fit
AgentWhyOpen-ended and easy to check by running them
Better fit
EngineerWhyA design choice, not a rewrite
5 situations. Pick the one closest to yours.
Beyond Java
What about COBOL and mainframe code?
People search for agents that can translate COBOL. Agents can explain COBOL and draft translations. The hard part is not syntax. It is copybooks, batch scheduling, data formats and the behavior of the platform around the program. Ace8 focuses on enterprise Java, so we do not offer mainframe translation. The same controls apply to any language: tests first, small scope, human review.
Practice
How does Ace8 use agents?
We use agents inside the method described on the method page: test before you touch, AI drafts and engineers decide, every step reversible. We pick agents and tools per codebase, and we compare them on the same sample application. See the tools benchmark once it is published, and the wider AI-assisted modernization guide.
We have not yet published results from our own agent runs, so this page claims no speed-up figures. When the runs are done we will report files changed, test results before and after, manual fixes and review minutes.