Frontmatter
Validate YAML metadata keys with front directives, including presence, allow-lists, dates, placeholders, patterns, and closure.
Bishop: "I may be synthetic, but I'm not stupid." Metadata deserves the same treatment: small rules, clear boundaries, no mystery cargo in the hold.
front <key> checks one top-level key; bare front strict closes the set. No end tag.
<!-- mdv: front status required in=[draft, review, published] -->
<!-- mdv: front date date=iso -->
<!-- mdv: front strict -->---
status: review
date: 2026-06-28
---
# Mission logWhat it catches
---
status: shipped
date: last-tuesday
author: dana
---
# Mission logmission.md
Shape: fix the form; this does not change what the document claims
4 error Unknown frontmatter key "author" unexpected-frontmatter-key
help: Move what it says into the declared key it belongs to
✖ 1 problem (1 error, 0 warnings)
mdv explain <rule-id> for detailsAn empty or missing required key is missing-frontmatter-key; a duplicate key warns and the first value wins.
Rules
| Rule | Checks |
|---|---|
required | key present |
in=[a, b] | one of the options |
date=iso | ISO-shaped (YYYY-MM-DD or timestamp), not calendar-valid |
none=@placeholders | no TODO or TBD |
pattern=/ | value matches |
front strict | no undeclared keys |
Top-level keys only.
Severity overrides
Raise, downgrade or turn off a rule's diagnostics per directive — warn=, error=, off= — without deleting the rule.
Evidence lists
Require list items to be falsifiable claims or carry a resolvable source, with items.all=@evidence/specific, items.all=@evidence/cited, and items.words.min.