Why it matters
The rules only work if Cursor parses their frontmatter. As CLAUDE.md puts it, "changing a glob changes when the rule fires". The validator doesn't parse that frontmatter as YAML: it greps a sed range that can run past the header, and it never looks at globs or alwaysApply.
Evidence
validate.yml:50, :77, :100: sed -n '/^---$/,/^---$/p' prints every ----delimited range in the file, not just the leading frontmatter. A Markdown horizontal rule (---) in a skill or rule body can satisfy a missing required key, or confuse the skill-name check.
validate.yml:89-114 (rules): checks only description: and standards-version:. alwaysApply and globs are never read, so a typo such as alwaysapply: false or a malformed glob passes.
- All 9
rules/*.mdc write globs as a YAML list:
Cursor's documented .mdc form is a comma-separated string (globs: **/*.py). There are community reports of list-valued globs not triggering auto-attach. Not verified in Cursor for this repo. Please confirm in a Cursor session before changing anything.
Suggested approach
- Replace the sed/grep checks with a small Python step that takes only the first frontmatter block (
text.split('---', 2)[1]), parses it with yaml.safe_load, and asserts the required keys and types: alwaysApply is a bool, and globs is a str or list of str matching the shape Cursor accepts.
- Verify glob triggering in Cursor: open a
.py file and confirm that prefer-data-over-ops-in-loops attaches. If lists don't work, convert all 9 rules and have the validator enforce the string form.
Done when
Why it matters
The rules only work if Cursor parses their frontmatter. As
CLAUDE.mdputs it, "changing a glob changes when the rule fires". The validator doesn't parse that frontmatter as YAML: it greps asedrange that can run past the header, and it never looks atglobsoralwaysApply.Evidence
validate.yml:50,:77,:100:sed -n '/^---$/,/^---$/p'prints every----delimited range in the file, not just the leading frontmatter. A Markdown horizontal rule (---) in a skill or rule body can satisfy a missing required key, or confuse the skill-name check.validate.yml:89-114(rules): checks onlydescription:andstandards-version:.alwaysApplyandglobsare never read, so a typo such asalwaysapply: falseor a malformed glob passes.rules/*.mdcwriteglobsas a YAML list:.mdcform is a comma-separated string (globs: **/*.py). There are community reports of list-valued globs not triggering auto-attach. Not verified in Cursor for this repo. Please confirm in a Cursor session before changing anything.Suggested approach
text.split('---', 2)[1]), parses it withyaml.safe_load, and asserts the required keys and types:alwaysApplyis a bool, andglobsis a str or list of str matching the shape Cursor accepts..pyfile and confirm thatprefer-data-over-ops-in-loopsattaches. If lists don't work, convert all 9 rules and have the validator enforce the string form.Done when
---no longer masks a missing key.globsandalwaysApplyare validated.CONTRIBUTING.md.