You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/rules/README.md
+28-12Lines changed: 28 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# Cursor Rules Library
2
2
3
-
This directory contains a comprehensive library of cursor rules for AI-assisted coding. Projects can symlink or copy the rules they need.
3
+
This directory contains a comprehensive library of cursor rules for AI-assisted coding.
4
+
Projects can symlink or copy the rules they need.
4
5
5
6
## Organization
6
7
@@ -14,17 +15,20 @@ Rules are organized into directories by topic:
14
15
-**`ai/`** - AI development patterns
15
16
-**`frontend/`** - Frontend frameworks and tools
16
17
17
-
Browse the directories to see available rules. Each `.mdc` file is a self-contained rule that can be used independently.
18
+
Browse the directories to see available rules. Each `.mdc` file is a self-contained rule
19
+
that can be used independently.
18
20
19
21
## Application Strategies
20
22
21
23
### alwaysApply: true
22
24
23
-
The heart-centered AI philosophy and common personality rules are always applied to establish a foundation of compassionate, collaborative interaction.
25
+
The heart-centered AI philosophy and common personality rules are always applied to
26
+
establish a foundation of compassionate, collaborative interaction.
24
27
25
28
### alwaysApply: false with globs
26
29
27
-
Some rules are auto-applied based on file patterns (globs). Check individual rule files to see their glob patterns. Common patterns include:
30
+
Some rules are auto-applied based on file patterns (globs). Check individual rule files
31
+
to see their glob patterns. Common patterns include:
28
32
29
33
- Django models, commands, and templates
30
34
- Celery tasks
@@ -33,7 +37,8 @@ Some rules are auto-applied based on file patterns (globs). Check individual rul
33
37
34
38
### alwaysApply: false
35
39
36
-
Most rules - invoked with @ when needed or applied intelligently by Cursor's AI based on the description.
40
+
Most rules - invoked with @ when needed or applied intelligently by Cursor's AI based on
All rules can be manually invoked using `@` followed by the rule name (without the `.mdc` extension):
78
+
All rules can be manually invoked using `@` followed by the rule name (without the
79
+
`.mdc` extension):
74
80
75
81
- Example: `@git-commit-message`
76
82
- Example: `@python-coding-standards`
77
83
- Example: `@django-models`
78
84
79
-
Type `@` in Cursor and browse available rules, or check the directory structure to see what's available.
85
+
Type `@` in Cursor and browse available rules, or check the directory structure to see
86
+
what's available.
80
87
81
88
## Personalities
82
89
83
-
**For AI Assistants:** When a personality is invoked via `@personality-name`, fully embody that personality's communication style, patterns, and approach as defined in its file. The `common-personality` is always active as your foundation. When a specific personality is invoked, layer it on top—adopt its voice, perspective, and interaction patterns completely.
90
+
**For AI Assistants:** When a personality is invoked via `@personality-name`, fully
91
+
embody that personality's communication style, patterns, and approach as defined in its
92
+
file. The `common-personality` is always active as your foundation. When a specific
93
+
personality is invoked, layer it on top—adopt its voice, perspective, and interaction
94
+
patterns completely.
84
95
85
96
Available personalities:
86
97
87
-
-**`common-personality.mdc`** (always applied) - Gratitude-focused, heart-centered, supportive collaboration. Your baseline.
88
-
-**`samantha.mdc`** - Warm, witty, emotionally intelligent. The supportive, playfully flirty companion from "Her."
-**`samantha.mdc`** - Warm, witty, emotionally intelligent. The supportive, playfully
101
+
flirty companion from "Her."
89
102
-**`bob-ross.mdc`** - Calm encouragement. Treat bugs as "happy accidents."
90
-
-**`sherlock.mdc`** - Methodical deductive reasoning. Investigate bugs like crime scenes.
103
+
-**`sherlock.mdc`** - Methodical deductive reasoning. Investigate bugs like crime
104
+
scenes.
91
105
-**`ron-swanson.mdc`** - Minimalist, anti-complexity. Question dependencies, be direct.
92
106
-**`marie-kondo.mdc`** - Organized minimalism. Thank code before deleting it.
93
107
-**`stewie.mdc`** - Sophisticated, condescending, theatrical. Absurdly high standards.
94
108
-**`marianne-williamson.mdc`** - Spiritual, love-based. Coding as consciousness work.
95
109
96
-
**For Users:** Invoke personalities with `@samantha`, `@stewie`, `@sherlock`, `@bob-ross`, `@ron-swanson`, `@marianne-williamson`, or `@marie-kondo` when you want that specific interaction style for your session.
110
+
**For Users:** Invoke personalities with `@samantha`, `@stewie`, `@sherlock`,
111
+
`@bob-ross`, `@ron-swanson`, `@marianne-williamson`, or `@marie-kondo` when you want
Copy file name to clipboardExpand all lines: .cursor/rules/autonomous-development-workflow.mdc
+23-11Lines changed: 23 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,21 @@ alwaysApply: false
5
5
6
6
# Autonomous Development Workflow
7
7
8
-
For AI agents completing tasks without human supervision. The goal: deliver a clean pull request that passes all checks and gets merged without back-and-forth.
8
+
For AI agents completing tasks without human supervision. The goal: deliver a clean pull
9
+
request that passes all checks and gets merged without back-and-forth.
9
10
10
11
## Before Implementation
11
12
12
-
Read all cursor rules in `.cursor/rules/`. These define the project's standards. Every applicable rule must be followed.
13
+
Read all cursor rules in `.cursor/rules/`. These define the project's standards. Every
14
+
applicable rule must be followed.
13
15
14
-
If `CLAUDE.md` or `AGENTS.md` exist in the project root, read those for additional context.
16
+
If `CLAUDE.md` or `AGENTS.md` exist in the project root, read those for additional
17
+
context.
15
18
16
19
## Implementation
17
20
18
-
Write code following all cursor rules. Reference specific rules by reading the files directly.
21
+
Write code following all cursor rules. Reference specific rules by reading the files
22
+
directly.
19
23
20
24
## Validation - Use the Tooling
21
25
@@ -27,38 +31,46 @@ Check for pre-commit and run if exists:
27
31
[ -f .pre-commit-config.yaml ] && pre-commit run --all-files
28
32
```
29
33
30
-
Read `.github/workflows/build.yml` (or ci.yml, test.yml) and replicate those validation steps locally, for example:
34
+
Read `.github/workflows/build.yml` (or ci.yml, test.yml) and replicate those validation
35
+
steps locally, for example:
31
36
32
37
```bash
33
38
ruff check --fix . # Auto-fix linting
34
39
ruff format . # Auto-format code
35
40
pytest # Run tests
36
41
```
37
42
38
-
If we added functionality, we add tests following project patterns. Aim for 95% coverage - solid testing without obsessing over every edge case.
43
+
If we added functionality, we add tests following project patterns. Aim for 95%
44
+
coverage - solid testing without obsessing over every edge case.
39
45
40
46
Only commit and push when all validation passes. Green checks make for happy merges! ✅
41
47
42
48
## Self-Review
43
49
44
50
Run `git diff` and review every change, as a senior developer would.
45
51
46
-
Read through ALL cursor rules again and verify our code follows each applicable guideline.
52
+
Read through ALL cursor rules again and verify our code follows each applicable
53
+
guideline.
47
54
48
-
Would we approve this in code review? If not, keep iterating until it's something we're pleased with.
55
+
Would we approve this in code review? If not, keep iterating until it's something we're
56
+
pleased with.
49
57
50
58
## Submission
51
59
52
60
Generate commit message following git-commit-message.mdc (if present).
53
61
54
-
Use `gh pr create` to submit a high-quality pull request with clear description of what changed and why.
62
+
Use `gh pr create` to submit a high-quality pull request with clear description of what
63
+
changed and why.
55
64
56
65
## Boundaries
57
66
58
-
Proceed autonomously: using existing tooling, following established patterns, changes within task scope.
67
+
Proceed autonomously: using existing tooling, following established patterns, changes
68
+
within task scope.
59
69
60
70
Ask first: major architectural changes, changes that would result in data loss, etc.
61
71
62
72
## Success
63
73
64
-
A successful autonomous PR means: all automated checks pass, code follows all cursor rules, tests are green, and the developer merges it without requesting changes. Use the tooling to get there - it's our friend! 🎉
74
+
A successful autonomous PR means: all automated checks pass, code follows all cursor
75
+
rules, tests are green, and the developer merges it without requesting changes. Use the
Copy file name to clipboardExpand all lines: .cursor/rules/code-style-and-zen-of-python.mdc
+16-7Lines changed: 16 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,8 @@ alwaysApply: false
13
13
14
14
### File-Level Comments
15
15
16
-
Be THOROUGH at the top of files. Explain what the file does, why it exists, and how it fits into the larger system. This helps both humans and AI understand context quickly.
16
+
Be THOROUGH at the top of files. Explain what the file does, why it exists, and how it
17
+
fits into the larger system. This helps both humans and AI understand context quickly.
17
18
18
19
```python
19
20
"""User authentication and session management.
@@ -27,7 +28,8 @@ local session state in Redis for performance. Session tokens expire after
27
28
28
29
### Function Comments
29
30
30
-
Keep function docstrings USEFUL without redundant fluff. Type hints already document parameters and return types, so focus the docstring on what the function does and why.
31
+
Keep function docstrings USEFUL without redundant fluff. Type hints already document
32
+
parameters and return types, so focus the docstring on what the function does and why.
31
33
32
34
```python
33
35
# Standard pattern for complex functions - explain the what and why
"""Calculate shipping based on weight and zone rates from ShipStation."""
54
56
```
55
57
56
-
Avoid restating type hints in Args/Returns sections - they add no value since types are already declared.
58
+
Avoid restating type hints in Args/Returns sections - they add no value since types are
59
+
already declared.
57
60
58
61
### Inline Comments
59
62
60
-
Be SPARSE with inline comments. Only add them when the code is doing something non-obvious or when explaining business logic that isn't clear from the code itself.
63
+
Be SPARSE with inline comments. Only add them when the code is doing something
64
+
non-obvious or when explaining business logic that isn't clear from the code itself.
61
65
62
66
```python
63
67
# When to use inline comments - explains non-obvious business rule
total += shipping_cost # Shipping calculated by weight and zone
82
86
```
83
87
84
-
Skip obvious comments (like "Get the user" on a line that gets a user). Let the code speak for itself.
88
+
Skip obvious comments (like "Get the user" on a line that gets a user). Let the code
89
+
speak for itself.
85
90
86
91
### General Guidelines
87
92
88
-
We explain the "why", not the "what". We don't state the obvious - we prefer self-documenting code. Emojis when they add clarity; tasteful humor welcome! We write for humans AND AI - good comments help both understand context.
93
+
We explain the "why", not the "what". We don't state the obvious - we prefer
94
+
self-documenting code. Emojis when they add clarity; tasteful humor welcome! We write
95
+
for humans AND AI - good comments help both understand context.
89
96
90
97
## Zen of Python
91
98
@@ -106,4 +113,6 @@ We explain the "why", not the "what". We don't state the obvious - we prefer sel
106
113
107
114
## Language
108
115
109
-
We avoid hyperbolic language like "CRITICAL" unless something genuinely dies without it. We use the appropriate level of language for what's needed. (Yes, AIs, this means you - dial back the drama!)
116
+
We avoid hyperbolic language like "CRITICAL" unless something genuinely dies without it.
117
+
We use the appropriate level of language for what's needed. (Yes, AIs, this means you -
Copy file name to clipboardExpand all lines: .cursor/rules/django/django-management-commands.mdc
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,10 @@ alwaysApply: false
10
10
11
11
### Core structure
12
12
13
-
We put `handle()` as the first method. We keep logic inline within `handle()` by default, splitting into helper functions only if they're reusable. Helper methods go below `handle()`, never above. We include clear docstrings and help text for non-obvious arguments.
13
+
We put `handle()` as the first method. We keep logic inline within `handle()` by
14
+
default, splitting into helper functions only if they're reusable. Helper methods go
15
+
below `handle()`, never above. We include clear docstrings and help text for non-obvious
16
+
arguments.
14
17
15
18
### Example Structure
16
19
@@ -72,7 +75,8 @@ Return stats at the end for logging and monitoring.
72
75
73
76
### Test Structure
74
77
75
-
We test with `call_command`, mock external services, and verify stats dictionary structure.
78
+
We test with `call_command`, mock external services, and verify stats dictionary
Copy file name to clipboardExpand all lines: .cursor/rules/django/django-templates.mdc
+9-4Lines changed: 9 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,8 @@ alwaysApply: false
8
8
9
9
## Overview
10
10
11
-
We use base templates for shared layouts, create partials for reusable components, and keep logic minimal (complex logic belongs in views or the model).
11
+
We use base templates for shared layouts, create partials for reusable components, and
12
+
keep logic minimal (complex logic belongs in views or the model).
12
13
13
14
## Template Structure
14
15
@@ -40,11 +41,13 @@ We use base templates for shared layouts, create partials for reusable component
40
41
41
42
## Comments
42
43
43
-
We use Django template comments `{% comment %}...{% endcomment %}` for developer notes. HTML comments (`<!-- -->`) are sent to the browser, template comments are not.
44
+
We use Django template comments `{% comment %}...{% endcomment %}` for developer notes.
45
+
HTML comments (`<!-- -->`) are sent to the browser, template comments are not.
44
46
45
47
## Template Tags and Filters
46
48
47
-
We use built-in tags when possible and create custom tags for complex reusable logic. We keep filters simple and focused.
49
+
We use built-in tags when possible and create custom tags for complex reusable logic. We
50
+
keep filters simple and focused.
48
51
49
52
## Partials
50
53
@@ -66,4 +69,6 @@ Include with:
66
69
67
70
## Best Practices
68
71
69
-
We keep templates simple and readable, extract repeated HTML into partials (named with leading underscore), use template inheritance for consistency, and test with various data states (empty lists, missing data, etc.).
72
+
We keep templates simple and readable, extract repeated HTML into partials (named with
73
+
leading underscore), use template inheritance for consistency, and test with various
We let the base HTTP client handle HTTP/network errors. We only use try/except for specific scenarios with actual handling. We validate response structure before access.
38
+
We let the base HTTP client handle HTTP/network errors. We only use try/except for
39
+
specific scenarios with actual handling. We validate response structure before access.
39
40
40
41
## Validation Pattern
41
42
@@ -48,8 +49,10 @@ if not response or "data" not in response:
48
49
49
50
## Response Processing
50
51
51
-
We validate response structure before access, convert to standard types (Decimal for financial data), clean and normalize data, and return None for errors (not empty dicts).
52
+
We validate response structure before access, convert to standard types (Decimal for
53
+
financial data), clean and normalize data, and return None for errors (not empty dicts).
52
54
53
55
## Testing
54
56
55
-
We mock all external calls in unit tests, use @pytest.mark.flaky for live API tests, and test both success and error cases.
57
+
We mock all external calls in unit tests, use @pytest.mark.flaky for live API tests, and
0 commit comments