Route a whole tree with one config
author-05 · YAML
A kind: config document maps globs to contracts — by name, by path, or inline — so validating an entire docs tree is configuration.
Builds on: Frontmatter and required sections
The artifact
Section titled “The artifact”The declarative YAML artifact, verbatim — no code required.
mcVersion: 2kind: configcontracts: decision: ./decision.contract.yaml runbook: ./runbook.contract.yamlrules: - include: ["decisions/**/*.md"] contract: decision # by name - include: ["runbooks/**/*.md"] exclude: ["runbooks/_archive/**"] contract: runbook - include: ["**/*.md"] # catch-all last: first match wins contract: # inline contract, no separate file frontmatter: type: object required: [title] properties: title: { type: string, minLength: 1 }What it exercises
Section titled “What it exercises”kind: config envelopeglob routing with first-match precedencenamed, path, and inline contract refs
Continue
Section titled “Continue”- Previous: Headings that repeat: changelogs
- Next: this is the last example of the group
- Group: Author contracts in YAML · All examples
- Reference: Declarative YAML reference