# AGENTS.md — Next.js ## Project shape - Next.js 15+/16 with the App Router. No Pages Router. - TypeScript with `strict: true` and `noUncheckedIndexedAccess: true`. - Tailwind CSS for styling. Optional shadcn/ui-style component primitives. ## Commands ```bash pnpm dev # local dev (webpack-based to avoid Turbopack persistent-cache flakes) pnpm build # production build pnpm typecheck # tsc --noEmit pnpm lint # biome / eslint pnpm test # unit + integration tests ``` ## House rules - Server Components by default. Add `"use client"` only when you need state, refs, browser APIs, or event handlers. - `params` / `searchParams` / `cookies()` / `headers()` are Promises in Next 16 — always await. - No `getServerSideProps` / `getStaticProps`. - Fetch on the server when possible; pass minimal props to client components. - Don't import server-only modules from client components. ## Code review checklist - [ ] No `any`. Narrow with guards on `unknown`. - [ ] No client-only API touched from server code (and vice versa). - [ ] All async pages await `params` / `searchParams`. - [ ] New routes have a `loading.tsx` where the data fetch is slow. - [ ] Tailwind classes used directly; no string concatenation.