# CLAUDE.md - project memory

> Claude Code loads this file at the start of every session. Fill in the [brackets], delete what doesn't apply, keep it short.

## Project
- What it is: [one sentence]
- Stack: [e.g. Next.js 15, TypeScript, Tailwind, Postgres via Drizzle]

## Commands
- Dev: `[npm run dev]`
- Test (single file): `[npm test -- path/to/file]`
- Typecheck: `[npx tsc --noEmit]`
- Lint: `[npm run lint]`
- Build: `[npm run build]`

## Layout
- `[app/]` routes and UI
- `[lib/]` shared logic, `[lib/server/]` server-only code
- `[tests/]` tests mirror source paths
- Generated, don't edit: [e.g. `*.gen.ts`, `migrations/`]

## How to work
- Read the files you will change and their neighbours before editing. Follow existing patterns.
- For anything bigger than a small fix, propose a short plan (files + approach) before writing code.
- Make the smallest change that fully solves the task. No unrelated refactors, renames or reformatting.
- Don't invent APIs or package names. Check the code, lockfile or docs.
- Ask before adding a dependency, and say why it's needed.
- If something is ambiguous, ask one focused question rather than guessing.

## Safety
- Never commit or print secrets. Read them from env vars; list every var in `.env.example` with a placeholder.
- Never put server secrets behind public prefixes (`NEXT_PUBLIC_`, `VITE_`); those ship to the browser.
- Ask before destructive commands: deleting data, dropping tables, `git push --force`, `rm -rf`, production migrations.
- Don't commit or push unless I ask.

## Definition of done
1. Typecheck, lint, tests and build pass. Fix failures; don't silence them with `any`, `@ts-ignore` or skipped tests.
2. New behaviour has a test, or a stated reason why not.
3. Finish with a summary: what changed, which files, how you verified it, anything left undone.

## Gotchas
- [Known footguns, flaky tests, odd config. Add them as you find them.]
