Mimicking Windsurf’s “Memory” Feature in Cursor — Let Generative AI Create Rules
Windsurf has a Memory feature that allows you to “store” information or procedures so you can leverage them later for content creation and interactions. In this post, we’ll explore how you can achieve a similar workflow in Cursor, by using its Project Rules as a form of “Memory.”
Windsurf’s Memory Feature
In Windsurf, you can easily store information in Memory by using its Cascade function (akin to Cursor’s agent). Simply say something like: “Please remember ___.” From then on, Windsurf will refer to that stored information whenever you generate content or have a conversation.
Examples
• “Please summarize the steps we’ve taken so far and store them in memory.”
• “Please research the usage of the ___ library and store it in memory.”
Once you give such an instruction, the content is automatically saved to Memory in Windsurf.
Achieving a Similar Workflow in Cursor
Although Cursor currently doesn’t provide an official “Memory” feature, you can mimic it by leveraging Project Rules. Below is a basic approach for creating a “Memory” file and having Cursor store your instructions within your project.
1. Create a “Memory” File Using Project Rules
In Cursor, create a new rule. For example, you might define it as follows (choose the Rule Type as “Manual” to start):
# Storing RulesWe will create a rule file in which to store instructions (essentially, our “memory”).## Location.cursor/rules/## File NameUse a name composed of letters, digits, and hyphens.## File Extensionmdc## ContentThe content is stored in a code block. The frontmatter changes depending on the rule type:```
description:
globs:
alwaysApply:
```## Rule TitleProvide the rule content in proper Markdown format.## Rule TypesRules can have the following types. Choose the one that best fits your needs:Always: Always applied.
Auto Attached: Automatically applied to files matching specified globs.
Agent Requested: Applied only when an agent decides it’s relevant, based on the description.
Manual: Applied only when the user explicitly says so.## Frontmatter DetailsThe frontmatter differs based on the rule type. Include the proper fields:### Always```
globs: *
```### Auto AttachedLeave description blank. Include globs. If you specify multiple globs, separate them with commas:```
description:
globs: comma-separated globs
```### Agent RequestedInclude a description. Do not include globs; otherwise, it becomes Auto Attached:```
description: Put your description here
globs:
alwaysApply: false
```### ManualLeave description and globs empty. Set alwaysApply to false:```
description:
globs:
alwaysApply: false
```## Reporting After CreationOnce you create your rule file, report:
- Which rule type you chose and why
- An explanation of the rule’s content
• The location is specified as .cursor/rules/.
• The file name can be something like my-rule.mdc (only letters, digits, hyphens).
• The Rule Type (e.g., Manual, Agent Requested, etc.) should be chosen as needed.
• The “Rule Title” and main content can be written in Markdown in any format you want.
2. Ask the Agent to Create “Memory”
In Cursor, use the agent by giving it a prompt such as:
Please remember ___ @Memory
For instance, you might say “Please summarize the steps we’ve taken so far and store them in memory @Memory,” or “Please look up how to use the ___ library and store it in memory @Memory.” By including “@Memory” at the end (or beginning) of your request, Cursor will automatically generate a Project Rule, crafting and saving the content you requested into .cursor/rules/ as if it were your “Memory.”
Final Thoughts
• In Windsurf, you can simply say “Please remember ___” to store info in Memory through its Cascade function.
• In Cursor, you can replicate that flow by creating Project Rules in the .cursor/rules/ directory and using them as a “Memory” store.
• When you want to store content, give Cursor’s agent an instruction like “Please remember ___ @Memory.”
While the internal mechanisms differ between Windsurf and Cursor, following these steps allows you to maintain a continuous reference to previous information in Cursor — even as your interactions and content generation grow more complex. Give it a try and see how it streamlines your workflow!