The Rules That Moved safedep.io from Astro to Next.js 16 SafeDep moved safedep.io — roughly 3,000 pages spanning its marketing site, blog and threat intelligence hub — from Astro to Next.js 16, with coding agents writing most of the 536 commits and reaching parity in five days after the author first codified site-wide code rules that the build enforces. The rebuilt site clicks between pages up to 2.4 times faster on a slow connection, loads no third-party scripts (down from about 740 KiB per page), scores 100 on accessibility and can run code on the server, though it ships more JavaScript than the Astro site did. The previous AstroWind fork on Cloudflare Pages comprised 202 .astro files and about 19,000 lines of templates, and its PostHog snippet sampled only 75% of visits until October 3. The Rules That Moved safedep.io from Astro to Next.js 16 On this page We moved safedep.io, about 3,000 pages across the marketing site, the blog and the threat intelligence hub https://safedep.io/ti , from Astro to Next.js 16. Before any agent touched the code, I wrote down what correct code looks like on this site and set the build to reject everything else. With that in place, coding agents wrote most of the 536 commits and reached parity in five days. That groundwork, and the weeks of hand-tuning after parity, are what this post is about. The result clicks between pages up to 2.4 times faster on a slow connection. It loads no third-party scripts, scores 100 on accessibility, and can run code on the server. It ships more JavaScript than the Astro site did, and that was a deliberate purchase. Two kinds of rules carried the project. The first are rendering rules for Next.js 16: 1. Cache the data, not the component. Put 'use cache' on the function that loads a record, never on a page or a component that holds a