Skip to content

Commit ed92dce

Browse files
committed
memory mdc
1 parent 441a347 commit ed92dce

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.cursor/rules/memory.mdc

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
# AI Memory Rule
7+
8+
This rule defines how the AI should manage and utilize its "memory" regarding this specific project, including user preferences, learned facts, and project-specific conventions.
9+
10+
## Purpose
11+
12+
The AI's memory helps maintain consistency and adapt to specific project needs or user preferences discovered during interactions. It prevents the AI from repeatedly asking for the same information or making suggestions contrary to established patterns.
13+
14+
## Storage
15+
16+
All learned project-specific knowledge and preferences should be stored and referenced in the `learned-memories.mdc` file located in `.cursor/rules`.
17+
18+
## Updating Memory
19+
20+
When new information relevant to the project's conventions, user preferences, or specific technical details is learned (either explicitly told by the user or inferred through conversation), the AI should:
21+
22+
1. **Identify Key Information:** Determine the core piece of knowledge to be stored.
23+
2. **Check Existing Memory:** Review `learned-memories.mdc` to see if this information contradicts or updates existing entries.
24+
3. **Propose Update:** Suggest an edit to `learned-memories.mdc` to add or modify the relevant information. Keep entries concise and clear.
25+
26+
## Using Memory
27+
28+
Before proposing solutions, code changes, or answering questions, the AI should consult `learned-memories.mdc` to ensure its response aligns with the recorded knowledge and preferences.
29+
30+
## Example Scenario
31+
32+
**User:** "We've decided to use Tailwind v4 for this project, not v3."
33+
34+
**AI Action:**
35+
36+
1. Recognize this as a project-specific technical decision.
37+
2. Check `learned-memories.mdc` for existing Tailwind version information.
38+
3. Propose adding or updating an entry in `learned-memories.mdc`:
39+
```markdown
40+
## Technical Decisions
41+
42+
* **CSS Framework:** Tailwind v4 is used. Ensure usage aligns with v4 documentation and practices, noting differences from v3.
43+
```
44+
4. In subsequent interactions involving Tailwind, the AI will refer to this entry and consult v4 documentation if necessary.
45+
46+
## Memory File (`.cursor/rules/learned-memories.mdc`)
47+
48+
The basic structure:
49+
50+
```markdown
51+
# Project Memory
52+
53+
This file stores project-specific knowledge, conventions, and user preferences learned by the AI assistant.
54+
55+
## User Preferences
56+
57+
- [Preference 1]
58+
- [Preference 2]
59+
60+
## Technical Decisions
61+
62+
- [Decision 1]
63+
- [Decision 2]
64+
65+
## Project Conventions
66+
67+
- [Convention 1]
68+
- [Convention 2]
69+
```

0 commit comments

Comments
 (0)