Cursor rules from rules directory being ignored?

:white_check_mark: Check the forum to ensure the issue hasn’t been reported already
done.

:lady_beetle: Provide a clear description of the bug
I recently added Doppler to a project and created a rule in Cursor to always start commands in agent mode with doppler run --. 3 things:

  1. When I asked it to create the initial rule it referenced npm. I have a rule that states the project uses yarn.
  2. When the agent runs any commands, it does not prepend doppler run -- to any command.
  3. It’s started to use npm for commands instead of yarn.

:counterclockwise_arrows_button: Explain how to reproduce the bug (if known)

  1. Create a rule that states all commands should start with (or prepend) doppler run --
  2. Ask agent to run a command.

:laptop: Tell us your operating system and your Cursor version (e.g., Windows, 0.x.x).
MacOS 15.4
Cursor 0.48.7

for what it’s worth, when I distill all of my .mdc rules in .cursor/rules into a single .cursorrules file, it is adhering to the rules and starting all commands with doppler run --

I can explain this problem. There seem to be three main causes:

  1. Rule Format: If the rule was written only as text in a Cursor rule, the AI might understand it as reference, not as an actual execution instruction. You’re right - the rule should be formulated more precisely, possibly in a code block or with clear syntax.

  2. Priority Conflict: There’s a conflict between two rules - one for yarn and one for doppler run --. If the rules aren’t clearly prioritized or no clear combination is specified, the AI may decide which one to follow.

  3. Interpretation vs. Instruction: The AI treats the instruction “start commands with doppler run --” as a general guideline rather than a strict requirement for command formatting.

For a solution, you could reformulate the rule like this:

RULE: cmd→format  # Format for ALL commands to be executed
- Every command MUST start with "doppler run -- "
- After "doppler run -- " you MUST use "yarn" for package manager commands (NEVER npm)
- Example: "doppler run -- yarn install" (✓) instead of "npm install" (✗)
- Example: "doppler run -- yarn start" (✓) instead of "yarn start" (✗)

This formatting makes the priority and combination of rules clearer and provides concrete examples for the AI to follow :wrench:

1 Like

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