# CLAUDE.md

## Project
- What it is: <one sentence>
- Stack: <language, framework, package manager>
- Where things live: `src/` <...>, `tests/` <...>

## Commands
- Install: `<npm ci>`
- All tests: `<npm test>`
- One test file: `<npm test -- path/to/file>`
- Lint and typecheck: `<npm run lint>` and `<npm run typecheck>`
- Build: `<npm run build>`

## Long tasks: plan first
1. Before changing code, write the plan to `PLAN.md`: the goal, the files you expect to touch, the steps, and how you will check each step. Then start.
2. Work one step at a time. After each step, run the tests for what you changed and tick the step in `PLAN.md`.
3. Append one line per finished step to `PROGRESS.md`: what changed and the test result.
4. After a compaction or a new session, read `PLAN.md` and `PROGRESS.md` before doing anything else.
5. Commit after each green step: `<type>: <what changed>`. Never amend or rewrite earlier commits.
6. If the same test fails twice for the same reason, stop. Write what you tried in `PROGRESS.md` and wait for me.
7. If the task turns out bigger than the plan, update `PLAN.md` first.

## Done means
- `<npm test>` passes, lint and typecheck are clean.
- New behavior has a test.
- `PROGRESS.md` ends with three lines: what changed, what I should check, what is left.

## Guardrails
- Don't push, deploy, publish or merge. I do that.
- Don't read, print or edit `.env` files, keys or credentials.
- Don't run `rm -rf`, `git reset --hard`, `git clean` or `git push --force`.
- Don't add a dependency without writing why in `PLAN.md`.
- Don't run migrations or touch production data.
- Don't change a test to make it pass unless the test is wrong. If it is, say so in `PROGRESS.md`.
- Ask before anything you can't undo.

## Code style
- <e.g. 2-space indentation, named exports, no default exports>
- Follow the patterns in nearby files before adding new ones.

## Compact instructions
When you compact, keep the current step of `PLAN.md`, the latest failing test output and the list of files changed so far.
