Skip to content

DECLARATIVE-YAML-01: Validate one required frontmatter field by type

A minimal contract document (mcVersion 1, kind contract) that requires a single typed frontmatter field.

Builds on: nothing — this is the first rung of Declarative YAML: Contracts and Corpus Config, No Code.

The declarative YAML artifact, verbatim — no code required.

mcVersion: 1
kind: contract
frontmatter:
fields:
title:
type: string
  • loadContract / loadContractFile
  • compileFrontmatter -> compileObjectSchema
  • type: string -> z.string()