Skip to content

EMBED-AND-CI-09: Drift-gate with init --check

Using init –check to verify a tree still conforms to its inferred config as a pre-merge gate.

Builds on: EMBED-AND-CI-05: Fail CI on the exit code

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

Terminal window
# in CI, after checkout:
npx markdown-contract init docs/planning --check
# exit 0: tree still conforms to markdown-contract.yaml
# exit 1: a doc drifted from the inferred shape
# exit 2: no config present to check against
  • CLI init --check (drift detection)
  • runCorpus over the existing config
  • exit 0/1/2