← anatomy · cross-cutting rules · frontmatter
04 · CROSS-CUTTING RULES

Frontmatter.

YAML block — every page in wiki/

The eight fields every page carries, plus a few type-specific extras. Frontmatter is the machine-readable contract that lets lint.py and check-drift.py notice when pages drift from their sources.

--- type incident name 2026-03-14 checkout latency status reviewed owner payments-team sources [raw/postmortems/…] source_hashes {…: <sha256>} # auto tags [latency, database] last_updated 2026-04-26 + type-specific fields (date, severity, services, …) ---

Eight required fields. Type-specific extras follow the dashed line.

The eight required fields

Type-specific extras

What it looks like in a real file

wiki/incidents/2026-03-14-checkout.mdspecimen · frontmatter only
---
type: incident
name: 2026-03-14 checkout latency spike
date: 2026-03-14
severity: SEV2
duration_minutes: 47
status: reviewed
owner: payments-team
services: [checkout-api, payments-db]
root_causes: [connection-pool-exhaustion]
sources:
  - raw/postmortems/2026-03-14-checkout.md
source_hashes:                                       # NEVER hand-edit
  raw/postmortems/2026-03-14-checkout.md: <sha256>     # run tools/check-drift.py --update
tags: [latency, database, capacity]
last_updated: 2026-04-26
---

Rules

  1. All eight required fields appear on every page, in any order. Missing fields fail lint.
  2. source_hashes is managed by tooling — after every ingest, run tools/check-drift.py --update.
  3. Reuse existing tags before inventing new ones. The index is the canonical tag vocabulary.
  4. Unknown owner is unknown, not blank. The wiki tracks unknowns explicitly so they don't get forgotten.
  5. Frontmatter lists (e.g. services: [checkout-api]) resolve as wiki-links — the basename must match a real page or a stub.