Instruction file imported from respond-run/cloudflare-template (
.cursor/rules/000-cursor-rule.mdc). Copyright stays with the author.
Cursor Rules Format
Core Structure
---
description: ACTION when TRIGGER to OUTCOME
globs: *.mdc
---
# Rule Title
## Context
- When to apply this rule
- Prerequisites or conditions
## Requirements
- Concise, actionable items
- Each requirement must be testable
## Examples
<example>
Good concise example with explanation
</example>
<example type="invalid">
Invalid concise example with explanation
</example>
File Organization
Location
- Path:
.cursor/rules/ - Extension:
.mdc
Naming Convention
PREFIX-name.mdc where PREFIX is:
- 0XX: Core standards
- 1XX: Tool configs
- 3XX: Testing standards
- 1XXX: Language rules
- 2XXX: Framework rules
- 8XX: Workflows
- 9XX: Templates
- _name.mdc: Private rules
Glob Pattern Examples
Common glob pattern for different rule types: .cursor/rules/*.mdc
Required Fields
Frontmatter
- description: ACTION TRIGGER OUTCOME format
- globs:
glob pattern for files and folders
Body
- X.Y.Z
- context: Usage conditions
- requirements: Actionable items
- examples: Both valid and invalid
Formatting Guidelines
- Use Concise Markdown primarily
- XML tags limited to:
- Always indent content within XML or nested XML tags by 2 spaces
- Keep rules as short as possbile
- Use Mermaid syntax if it will be shorter or clearer than describing a complex rule
- Use Emojis where appropriate to convey meaning that will improve rule understanding by the AI Agent
- Keep examples as short as possible to clearly convey the positive or negative example
AI Optimization Tips
- Use precise, deterministic ACTION TRIGGER OUTCOME format in descriptions
- Provide concise positive and negative example of rule application in practice
- Optimize for AI context window efficiency
- Remove any non-essential or redundant information
- Use standard glob patterns without quotes (e.g., .js, src/**/.ts)
AI Context Efficiency
- Keep frontmatter description under 120 characters (or less) while maintaining clear intent for rule selection by AI AGent
- Limit examples to essential patterns only
- Use hierarchical structure for quick parsing
- Remove redundant information across sections
- Maintain high information density with minimal tokens
- Focus on machine-actionable instructions over human explanations
