Skip to content

INFERENCE-INIT-02: Read the inferred contract

The generated YAML is a plain declarative contract — required vs optional sections, strict frontmatter, and value-ladder field types you can hand-tune.

Builds on: INFERENCE-INIT-01: Scaffold a contract from a folder of notes

The declarative YAML artifact, verbatim — no code required.

# <name>.contract.yaml — the contract `init` generates, plain declarative YAML
mcVersion: 1
kind: contract
frontmatter:
strict: true # key set is closed by construction
fields:
title:
type: string # value ladder: a free-varying value stays a bare type
body:
order: recognized-relative # detectOrder: a shared partial order, not lockstep
allowUnknown: false # no unlisted section ever appeared
sections:
- section: Summary # universal across docs → required
- section: Context
optional: true # absent from some docs → optional
- section: Decision
- section: Notes
optional: true
  • inferFrontmatter (strict + value ladder: const/format/enum)
  • inferBody (universal=required, detectOrder)
  • declarative contract format