56 lines
1.5 KiB
Plaintext
56 lines
1.5 KiB
Plaintext
# Cursor Rules - Essential Guidelines
|
|
|
|
**⚠️ IMPORTANT: This rule is loaded by agent_workflow.mdc. Do not read directly.**
|
|
|
|
## Purpose
|
|
|
|
This file provides essential rule formatting guidelines for Cursor rules. For complete workflow guidance, see [agent_workflow.mdc](mdc:.cursor/rules/agent_workflow.mdc).
|
|
|
|
## Required Rule Structure
|
|
|
|
```markdown
|
|
---
|
|
description: Clear, one-line description of what the rule enforces
|
|
globs: path/to/files/*.ext, other/path/**/*
|
|
alwaysApply: boolean
|
|
---
|
|
```
|
|
|
|
## Rule Content Guidelines
|
|
|
|
- Start with a concise, high-level summary
|
|
- List clear, actionable requirements
|
|
- Provide correct implementation examples
|
|
- Reference real code from the codebase when possible
|
|
- Keep rules focused and practical
|
|
|
|
## Code Examples
|
|
|
|
- Use fenced code blocks with correct language identifier
|
|
- Always provide both correct (DO) and incorrect (DON'T) examples
|
|
- Reference real code from the codebase when possible
|
|
|
|
```python
|
|
# ✅ DO: Show good examples
|
|
def good_example():
|
|
return True
|
|
|
|
# ❌ DON'T: Show anti-patterns
|
|
def bad_example():
|
|
return False
|
|
```
|
|
|
|
## File References
|
|
|
|
- **Rule References**: Use `[filename](mdc:path/to/file)` for rule files
|
|
- **Code References**: Use `[filename](mdc:path/to/file)` for source files
|
|
- **Cross-References**: Link to related rules to avoid duplication
|
|
|
|
## Keep It Simple
|
|
|
|
- Focus on practical implementation patterns
|
|
- Avoid complex hierarchies and workflows
|
|
- Use clear, actionable language
|
|
- Reference the comprehensive workflow in [agent_workflow.mdc](mdc:.cursor/rules/agent_workflow.mdc)
|
|
|