Skip to content

DECLARATIVE-YAML-05: Toggle strict vs open frontmatter

Whether unlisted frontmatter keys are rejected (strict) or passed through (open).

Builds on: DECLARATIVE-YAML-04: Make fields optional, defaulted, or nullable

The declarative YAML artifact, verbatim — no code required.

frontmatter:
strict: true # unknown keys become a finding (z.strictObject)
fields:
type: { const: task }
id: { type: string }
status: { enum: [open/ready, closed/done] }
  • compileFrontmatter(): strict -> z.strictObject vs z.object