INFERENCE-INIT-09: Guard the tree with --check
What it demonstrates
Section titled “What it demonstrates”–check skips inference and verifies the existing scaffold still accepts the tree, exiting 0 when clean — a drift detector for CI.
Builds on: INFERENCE-INIT-01: Scaffold a contract from a folder of notes
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.
# run against the unchanged tree the scaffold was inferred frommarkdown-contract init ./notes --check# loads the existing markdown-contract.yaml and runs it over ./notes:# check /abs/notes: clean# exit 0 — wire straight into the CI gate alongside `validate`Surfaces exercised
Section titled “Surfaces exercised”init --check branch (runInitCheck)loadConfigFile + runCorpusexit 0 clean / 1 drift