Configuring a .cursorrules file in the root of your project forces your AI agent to follow team coding standards automatically.
Standard Production .cursorrules Template
•Framework: Next.js App Router (React 19, TypeScript strict mode)
•Styling: Vanilla CSS / Tailwind with explicit utility classes
•State Management: Server components first; minimal React client state
Code Quality Rules
1.Never generate generic variable names like data, temp, or res.
2.Always write explicit TypeScript interfaces for API contracts.
3.Handle errors explicitly in server routes—never swallow errors silently.
4.Do not add redundant comments explaining basic JavaScript syntax.