Cursor rules not followed by agents

I created a framework for cursor agents to follow with custom commands (e.g. plan - will create a a ticket for a task with description checklists and implementation steps). I added a comprehensive json file with the rules to follow for this framework in cursor rules, but seems like cursor does not really use my rules unless i add context to follow the framework commands from .context folder. Also I cannot get these commands to autocomplete (this would be a bonus). The main issue I have is that I don’t understand why cursor does not take into account anything I add in Cursor Settings / User Rules. I tried adding an assistants.json file with these commands and details as well but it did not help. Tried a lot of different things and still no success. Would deeply appreciate some help witht this.

1 Like

are they set to auto attached?

I pasted them in json format in the Cursor Settings UI

BUT I also created a rule to always check for the actual commands and it does not do that

1 Like

ok, so i found a solution to make sure this works and follows the commands:

I created a .cursor.json file that points to a couple of helpful folders and to the source of the commands.

Does anyone have any idea how I can make cursor to suggest auto-complete for the commands? This would be the final implementation step for this framework.

1 Like

That seems a really bizarre way to implement rules! No idea why you’ve got json in the user rules.

Try the /GenerateCursorRules command on something simple and copy the structure it creates.

2 Likes

Yeah it felt weird to me too, but I actually used cursor to generate those rules in json format (suggested by cursor) :sweat_smile: . The goal for that JSON was to have a complex set of instructions ready to copy paste into your project/editor, BUT generating a set of rules using this command makes much more sense. I did not know about it, so thanks a lot @mwjt42 ! Any chance you know how to create aliases that cursor recognizes and autocompletes for custom commands?

You mean an AI model generated the rules, it doesnt know Cursor actually since the AI models are provided by 3rd party AIs (GPT, Claude, Gemini,…)

You should not use json for Cursor Rules as this wastes your context with empty space. Use plain text or markdown.

@T1000 The problem is not with the cursor rules. I did rewrite them into a different format, to avoid using too many tokens. The problems lie with the AI Agents as they skim through the command instructions and do not respect the desired lifecycle of the command.

I have a command that should: analyze context, demand clarification, create task ticket and generate a history tracker, then start task, validate task implementation steps, etc. I see the AI read the the yaml file where the instructions are (the yaml should be injected into the prompt when running a command) it basically skips random steps it does not think are totally necessary (even though it is mentioned that each step is necessary).

I tried using plain text to describe the rules and a bunch of different ways of enforcing the agent to respect and follow each step from the commands, but nothing worked so far.