The default Claude Code output for a React/Next.js task is a tutorial. Class-component muscle memory, useEffect everywhere, "use client" slapped on a layout.tsx , a 250-line component that fetches in three places and renders four error states. None of it is wrong in isolation. All of it is wrong for an App Router app shipped in 2026. The fix isn't a longer prompt. It's a CLAUDE.md at the repo root — the file Claude reads on every turn — encoding the patterns that make generated code look like your codebase instead of a Stack Overflow answer from 2021. Here are 13 rules that survive review. Each one started as a recurring failure mode in real PRs. 1. Server Components by default — "use client" only at the leaf Every component under app/ is a Server Component until proven otherwise. The directive moves to the smallest leaf that actually needs useState , useEffect , an event handler, or a browser API. Never on layout.tsx or page.tsx .…