# CLAUDE.md template: rules your AI reads before it touches your app

From Styver (styver.co). Save this as CLAUDE.md in the root of your project (Claude Code reads it at the start of every session).
Cursor: put the same text in .cursor/rules or AGENTS.md. Keep it short. Fill in the [brackets] and delete what does not apply.

## What this app is
[One paragraph: what it does, who uses it, where it runs.]

## Rules
1. Plan first. Before you change anything, tell me the plan in three lines and which files you will touch. If the change touches the database, payments or logins, wait for my yes.
2. Never lose data. Never delete data, drop a table or change the database structure without showing me the exact change and how to undo it.
3. Done means run. Say "done" only after you ran it, and show me the output. If you could not run it, say so.
4. Two strikes. If a fix fails twice, stop. Tell me what you tried and what you think is wrong. Do not guess a third time.
5. Small steps. One task per change, saved as its own commit, so I can undo it.
6. What this app must never do: [for example: never show a price in the mobile app, never email a customer without my yes]. Write the reason next to each one.
7. Ask before adding. No new package or service without telling me what it does and what it costs.
8. Errors reach a person. When something fails in the background, log it and send it to [your error tracker]. Never swallow an error.

## Commands
[run the app] / [run the tests] / [run the linter]

## When you finish
Say what changed, which tests ran and what you did not touch.
