# Recursively look up cursor rules in any .cursor directory

**URL:** <https://forum.cursor.com/t/recursively-look-up-cursor-rules-in-any-cursor-directory/76296>\
**Category:** Feature Requests\
**Created:** [April 7, 2025, 8:50pm UTC](https://forum.cursor.com/t/recursively-look-up-cursor-rules-in-any-cursor-directory/76296 "2025-04-07T20:50:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jameslamine](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jameslamine/32/45101_2.png) [@jameslamine](https://forum.cursor.com/u/jameslamine)\
**Post date:** [April 7, 2025, 8:50pm UTC](https://forum.cursor.com/t/recursively-look-up-cursor-rules-in-any-cursor-directory/76296/1 "2025-04-07T20:50:03Z")

</div>

We have a large codebase which many teams contribute to. Rather than putting all of the cursor rules in a single `.cursor` directory in the root of the project, we’d like to be able to put the rules in individual sub-directories.

This would work better for organization, and makes it easier to have different teams own the code reviews for different rules - typically the way we do ownership is per-directory.

The idea is that if you add a file, cursor will look for .cursor directories anywhere on the path between the project root and that file.

For example ideally it would be able to find all of these:

`.cursor/rules`  
`service-a/.cursor/rules`  
`service-b/.cursor/rules`

Then if I edit a file like `service-b/example.txt` it would use the rules from `service-b/.cursor/rules` as well as `./cursor/rules` but not from `service-a/cursor/rules`.

That way each team can maintain separate rules for how to write unit tests or code style, and those rules can be kept just in the directory for their service.

This is similar to how .gitignore works - you can put it in any directory and it is applied just to that directory and below.

---

<div class="post-metadata">

**Author:** ![jameslamine](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jameslamine/32/45101_2.png) [@jameslamine](https://forum.cursor.com/u/jameslamine)\
**Post date:** [April 7, 2025, 8:59pm UTC](https://forum.cursor.com/t/recursively-look-up-cursor-rules-in-any-cursor-directory/76296/2 "2025-04-07T20:59:23Z")

</div>

Unfortunately, just opening `service-a` as the project root is not a solution that works for us - we need to open the entire root.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 18, 2026, 10:37am UTC](https://forum.cursor.com/t/recursively-look-up-cursor-rules-in-any-cursor-directory/76296/3 "2026-06-18T10:37:32Z")

</div>


