Skip to content

Consolidate frontmatter schema and contract into one schema.ts per entity

Status: closed/done · Impact: medium · Complexity: medium

The substrate landed each entity’s contract in a separate contract.ts next to its frontmatter schema, splitting one entity’s validation definition across two files. Consolidate them so each <type>/schema.ts is the single home for both the frontmatter Zod schema and the markdown contract.

  • Each <type>/schema.ts exports both <Type>Schema and <Type>Contract.
  • The 11 separate contract.ts files are removed.
  • All contract consumers and the registry resolve against the consolidated schema.ts exports.
  • bunx tsc --noEmit is clean and the contract/substrate tests stay green.
  • Changing any contract’s validation rules — this is a file-layout consolidation only.

← Back to Tasks