prompt-decorators / rules
Cursor rule44 starsChanged 20 months agoApache-2.0View on GitHub
MAINTAIN development discipline WHEN implementing changes TO preserve codebase integrity
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,157 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- .cursor/rules/000-cursor-rules.mdcCursor rule
- .cursor/rules/001-emoji-communication.mdcCursor rule
- .cursor/rules/050-careful-code-modification.mdcCursor rule
- .cursor/rules/060-coding-patterns.mdcCursor rule
- .cursor/rules/400-md-docs.mdcCursor rule
- .cursor/rules/900-software-dev-decorators.mdcCursor rule
The file
We split this 070-workflow-preferences.mdc into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
When implementing new features
- Distinctive: line 12
When fixing bugs or addressing issues
- Distinctive: line 13
When refactoring or improving existing code
- Distinctive: line 14
When reviewing code changes
- Distinctive: line 18
Do not modify code unrelated to the assigned task
- Distinctive: line 19
Write thorough tests for all major functionality
- Distinctive: line 22
Consider side effects before implementing changes
- Distinctive: line 24
Document significant architectural decisions
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: MAINTAIN development discipline WHEN implementing changes TO preserve codebase integrity
globs: **/*.py
---
# Coding Workflow Preferences
<version>1.0.0</version>
## Context
- When implementing new features
- When fixing bugs or addressing issues
- When refactoring or improving existing code
- When reviewing code changes
## Requirements
- Focus exclusively on code areas relevant to the current task
- Do not modify code unrelated to the assigned task
- Write thorough tests for all major functionality
- Preserve existing architectural patterns unless explicitly instructed otherwise
- Analyze potential impacts of changes on other methods and code areas
- Consider side effects before implementing changes
- Maintain backward compatibility when possible
- Document significant architectural decisions
## Examples
<example>
# Good: Focused change with proper testing
# Task: Fix validation in user registration
# 1. Only modify the relevant validation function
def validate_user_input(user_data):
"""Validate user registration data with fixed email validation."""
if not is_valid_email(user_data.get('email')):
raise ValidationError("Invalid email format")
# Other existing validation logic...
# 2. Add thorough tests for the fix
def test_validate_user_input_with_invalid_email():
"""Test that invalid emails are properly rejected."""
with pytest.raises(ValidationError):
validate_user_input({'email': 'invalid-email'})
def test_validate_user_input_with_valid_email():
"""Test that valid emails pass validation."""
result = validate_user_input({'email': 'user@example.com'})
assert result is True
</example>
<example type="invalid">
# Bad: Unfocused changes beyond task scope
# Task: Fix validation in user registration
# 1. Modifying unrelated authentication system
def authenticate_user(username, password):
"""Authenticate user with new token-based system."""
# Completely rewriting authentication when task was only about validation
token = generate_jwt_token(username, password)
return {'authenticated': True, 'token': token}
# 2. Changing database schema without tests
def update_user_schema():
"""Update user table with new fields."""
# Adding schema changes unrelated to the validation fix
db.execute("ALTER TABLE users ADD COLUMN last_login TIMESTAMP")
</example>
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

