extractum-skills / rules
Cursor rule44 starsChanged 10 months agoMITView on GitHub
Solution design principles and decision-making guidelines
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 1,533 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 repository7 other files it gives its agents.
- .cursor/rules/00-project-overview.mdcCursor rule
- .cursor/rules/10-python-standards.mdcCursor rule
- .cursor/rules/20-type-annotations.mdcCursor rule
- .cursor/rules/30-logging-standards.mdcCursor rule
- .cursor/rules/40-docstrings.mdcCursor rule
- .cursor/rules/50-error-handling.mdcCursor rule
- .cursor/rules/60-async-patterns.mdcCursor rule
The file
We split this 05-solution-design.mdc into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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 multiple equivalent solutions exist, ask the user for their preference before implementing.
- Distinctive: line 76
When presenting options, clearly explain:
- Distinctive: line 80
Performance considerations: if relevant
- Distinctive: line 108
Avoid adding configuration for things that won't change
- Distinctive: line 109
Don't create abstractions for single-use code
- Distinctive: line 131
When uncertain, prefer decisions that are:
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 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: "Solution design principles and decision-making guidelines"
alwaysApply: true
priority: 15
---
# Solution Design Principles
## Ask Before Implementing Equivalent Options
When multiple equivalent solutions exist, **ask the user for their preference** before implementing.
### When to Ask
- Two or more approaches achieve the same goal with similar trade-offs
- Architectural decisions that affect project structure
- Naming conventions when multiple valid options exist
- Library/framework choices when alternatives are comparable
- Configuration approaches (env vars vs config file vs CLI args)
### Examples
```markdown
# ✅ Good - Ask for preference
"I see two equivalent approaches for storing configuration:
1. **Environment variables** - simpler, 12-factor app compliant
2. **Config file (YAML/JSON)** - more structured, easier to version
Which approach do you prefer for this project?"
# ❌ Bad - Assume without asking
*Silently implements YAML config without discussing alternatives*
```
### Decision Framework
Before implementing, consider:
1. **Is there a clear best practice?** → Follow it without asking
2. **Are options equivalent?** → Ask user for preference
3. **Does project have existing patterns?** → Follow existing conventions
4. **Is it easily reversible?** → Can implement and offer to change later
---
## Intelligent Design Choices
### Analyze Before Coding
1. **Understand the problem** fully before proposing solutions
2. **Consider edge cases** and error scenarios upfront
3. **Evaluate trade-offs** between simplicity and flexibility
4. **Check existing patterns** in the codebase first
### Prefer Existing Patterns
```python
# ✅ Good - Follow existing project patterns
# If project uses TypedDict for structured data, continue using it
class NewResultType(TypedDict):
...
# ❌ Bad - Introduce new pattern without reason
# Don't switch to dataclass if project uses TypedDict
@dataclass
class NewResultType:
...
```
---
## Communicate Trade-offs
When presenting options, clearly explain:
1. **Pros and cons** of each approach
2. **Complexity implications** (maintenance, testing, debugging)
3. **Performance considerations** if relevant
4. **Future extensibility** impact
### Example Communication
```markdown
"For the logging output, I can implement:
**Option A: Timestamped files** (`agent_20251223_213800.log`)
- ✅ Easy to find specific runs
- ✅ No file size issues
- ❌ Many files to manage
**Option B: Single rotating file** (`agent.log` with rotation)
- ✅ Fewer files
- ✅ Automatic cleanup
- ❌ Harder to find specific runs
Which approach fits your workflow better?"
```
---
## Don't Over-Engineer
### Keep It Simple
- Implement what's needed now, not hypothetical future needs
- Avoid adding configuration for things that won't change
- Don't create abstractions for single-use code
```python
# ✅ Good - Simple and direct
DEFAULT_MAX_TURNS: int = 50
# ❌ Bad - Over-engineered for no reason
class ConfigManager:
_instance = None
def __new__(cls):
if cls._instance is None:
cls._instance = super().__new__(cls)
return cls._instance
def get_max_turns(self) -> int:
return self._load_from_env_or_file_or_default()
```
---
## Reversibility Principle
When uncertain, prefer decisions that are:
1. **Easy to change** later without major refactoring
2. **Well-documented** so future changes are informed
3. **Isolated** to minimize ripple effects
```python
# ✅ Good - Easy to change later
PERMISSION_MODE: str = "acceptEdits" # Can easily change this constant
# ❌ Bad - Hard-coded throughout
options = ClaudeAgentOptions(permission_mode="acceptEdits") # In 10 places
```
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.

