OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

CI gating with deterministic diffs

Add ContractSpec CI checks that validate specs, detect drift, and gate breaking changes before merge.

What you'll build

  • CI workflow running ContractSpec validation and drift checks.
  • Machine-readable output for PR annotations.
  • Deterministic contract diffs in review.

1) Add the CI workflow

Copy the template from the CLI package.

ci-copy
cp node_modules/@contractspec/app.cli-contractspec/templates/github-action.yml .github/workflows/contractspec.yml

Expected output: new workflow file in .github/workflows.

2) Run CI locally

ci-local
contractspec ci --format json --check-drift

Expected output: JSON summary including pass/fail counts and drift status (if configured).

3) Add a diff check

Use the diff command to inspect breaking changes in PRs.

ci-diff
contractspec diff src/contracts/spec-v1.ts src/contracts/spec-v2.ts --breaking

Expected output: deterministic diff with breaking change hints.

Example package

The CRM pipeline example is already wired in the quickstart smoke test. Use it as a CI-ready template.

crm-ci
cd packages/examples/crm-pipeline
bun run build
bun run validate

Need continuous checks tied to outcomes?

Studio closes the loop with post-change verification and learning dividends that improve future decisions.

See what Studio adds
OSS docsoperateStart with OSS. Adopt Studio when you want the operating layer.

Why ContractSpec

Keep educational and comparison content reachable without letting it define the primary OSS learning path.