Created
April 17, 2025 05:48
-
-
Save architjn/dccec978a5b0d3713b6d77453b6d4a74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Must consult existing memory | |
## MUST DO WITH EACH REQUEST | |
- First action for each chat request should be to read @self.md and @project.md | |
- Last action for each chat should be to update @self.md and @project.md if needed. | |
## Objective | |
Ensure Cursor avoids repeating known mistakes by persistently logging corrections and learning. All requests must reference stored knowledge in: | |
- `.remember/memory/self.md` — for known mistakes and their fixes | |
- `.remember/memory/project.md` — for user preferences and custom rules | |
--- | |
## Rule: Learn from Mistakes | |
### On Every Mistake or deprecated warning: | |
1. **Detect** incorrect or suboptimal outputs. | |
2. **Correct** the mistake. | |
3. **Save** both mistake and correction in @self.md using the format: | |
```markdown | |
### Mistake: [Short Description] | |
**Wrong**: | |
``` | |
[Insert incorrect code or logic] | |
``` | |
**Correct**: | |
``` | |
[Insert corrected code or logic] | |
``` | |
``` | |
--- | |
## Always add a step to read @self.md in your thoughts | |
## Rule: Respect and Reference Project Preferences | |
### On Every Request: | |
1. **Read** @project.md for: | |
- User’s preferred tools, stack, coding style, formatting, naming, etc. | |
- Preferences like TypeScript over JS, Yarn over npm, etc. | |
2. **Apply** these preferences without exception. | |
3. **Save** any new user preferences in @project.md. | |
--- | |
## Rule: Prevent Repetition | |
### On Every Request: | |
- Always **read @self.md** before applying logic. | |
- If a related mistake is found: | |
- **Use** the corrected approach instead. | |
- **Log** that a prior fix was applied (optional debug). | |
--- | |
## Rule: Keep Memory Clean and Updated | |
- If a better fix is found for an existing issue: | |
- **Update** that section in @self.md. | |
- Structure the memory files with clear `###` headers. | |
- Group by topic if needed. | |
- MUST DO: Only keep general information in memory, do be specific to the file or request. | |
- MUST DO: Information saved in memory should be useful and reusable. | |
--- | |
## Storage Paths | |
- `.remember/memory/self.md`: Persistent log of mistakes and their fixes | |
- `.remember/memory/project.md`: User preferences and custom rules | |
--- | |
## Enforcement | |
- Failing to read or update memory files after a mistake is a **critical error**. | |
- All requests must use and comply with stored knowledge and preferences. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I added flow documentation for both the backend and frontend. I think it’s working well. Sometimes, when the AI progresses on its own, you can look at the flows and piece together the story of what happened.
"""
Must consult existing memory
MUST DO WITH EACH REQUEST
Objective
Ensure Cursor avoids repeating known mistakes by persistently logging corrections and learning. All requests must reference stored knowledge in:
.remember/memory/self.md
— for known mistakes and their fixes.remember/memory/project.md
— for user preferences and custom rulesRule: Learn from Mistakes
On Every Mistake or deprecated warning:
Detect incorrect or suboptimal outputs.
Correct the mistake.
Save both mistake and correction in @self.md using the format:
[Insert incorrect code or logic]
[Insert corrected code or logic]
Always add a step to read @self.md in your thoughts
Rule: Respect and Reference Project Preferences
On Every Request:
Rule: Prevent Repetition
On Every Request:
Rule: Keep Memory Clean and Updated
###
headers.Rule: Document Backend & Frontend Flows
Whenever Cursor adds a new feature or modifies existing code, flow documentation must be updated automatically.
Backend Flow Update
For every changed or new API endpoint, add a new subsection to
backend-flow.md
.Format (example):
List only the steps needed for debugging—avoid unnecessary detail.
Frontend Flow Update
For each new UI action the user can trigger, add a subsection to
frontend-flow.md
.Format (example):
If updating an existing flow, mark the section with (Updated YY-MM-DD).
Storage Paths
.remember/memory/self.md
: Persistent log of mistakes and their fixes.remember/memory/project.md
: User preferences and custom rules.remember/flows/backend-flow.md
: Backend flow documentation.remember/flows/frontend-flow.md
: Frontend flow documentationEnforcement
"""