Documentation

Stabilize your AI-generated code. Define contracts once, generate consistent code across all surfaces, regenerate safely anytime.

Quick start

Add ContractSpec to your project and define your first contract:

docs-quick-start
# Install the CLI and core libraries
bun add -D contractspec
bun add @contractspec/lib.contracts @contractspec/lib.schema

# Create your first contract
bun contractspec create --type operation

# Generate implementation
bun contractspec build src/contracts/mySpec.ts