Documentation
Stabilize your AI-generated code. Define contracts once, generate consistent code across all surfaces, regenerate safely anytime.
Get started
Install ContractSpec and define your first contract in minutes.
Core contracts
Commands, queries, events, and presentations. The building blocks.
Safe regeneration
Golden tests, migrations, signing, and audit trails.
Studio (managed)
Visual builder, deployments, and team collaboration.
Quick start
Add ContractSpec to your project and define your first contract:
# Install the CLI and core libraries pnpm add -D @lssm/tool.contracts-cli pnpm add @lssm/lib.contracts @lssm/lib.schema # Create your first contract contractspec create --type operation # Generate implementation contractspec build src/contracts/mySpec.ts
Featured
AI Governance
Constrain what AI agents can change. Enforce contracts they must respect. Human-in-the-loop guardrails.
Browse all documentation
Use the sidebar or choose a topic to explore spec-first development.
Getting Started
Installation, first contract, and CLI usage
Core Contracts
Commands, queries, events, presentations, workflows
Safe Regeneration
Signing, migrations, golden tests, compliance
Multi-Surface Output
REST, GraphQL, Prisma, MCP tools, React
Libraries
Core runtime libraries and utilities
AI Governance
Agents, contract enforcement, approval workflows
Architecture
Multi-tenancy, integrations, knowledge sources
Manifesto
Our philosophy: compiler not prison