Skip to content

INFERENCE-INIT-09: Guard the tree with --check

–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

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

Terminal window
# run against the unchanged tree the scaffold was inferred from
markdown-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`
  • init --check branch (runInitCheck)
  • loadConfigFile + runCorpus
  • exit 0 clean / 1 drift