Evalsmaxxing Ships the Rewrite. Context Keeps It Alive.
Agent swarms can rewrite legacy code. What the owning team inherits depends on what happened before the first agent ran. Evals decide whether a rewrite ships; context decides whether it lasts.

Agent swarms can rewrite legacy code. What the owning team inherits depends on what happened before the first agent ran.
Legacy applications hold decades of business logic and soak up engineering time. No wonder large enterprises are now openly testing agent swarms on them. Cisco is the most visible case. Jeetu Patel, its president and chief product officer, described the experiment on LinkedIn: a small team pairs swarms of AI agents with simulations and evals to rewrite one piece of existing code in a memory-safe language. If it works, the code goes back to the team that owns it. He calls it evalsmaxxing, not tokenmaxxing.
The discussion around it has been one of the more useful engineering conversations I have read recently. I agree with the key takeaway that evals are the gate. But I would add two things the debate mostly skipped. Before the agents run, you cannot eval behavior nobody wrote down, and decades of business rules live in code and in people’s heads. After the agents finish, a team that gets back only rewritten code has inherited a new legacy system, just written faster.
Evals decide whether a rewrite ships. Context decides whether it lasts.
The Industry Is Right That Evals, Not Tokens, Are the Gate
The pull toward evals is justified. But a rewrite has to show that the new software preserves the behavior customers depend on, performs under real conditions and handles failures correctly. Agents can iterate freely, but passing those evals has to be a prerequisite for deployment. It also helps to separate two decisions that usually get blurred: running an experiment and deploying its output.
The eval set should sit outside the agents doing the rewrite, with a held-out portion the agents never see, so they cannot optimize against the grader. Differential testing against recorded production traffic should carry most of the load, with synthetic cases only where production leaves gaps. Any serious rewrite program should clear that bar.
Where the evals run matters as much as whether they run. Applied continuously across large pieces of code, with swarms of agents re-checking everything at every stage, evaluation consumes the capacity and tokens it was meant to protect. Applied to small, bounded units of work, each with a spec that defines what ‘done’ looks like, it scales. That is how Opsera Forge works: every Work Order is small, carries about 8 acceptance criteria drawn from the spec, and is evaluated at every stage.
Evals settle whether a rewrite is safe to ship. They can’t settle which code deserves a rewrite, or what that rewrite must preserve, because both questions are answered before the first eval runs.
Before the Swarm: Choosing the Code
Operational metrics show where code hurts, not where knowledge is at risk.
Incident counts and change cost tell you where code hurts. They say nothing about where knowledge is concentrated, and that is the risk a rewrite inherits. A module with few incidents and cheap changes is often quiet because one or two people understand it and everyone else routes around it. When those people leave, the metrics stay green until the first change nobody can explain.
Code that is hard to read is code few people can safely change, so the ranking has to come from the code itself. That’s why we built ForgeScore, part of Opsera Forge, our spec-driven software factory. It rates each application across eight dimensions, including cognitive load and data weight, which surface the code few people can safely touch, and it sets the sequence from what the codebase contains, not from a questionnaire. Estates change as they modernize, so the score is recomputed after every wave.
Before the Swarm: Capturing Intent and Context
An eval can only check a rule someone wrote down.
If a business rule never made it into a spec, no test covers it, and a swarm optimizing for passing tests is free to rewrite it away. In a legacy estate that is the normal case, because the rule survives only as an unexplained branch in the code or as one engineer’s memory.
I would make recovering that intent and context the first step of every modernization: capture what the code does, have the people who own the process confirm it, and the evals get their baseline. Forge recovers business rules from the code as written specs, and the people who own those rules confirm them before any Work Order is scoped. The confirmed specs become the baseline the evals test against.
After the Swarm: The Hand-Back
A rewrite without its context and HITL approval is a new legacy, just written faster.
However a rewrite run, it ends with the code going back to the team that owns it, and that handoff is where the value either lands or leaks. The owning team will open the new code soon, to fix a defect or add a feature, and ask the question every legacy team asks: why does it do that? If the answer died with the swarm, the team reverse-engineers its own system again, in a modern language this time.
That is a maintainability problem, and it is easy to miss because the new code looks clean and passes its tests. Code nobody can explain is hard to maintain in any language.
So the rewrite can’t be the deliverable. The deliverable should be the rewrite plus what explains it: the confirmed specs, the eval suite that proves behavior held, and the decisions made along the way. In Forge, each Work Order records its architecture decision, and each change traces to the requirement it meets, the tests that cover it, and the person who approved it. A code change requires a spec change, so the context stays current instead of rotting. And the record stays with the enterprise, whichever vendor, integrator, or internal team ran the swarm.
The Economics
Measure cost per production-ready component, then the cost of the second migration.
Token spend and time to first draft measure the swarm, not the result. The number a CFO can defend is cost per production-ready component: code that passed its evals, traces to a confirmed spec, and was approved by an engineer.
The second number is the one most programs never track: what the next migration costs compared with the first. When context stays with the enterprise, the second wave starts from specs and evals that already exist. When it doesn’t, the second wave pays the discovery bill again.
Ask What You’d Still Own If the Swarm Disappeared
Nobody will know how far this approach goes until teams try it, and I hope more enterprises do. Before yours does, ask one question: if the swarm disappeared tomorrow, what would we still own? If the answer is rewritten code, the program bought speed. If the answer includes confirmed specs, an eval suite, and the decisions behind both, it bought a capability.
The real obstacle is that capturing intent and context is slower to start than letting the agents run, and agent speed makes skipping it tempting. But no enterprise has to start from a blank page. Recovering intent before the agents run is a repeatable process, and Forge is built around it. So start small. Score one application, analyze where its risk concentrates, and see what the specs would look like before you commit the estate.
Agents will keep getting faster at writing code. What stays scarce is knowing what the code is for.
Get a ForgeScore on one application to see where your estate stands, or book a modernization assessment to see the specs Forge would produce before you commit.

