Composer not following .cursorrules

Hey, I thought about that too. It’d be handy to have such an option. Right now, I’m using my own solution, and as many have shown here, my workaround works for now. If you don’t see the welcome message, it means the model’s starting to forget, and you should start a new session.

3 Likes

Awesome! Please suggest this as a feature!

I am experimenting with a working memory markdown. You may wanna try it.
In .cursorrules, I instruct the agent only about tools and behaviors. One is updating and carrying an information-dense working memory as a markdown file, sometimes updating several times a response. I am experimenting with several outlines to update its top-of-mind objective, files to focus on and regularly read during implementation, a summary of the last seven steps, the current step, and the subsequent potential three steps ahead, and a few other sections about the alignment between the tests, codes, and documentation (which is where I document the application)

My typical workflow,
when I start working, we first discuss some design topics, which will start making the working memory first, and then document our discussion in markdown files as its long term memory .cursor_knowledge/ ; then as we move to implementation and testing, I still only push the working memory to the prompt (every 25 tool call, the current limit)
I expect that it will regularly include reading docs and code files and maintain an optimal recent context, so hopefully, we will always have the best details in the context.

It works sometimes, but the outline of the working memory for different types of operations could be more focused and optimal, for example, when we are documenting and discussing the features, when we code, and when we test and debug.

If you try, let me know what works and what doesn’t.

1 Like

Thought to update this. .cursorules has been working fine for me since after I posted this. I set the system rules and create a project specific .cursorrules file and keep that in the context every time. A lot of community members referenced its usefulness, I tried it, and it’s been very helpful. Thats not to say that the rules are ALWAYS obeyed. Some are always obeyed and some (I’d bet those that conflict with its primary training or base system rules) are ignored. Frequent iteration has produced better results overtime.

this sounds good. :thinking: is it necessary though? updating project implementation status may very well be sufficient. Anyhow, I see a couple of folks have tried this, creating and updating a file that helps maintain conversation context throughout the project. I’d give it a shot. Let you know how it turns out.

My most recent observations and approach:
I agree; it does follow some more than others. But I usually try to fix it by controlling the overall flow of the conversation.

I see it works better if we start a new conversation with an empty working memory markdown, and then given what I want to accomplish in the conversation, I explain a bit, a few paragraphs, and instruct it to start reading files and taking notes and updating its working memory,
Since it often breaks existing features while adding new ones, I would also ask it to gather context about where it must be careful not to break previous ones.

When all these are pushed into the new working memory, I continue every message with my cursorrules and working memory file as the sole context.

Also, including testing discussions in every handful of messages helps maintain the recent context quality in the chat.
The only problem is that sometimes it falls into a loop of testing and fixing and forgets to update the context or update the working memory, diluting the recent context with too much specific info about the current errors and losing the big picture.

I wish we had a metric to show the diversity of information in recent chat history. I am unsure how the cursor team is affecting the process, but I think they have to force the agent to read relevant files continuously in the recent context.

Example: I did build a simple js app as my prototype, and then when I tried to transfer the functionality to my main app, it started with a good context about the prototype, but after a few tests and fixes, it completely forgot that it was supposed to move the existing prototype to the main app and starts adding new features to the prototype. My goal is to keep an eye on the context and keep reminding the agent to read files and update the working memory markdown. If you can push it to do this in every message, it will be more successful and break less stuff.

1 Like

In regards to this, would be interesting to know, how Cursor is managing the context at all. My first guess is that it is FIFO.
However I have to admit, that recent updates seem to have improved Cursors ability to keep the cursorrules in its context for longer.

1 Like