-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.cursorrules
146 lines (110 loc) · 6.05 KB
/
.cursorrules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# CURSOR10X MEMORY SYSTEM ENFORCEMENT RULES
# These rules MUST be followed ALWAYS without exception.
## RULE 1: CONVERSATION INITIALIZATION
The FIRST action in the BEGINNING of EVERY response MUST be to initialize the conversation with this single tool call and display the banner from the response immediately after. It MUST be called EXACTLY ONCE per conversation and ONLY at the very beginning after receiving user input:
```javascript
// ✅ DO: Call EXACTLY ONCE at the beginning of EVERY conversation
mcp_cursor10x_initConversation({content: "[user message]", importance: "[low/medium/high/critical]"})
// ❌ DON'T: Call multiple times within the same conversation
// ❌ DON'T: Call in the middle or end of a conversation
// ❌ DON'T: Skip calling this at the start
```
## RULE 2: ASSISTANT MESSAGE STORAGE
EVERY assistant response containing important information MUST be stored. This can be called MULTIPLE times as needed during a conversation to store significant assistant responses:
```javascript
// ✅ DO: Call when storing important information
mcp_cursor10x_storeAssistantMessage({content: "[assistant response]", importance: "[low/medium/high/critical]"})
// ✅ DO: Store multiple distinct responses when appropriate
```
## RULE 3: ACTIVE FILE TRACKING
EVERY file being worked on or modified MUST be tracked - not files being read. This should be called whenever starting work on a file:
```javascript
// ✅ DO: Track when editing or creating files
mcp_cursor10x_trackActiveFile({filename: "[file path]", action: "[edit/create]"})
// ❌ DON'T: Track files that are only being read
```
## RULE 4: MILESTONE RECORDING
ALL completed tasks or achievements MUST be recorded as milestones. Use this to mark significant accomplishments:
```javascript
// ✅ DO: Record milestones when completing important tasks
mcp_cursor10x_storeMilestone({title: "[milestone title]", description: "[milestone description]", importance: "[low/medium/high/critical]"})
```
## RULE 5: DECISION RECORDING
ALL important project decisions MUST be recorded. Use this when making significant decisions:
```javascript
// ✅ DO: Record important decisions with reasoning
mcp_cursor10x_storeDecision({title: "[decision title]", content: "[decision content]", reasoning: "[decision reasoning]", importance: "[low/medium/high/critical]"})
```
## RULE 6: REQUIREMENT RECORDING
ALL project requirements MUST be documented. Use this when identifying or defining requirements:
```javascript
// ✅ DO: Document project requirements
mcp_cursor10x_storeRequirement({title: "[requirement title]", content: "[requirement content]", importance: "[low/medium/high/critical]"})
```
## RULE 7: EPISODE RECORDING
ALL significant events or actions MUST be recorded as episodes. Use this to track important interactions:
```javascript
// ✅ DO: Record significant events
mcp_cursor10x_recordEpisode({actor: "[user/assistant/system]", action: "[action type]", content: "[action details]", importance: "[low/medium/high/critical]"})
```
## RULE 8: CONVERSATION END SEQUENCE
This EXACT sequence MUST be executed at the VERY END of EVERY conversation and EXACTLY ONCE per conversation:
```javascript
// ✅ DO: Call EXACTLY ONCE at the very end of the conversation
mcp_cursor10x_endConversation({content: "[Content of the assistant's final message]", milestone_title: "[Title for the completion milestone]", milestone_description: "[Description of what was accomplished]", importance: "[low/medium/high/critical]", metadata: "[Additional metadata for the operations]" })
// ❌ DON'T: Call in the middle of a conversation
// ❌ DON'T: Call multiple times
// ❌ DON'T: Skip calling this at the end
```
## RULE 9: HEALTH MONITORING
Memory system health MUST be checked when issues occur:
```javascript
// ✅ DO: Check health when troubleshooting problems
mcp_cursor10x_checkHealth({})
```
## RULE 10: MEMORY STATISTICS
Memory statistics MUST be gathered periodically:
```javascript
// ✅ DO: Get memory stats when useful for context
mcp_cursor10x_getMemoryStats({})
```
## RULE 11: CONTEXT RETRIEVAL
Use context retrieval tools as needed throughout the conversation:
```javascript
// ✅ DO: Get comprehensive context when needed
mcp_cursor10x_getComprehensiveContext({})
// ✅ DO: Get recent messages when relevant
mcp_cursor10x_getRecentMessages({limit: 5, importance: "high"})
// ✅ DO: Get active files when working on code
mcp_cursor10x_getActiveFiles({limit: 5})
```
## RULE 12: IMPLEMENTATION VERIFICATION
ALWAYS check if similar or corresponding files/folders already exist BEFORE starting any new implementation:
1. Use search tools to scan the codebase for similar implementations
2. Check existing directory structure to identify appropriate locations
3. Review project documentation for mentions of similar functionality
4. Record findings before proceeding with implementation
## RULE 13: TASK WORKFLOW MANAGEMENT
ALWAYS follow the task workflow process when implementing tasks:
1. **Task Structure Validation**
- Ensure tasks contain required fields: id, title, file, status, prompt
- Tasks MUST be stored in tasks/tasks.json
2. **Task Status Management**
- Update task status to "in-progress" when starting implementation
- Update task status to "complete" when implementation is finished
- Update task status to "skipped" when task is bypassed
- ALWAYS update metadata counts and lastUpdated timestamp
3. **Project Context Review**
- Read blueprint.md in docs directory before implementing any task
- Review any related files mentioned in the task
4. **Implementation Focus**
- Focus implementation on the file specified in the task
- Follow detailed instructions provided in the task prompt
- DO NOT modify task ids, titles, or prompts unless specifically requested
5. **Task Order Adherence**
- Process tasks in their defined order unless specified otherwise
- When asked for "next task", select first pending task from tasks.json
- When specific task ID is provided, locate and implement that specific task
6. **Completion Notification**
- Inform user of successful task completion
- Provide summary of changes made