It sounds like your agents were allowed to directly read the old code and implement it as new code.
Technically this is a violation of the rules for reverse engineering. You need a gap between the agents that look at the old code and the agents that implement the new code. With an English spec connecting them.
Interestingly, that's also easy to do with agents. And apparently legal. Our entire system of software copyrights is hanging in the balance.
Strange days.
EDIT: I heartily apologize for citing the rules for a clean-room implementation. I shall never try to explain anything to HN again.