Skip to content

REAL-WORLD-SCHEMAS-10: Corpus config: route two types, first match wins

A meta-config mapping path globs to per-type contracts so a tree validates against the right contract.

Builds on: REAL-WORLD-SCHEMAS-06: RFC with a rejected-alternatives section

The declarative YAML artifact, verbatim — no code required.

mcVersion: 1
kind: config
contracts:
adr: ./contracts/adr.contract.yaml
rfc: ./contracts/rfc.contract.yaml
rules:
- include: ["docs/adr/**/*.md"]
contract: adr
- include: ["docs/rfc/**/*.md"]
contract: rfc
  • declarative kind: config; contracts name map; rules include globs
  • first-match-wins routing in the corpus runner (runCorpus)