Best way to provide context: Rules vs. Memories

We can use rules and memories to provide the same context — for example: “Throw NotFoundException when a resource is not found.”

This instruction could either be included as part of a rule or we could ask Cursor to update the memory with the same guidance.

Is there a recommendation on which approach is more effective?

Hi & welcome @Andre_Y

Its right, you can tell the “Agent” to add memories like:

Prompt like:

Save memories: // Take comments in the code into account.

image

Here is the result.

I don’t see any chance to add it manually.

I reject almost all of the memories, but some of the proposed ones duplicate the rules of the project - I save some of them.

I recommend creating your own complete set of rules from scratch or based on Agent Compass.

1 Like

Which one is better from the perspective of Cursor - ask Cursor to save an instruction in memory OR put that same instruction in to the Cursor rules manually?

From Cursor’s perspective, neither method is inherently better, as they serve distinct purposes for providing context. Use the manual rules.md file for high-level, permanent directives that should apply across your entire project, such as enforcing a specific coding style or architectural pattern. These rules ensure consistent AI behavior during every interaction within that workspace. In contrast, asking Cursor to save “memories” gives you a different advantage..

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