Skip to content

Commit c279d16

Browse files
committed
Optimized Cursor and Claude-code Rules
1 parent 7e7a895 commit c279d16

File tree

8 files changed

+625
-121
lines changed

8 files changed

+625
-121
lines changed

.cursor/rules/2ndRule.mdc

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ alwaysApply: true
55
---
66
# 🔍 ADAPTIVE MEMORY-BASED ASSISTANT SYSTEM
77

8-
> **TL;DR:** I am an AI with memory that resets between sessions. I use a structured Memory Bank to maintain context. The system scales across four complexity levels from quick bug fixes to complex systems, adapting the process to match task requirements while maintaining essential documentation.
8+
> **TL;DR:** Memory-based AI that adapts process complexity (L1-L4) to task requirements.
99

1010
## 🚨 PLATFORM IDENTIFICATION - FIRST STEP
1111

@@ -328,3 +328,52 @@ Reason: [Brief explanation]
328328
```
329329

330330
2. If escalation is approved, adjust the process to the higher level.
331+
332+
## PLATFORM & FILE VERIFICATION
333+
```
334+
Platform: [Windows/Mac/Linux]
335+
Files Required:
336+
- .cursorrules (file)
337+
- memory-bank (dir)
338+
- docs/archive (dir)
339+
- tasks.md (file)
340+
```
341+
342+
## WORKFLOW TEMPLATES
343+
344+
### L1: Quick Fix
345+
```
346+
[Bug description]
347+
- Root cause
348+
- Fix applied
349+
- Verification
350+
- Docs updated
351+
```
352+
353+
### L2: Enhancement
354+
```
355+
[Enhancement goal]
356+
- Plan created
357+
- Implementation
358+
- Testing done
359+
- Docs updated
360+
```
361+
362+
### L3/4: Full Process
363+
```
364+
[Task objective]
365+
1. Initialization
366+
2. Documentation
367+
3. Planning
368+
4. Implementation
369+
5. Reflection
370+
6. Archiving
371+
```
372+
373+
## VERIFICATION
374+
- Files exist and correct type
375+
- Platform identified
376+
- Process matches complexity
377+
- Tasks tracked in tasks.md
378+
- Implementation documented
379+
- Changes archived properly

.cursor/rules/creativePhaseGuidelinesRule.mdc

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,91 @@ Before exiting a creative phase, perform a systematic verification (similar to "
176176
- [ ] Checked for security implications
177177
- [ ] Assessed performance impacts
178178
- [ ] Considered testing approach
179+
180+
# CREATIVE PHASE GUIDELINES
181+
182+
> **TL;DR:** Structured approach for complex design decisions. Required for L3-4 tasks.
183+
184+
## TRIGGERS
185+
Enter creative phase when facing:
186+
- Multiple viable solutions
187+
- Complex design choices
188+
- Competing constraints
189+
- Architectural decisions
190+
- Algorithm optimization
191+
192+
## TEMPLATE
193+
```
194+
=== CREATIVE: [TYPE] ===
195+
Focus: [Area]
196+
Goal: [Objective]
197+
Limits: [Constraints]
198+
199+
Components:
200+
1. [Part 1]
201+
2. [Part 2]
202+
203+
Options:
204+
A. [Option 1]
205+
+ Pros
206+
- Cons
207+
208+
B. [Option 2]
209+
+ Pros
210+
- Cons
211+
212+
Decision: [Choice]
213+
Rationale: [Why]
214+
Verification: [Requirements met]
215+
=== END CREATIVE ===
216+
```
217+
218+
## TYPES
219+
220+
### Algorithm Design
221+
- Data structures
222+
- Performance optimization
223+
- Logic implementation
224+
- Edge case handling
225+
226+
### UI/UX Design
227+
- Component structure
228+
- State management
229+
- User flows
230+
- Accessibility
231+
232+
### Architecture
233+
- System boundaries
234+
- Data patterns
235+
- Security/Auth
236+
- Scaling strategy
237+
238+
## PROCESS
239+
240+
1. **Entry**
241+
- Stop normal flow
242+
- State problem
243+
- List constraints
244+
245+
2. **Analysis**
246+
- Break down problem
247+
- List options
248+
- Compare trade-offs
249+
250+
3. **Decision**
251+
- Choose solution
252+
- Document rationale
253+
- Verify requirements
254+
255+
4. **Exit**
256+
- Summarize work
257+
- List next steps
258+
- Update tasks.md
259+
260+
## VERIFICATION
261+
Before exit, confirm:
262+
- Problem analyzed
263+
- Options compared
264+
- Decision justified
265+
- Requirements met
266+
- Next steps clear

.cursor/rules/gitCommitRule.mdc

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,111 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: false
5+
---
16

27
---
38
description: Git Commit Rule
49
globs: *
510
---
611

12+
# GIT COMMIT PROTOCOL
13+
14+
> **TL;DR:** Write clear, atomic commits using `type(scope): message` format in present tense, imperative mood.
15+
16+
## 📝 COMMIT FORMAT
17+
18+
```
19+
type(scope): message
20+
21+
[optional body]
22+
23+
[optional footer]
24+
```
25+
26+
## 🏷️ COMMIT TYPES
27+
28+
- **feat**: New feature
29+
- **fix**: Bug fix
30+
- **docs**: Documentation
31+
- **style**: Formatting
32+
- **refactor**: Code restructure
33+
- **test**: Testing
34+
- **chore**: Maintenance
35+
36+
## ✅ COMMIT RULES
37+
38+
1. **Message Structure**
39+
- Present tense ("add" not "added")
40+
- Imperative mood ("move" not "moves")
41+
- No period at end
42+
- 50 chars or less
43+
44+
2. **Body (Optional)**
45+
- Blank line after subject
46+
- Wrap at 72 chars
47+
- Explain what and why
48+
49+
3. **Scope (Optional)**
50+
- Component affected
51+
- Lowercase, no spaces
52+
- Use consistent names
53+
54+
## 💡 VALID EXAMPLES
55+
56+
```
57+
feat(auth): add Google sign-in option
58+
fix(api): handle null response from server
59+
docs(readme): update installation steps
60+
style(components): format according to style guide
61+
refactor(database): optimize query performance
62+
test(utils): add unit tests for date functions
63+
chore(deps): update dependencies to latest
64+
```
65+
66+
## 🚫 INVALID EXAMPLES
67+
68+
```
69+
❌ fixed bug # No type
70+
❌ feat: Added new feature # Past tense
71+
❌ style(HEADER): Changed CSS # Uppercase scope
72+
❌ docs: updated docs. # Period at end
73+
❌ feat: implement...very...long...commit...message # Too long
74+
```
75+
76+
## 🔄 WORKFLOW
77+
78+
1. **Stage Changes**
79+
```bash
80+
git add <files>
81+
```
82+
83+
2. **Write Commit**
84+
```bash
85+
git commit
86+
```
87+
88+
3. **Push Changes**
89+
```bash
90+
git push
91+
```
92+
93+
## ⚠️ SAFETY
94+
95+
- One logical change per commit
96+
- No sensitive data in messages
97+
- Verify staged files before commit
98+
- Use .gitignore for secrets
99+
100+
## ✓ VERIFICATION
101+
102+
Before committing, verify:
103+
- [ ] Correct type selected
104+
- [ ] Scope is appropriate
105+
- [ ] Message follows format
106+
- [ ] Changes are atomic
107+
- [ ] No sensitive data
108+
7109
# Git Conventional Commits
8110

9111
Rule for automatically committing changes made by CursorAI using conventional commits format.

.cursor/rules/memoryBankRule.mdc

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,85 @@ description: Memory bank structure and implementation
33
globs: **/memory-bank/**", "**/.cursorrules
44
alwaysApply: false
55
---
6-
# CURSOR'S MEMORY BANK SYSTEM
6+
# MEMORY BANK
77

8-
> **TL;DR:** The Memory Bank is a set of 6 core files that serve as my persistent memory. I must read ALL files at the start of EVERY task. Create/update files in this order: projectbrief → productContext/systemPatterns/techContext → activeContext → progress.
8+
> **TL;DR:** Core system for maintaining project context across sessions.
9+
10+
## STRUCTURE
11+
```
12+
memory-bank/
13+
├── projectbrief.md # Requirements
14+
├── productContext.md # Purpose
15+
├── activeContext.md # Current focus
16+
├── systemPatterns.md # Architecture
17+
├── techContext.md # Tech stack
18+
├── progress.md # Status
19+
└── tasks.md # Task tracking
20+
```
21+
22+
## FILE PURPOSES
23+
24+
### projectbrief.md
25+
- Core requirements
26+
- Project goals
27+
- Success criteria
28+
29+
### productContext.md
30+
- Business purpose
31+
- User needs
32+
- Key features
33+
34+
### activeContext.md
35+
- Current work
36+
- Recent changes
37+
- Next steps
38+
39+
### systemPatterns.md
40+
- Architecture
41+
- Design patterns
42+
- Tech decisions
43+
44+
### techContext.md
45+
- Tech stack
46+
- Dev setup
47+
- Dependencies
48+
49+
### progress.md
50+
- Task status
51+
- Milestones
52+
- Blockers
53+
54+
### tasks.md
55+
- Task list
56+
- Status tracking
57+
- Dependencies
58+
59+
## UPDATES
60+
61+
### When to Update
62+
- Task start/end
63+
- Major decisions
64+
- Status changes
65+
- New patterns
66+
67+
### How to Update
68+
```
69+
## [Section Name]
70+
- [Update type]: [Details]
71+
- [Timestamp]: [Change]
72+
```
73+
74+
## CROSS-LINKING
75+
- Link related updates
76+
- Reference decisions
77+
- Track dependencies
78+
- Note impacts
79+
80+
## VERIFICATION
81+
- Files exist
82+
- Content current
83+
- Links valid
84+
- Tasks tracked
985

1086
## 📚 MEMORY BANK STRUCTURE
1187

0 commit comments

Comments
 (0)