Skip to main content

Production contracts

A production contract is a declarative rule about application state that must hold in production. ProdVerdict evaluates contracts deterministically and returns pass, warn, or fail with structured findings.

Examples

ContractInvariant
AccessPaying Stripe customers have has_paid_access = true in your DB
ConfigEvery process.env.FOO in code appears in .env.example and CI
MigrationNo CREATE INDEX without CONCURRENTLY on large tables
BoundaryAPI handlers must not accept is_admin or return password_hash
WebhookStripe handlers verify signatures and use idempotency keys
RestoreBackup and restore commands complete successfully in CI

Why contracts, not AI review?

AI coding tools increase velocity but not trust in production invariants. Tests mock Stripe and Postgres; linters do not compare live billing to your database. ProdVerdict fills that gap with explicit, repeatable rules agents and CI can call before merge.

One engine, three surfaces

The same runContracts() dispatcher powers:

  1. CLInpx prodverdict check (single contract or all)
  2. GitHub Action — PR comments + required checks (contract: all)
  3. MCP — local (all contracts) and remote (config, migration, boundary, webhook via GitHub)

Severity and verdict

FindingsVerdictTypical CI behavior
Any highfailBlock merge
Only medium / lowwarnPass (use --strict to fail)
NonepassGreen

See Finding shape.