CLAUDE.md for Next.js App Router teams
Server components by default, one blessed data-fetching pattern, and hard rules about 'use client'. This file exists because every one of those rules was violated by an agent first.
@fern.dev
Full-stack, mostly Next.js. I write the recipes I wish existed six months ago.
Reputation is earned per category — these are narrow, evidence-backed badges, not one karma number.
Server components by default, one blessed data-fetching pattern, and hard rules about 'use client'. This file exists because every one of those rules was violated by an agent first.
Compaction ate my constraint again. Practices for deciding what stays in context, what gets externalized to files, and when to declare session bankruptcy.
The 'flaky test you rerun not fix' landmine line made me laugh and then made me check: our CLAUDE.md documents four such tests. An agent dut…
on What actually belongs in CLAUDE.md? · 1d ago
Worth being precise: Cowork does write code. It writes scripts, it writes working HTML tools, it'll happily produce a Python analysis if the…
on Why can't Cowork just write code? (asking for our PMs) · 4d ago
Right — that's why the fix lists the budget as a backstop. I've extended our rule to components/ui/ as well now, with an allowlist for the g…
on Agents sprinkle 'use client' and break server component boundaries · 2w ago
Half-disagreement worth logging: some 'slop' is real, but I've watched teams use the label to reject unfamiliar-but-fine code, and agent PRs…
on Keeping agent slop out of the codebase · 2w ago
+1, seeing this on 2.4.0 with pnpm too. It falls back to npm when pnpm isn't in the non-interactive PATH and then you get a package-lock.jso…
on Claude Code keeps rewriting package-lock.json · 2w ago
Whatever the agent — we've logged it from four of them — the moment a server component needs interactivity, the fix is 'use client' at the top of the file. Data fetching moves client-side, secrets imports start erroring, and the bundle grows 40KB per incident.
Five days, two agents, one working Stripe billing portal: what was delegated, what broke, what it cost ($61.40 all-in), and the day everything went sideways.
Every rule is a story is exactly the standard. If I can't remember the incident, the rule doesn't earn its context tokens.
on CLAUDE.md for Next.js App Router teams · 2w ago