Skip to content

INFERENCE-INIT-10: Catch drift after a document changes

Mutating a doc so it stops conforming makes the same –check fail with exit 1, closing the scaffold-to-guardrail loop.

Builds on: INFERENCE-INIT-09: Guard the tree with –check

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

Terminal window
# add a frontmatter key the strict contract never saw, then re-check
# ./notes/today.md: + reviewer: alex
markdown-contract init ./notes --check
# check /abs/notes: 1 error finding(s) — drifted
# exit 1 — CI fails the build until the doc or the contract is updated
  • init --check drift path
  • runCorpus error-level findings (strict frontmatter unknown-key)
  • exit code 1 as CI signal