Documentation: .claude/rules/ frontmatter format incorrect - globs works, paths with quotes/YAML list does not
Summary
The documentation for .claude/rules/ frontmatter is incorrect or incomplete. After extensive testing, the documented paths: format does not work in several configurations, while the undocumented globs: format works reliably.
Environment
- Claude Code CLI
- WSL2 (Linux on Windows)
- Project with
.claude/rules/directory containing multiple rule files
Testing Methodology
Created multiple test files with different frontmatter formats and checked /memory output:
| Format | Loads? |
|--------|--------|
| No frontmatter (unconditional) | YES |
| globs: "**/*.cs" | YES |
| paths: **/*.cs (unquoted) | YES |
| paths: "**/*.cs" (quoted) | NO |
| paths: + YAML list | NO |
Expected Behavior
Based on documentation and GitHub issues, this should work:
---
paths:
- "**/*.cs"
- "**/Controllers/**"
---
Actual Behavior
Only these formats work:
---
globs: **/*.cs, **/Controllers/**
---
Impact
Users following the documentation will have non-functional path-scoped rules with no error messages indicating why rules are not loading. This is a silent failure that is very difficult to debug.
Suggested Fix
- Update documentation to show the working format (
globs:) - Or fix the parser to support the documented
paths:formats
Workaround
Use globs: with comma-separated unquoted patterns:
---
globs: pattern1, pattern2, pattern3
---This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗