frontmatter-guard
Scans and repairs YAML frontmatter in markdown brain pages, catching malformed metadata like missing delimiters, nested quotes, and slug mismatches before files sync, and guides safe fixes with backup
What it does
Validate and auto-repair YAML frontmatter on brain pages. Catches malformed pages before they enter the brain (missing closing ---, nested quotes, slug mismatches, null bytes, empty frontmatter, YAML parse failures), explains files sync holds instead of importing, and drives the previewed `gbrain repair frontmatter` fix. Wraps the `gbrain frontmatter` CLI for agent-driven workflows.
Quality judgment
Exceptionally thorough: covers validation classes, hold records, repair flows, prevention, failure modes, and anti-patterns with concrete commands and output envelopes. Trigger section is thin (five literal phrases, no contextual triggers), and the doc is long enough that some sections (prevention, holds) could be split, but content quality is excellent.