<!--
ROBOTS ON PAYROLL / THE VAULT
What this is: an anti-bloat CLAUDE.md starter (about 80 lines) you copy to your repo root and fill in.
How to use it: download this file and give it to your AI (Claude, ChatGPT,
Cursor, Lovable chat) as a reference. Say: "Use this as my playbook for
writing my project's CLAUDE.md."
Latest version + full guide: https://robotsonpayroll.com/resources/claude-md-starter
-->

# CLAUDE.md

<!-- ============================================================
     THE ANTI-BLOAT STARTER (~80 lines including comments)
     How to use: copy this file to your repo root as CLAUDE.md,
     replace every [BRACKET], delete every comment block like
     this one, and delete any section that doesn't apply.
     Rule of thumb: if your finished file is over 100 lines,
     you are probably doing it wrong.
     ============================================================ -->

## What this is

[PROJECT NAME] is a [ONE-LINE DESCRIPTION, e.g. "Next.js app that
lets newsletter writers sell paid subscriptions"]. The [MOST
IMPORTANT THING TO KNOW, e.g. "money-critical code lives in
src/billing/ and must never be changed without asking me first"].

<!-- Two lines max. The agent can read your code; it cannot read
     your intent. This section is intent only. -->

## Commands

- Dev server: `[npm run dev]`
- Tests: `[npm test]` (run before saying anything is done)
- Typecheck/lint: `[npm run check]`
- Deploy: `[git push origin main]` (auto-deploys; never deploy another way)

<!-- Only commands the agent will actually run. If a command is
     discoverable in package.json and obvious, you can skip it.
     Keep the parenthetical rules: those are the real content. -->

## Code style

- [LANGUAGE RULE, e.g. "TypeScript strict mode, no `any`"]
- [PATTERN RULE, e.g. "Server components by default, 'use client' only when needed"]
- [DEPENDENCY RULE, e.g. "Ask before adding any new dependency"]
- Match the style of surrounding code over any general convention.

<!-- Every rule here must be CHECKABLE: you (or a linter) can look
     at a diff and say pass/fail. "Write clean code" is not a rule,
     it's a wish. Delete wishes. -->

## Never touch

- `[.env, .env.local]` (secrets; read if needed, never edit or print values)
- `[src/db/migrations/]` (applied migrations are immutable; new ones OK)
- `[legacy/]` (scheduled for deletion; do not fix or extend)

<!-- The highest-value section in the file. Every entry here is
     something that costs real money or real hours if the agent
     edits it. Earn each line: only list things that actually
     exist in your repo. -->

## When unsure

- Ambiguous requirements: ask me, don't guess.
- Two reasonable implementations: pick one, say why in one sentence, proceed.
- Anything involving [PAYMENTS/AUTH/USER DATA]: always ask first.
- Destructive operations (deleting files, dropping tables, force-push): always ask.

<!-- This section kills the two worst failure modes: the agent
     asking permission for everything, and the agent confidently
     rewriting your billing code at 2am. -->

## Definition of done

A task is done when ALL of these pass:

1. `[npm run check]` passes with zero errors
2. `[npm test]` passes
3. The feature works when you actually exercise it (not "should work")
4. No new console errors or warnings in the changed flow

If any of these fail, the task is not done. Say so plainly instead
of describing the work as complete.

<!-- Without this section, "done" means "I wrote code that looks
     plausible." With it, "done" means the same thing it means
     to you. This is the section that pays rent every session. -->
