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.
Acceptance criteria
Section titled “Acceptance criteria”- A
contract()is authored for all 11 entity types (task, milestone, decision, standard, principle, term, reference, backlog, capability, driver, product). - A
_contracts.tsregistry exposescontractForType(type)to resolve a contract by type name. - The
taskcontract 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).
Out of scope
Section titled “Out of scope”- Rewiring
validate/audit/authoringonto the contracts — that is the rewire follow-on. - Consolidating each entity’s schema and contract into one file — done in the consolidation follow-on.