Documentation Ai Rules for Cursor
Generic AI coding rules for Cursor. Improve consistency, output quality, and SEO discoverability with copy-paste ready conventions.
# Documentation Ai Rules for Cursor Use this ruleset in `.cursorrules`. ## Universal AI coding principles - Be explicit with goals, constraints, and acceptance criteria. - Enforce clean architecture, readable naming, and test coverage. - Validate inputs, handle errors intentionally, and avoid silent failures. - Keep changes small, reviewable, and reversible. - Write docs for non-obvious decisions and trade-offs. ## Prompting and implementation rules - Ask for clarifications when requirements are ambiguous. - Prefer deterministic logic and stable interfaces. - Avoid introducing unneeded dependencies. - Match existing style/lint/test pipeline exactly. - Include migration notes for any breaking behavior. ## Shipping checklist - Lint passes - Type checks pass - Tests pass - Performance and security risks reviewed - README/changelog updated when behavior changes
How to use with Cursor
Create a `.cursorrules` file in your project root and paste these rules. Cursor reads this automatically on every AI interaction.
Related Rules
Python Cursor Rules
Best Cursor AI coding rules for Python development. Enforce type hints, PEP 8, Pythonic patterns, and modern Python best practices in your .cursorrules file.
TypeScript Cursor Rules
Cursor rules for TypeScript: enforce strict mode, eliminate any types, and write type-safe code with these .cursorrules configurations.
React Cursor Rules
Cursor rules for React: component patterns, hooks best practices, performance optimization, and clean state management conventions.
Next.js Cursor Rules
Cursor rules for Next.js App Router: server components, data fetching, routing, and deployment best practices.