I have project rules set to Always. This is the .mdc file attached to .cursor/files.
When I create new files with Cursor (I mostly use Claude-4-sonnet MAX) or add any new functionality Cursor never respect project rules.
On previous version at least I could explicitly say in a chat “Strictly follow project rules” and some of them (not all) would be respected. Starting with one of the latest version it’s not working at all.
Steps to Reproduce
Open Cursor Settings > Rules
Add a new Project rule > Create a “new rule” (set to “Always”), add a file with rules
Start a new conversation
Ask to create a new component
The component will be created ignoring all the rules
Expected Behavior
Component should be created following every rule in project rules
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Hey Cursor team and @condor, will this be answered at all? Development become more and more dirty because the rules don’t apply anymore.
Today I explicitly asked agent to read project rules and it didn’t but started changing files with made up rules. I asked it a few times. Only on a forth time after I asked to just read the rules and don’t do anything else - it actually started reading them but didn’t read all of them, just part.
Note: I used claude-sonnet MAX.
Hi @condor , thank you! Yes, our contributing.md is pretty big and was created for both human and AI. I’ll follow your advice and make a smaller version for AI. Hopefully it will help. But it’s still will not be small. The rules are important to keep code base clean. I’ll post my observations.
Great, thanks for the update. I’m also using Sonnet 4 with Max.
Happy to chat about what works and how you could adjust things.
Let me know if you want to review more of your process, often a few details can help optimize AI responses.
e.g. with Sonnet 3.5 I had to use more rules so it generates acceptable code. Sonnet 4 actually works better with less as long as your framework and programming language has good best practices, it will use those automatically.