Skip to content

Build the per-entity markdown-contract substrate

Status: closed/done · Impact: high · Complexity: large

With Zod v4 in place, build the declarative markdown-contract substrate the rest of the adoption rewires onto: one contract() per entity type and a registry that resolves a contract from a type name. This is the new validation surface that ultimately replaces the bespoke two-path validator.

  • A contract() is authored for all 11 entity types (task, milestone, decision, standard, principle, term, reference, backlog, capability, driver, product).
  • A _contracts.ts registry exposes contractForType(type) to resolve a contract by type name.
  • The task contract is relaxed to a presence-floor body plane (typed shapes deferred to the implementation-ready contract follow-on).
  • A substrate test asserts roster parity and load/validate smoke across all 11 entity types.
  • The live corpus validates clean against the contracts except the known drift docs (fixed in the rewire PR).
  • Rewiring validate/audit/authoring onto the contracts — that is the rewire follow-on.
  • Consolidating each entity’s schema and contract into one file — done in the consolidation follow-on.

← Back to Tasks