I have been using rules in a recent project, but don’t think they are not automatically picked up by the cursor, I want to check if anyone else has the same impression.
Also, there’s no visual indication a rule is being picked up by chat or composer, it would be helpful to have such an indication.
Hey, are you using rules from the .cursorrules file? Check if the .cursorrules function is enabled in your settings.
As an indicator to know that your rules are working, you can specify something like: “Start each response with ”.
If you don’t see this emoji in the response, it means your rules aren’t working, and you need to start a new session, as this session might have a context window overflow.
AHH so they’re not picked up automatically? the changelog states they are automatically pcked up:
.cursor/rules: Users can write several repository-level rules to disk in the .cursor/rules directory. The Agent will automatically choose which rule to follow.
I found this .cursorrules instruction to show the applied rules in the output.
"every time you choose to apply a rule(s), explicitly state the rule(s) in the output, you can abbreviate the rule description to a single word or phrase, one paragraph per rule. For example: ✨ Applying rules: <br> 📋 output.rules: ***short description*** <br>",
# General Python style guide for this project—refer to this when writing any Python-related code.
- Follow PEP8 style.
- Add docstring for every function, class, method.
And yet not getting picked up, generated functions don’t include docstring
As I noticed, they work even without any indication, like in my screenshot above. Project rules are an addition to the regular rules, which will eventually be removed from Cursor. You can add specific rules for a particular file type, directory, and specific description. You also need to add a description, only then can the agent recognize it. Essentially, project rules are a more detailed way of implementing regular rules.
This is a very obvious prompt though. Some understanding around how it decides to use the rules. I have rules around creating components that are not adhered to and never referenced when creating components dispite lots of cues in the description
In my end, it works (assuming) only when I mention the rules in every prompts. Although it is annoying that need to do this just makes the whole purpose of the rules to be useless if it can’t pick up automatically. Tried re-sync, close/open again. I have .cursor\rules\project-rules.mdc file but it still stays “No project rules found.”