veritas
veritas is a CLI-first adversarial verification harness for AI-written and AI-modified software.
It answers the question ordinary test runs often miss:
Would the current tests catch the kinds of subtle mistakes an AI coding agent is likely to make?
veritas maps changed code to verification targets, generates reviewable harnesses, runs scoped tests, fuzzing, mutation probes, and coverage collection under budgets, then writes CI-friendly reports and AI-ready feedback.
The default path is deterministic and does not call an LLM. An optional external planner hook can be enabled for AI-assisted planning while veritas still owns execution scope, budgets, and artifact writes.
Install
From crates.io, after release:
From the Git repository:
For local development:
Optional tools:
# Go verification
# Rust coverage, only used when coverage_enabled = true
Quick Start
Use veritas on a changed branch:
Verify a specific target:
Explain and promote findings:
Documentation
- AI Agent Guide: copy-paste instructions and review loop for coding agents.
- Production Guide: large-repo Go/Rust operation, budgets, CI policy, and host safety.
- Architecture: workspace layout, plugin contract, artifacts, and planner model.
- Confidence Guide: fixture tiers, seeded examples, and external canaries.
- Releasing: crates.io publishing through GitHub Actions.
CLI Surface
Capabilities
Changed-target verification:
- reads git diffs, staged changes, and untracked files
- maps changed lines to discovered Rust/Go symbols when line ranges are available
- scopes package commands to changed packages and selected reverse dependencies where graph data exists
- writes AI review artifacts with change digests and verification guidance
Rust verification:
- detects packages and virtual workspaces through
Cargo.toml - discovers public free functions and public methods with Tree-sitter
- writes package-local
proptestintegration harnesses for supported public free functions - runs
cargo test --all-targetswith configurable jobs, test threads, command timeouts, and optional systemd scope limits - runs AST-scoped mutation probes and reports surviving mutants
- collects
cargo llvm-cov --summary-onlywhen enabled - writes Rust symbol graph artifacts under
.veritas/symbol_graph/
Go verification:
- detects one or more
go.modroots - discovers exported functions and methods with Tree-sitter
- builds package graphs with
go list -json ./... - runs scoped
go testcommands for selected packages plus configurable reverse dependencies - discovers handwritten and generated fuzz targets
- writes
testing.Ffuzz harnesses for exported free functions with supported Go fuzz parameter types - runs relevant
go test -run=^$ -fuzz=...targets within caps and timeouts - applies build tags to Go list, test, fuzz, coverage, and mutation commands
- runs AST-scoped mutation probes for comparisons, nil/error branches, return defaults, and domain-labeled risk surfaces
- writes package graph, package-awareness, and symbol graph artifacts
Reports and artifacts:
- renders Markdown, JSON, SARIF 2.1.0, and compact JUnit XML
- saves the latest report to
.veritas/report.json - writes API signature baselines and accepted finding baselines
- writes coverage feedback, mutation feedback, repro notes, candidate verification patches, and promotion notes
- cleans generated artifacts with
veritas cleanup
CI behavior:
veritas verify --profile ciimplies--changed- CI profile disables full coverage, tightens package/fuzz/mutation/time caps, and enables policy-based failure on error severity by default
- policy filters can select severity, language, artifact kind, and target risk
- accepted finding IDs support new-findings-only CI behavior
Config
Create veritas.toml or .veritas.toml in the target repo:
[]
= 120
= true
= true
= false
[]
= "deterministic"
# mode = "external_llm"
# command = "my-veritas-planner"
# fail_on_error = false
[]
= "error"
= []
= []
= []
[]
= "proptest"
= 120
= false
= 120
= 1
= 1
= false
= "4G"
= "200%"
[]
= 10
= true
= true
= 1
= 20
= 120
= 64
= 8
= []
For shared machines, keep Rust coverage disabled unless needed and enable systemd scope limits:
[]
= false
= true
= 1
= 1
= "4G"
= "200%"
Development
Run the workspace checks:
Run fixture checks:
Run the richer example beds:
( && )
The example projects intentionally contain hidden assumptions while their handwritten tests pass, so they are useful for validating generated property/fuzz artifacts and report output.
Run external canary smoke checks when you want confidence against real pinned repositories: