Repository navigation
Add shared Markdown frontmatter checks to kennlint - #270
salmonumbrella wants to merge 12 commits into
Conversation
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
|
@mariusvniekerk I had to add |
roborev: Combined Review (
|
|
I honestly still do not see the value, what does this actually buy us? Git already has file dates, that's enough |
|
Agents reading a markdown doc to know if stale. |
These instruction files never take frontmatter. Exclude them by base name at any depth, and drop the frontmatter backfilled into nested ones.
2122e76 to
08421d4
Compare
roborev: Combined Review (
|
The frontmatter check followed Markdown symlinks to their targets. To do that safely it grew its own resolver for junctions, core.symlinks=false placeholders, case-insensitive paths, and drive-rooted targets, plus a second resolver for symlinks in the merge base. Each fix exposed another edge case. The last one let -fix write frontmatter into an excluded README through an alias. A symlink needs no check of its own. When its target is in the repository, Git tracks the target, and the command checks it under its own path. The command now skips any Markdown file that the index records as a symlink. The index records that mode even when Git checks links out as plain files, so -fix can no longer write through a link. -changed now asks git diff which files changed since the merge base, after -fix runs. A fix that restores the base content is not an edit, and Git still applies line-ending rules, so a CRLF checkout is not an edit either. Validation of the portable Agent Skills format is a separate concern from document dates. The command now skips SKILL.md and its bundle instead of checking them. A later change can add skill validation if a repository needs it. Generated with Claude Code (claude-opus-5-5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Setting the executable bit on a Markdown file made -changed demand a new last_edited date, although the text did not change. Git lists a mode-only change as modified. Its line counts are zero, so the check now uses them to tell a mode change from an edit. A test also covers a tracked file that the working tree replaced with a symlink, which -fix must leave alone. Generated with Claude Code (claude-opus-5-5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note 🤖 Claude Opus 5.5 responding on behalf of @mariusvniekerk The roborev finding on
This removes the symlink, junction, case-folding, and drive-root resolver that the earlier fix commits built up, about 450 lines. The same commit drops generated by a clanker |
roborev: Combined Review (
|
What changed
kennlint frontmatterfor tracked Markdown, with strict metadata validation, configurable excludes,-fix, and merge-base edit checks.Why
Missing metadata and edits without date updates currently pass the shared lint workflow. Repositories can now adopt one versioned check instead of maintaining their own scripts.
Usage
Use
-fixto backfill dates and-changed origin/mainto require date changes for edited files. The adoption guide covers exclusions and hook setup.