You have 1 article left to read this month before you need to register a free LeadDev.com account.
Estimated reading time: 6 minutes
Key takeaways:
- AI has made “start from scratch” a realistic option. Cloudflare rebuilt Next.js in a matter of days for $1,100, producing something faster and purpose-built for their infrastructure.
- Agentic coding shifts engineers from writing code to directing it.
- Not every team should rebuild everything, but every team should be asking the question: the build-versus-buy equation has fundamentally changed.
We’ve come a long way from in-line AI code suggestions. Now, developers are using AI-coding agents to reverse-engineer entire software components and even major frameworks.
The latest case comes from Cloudflare. In early 2026, an engineering director rebuilt Next.js, the popular React framework, in a matter of days using Claude in OpenCode.
“One weekend, an engineering director decided to point AI at it to see how far he could get with purely agentic coding,” Dane Knecht, CTO of Cloudflare, tells LeadDev. “After the first weekend, it worked pretty well.”
The result, vinext, cost just $1,100 in tokens to produce. Compared to Next.js, it’s far more custom-tailored to Cloudflare’s infrastructure, resulting in a smaller footprint and better performance.
This is more than a one-off stunt. The ability to replace components using AI presents a major shift for development processes, collaboration, and overall IT strategy.
Now, the idea of ‘starting over from scratch’ is a far more realistic option. “The costs are just so much lower and you can build purpose-built from day one,” Knecht says. “This kind of reinvents the factory floor.”
Your inbox, upgraded.
Receive weekly engineering insights to level up your leadership approach.
Forking code is nothing new
Knecht frames reproducing open-source software components using agentic coding as the next evolution of “forking” – the practice of copying free-to-use open-source software packages and iterating on them in a new branch.
Forking is commonplace and pre-dates AI-assisted coding by decades. For example, as Knecht notes, the Webkit browser engine spawned numerous forks, such as Blink, which powers Google Chrome. Forks exist for SQLite, Rust, and plenty of others.
“Forking isn’t bad,” and it’s “nothing new,” says Knecht. For him, the ability to take a technology in a different direction is an intrinsic quality of open-source software development. “If you want total control, don’t open source your software.”
It’s not just frontend frameworks, either. Across the stack, forking is common practice. JavaScript itself expanded into runtime ecosystems like Node.js. MariaDB forked from MySQL. Ubuntu was forked from Debian, and so on.
What’s changed with the dawn of AI is the ease at which components can be replicated or replaced. “In a lot of ways, it makes sense to kind of reduce those dependencies unless they’re truly needed,” says Knecht.
Reverse engineering Next.js
For Cloudflare, Next.js was one of those components that never quite fit their platform. Originally designed by Vercel, it felt bespoke to Vercel’s needs, not Cloudflare’s.
This platform lock-in made it challenging when deploying to other environments. As Steve Faulkner describes, “you have to take that build output and reshape it into something the target platform can actually run.”
Cloudflare had previously attempted to patch Next.js using OpenNext to better align with their infrastructure requirements. However, as Knecht explains, “we never had great parity.” Performance was also lacking.
What they needed was a version of Next.js designed natively for Cloudflare, to take advantage of better performance and security, explains Knecht.
The end result, the vinext project, is technically a plugin for Vite, a frontend build tool, that reimplements the Next.js Application Programming Interface (API) surface. “A lot of credit goes to Vite,” says Knecht. “We’re building on the shoulders of giants.”
More like this
The results for Cloudflare
By eliminating dependence on Next.js and building closer to Vite, vinext can build production apps up to four times faster and produces 57% smaller client bundles, a major improvement over the predecessor Next.js.
“Once you cover that surface area for that customer, the results – from build times to page sizes – are just phenomenal,” says Knecht. Select customers are already using it, and larger ones are in the process of migrating.
Its pre-rendering capability is highly beneficial for latency-sensitive sites, he adds, noting the developer experience benefit as well. “People familiar with Vite tools have a great experience with it.”
The project has seen a community emerge around it too, with over 50 contributors and 8,000 GitHub stars at the time of writing. These collaborators are continuing to iterate vinext in an agentic way. “They’re not in there writing code by hand,” says Knecht. “They’re creating plans and specs for the AI and prompts and telling the AI to go off and do it.”
Implications for software engineering
Vinext is an impressive case study of using modern AI tools to make wholesale custom-tailored replacements of existing systems. It also highlights how AI is augmenting the practice of software engineering as a whole.
For instance, agentic coding unlocks a shift away from low-level code details toward more architectural decision-making, says Knecht. “It’s less making sure that they’re tabbing or spacing, and more thinking through architecture and planning.”
It’s also shifting the day-to-day. “How does an engineer spend their day? The skillset will have to evolve. Communication skills and time management will become more important.”
In that future, software ownership is fundamentally different, too. For example, although vinext has received community enhancements, the original creator is still the primary maintainer, indicating what’s possible for solo-creators these days.
“Over time, we’ll have someone dedicated to it,” says Knecht. “Right now, we’re more interested in figuring out what autonomous agentic coding looks like.”
This potential has influenced Cloudflare to invest heavily in AI tooling across the company. It’s also influencing Knecht to reconsider how to reassign work in an agentic era, thinking in terms of ‘jobs to be done’ rather than finding an existing off-the-shelf solution for every problem.
“It’s a losing battle to be adversarial with AI,” he says. “We don’t make people still write in Assembly or punch cards anymore.” For him, AI is a tool, like an electric screwdriver, and should be used when appropriate.

New York • September 15-16, 2026
Speakers Camille Fournier, Gergely Orosz and Will Larson confirmed 🙌
When not to rebuild
The move from human-led to autonomous-led coding feels inevitable. That said, the rise of AI doesn’t mean all companies should redraw their core software components tomorrow.
Knecht admits that Cloudflare, widely considered the world’s largest content delivery network, operates at a massive scale with highly specific needs. “Of course, there are a lot of people that won’t have those unique criteria and they should use more building blocks,” he says.
If teams move away from established projects en masse, there’s also a risk of a more fragmented open source landscape with less oversight. “The bigger projects have more eyes on them,” says Knecht. Smaller projects may be more prone to security issues going unnoticed.
Still, Knecht believes that agentic coding can open up innovation at large. “If one of the forks has a new idea that is revolutionary and the main authors don’t want it, then, over time, it will get those eyes,” he says. “I think, at the end of the day, this is really healthy for the inventor community.”
The act of repurposing software could even yield a positive outcome for the open source community, he adds. “It’s going to give new projects new life and increase the number of people involved.”
It’s only the beginning
Some are sounding the ‘SaaSpocalypse’ bell in the wake of AI’s ability to rewrite software components. Today’s technical leaders are increasingly interested in how agents can unlock new optimizations. In the process, agentic coding is reshaping the build-versus-buy equation.
Knecht anticipates engineers at Cloudflare and beyond will continue to experiment, finding additional off-the-shelf components to fork, mimic, or fine-tune using agentic coding. “I think there are some major open-source projects that might be 20+ years-old where it’s time to go back to the drawing board.”
While Cloudflare’s vinext project mimicked an API surface area, he expects more true code-based forks to emerge quickly.
“Stay tuned, there will be a lot of them. This is not the last.”