Instruction file imported from Aaronontheweb/dotnet-cursor-rules (
.cursor/rules/meta.mdc). Copyright stays with the author.
description: A meta-rule for using Cursor to update *.mdc file in this repository. globs: *.mdc
Cursor Rules
This document outlines the meta-rules for cursor operations in this repository.
Line Ending & Formatting Rules
-
Line Endings
- Don't modify existing line endings
- Preserve CRLF/LF as found in the original file
-
Whitespace
- Preserve trailing whitespace where it exists
- Maintain existing indentation style (spaces vs tabs)
- Keep line length consistent with existing code
File Handling
-
MDC Files
- Always commit changes to
*.mdcfiles directly - Ensure changes to
*.mdcfiles are synchronized with their implementation - Maintain consistent formatting within MDC files
- Prefer modifying existing files over creating new ones unless explicitly requested
- When adding new content, first check if it fits within an existing rule file
- Always commit changes to
-
File Creation
- Only create new rule files when:
- Explicitly requested by the user
- The content doesn't logically fit in any existing rule file
- Creating a new file would significantly improve organization and clarity
- Document the rationale for creating new files in their README.md
- Only create new rule files when:
Code Style & Structure
-
Formatting
- Preserve existing code formatting patterns
- Maintain consistent naming conventions
- Keep indentation consistent with file style
-
Organization
- Keep file structure consistent
- Don't move files without updating all references
- Maintain existing import/include order
Rule Content
- Examples
- Always include "do" and "don't" examples when showing specific changes to files or syntax
- Include helpful comments that explain why an example is a "do" or a "don't"
Documentation
- README.md
- Each
*.mdcfile is lumped into a folder with aREADME.mdfile explaining what the rule does and when it's used.
- Each