What rules are for
Project rules are instructions Cursor includes automatically in the AI's context. Use them for the facts you'd otherwise type every time: framework versions, folder layout, style and no-go areas. They live in your repo (under .cursor/rules), so the whole team shares them.
A good starter rule
- Stack: Next.js App Router, TypeScript strict, Tailwind CSS
- Server components by default; add "use client" only when needed
- Data access only through src/lib/db.ts
- Use existing UI components in src/components before creating new ones
- Do not add dependencies without asking
- Run `npm run lint && npm test` after changesTip: Keep rules short and factual. A rule that says "write clean code" changes nothing; "no default exports" does.
Review every diff
Rules reduce mistakes, they don't remove them. Read the diff, run the tests, and commit in small steps so a bad change is easy to roll back.