Claimcheck can receive its input three different ways depending on where you are in your workflow. File mode is the standard path: point it at aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/metareflection/claimcheck/llms.txt
Use this file to discover all available pages before exploring further.
.dfy source file and a mapping JSON, and it extracts the lemma text automatically. Stdin mode skips extraction entirely — you supply pre-built claim objects over a pipe, which is useful for programmatic integrations and CI steps that already have the Dafny code in memory. Multi-domain mode, provided by the claimcheck-multi command, handles projects where lemmas are spread across several .dfy files and runs them in parallel sub-processes before merging the results.
File mode
File mode is the default. Pass a mapping file and a.dfy source file; claimcheck extracts each lemma by name and then runs the audit.
How the mapping file works
The mapping file (-m / --mapping) is a JSON array. Each entry pairs a natural language requirement with the name of the Dafny lemma that is claimed to formalise it:
lemmaName is not found in the .dfy source, that entry is reported with status error.
How lemmas are extracted
Claimcheck reads the full.dfy source text and locates each lemma by matching its identifier. The extracted text includes the lemma signature and body. If the .dfy file uses Dafny modules and you also want to run --verify, pass --module <ModuleName> so that the Dafny verifier can resolve the module scope correctly. The --module flag is not required for the LLM audit itself.
Example: file mode with verification
dafny must be in PATH when using --verify. Lemmas that fail verification are reported as verify-failed and are excluded from the LLM round-trip.Stdin mode
In stdin mode (--stdin), claimcheck reads a JSON object from standard input. You provide the dafnyCode for each claim directly — no .dfy file is needed. This is the right choice when a build system, agent, or CI pipeline has already assembled the claims programmatically.
| Field | Type | Required | Description |
|---|---|---|---|
claims | array | Yes | Array of claim objects, each with requirement, lemmaName, and dafnyCode. |
domain | string | No | Domain name for context. Defaults to "unknown" if omitted. |
--json is passed. The result schema is the same as the JSON output format.
Library usage
The same interface is available as a JavaScript module:Multi-domain mode (claimcheck-multi)
claimcheck-multi is a separate command for projects where lemmas live in multiple .dfy files. It accepts a mapping that includes a file field on each entry, groups the entries by file, dispatches one claimcheck subprocess per file, and merges the results into a single report.
Multi-domain mapping format
Each entry in the mapping must include afile field that resolves relative to the mapping file’s own directory:
file field fall back to the --dfy flag if provided; if neither is present, claimcheck-multi exits with an error.
How claimcheck-multi works
Group entries by file
Claimcheck-multi resolves each
file path relative to the mapping file and groups entries by resolved absolute path.Write per-file temp mappings
For each group, a temporary mapping JSON (without
file fields) is written to a system temp directory.Invoke claimcheck per file
Each group is dispatched as a separate
node claimcheck.js subprocess with the appropriate --dfy path and a shared set of passthrough flags (mode, model, backend, verbosity). Subprocesses always receive --json so results can be parsed and merged.All claimcheck flags are supported
claimcheck-multi accepts and forwards the same flags as claimcheck:
When to use each mode
File mode
Typical workflow. You have a
.dfy file with lemmas and a mapping JSON. Claimcheck handles extraction automatically. Use --verify to gate on proof correctness before the LLM audit.Stdin mode
Programmatic and CI use. A script, agent, or pipeline already holds the Dafny code as a string. Pipe it in and get JSON back. No filesystem dependency on a
.dfy file.Multi-domain
Large projects. Lemmas are spread across multiple
.dfy files organised by bounded context or module. claimcheck-multi runs each file’s lemmas concurrently and returns a unified report.