# Using the "project-rules" in 0.45.2

**URL:** <https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447>\
**Category:** Discussions\
**Created:** [January 24, 2025, 10:30am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447 "2025-01-24T10:30:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![VictorBischoff](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/victorbischoff/32/21971_2.png) [@VictorBischoff](https://forum.cursor.com/u/VictorBischoff)\
**Post date:** [January 24, 2025, 10:30am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/1 "2025-01-24T10:30:13Z")

</div>

Hey everyone! 👋

With the release of **Cursor v0.45.2** , the new “project-specific rules” feature has been a hot topic! For those who haven’t tried it yet, this update lets you define custom rules (with descriptions and glob patterns) tailored to specific projects. Check out the [announcement post](https://www.reddit.com/r/cursor/comments/1i63jdj/cursor_045_project_rules/) for details.

**Questions for the community:**

1. **How are you using project-specific rules so far?**

2. **Glob patterns:**

3. **Project types:**

4. **Challenges?**

5. **Tips for others?**

Let’s crowdsource ideas and examples! If you’ve built a cool rule setup, drop a code snippet or screenshot below. Excited to see how everyone’s leveraging this feature! 🚀

* * *

_Example starter (optional):_

```markdown
// .cursor/mason.mdc
Description Always stay updated on the `_mason` folder
Globs: _mason/*

# Main file
Use the @how-mason-works.md file to understand how mason_cli works
Use the @mason-folder-structure.md file to get an idea of structure and usage
check the @bricklink.md for repository and documentation

```

---

<div class="post-metadata">

**Author:** ![SamPeng87](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/sampeng87/32/21983_2.png) [@SamPeng87](https://forum.cursor.com/u/SamPeng87)\
**Post date:** [January 24, 2025, 11:16am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/2 "2025-01-24T11:16:21Z")

</div>

What is the relationship between this feature and the NOTEPADS feature? Is it a replacement or a complement? Is it just an attempt?

I briefly looked at this feature and haven’t used it yet, but I have a few questions and speculations.

- Description is a description that helps view this rule and will not be passed to LLM
- Globs are applied once files or files in the context are matched.
- Therefore, this feature is an automatic process and does not require manual addition to the chat context.

I think what’s more important is to know how this feature actually works. I’m a bit scared of @files right now; the recent cursor and the understanding of @files are basically random. Sometimes it seems to understand, and other times it acts as if it hasn’t seen anything. It’s completely unpredictable.

---

<div class="post-metadata">

**Author:** ![jake](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jake/32/20459_2.png) [@jake](https://forum.cursor.com/u/jake)\
**Post date:** [January 25, 2025, 7:21am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/3 "2025-01-25T07:21:03Z")

</div>

> [@SamPeng87](#):
>
> What is the relationship between this feature and the NOTEPADS feature? Is it a replacement or a complement? Is it just an attempt?

This is distinct from the NotePads feature.

Project-specific rules allow you to more intelligently add relevant context to the chat and cursor windows.

For example, if you only want certain information to apply to specific file types (`.py` files) or directories.

Unlike Notepads, you don’t have to @ these manually. They are automatically added via the glob pattern or the agent recognising they are relevant from the rule description.

Unlike `.cursorrules`, which is auto-added to any chat/composer interaction, these project-specific rules will only be added to the context when they are relevant (via the glob pattern or agent thinking it is, based on your project description).

---

<div class="post-metadata">

**Author:** ![jake](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jake/32/20459_2.png) [@jake](https://forum.cursor.com/u/jake)\
**Post date:** [January 25, 2025, 7:25am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/4 "2025-01-25T07:25:56Z")

</div>

> [@VictorBischoff](#):
>
> Any clever tricks for excluding files or targeting subdirectories?

You should be able to target specific directories via a glob pattern.

e.g. `'path/to/directory/*'`

> [@VictorBischoff](#):
>
> What globs have you found most useful (e.g., `src/**/*.ts`, `tests/*.py`)?

I’ve been using extension-specific globs to isolate rules that are only relevant to certain file types (e.g. ` **.html` or `**.py`).

As well as targeting certain directories (e.g. `**/templates/*`).

Loving it so far. Before, I was constantly umming and ahhing about what to put in my `.cursorrules` files, not wanting to fill it with unnecessary information, and hence having to make trade-offs about what to include.

For example, I didn’t want to add too much information regarding how I like my Python functions formatted, for fear of it bloating the context window when writing JavaScript.

Now, I just write a Python-specific rule that only target Python files.

It’s _chef’s kiss_ fantastic.

---

<div class="post-metadata">

**Author:** ![CodeWithBehnam](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/codewithbehnam/32/18080_2.png) [@CodeWithBehnam](https://forum.cursor.com/u/CodeWithBehnam)\
**Post date:** [January 25, 2025, 11:32am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/5 "2025-01-25T11:32:11Z")

</div>

Is it possible to create a comprehensive guide on how to add project rules? I’ve created the .cursor folder and a \*.mdc file. I’ve added my desired rule to the file, for example, recording any changes in progress.md file and pointing it to that folder. However, nothing seems to be happening. Where am I going wrong?

---

<div class="post-metadata">

**Author:** ![saidiibrahim](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/saidiibrahim/32/22199_2.png) [@saidiibrahim](https://forum.cursor.com/u/saidiibrahim)\
**Post date:** [January 25, 2025, 11:41am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/6 "2025-01-25T11:41:14Z")

</div>

I’ve realised that rules outside this `.cursor/rules/` folder are not being recognised. Is this correct? And what’s the best way to organise these `.mdc` files? Seems like we can’t event have subfolders within `.cursor/`

---

<div class="post-metadata">

**Author:** ![xuzhiping7](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/xuzhiping7/32/10104_2.png) [@xuzhiping7](https://forum.cursor.com/u/xuzhiping7)\
**Post date:** [January 26, 2025, 6:40am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/8 "2025-01-26T06:40:46Z")

</div>

I still dont know how it work …  
how it aotu select what is useful ?

some keywork input to the composer ,then it would auto find the right information from project-rules?

“When you specify file patterns here (e.g. \*.tsx), this rule will automatically be included in AI responses for files matching those patterns”

the desc means when composer decide to change some files, it would firstly to find out those files fixed the partern content rule ? and how can i konw it actually get the right rules?

can u show me an example ,pls ,thx

---

<div class="post-metadata">

**Author:** ![xuzhiping7](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/xuzhiping7/32/10104_2.png) [@xuzhiping7](https://forum.cursor.com/u/xuzhiping7)\
**Post date:** [January 26, 2025, 7:20am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/9 "2025-01-26T07:20:03Z")

</div>

can i use the rules to control the function “Gernarate Commit Message” ?

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [January 26, 2025, 9:31am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/10 "2025-01-26T09:31:28Z")

</div>

Hey, not yet, but we’ll add this feature soon.

---

<div class="post-metadata">

**Author:** ![xuzhiping7](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/xuzhiping7/32/10104_2.png) [@xuzhiping7](https://forum.cursor.com/u/xuzhiping7)\
**Post date:** [January 26, 2025, 9:37am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/11 "2025-01-26T09:37:32Z")

</div>

I just tested it for a while and found that this rule is really easy to use. It is highly reusable and the experience is also very good.it made the whole project clearer and more controllable.

---

<div class="post-metadata">

**Author:** ![mpsharp](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mpsharp/32/5669_2.png) [@mpsharp](https://forum.cursor.com/u/mpsharp)\
**Post date:** [January 28, 2025, 11:16pm UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/12 "2025-01-28T23:16:12Z")

</div>

Hot tip: Autosave doesn’t work on the mdc editor (IE: save on focus change). Note the globs are just a line in the file. Format is pretty trivial.

---

<div class="post-metadata">

**Author:** ![ultrawideturbolife](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/ultrawideturbolife/32/17726_2.png) [@ultrawideturbolife](https://forum.cursor.com/u/ultrawideturbolife)\
**Post date:** [January 29, 2025, 1:53am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/13 "2025-01-29T01:53:12Z")

</div>

can we make folders in the project rules? so .cursor/rules/protocols/how-we-make-pew-pew.mdc, .cursor/rules/personas/michael-scott.mdc etc? will it still work the same or do they all have to be in the root

---

<div class="post-metadata">

**Author:** ![Dillonu](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/dillonu/32/37014_2.png) [@Dillonu](https://forum.cursor.com/u/Dillonu)\
**Post date:** [January 29, 2025, 3:40am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/14 "2025-01-29T03:40:52Z")

</div>

I’ve noticed the rules don’t seem to get applied on reruns or edits of a message in Composer. Could we get it to apply on those?

Separately, I had an idea to make rules even more powerful with something I call “Agent Flows” (or “Flow Rules”). I’ve outlined it in a separate post here: [[Link to Agent Flows]](https://forum.cursor.com/t/agent-flows-for-reliable-step-by-step-automation/45795). It’s a bit different from Project Rules and Cursor Rules, but could be a great complement!

---

<div class="post-metadata">

**Author:** ![asapMaki](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/asapmaki/32/22940_2.png) [@asapMaki](https://forum.cursor.com/u/asapMaki)\
**Post date:** [January 29, 2025, 7:23am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/15 "2025-01-29T07:23:06Z")

</div>

When choosing a file, can we have that fancy folder choosing.  
Since I mostly follow Folder/index.tsx pattern  
And choosing a specific file with current implementation is not effective

 ![image](https://us1.discourse-cdn.com/cursor1/original/3X/a/7/a75e6fd889cb0bef49b1cc886b93d6dd4cdb69ca.png)

---

<div class="post-metadata">

**Author:** ![asapMaki](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/asapmaki/32/22940_2.png) [@asapMaki](https://forum.cursor.com/u/asapMaki)\
**Post date:** [January 29, 2025, 7:28am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/16 "2025-01-29T07:28:58Z")

</div>

Is now:

.cursorrules only for → Rules for AI  
Rules for AI only for → chat and Command - K seesions but not for a composer/agent ?

Are Project rules only for `composer/agent` ?

 ![Screenshot 2025-01-29 at 08.27.16](https://us1.discourse-cdn.com/cursor1/original/3X/b/0/b07f36688d562f589ea75d09b8bfc8d4720c4157.png)

---

<div class="post-metadata">

**Author:** ![jake](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jake/32/20459_2.png) [@jake](https://forum.cursor.com/u/jake)\
**Post date:** [January 31, 2025, 5:20am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/17 "2025-01-31T05:20:44Z")

</div>

> [@asapMaki](#):
>
> .cursorrules only for → Rules for AI  
> Rules for AI only for → chat and Command - K sessions but not for a composer/agent ?

`.cursorrules` and `Rules for AI` function as they did before, as outlined here: [Context / Rules for AI – Cursor](https://docs.cursor.com/context/rules-for-ai)

There is no change in their functionality.

`Project Rules` is in addition to these features. This will eventually replace `.cursorrules` and is essentially a more fine-grained way to implement cursor rules, so you can make rules specific to:

1. A particular file type
2. Directory
3. Semantic description

> [@asapMaki](#):
>
> Are Project rules only for `composer/agent` ?

- Chat + composer windows use the glob patterns outlined in`Project rules`
- The `Description` for the Project Rule is only used in Agent mode. `Globs` are used by `normal` + `agent`
- `Ctrl/⌘ K` currently does not use `Project Rules`

I hope that helps 🙂

---

<div class="post-metadata">

**Author:** ![robshox](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/robshox/32/8108_2.png) [@robshox](https://forum.cursor.com/u/robshox)\
**Post date:** [February 5, 2025, 5:48am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/18 "2025-02-05T05:48:41Z")

</div>

> [@jake](#):
>
> I’ve been using extension-specific globs to isolate rules that are only relevant to certain file types (e.g. ` **.html` or `**.py`).
> 
> As well as targeting certain directories (e.g. `**/templates/*`).
> 
> Loving it so far. Before, I was constantly umming and ahhing about what to put in my `.cursorrules` files, not wanting to fill it with unnecessary information, and hence having to make trade-offs about what to include.

Jake, would love a short post on a globbing example. Are you simply adding \*.py or _.ts or "/src/app/\*\*/_.ts"  
How well does it work at the catch all level  
Is it always invoked if the glob matches or is it just a reference helper for the LLM  
An example or two would be amazing, Thanks!

---

<div class="post-metadata">

**Author:** ![jake](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jake/32/20459_2.png) [@jake](https://forum.cursor.com/u/jake)\
**Post date:** [February 6, 2025, 3:58am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/19 "2025-02-06T03:58:31Z")

</div>

To hit all file types for a particular file, use the pattern `**/*.py` (where `.py` is your desired file extension).

This catches all of said file type, regardless of where it is located.

Globs are deterministic and will always be used in chat/composer, irrespective of whether or not you’re in agent mode. In agent mode, it will still be used, and the agent can not “override” the decision. It can only “add” to the decision based on the description.

Soon you’ll be able to see in composer which project rules have been used, which will make troubleshooting a lot easier.

---

<div class="post-metadata">

**Author:** ![ichabodcole](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/ichabodcole/32/21771_2.png) [@ichabodcole](https://forum.cursor.com/u/ichabodcole)\
**Post date:** [February 6, 2025, 5:53am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/20 "2025-02-06T05:53:13Z")

</div>

Is there a way to ensure a rule will always be used even if no files are referenced?  
So far I have not had luck in getting the composer agent to always use a rule, so I’ve had to revert to using the global “Rules for AI” setting. Would be nice if I could just add an index file that always gets used as context.

My use case is mainly for activating certain meta modes like personas or behaviors, which I sometimes use to plan / workshop various features before implementation.

---

<div class="post-metadata">

**Author:** ![robshox](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/robshox/32/8108_2.png) [@robshox](https://forum.cursor.com/u/robshox)\
**Post date:** [February 6, 2025, 10:16am UTC](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447/21 "2025-02-06T10:16:01Z")

</div>

Thanks Jake!!

I just put up a video with everything I have learned on Cursor Rules alongside all my research notes on it here which I will keep updating

[![](https://us1.discourse-cdn.com/cursor1/original/3X/5/b/5bfc70ba3da50f1e081ba9532bdc15d0025c8636.jpeg "Master Cursor AI App Development With These Simple Rules!") ](https://www.youtube.com/watch?v=BtDxvAGhrjg)

> **[Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.](https://notes.switchdimension.com)**
>
> A new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team

[Next page](https://forum.cursor.com/t/using-the-project-rules-in-0-45-2/44447.md?page=2)
