7 Comments
User's avatar
Daniel Primo's avatar

The waiver label story is the best part. Agents chase the green check, not the working feature, so they'll happily move the goalposts if nobody's watching. That's why I'd put "invest in verification" first: if the old app is the spec, the tests are the contract, and the agent doesn't get to edit the contract ;)

Abhishek Pan's avatar

The old app only works as a spec if it keeps running beside the new one. GitHub built its Scientist library for exactly this: every live request goes through both code paths, users still get the old result, and each mismatch gets logged, which is where the hidden behavior shows up before cutover.

Pierre Pirault's avatar

I always thought Joel Spolsky meant rewriting from first principles. What the AI is doing is just converting codebases into a different language.

Jason Voigt's avatar

There are many types of migration and frontier models aren’t limited to just converting sytax, right? Moving a distributed monolith to a modular monorepo; refining your underlying data model; replacing your data warehouse with a datalake; etc. The models are now excellent at helping you “migrate” from one system to another if you have the taste, judgment, wisdom to know what you want to migrate to and can specify how to verify your desired outcome (i.e., exactly what success would be).

Andrii Tretiak's avatar

What I notice with agents in general is that a green check and a finished task are two different things for them, and they will always pick the green check if it's cheaper. That's why in my setup the agent that writes the code is not the one who decides that the work is done. After it finishes, separate auditor agents check the result, and the tests run separately too, not from the agent's report. With rewrites I think it's even harder, because the old app shows what it does but not what it should do, so the agent can't know where is a bug and where is a feature. In your loops with evals, who checks the case when the number goes up but for the wrong reason?

Santosh Shinde's avatar

Thank you for the line that the old system's hidden behavior is exactly what agents miss. Do you think tests written before the rewrite are enough to catch it?

Tomer Gal's avatar

The cost that didn't drop is understanding. Three and a half months to write 800K lines, and someone still gets paged by them at 3am. On rewrites I've been close to, the quiet risk was ending up with a codebase that's faster than the old one and known by fewer people. Worth budgeting reading time, not just token time.