I find a lot of information on the rules for cursor AI. Some people split it into several files in .cursor\rules, some use .cursorrules, some write the rules in sentences, some like this
“enableAIReview”: true,
“enableStrictAIReview”: true,
“requireCodeAnalysisBeforeChanges”: true,
So what’s the right way to do it?
The there are several approaches how people use rules.
I would suggest a minimal approach at begin:
- Set for specific parts like certain files or framework parts specific project rules. E.g. for CSS files what rules AI should follow based on your project requirements for CSS files.
- Keep project rules simple if possible as too long rules confuse AI and pollute context.
- Ensure to use proper description: or glob: or always true, depending on which case you want to handle.
- Start with simple text description e.g. markdown (# heading1, … etc) but plain text works also well.
- Some create rules by process (e.g. Plan mode vs Act mode), see other posts about plan mode ideas.
- If you have experience of what prompt style/format works better for certain AI models then adjust the prompts or rules for that, but its not really required to make rules work well.
More info at:
Not sure which version of cursor you use, there might be slight UI differences for rules, but this should help you.