Is the.cursor/rules Directory Mandatory for All Rule Types?

Hi everyone,

I’m seeking some clarification on the project rules system and how Cursor discovers and applies .mdc files.

My question is: Is it a strict requirement for all project rule files (.mdc) to be located inside the .cursor/rules directory, regardless of their Rule Type?

I’ve been thinking about the different rule types, and it seems plausible that some might not need to be in that specific directory. For instance, a rule with alwaysApply: true feels like it should apply to the entire project context constantly. My initial thought was that perhaps such a file could live in the project root or another config directory and still be picked up by Cursor.

However, I’ve noticed that the official documentation consistently reference the .cursor/rules path when talking about project rules.

Could someone clarify if placing rules in .cursor/rules is:

  1. A mandatory requirement for Cursor’s file discovery and scoping mechanism?
  2. Or, a strong recommendation for project organization, with other locations being technically possible?

Any insights on the underlying mechanism would be greatly appreciated!

Thanks!

hi @shuntaro.murakami yes it is a requirement to put rules in .cursor/rules directory.

Cursor only looks for .mdc files in .cursor/rule, but there are additional options:

  • You can nest them
  • Use alternatively AGENT.md file
  • For more see docs:

@condor

Thanks for your reply!

Sorry if these are similar questions, but I’d like to ask two follow-up questions to make sure I understand:

  1. For rule types other than Auto Attached, is it possible that the file’s location is irrelevant?
  2. Specifically for a rule with always: false, am I wrong to think its location shouldn’t matter, since I’m calling it manually anyway?

Sure, happy to answer your follow ups:

  1. The Cursor Project Rule .mdc file location can only be in .cursor/rules not outside that folder.

  2. Cursor detects any Project Rule .mdc files only in .cursor/rules. Any other folders will not be detected.

If you are attaching them manually from location that is not .cursor/rules. it will not be used as rule file at all.

1 Like

Thank you so much for the clear and direct answer!
My understanding has deepened significantly. Thanks again for your help!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.