Skip to content

Bind a contract directly, scope the run

validate-04 · CLI transcript

No config file needed: --contract binds one contract to a folder, and --include / --exclude narrow any run without touching config.

Builds on: Check a folder of docs

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

Terminal window
# bind one contract straight to a folder — no markdown-contract.yaml required
markdown-contract validate ./decisions --contract decision.contract.yaml
# narrow a run with globs (relative to the validated path)
markdown-contract validate ./decisions --include "2026-*/**" --exclude "**/drafts/**"
# different trees, different contracts, one run: pair each --contract with a --path
markdown-contract validate --contract decision.contract.yaml --path decisions --contract runbook.contract.yaml --path runbooks
  • --contract (inline binding)
  • --include / --exclude globs
  • --contract/--path pairing