[ ABORT TO HUD ]
SEQ. 1

Project Rules & MDC Files

📋 Cursor Rules & Configuration 20 min 450 BASE XP

Teaching the AI Your Standards

Cursor Rules are persistent instructions that tell the AI how to behave in your specific project. They're the difference between generic AI output and code that matches your team's exact conventions.

Legacy vs Modern Format

FormatLocationCapabilities
.cursorrules (legacy)Project rootSingle file, always loaded
.cursor/rules/*.mdc (modern).cursor/rules/ directoryYAML frontmatter, glob patterns, conditional loading

MDC File Structure

---
description: Enforce TypeScript best practices for components
globs: src/components/**
alwaysApply: false
---
# Component Standards
- Use functional components exclusively
- Prefer named exports over default exports
- Always define a Props interface
- Use React.FC<Props> type annotation

Rule Categories

  • Always-On: Core tech stack, universal standards (set alwaysApply: true)
  • Auto-Attached: Triggered by file path via globs (e.g., frontend vs backend rules)
  • Manual: One-off instructions for specific tasks
Token Tax Warning: Every alwaysApply: true rule consumes context window space in every interaction. Keep foundational rules under 200-300 words and modularize into separate files.
SYNAPSE VERIFICATION
QUERY 1 // 3
What is the modern format for Cursor rules?
.cursorrules file in root
.cursor/rules/*.mdc files with YAML frontmatter
cursor.config.json
.vscode/settings.json
Watch: 139x Rust Speedup
Project Rules & MDC Files | Cursor Rules & Configuration — Cursor Academy