Sharing Cursor Rules Files

I am a software architect that works for a company that has 15ish developers. We have a “macroservice” architecture (many repos) and I would love to share the new .mdc rules files between all of the solutions.

What I’m doing today is that I have a centralized repo where I’ve stored some .cursor/rules mdc files and upon merge I’m copying them to all applicable repos.

The issue I’m having is that the rules aren’t being applied when I do it this way. I have to open up the file in Cursor, copy and paste the description/glob into the textboxes and then save.

Is there anything I should be doing to format the centralized files in a way that cursor will pick them up?

Here is an example of one that does not work:

---
description: C# Coding Rules
globs: **/*.cs
---
 # C# Coding Rules

Use the following C# features and patterns:
- Primary constructor syntax
- Record syntax
- File scoped namespaces
- Interrogate global usings to see if a namespace is already importedS

The format looks correct, but there might be a reactivity issue with Cursor picking up the changes. A few things to try:

  1. Make sure the files are in .cursor/rules directory of each repo
  2. Try closing/reopening Cursor after copying the files
  3. Check the project rules in Command Palette (Cmd/Ctrl + Shift + P) to see if they show up

I’ve flagged this to the team to investigate the reactivity issue when copying rules between repos

Thank you! It seems to pick up the contents just fine, it’s just that it doesn’t pick up the description and globs.

You can see in this first screenshot that everything looks good but…

When I click on it, the textboxes are blank and it shows the description/glob in the contents. The only way for it to stop doing this for me is to copy/paste into the textboxes, delete the — section and then save.

If I don’t copy/paste into the textboxes and resave it doesn’t seem to be picking it up in the Composer section. Thanks again!