# Lessons Learned

> This file is updated after every user correction. Claude reads it at session start.
> Each lesson prevents a repeated mistake. Ruthlessly iterate until mistake rate drops.

## Diagnosis Mistakes

- **Never blame CPU/host when container restart fixes it** (Session pattern: 5+ occurrences)
- **Check role-based permissions AND tier gating** — don't assume one over the other
- **Always check pending migrations before assuming code bugs**
- **Browser extensions/honeypot fields cause false form failures** — check before debugging backend

## Workflow Mistakes

- **Never work sequentially on parallelizable tasks** — user will interrupt and redirect
- **Always use /feature workflow for new features** — not ad-hoc sequential branches
- **Always commit immediately after changes** — don't leave edits uncommitted
- **Verify you're editing the branch Docker actually mounts** — wrong branch = wasted work

## Code Quality Mistakes

- **Don't use global CLI tools** — always `npx prisma`, never global `prisma`
- **Pre-commit secret scanner triggers false positives** on `JWT_SECRET`, `.env` references — bypass specifically
- **Run lint + typecheck + tests automatically** — never report done without verification
- **Don't create .env variants** — only `.env.local` for dev

## Communication Mistakes

- **State approach in 2-3 bullets before starting** — prevents wrong-approach friction
- **Report results, not questions** — user delegates, expects autonomous execution
- **Don't ask permission for obvious fixes** — just fix lint, tests, types automatically
