Skip to main content
Disposable inference systems are mostly written by agents, so the most frequent caller of the verifier should be the agent itself. theformalera mcp starts an MCP server with the spec and verification tools.
Run it from the root of a repository that has a theformalera.toml and a lock. For example, to register it with Claude Code:

Tools

verify.quick and verify.full verify the source in a scratch copy of the project, against the project’s locked specs, with the local engine.

The loop

  1. Call spec.get for the node you are implementing. Implement that definition, not the reference modeling file. The Lean definition is unambiguous: Qwen3.8’s (1 + w) RMSNorm weight is spelled out.
  2. Call lemma.search with the same key. When performance is comparable, prefer the patterns existing lemmas cover: verification is faster and UNKNOWN is rarer.
  3. Write the kernel and its @tfe.implements annotation together.
  4. Call verify.quick. On a counterexample, fix the kernel using the witness, holds_when and suspect, then call it again.
  5. When it passes, call verify.full, then tune performance. Performance work must keep verify.full passing.
  6. Open the PR. CI is the final gate.

AGENTS.md

theformalera init writes an AGENTS.md with these rules, so any agent working in the repository follows them:
AGENTS.md
An agent can make a check pass by narrowing domain or adding assume entries. Reviewers should treat any change to those fields as a change to the contract. Both appear in the JSON report and in the release certificate.