Skip to content

CLI-10: Route contracts to dirs with --contract/--path pairs

Paired –contract and –path flags map each contract to its own directory in one run.

Builds on: CLI-09: Apply one contract inline with –contract

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

Terminal window
# one rule per pair: each --contract is scoped to its matching --path directory
markdown-contract validate \
--contract contracts/decisions.contract.yaml --path docs/planning/decisions \
--contract contracts/tasks.contract.yaml --path docs/planning/tasks
# each --path/**/*.md routes to the contract it is paired with; each --contract needs a matching --path
  • paired --contract/--path
  • buildInlineConfig paired routing (one rule per pair)
  • each --contract needs a matching --path