Skip to content

REAL-WORLD-SCHEMAS-14: Scaffold and drift-check a corpus with init

Inferring a tight contract from existing docs and re-checking the tree for drift.

Builds on: REAL-WORLD-SCHEMAS-10: Corpus config: route two types, first match wins

A terminal session: the command as you’d run it, followed by the output it prints; trailing comments note the exit status.

Terminal window
markdown-contract init docs/adr --out contracts --dry-run # preview the inferred contract, write nothing
markdown-contract init docs/adr --out contracts # write the scaffold + a markdown-contract.yaml router
markdown-contract init docs/adr --check # drift detection: nonzero exit if a doc diverged
  • CLI init --dry-run --out --check (self-check / drift)
  • auto-written router config (markdown-contract.yaml)