# CLAUDE.md
## Core Behavior
You are an AI assistant working on this project. Follow all instructions in this file carefully — they are the source of truth for how you should behave in this codebase.
## Self-Correction Protocol
**After every correction from the user, you MUST update this file.**
When the user corrects you — whether it's a code style issue, a wrong assumption, a misunderstood convention, or anything else — you must:
1. Acknowledge the correction.
2. Immediately append a new rule to the `## Learned Rules` section below.
3. Write the rule in clear, imperative language (e.g., "Always use...", "Never assume...", "Prefer X over Y...").
4. Include a short rationale in parentheses so future context is preserved.
5. Never duplicate an existing rule — if a related rule exists, refine it instead.
### Rule Format
```
- **[CATEGORY]**: Rule description. _(Rationale: why this rule exists.)_
```
Categories: `STYLE`, `ARCHITECTURE`, `TOOLING`, `CONVENTION`, `LOGIC`, `TESTING`, `DEPLOYMENT`, `COMMUNICATION`, `OTHER`
### Important
- Re-read the `## Learned Rules` section before starting any task.
- If two rules conflict, the one added later takes precedence.
- Never remove or weaken a learned rule unless the user explicitly asks you to.
- When in doubt, ask — don't guess and get corrected twice for the same thing.
---
## Project Context
<!-- Add project-specific context here: tech stack, structure, conventions, etc. -->
---
## Learned Rules
<!-- Rules will be appended here automatically after each correction. -->