Skip to content

REAL-WORLD-SCHEMAS-04: Validate one ADR from the CLI

Running a single contract over one document and reading the exit code.

Builds on: REAL-WORLD-SCHEMAS-03: Typed table inside Consequences

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

Terminal window
markdown-contract validate docs/adr/0007-use-postgres.md \
--contract contracts/adr.contract.yaml --format human
# exit 0 = clean · 1 = error-level findings · 2 = usage/config error
# findings are deterministically ordered by line, then col, then plane
  • CLI validate <path> --contract (config-less binding) --format human
  • exit 0 clean / 1 error-level findings / 2 usage/config