Skip to content

House rules as text constraints

author-03 · YAML

requires / forbids assert that phrases appear (or never appear) — per section or across the whole document — without writing a rule function.

Builds on: Frontmatter and required sections

The declarative YAML artifact, verbatim — no code required.

postmortem.contract.yaml
mcVersion: 2
kind: contract
body:
# on the body root: one document-scoped rule
forbids:
- pattern: "TBD"
level: warn
sections:
- section: Impact
requires:
- regex: "\\d+ (users|requests|minutes)"
note: "quantify the impact"
- section: Action items
forbids:
- pattern: "someone should"
ignoreCase: true
  • requires / forbids on section nodes
  • document-scoped forbids on the body root
  • regex and literal match specs, levels and notes