Core model
Contracts are the durable system boundary.
ContractSpec uses explicit TypeScript specs to describe behavior before it spreads across APIs, UI, data models, events, and operator flows. The goal is not to hide implementation. The goal is to make the system boundary explicit enough that generation, validation, runtime enforcement, and regeneration can stay coherent.
System promise
one contract → many surfaces
Use the contract layer to keep surface behavior aligned, then let runtimes and generators do the repetitive work without inventing a closed platform.
What the contract layer owns
- Behavior: operations, events, presentations, workflows.
- Validation: input, output, and schema boundaries.
- Governance: policy, auditability, and migration rules.
- Surface alignment: generated or served behavior across API, UI, data, and agent-facing interfaces.
Specification types
You can adopt the model one part at a time. Not every system needs every spec type on day one.
Capabilities
Model operations, events, and presentations as explicit system behavior.Data views
Describe query, filtering, and presentation behavior from the same source model.Workflows
Coordinate multi-step execution, retries, monitoring, and hand-offs.Policy
Carry governance and access rules through every generated and runtime-served surface.Overlays
Customize generated surfaces safely instead of forking them permanently.Safety and migration
Keep change safe with signing, audits, rollbacks, and explicit migration behavior.Implemented spec packs
These packs combine multiple contract surfaces into higher-order systems you can use directly today: agent enforcement, AI-native surface runtime, and governed Builder authoring.