Skip to main content

Overview

Cursor uses a unique .mdc format: Markdown with YAML frontmatter that supports conditional rules via glob patterns. Drevon’s Cursor adapter is the most complex, generating multiple rule files from your config.

Output Files

.cursor/rules/
├── core.mdc           # Identity, instructions, agent extras
├── memory.mdc         # Memory protocol
├── skills.mdc         # Installed skills
└── *.mdc              # Per-instruction files (if using globs)

The MDC Format

Each .mdc file contains YAML frontmatter with Cursor-specific fields:
---
description: Core workspace rules and identity
globs:
alwaysApply: true
---

# Drevon Core Rules

## Identity & Operating Mode
...
FieldTypeDescription
descriptionstringWhat this rule file covers
globsstring | string[]File patterns that trigger this rule
alwaysApplybooleanWhether to apply to all files

Glob-Targeted Instructions

Drevon’s killer feature for Cursor: instructions with globs become separate rule files that only activate when matching files are open.
{
  "instructions": [
    {
      "id": "typescript-rules",
      "title": "TypeScript Standards",
      "content": "Use strict TypeScript. Prefer interfaces over types.",
      "globs": ["**/*.ts", "**/*.tsx"],
      "alwaysApply": false
    },
    {
      "id": "css-rules",
      "title": "Styling Guidelines",
      "content": "Use Tailwind utility classes. Never use inline styles.",
      "globs": ["**/*.css", "**/*.tsx"],
      "alwaysApply": false
    }
  ]
}
This generates:
.cursor/rules/
├── core.mdc
├── memory.mdc
├── skills.mdc
├── typescript-rules.mdc    # Only active in .ts/.tsx files
└── css-rules.mdc           # Only active in .css/.tsx files
Use glob-targeted instructions to give Cursor context-specific guidance. For example, different rules for frontend vs backend files, or special handling for test files.

Enabling

drevon add-agent cursor

Agent-Specific Settings

{
  "agents": {
    "cursor": {
      "enabled": true,
      "extraInstructions": [
        "When generating UI code, always use shadcn/ui components",
        "Follow the project's existing naming conventions"
      ]
    }
  }
}

Requirements

  • Cursor editor installed
  • .cursor/rules/ directory (Drevon creates this)