Skip to content

Automate and embed

Each example builds on the one before it — read the group in order, or jump to the one you need. Every shipped artifact is regression-checked against the real CLI and library output.

  1. Embed the corpus runner — Everything the CLI does is one library call: runCorpus routes a tree of files to contracts and returns findings, stats, and an exit code.
  2. A CI gate in GitHub Actions — Two workflow steps make the contract a merge gate: validate with SARIF output, then upload the findings to code scanning.
  3. Custom rules for cross-cutting policy — When neither plane covers a policy, a named docRule sees the whole typed document — so a frontmatter field can gate a body section.
  4. This repo validates its own planning docs — The dogfood proof: this repository’s config maps its planning corpus to six contracts, and CI validates the corpus on every push.

Or browse all examples, or open the Library API reference for the underlying spec.