R015 FrontmatterFields
- Applies to
- Cursor rules (.mdc)
- Severity
- Warning (−4 per finding, max −30)
- Summary
- A Cursor rule's frontmatter is missing, has unknown keys, or has an invalid alwaysApply.
- Flags
- Cursor .mdc rules only: no frontmatter; keys other than description, globs, alwaysApply; alwaysApply not true or false. Manual-mode rules are R016.
- Measured false-positive rate
- 0% (0 of 10) and 0% (0 of 10), two judges, ruleset v2; rule unchanged since. Methodology
Before
---
descriptoin: Formatting rules for C# files
globs: **/*.cs
alwaysApply: maybe
---
- Use tabs.
After
---
description: Formatting rules for C# files
globs: **/*.cs
alwaysApply: false
---
- Use tabs.
Fix
- Remove the key or fix its spelling.
- Set alwaysApply: true or alwaysApply: false.
Cursor application modes
Cursor decides when to include a rule from three frontmatter fields: alwaysApply, globs, and description.
| Mode | Frontmatter | Included | Finding |
|---|---|---|---|
| Always Apply | alwaysApply: true |
In every chat session | No finding |
| Apply Intelligently | description set, alwaysApply: false |
When the agent judges the description relevant | No finding |
| Apply to Specific Files | globs set, alwaysApply: false |
When a file in context matches a glob | No finding |
| Apply Manually | alwaysApply: false, no description or globs |
Only when @-mentioned in chat | R016 (Info) |
Source: Cursor rules documentation.