aboutsummaryrefslogtreecommitdiff
path: root/.ai/scripts/flashcard-sync
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-27 13:02:19 -0500
committerCraig Jennings <c@cjennings.net>2026-07-27 13:02:19 -0500
commit0adcb1afcf64a4638f110a3ab0c616c48d86ba4f (patch)
tree461ffdb509408d0a5298fd986573bad0ab677cf2 /.ai/scripts/flashcard-sync
parent6c1ea8bbc3775fe7c481f41b4f30e0c0110a9339 (diff)
downloadrulesets-0adcb1afcf64a4638f110a3ab0c616c48d86ba4f.tar.gz
rulesets-0adcb1afcf64a4638f110a3ab0c616c48d86ba4f.zip
fix(rules): honor declared file-type scopes with paths frontmatter
Three rules already declared a narrow scope. todo-format and org-tables name org files, emacs names elisp. But they declared it in an "Applies to:" line, which is prose. Claude Code scopes a rule by a paths field in YAML frontmatter. None of them had one, so all three loaded into every session in every project regardless of what their own first line said. That's 5,896 words of a 25,386-word rules surface, resident whether or not the session ever opened an org or elisp file. They now carry the frontmatter. The prose line stays, because it's what a human reads. The frontmatter is what the loader reads. Keeping both means they can disagree, so lint.sh now warns when a rule names a concrete extension in prose without matching frontmatter. That check flags exactly these three and nothing else. The heading check needed teaching too. It read line 1 and expected a Markdown heading, which frontmatter displaces. It now skips a leading frontmatter block and the blank line after it. A file with no heading and no frontmatter still warns. I haven't confirmed that paths frontmatter applies to user-level rules rather than project-level ones only. The docs describe it as a property of rules files without drawing that distinction. If it turns out to be project-only the frontmatter is inert and the rules load as before, so the downside is nothing. I'll check with /context next session.
Diffstat (limited to '.ai/scripts/flashcard-sync')
0 files changed, 0 insertions, 0 deletions