A project that once required 4 years was forcefully compressed into two weeks by Claude Code!
Costs were slashed from $3 million to just over a hundred thousand.
Recently, Anthropic publicly unveiled the full process of large-scale code migration using Claude Code for the first time. Their six-step framework has left the entire internet in awe.

The protagonist of the story is Jarred Sumner, the creator of Bun.
He once spent a year writing Bun, a JavaScript runtime that outperforms Node.js.
Now, in less than two weeks, he frenziedly wrote one million lines of code, migrating the entire project from Zig to Rust.
Bun's Creator Has AI Rewrite a Million Lines of Code
Back then, Jarred Sumner's logic for betting on Zig was pure: achieve performance comparable to C language through extreme simplicity.
This was almost a tool tailor-made for solo founders.
In his own words, "Before LLMs existed, I built Bun in a small apartment in Oakland in one year."

However, the dark side of extreme simplicity is the countless hidden pitfalls laid down early on.
Now, Bun's CLI monthly downloads have robustly surpassed the 10 million mark, and it has even become a heavy dependency at the core of Claude Code.
With the ecosystem's frenetic growth, the "technical debt" accrued over the years has come due, demanding repayment with interest.

So he did something he never dared to think of before: using Claude Code to migrate the entire Bun codebase from Zig to the more memory-safe Rust.
In less than two weeks, it produced one million lines of code.
Before merging, all existing Bun test cases passed 100% in CI. After merging, 19 regressions surfaced, but they have all been fixed now. The Rust version quietly went live with Claude Code in June.
This migration consumed 5.9 billion input tokens and 690 million output tokens. Calculated at API pricing, it cost approximately $165,000.
It sounds expensive, but compared to the old budget of 4 years and $3 million, this amount is practically pocket change.
A Python Library Transformed into 165,000 Lines of TypeScript
Jarred Sumner is far from the only one using CC as an efficiency engine.
Mike Krieger, Head of Anthropic Labs and co-founder of Instagram, has an even more representative story.
Over a weekend, he migrated an entire Python codebase to 165,000 lines of TypeScript. The core part consumed about 27 million tokens.
Hundreds of agents, 8 checkpoints, 3 rounds of adversarial reviews, and finally, a consistency check that compared the output of every single command with the original Python version line-by-line. Any behavioral deviation was treated as a bug to be fixed.
He even had Claude design a set of end-to-end tests that ran for four consecutive nights, specifically targeting unforeseen corner-case issues.
Why was migration absolutely necessary?
His team's internal tools needed to be packaged as a single binary for delivery to users.
Using the Python toolchain, compilation took 8 minutes per platform, and the entire build matrix required a half-hour wait for each release.
After the migration, the same compilation takes only 2 seconds. The binary launches 6 times faster, and they also managed to retire an entire deployment pipeline.
Don't Fix the Code: The Six-Step Core Framework
So, what is the soul of this approach?
Anthropic summarizes it in one sentence: Don't fix the code; fix the loop that produces the code.

Large-scale migrations are particularly well-suited for AI, for simple reasons—
The work is inherently parallelizable; thousands of files can be processed simultaneously.
The old code itself serves as the best specification.
The test suite is a ready-made judge.
If compilation or testing fails, the next task automatically surfaces.
The model can relentlessly iterate against this "objective truth" for days, with no human arbitration needed in between.
Thus, Anthropic proposes a reusable six-step framework: First, set up the judge (tests), write the rulebook, draw the dependency graph, and list the gap inventory.
Then, conduct a small-scale "shakedown" to stress-test the rules, catching critical issues before scaling to thousands of files.
Next, perform the full translation, running a multi-agent cycle of "implementation—review—fix"; finally, compile, run, and compare behavior line-by-line.

Throughout the entire process, rules are never manually patched:
Every time a reviewer catches an error, they add a sentence to the rulebook and regenerate the affected batch of files.
Anthropic's final suggestion: Pick a codebase you've been tolerating for too long, and go ask Claude what its migration process would look like.
Four years ago, this statement was a joke. Today, it's a check that can actually be cashed.
In the past, migration was a chasm developers dared not cross; now, it's just a progress bar waiting to be cleared.
This article is from the WeChat public account "New Zhi Yuan," author: ASI Revelation







