EMBED-AND-CI-09: Drift-gate with init --check
What it demonstrates
Section titled “What it demonstrates”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
How it’s done
Section titled “How it’s done”A terminal session: the command as you’d run it, followed by the output it prints; trailing comments note the exit status.
# 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 againstSurfaces exercised
Section titled “Surfaces exercised”CLI init --check (drift detection)runCorpus over the existing configexit 0/1/2