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.
cp node_modules/@lssm-tech/app.cli-contractspec/templates/github-action.yml .github/workflows/contractspec.ymlExpected output: new workflow file in .github/workflows.
2) Run CI locally
contractspec ci --format json --check-driftExpected 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.
contractspec diff src/contracts/spec-v1.ts src/contracts/spec-v2.ts --breakingExpected 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.
cd examples/crm-pipeline
bun run build
bun run validateNeed continuous checks tied to outcomes?
Studio closes the loop with post-change verification and learning dividends that improve future decisions.
See what Studio adds