The Secret to AI-Driven Code Modernization? It's All in the Prep!
Hi, it's Shii-chan! Today I found something about a part of AI-driven code modernization that's easy to overlook but turns out to matter the most: preparation. Let's get into it!
Claude BlogWhat was announced?
I'm covering a post from the Claude Blog called "How to prepare for AI-driven code modernization projects." It's written by an Anthropic field engineer and walks through how an organization should prepare before letting AI agents loose on modernizing a critical system. It's less a feature announcement and more a practical playbook.
The post points out that AI agents can shrink modernization projects that used to take years down to months. But as that speed goes up, an organization's change management and approval processes often can't keep pace, and that becomes the new bottleneck.
Why it matters
If a team doesn't agree up front on what counts as "done" and what standard determines whether a change is legitimate, those same arguments tend to resurface later in the project. That's especially true in environments like core banking systems, where every change must pass through a strict change management process. Handing that kind of work to agents without this groundwork in place is risky, which is exactly why the preparation phase itself can make or break the project.
What changes
The post breaks preparation down into six steps.
- Step 1: Define goals — Pick a target upfront: "uplift" (same stack, newer version), "transform" (different stack, same behavior), or "reimagine" (behavior changes too). This requires mapping the existing system, writing behavior specs, and getting stakeholders aligned.
- Step 2: Define certification criteria — Choose from conditions like passing the original test suite, passing new tests, hitting coverage thresholds, maintaining performance benchmarks, independent adversarial review, or running in parallel with production, based on how critical the system is.
- Step 3: Set promotion policy — Tier how deep human review needs to go based on the agent's confidence and the blast radius of a change. Regularly analyzing flagged changes to fix root causes, rather than one-offs, keeps subject matter experts' time efficient.
- Step 4: Get prerequisites in place — Dedicated hosts, test environments, CI/CD, dependency maps, security and compliance sign-off, and reviewer bandwidth all need to be ready beforehand.
- Step 5: Build agentic automation workflows — Build dynamic modernization workflows in Claude Code, including the official code modernization plugin, running SME reviews on a small scope first and fixing the workflow itself rather than individual changes.
- Step 6: Execute — Run a small scope fully end-to-end first, then scale up once it's validated. For in-place modernization, it helps to freeze and modernize one logical area at a time.
Following this order helps keep an organization's approval process and quality bar from falling behind as agents start producing changes at scale.
Dive Deep
The post also gets specific about cost estimation. The main cost drivers are the ratio of code you actually need to touch versus what you just read, how complex the certification criteria are (verification is often bigger than the change itself), the cost of writing and fixing new tests, and the coordination overhead with other work happening in parallel. The suggested approach is to extrapolate from real numbers measured during a pilot, while keeping an explicit "unknown" bucket for what you can't predict yet.
On model choice, it recommends routing high-frequency, routine work to lower-cost models like Sonnet, and reserving more capable models for harder transformations and adversarial review. It's also worth weighing retry costs when something fails — comparing several cheap attempts against a single expensive one.
The post closes with this line:
Risk reduction is often the most important modernization benefit
In other words, reducing risk is often the biggest payoff of modernization, even more than speed.
Wrap-up
- AI agents speed up modernization, but an organization's change management process can become the new bottleneck
- Preparation runs through six steps: define goals, define certification criteria, set promotion policy, get prerequisites in place, build agentic automation workflows, and execute
- Cost estimates should factor in the ratio of code changed, certification complexity, test costs, and coordination with parallel work, extrapolated from pilot data
- Route routine work to cheaper models and reserve capable models for hard transformations and adversarial review
- Fix the workflow, not individual changes, when problems surface
This one's especially useful for engineering leaders and architects planning to run AI agents on a critical system modernization project!