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 log

What it catches

---
status: shipped
date: last-tuesday
author: dana
---

# Mission log
mission.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 details

An empty or missing required key is missing-frontmatter-key; a duplicate key warns and the first value wins.

Rules

RuleChecks
requiredkey present
in=[a, b]one of the options
date=isoISO-shaped (YYYY-MM-DD or timestamp), not calendar-valid
none=@placeholdersno TODO or TBD
pattern=/regex/value matches
front strictno undeclared keys

Top-level keys only.

On this page