A Polygraph engine

polygen — code that's checkable from the first line

Most AI-written code is verified after the fact, if it's verified at all. polygen flips the order: it drafts the state machine and its contract together, self-repairs against its own checks before you ever see a diff, and ships with a regression corpus synthesized from the model it just built.

How it works

Three stages, one output: a new state machine that arrives already gated.

1

Draft the contract

States, transitions, guards, and the invariants that come with them are generated alongside the implementation, not bolted onto it afterward.

2

Self-repair to its checks

Every violation polygen's own gate finds during generation gets fixed before the code reaches you, not flagged for you to fix later.

3

Synthesize a regression corpus

A set of traces derived from the verified model, so the first commit already has a test suite that actually explores the state space.

Fits with: Hands off a pre-verified machine to polyrun to execute, or to polygraph if you want an independent second opinion on code that came from elsewhere.