What are Cursor Rules?
Cursor rules are markdown files (.mdc format) that provide context and guidelines to AI coding
assistants. They help ensure that AI-generated code follows your project's specific patterns,
conventions, architectural decisions, and best practices for each technology stack.
How to Use These Rules
Copy the rule files into your project's .cursor/rules directory. Each rule file can be configured with different application modes:
- Always Apply — Rule is included in every chat session
- Apply Intelligently — Agent decides when it's relevant based on description
- Apply to Specific Files — Triggers when files match a glob pattern
- Apply Manually — Only when @-mentioned in chat
You can also use nested rules by placing .cursor/rules directories in subdirectories (e.g., backend/.cursor/rules) for scoped instructions.
Technology Stacks
Common Principles
No Hiding
Never hide compiler warnings, linter errors, type checker warnings, or security issues. All must be resolved.
Logging Guidelines
IMPORTANT: Only add logs when explicitly requested. By default, do NOT add logs unless asked.
Commenting
Focus on explaining the "why" and "intent", not just the "what".
Code Style
NEVER abbreviate variables - Always use full, descriptive names. Follow language-specific conventions.
Testing
Write comprehensive tests, aim for high coverage on critical paths, and test edge cases.
Git Workflow
Use Conventional Commits format, write clear commit messages, and never commit secrets.