Skip to content

REAL-WORLD-SCHEMAS-02: Type the ADR frontmatter

Layering frontmatter typing onto the ADR: an enum status and a format-checked required date.

Builds on: REAL-WORLD-SCHEMAS-01: ADR: require the four sections in order

The declarative YAML artifact, verbatim — no code required.

frontmatter:
strict: true
fields:
status:
enum: [proposed, accepted, superseded, deprecated]
date:
type: string
format: date
# (body: the strict Status/Context/Decision/Consequences sections from 01)
  • declarative frontmatter.fields: enum -> frontmatter/enum; format: date -> frontmatter/type
  • strict: true rejects unknown keys -> frontmatter/unknown-key (z.strictObject under the hood)