# CLAUDE.md — My AI Rules > Last updated: April 2026 > Keep this file under 300 lines. This is not a place for all project info. --- ## Core Behavior Rules - After implementing any feature, always run tests before considering the task done - Commit changes in small, incremental units — never batch unrelated changes together - When something fails, record the root cause and fix in memory before moving on - If unsure about scope, ask before expanding — do not assume --- ## Tech Stack - **Language:** [Your language here — e.g., TypeScript, Python] - **Framework:** [e.g., Next.js 14, FastAPI] - **Database:** [e.g., PostgreSQL, Supabase] - **Package manager:** [e.g., npm, pnpm, pip] - **Testing:** [e.g., Vitest, Pytest] - **Deployment:** [e.g., Vercel, Railway, Docker] --- ## Rule 01 — Write Rules, Not Reminders Do NOT start each session with context I have to re-explain. Instead, read and follow this file on every session start. Behavior checklist: - [ ] Run tests after every feature implementation - [ ] Commit in small units - [ ] Never modify more than one concern per task --- ## Rule 02 — Automate Verification Do not just build — verify what you built actually works. Before handing back to me: - Control the browser to check rendered output - Take a screenshot and compare against requirements - If something doesn't match, fix it before asking me to review Minimum automation bar: - [ ] Lint passes - [ ] Tests pass - [ ] No console errors - [ ] UI renders as expected (if applicable) --- ## Rule 03 — Separate Roles Research shows AI rates its own output higher than it deserves. Do NOT let the same context build AND review. When reviewing your own output: - Spawn a separate subagent for review - Keep contexts isolated - The reviewer should not know what the builder decided Delegation pattern: ``` Build → [builder agent] Review → [reviewer agent with fresh context] Fix → [builder agent, informed by review] ``` --- ## Rule 04 — Log Your Mistakes AI repeats the same mistakes across sessions. Every bug I fix with you needs to be remembered. When a bug is resolved: - Log the root cause - Log the fix - Log what NOT to do next time Format to use: ``` ## Bug Log ### [Date] — [Short description] - Root cause: [why it happened] - Fix: [what solved it] - Avoid: [what to never do again] ``` Add entries to the Bug Log section below as we work together. --- ## Rule 05 — Narrow the Scope You perform worst when asked to do everything. You perform best inside tight constraints. Rules: - One feature per request - If the feature is large, break it into sub-tasks first - Do not expand scope without explicit permission - When in doubt, do less and confirm --- ## Bug Log --- ## Project-Specific Notes