Most of what an agent writes for you won't be written from scratch. It will be fitted into someone else's structure.
Framework
A large body of code that makes most of the structural decisions for you, such as how a URL finds its code and where files go. You fill in the gaps. Next.js, Rails, Django and Laravel are frameworks.
A framework is why an agent can build quickly, and also a place it goes wrong. Models learned conventions from older versions, so it may write the old way with full confidence. Make it check the installed version and read those docs.
“Check the Next.js version in package.json and read the docs for that version before writing any routes. Put the page at app/orders/[id]/page.tsx and the API at app/api/orders/[id]/route.ts, then list every file you created.”