You can't verify whether your AI's output is correct, complete, or safe.
LeanCTX produces proof-carrying outputs. Policy invariants are formally verified in Lean4 with 82 machine-checked theorems. Every context decision generates an auditable trail with pipeline metrics and provenance chains. Outputs are checked for valid paths, correct identifiers, and structural integrity. Claim-based verification decomposes proofs into atomic, verifiable units with Quality Levels 0-4.
Shipping Unaudited AI Work
AI agents hallucinate file paths, generate broken imports, leak secrets into outputs, and produce changes that nobody can trace back to their context. Without verification, you are shipping unaudited AI work.
ctx_verify checks every output for hallucinated paths, broken imports, and secret leaks. ctx_proof generates ContextProofV2 reports with claim-level verification and Lean4-backed formal guarantees.
8 tools
Lean4 Formal Proofs
82 machine-checked theorems across 3 domains: Policy invariants, compression preservation, and agent handoff safety — all verified in Lean4 with zero sorry.
Claim-based Verification
ContextProofV2 decomposes verification into atomic claims. Each claim is routed to the appropriate verifier — from deterministic checks to Lean4 proofs.
Quality Levels 0–4
Five assurance tiers: Provenance (Q0), Deterministic (Q1), Tested (Q2), Policy Proved (Q3), Formally Verified (Q4). Every output carries its exact trust level.
Proof Artifacts
JSON and HTML proof reports with pipeline metrics, SLO snapshots, and provenance chains.
Output Checks
Path and identifier preservation as the quality gate mechanism. Structure verification with WARN/FAIL semantics ensures no valid paths or identifiers are lost during compression.
Compression Invariants
4-layer compression engine with quality gate — formally proven: signatures mode preserves all exports, map mode preserves imports, aggressive mode leaks zero secrets. 82 Lean4 theorems, 0 sorry.
Replayability
Deterministic sessions with replay hashes, CI gates, and regression detection.
Agent Handoff Safety
State machine formally verified in Lean4. Terminal states are sinks, lifecycle ordering is monotonic, invalid envelopes are rejected.
See it in action
LeanCTX produces proof-carrying outputs. Policy invariants are formally verified in Lean4 with 82 machine-checked theorems. Every context decision generates an auditable trail with pipeline metrics and provenance chains. Outputs are checked for valid paths, correct identifiers, and structural integrity. Claim-based verification decomposes proofs into atomic, verifiable units with Quality Levels 0-4.
7 MCP tools
LeanCTX produces proof-carrying outputs. Policy invariants are formally verified in Lean4 with 82 machine-checked theorems. Every context decision generates an auditable trail with pipeline metrics and provenance chains. Outputs are checked for valid paths, correct identifiers, and structural integrity. Claim-based verification decomposes proofs into atomic, verifiable units with Quality Levels 0-4.
ctx_verify Verification observability snapshot. Action stats returns versioned JSON or compact summary (no raw content).
ctx_proof Export a machine-readable ContextProofV1 (Verifier + SLO + Pipeline + Provenance). Writes to .lean-ctx/proofs/ by default.
ctx_artifacts Context artifact registry + BM25 index. Actions: list|status|index|reindex|search|remove.
ctx_gain Gain report (includes Wrapped via action=wrapped).
ctx_heatmap File access heatmap (local-first). Actions: status|directory|cold|json.
ctx_metrics Session token stats, cache rates, per-tool savings.
ctx_cache Cache ops: status|clear|invalidate.
Every output carries proof
LeanCTX generates proof artifacts for every session: which files were read, what was compressed, which checks passed, and how tokens were spent. This makes AI work auditable, replayable, and trustworthy.
Explore Verification Tools
LeanCTX produces proof-carrying outputs. Policy invariants are formally verified in Lean4 with 82 machine-checked theorems. Every context decision generates an auditable trail with pipeline metrics and provenance chains. Outputs are checked for valid paths, correct identifiers, and structural integrity. Claim-based verification decomposes proofs into atomic, verifiable units with Quality Levels 0-4.