What are .cursorrules files and how do they work?
A .cursorrules file in your project root contains custom instructions that Cursor includes in every AI prompt — like a persistent system prompt for your project. Use it to specify your coding conventions, preferred patterns, architectural constraints, and style guide. For example: "Always use Zod for validation. Never use 'any' in TypeScript. Prefer composition over inheritance." This dramatically improves consistency of AI output across your team.