Skip to content

Author contracts in YAML

Each example builds on the one before it — read the group in order, or jump to the one you need. Every shipped artifact is regression-checked against the real CLI and library output.

  1. Frontmatter and required sections — A complete contract, no code: typed frontmatter fields plus the sections every decision record must carry.
  2. Typed tables and checklists — Content leaves put shape requirements inside a section: a table with named, schema-checked columns and a checklist with a minimum length.
  3. House rules as text constraintsrequires / forbids assert that phrases appear (or never appear) — per section or across the whole document — without writing a rule function.
  4. Headings that repeat: changelogs — A counted slot lets one heading legitimately recur as peers — with minContains / maxContains occurrence bounds — instead of tripping the duplicate-section rule.
  5. Route a whole tree with one config — A kind: config document maps globs to contracts — by name, by path, or inline — so validating an entire docs tree is configuration.

Or browse all examples, or open the Declarative YAML reference for the underlying spec.