Metadata-Version: 2.5
Name: verdict-evals
Version: 0.1.1
Summary: Regression testing for AI agent products: run your real code with side effects contained, grade outcomes, and get an honest verdict on every change.
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.11
Provides-Extra: all
Requires-Dist: fastapi>=0.110; extra == 'all'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.24; extra == 'all'
Requires-Dist: opentelemetry-sdk>=1.24; extra == 'all'
Requires-Dist: sqlalchemy>=2.0; extra == 'all'
Requires-Dist: time-machine>=2.14; extra == 'all'
Requires-Dist: uvicorn>=0.29; extra == 'all'
Provides-Extra: clock
Requires-Dist: time-machine>=2.14; extra == 'clock'
Provides-Extra: dev
Requires-Dist: fastapi>=0.110; extra == 'dev'
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.24; extra == 'dev'
Requires-Dist: opentelemetry-sdk>=1.24; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: python-dotenv>=1.0; extra == 'dev'
Requires-Dist: sqlalchemy>=2.0; extra == 'dev'
Requires-Dist: time-machine>=2.14; extra == 'dev'
Requires-Dist: uvicorn>=0.29; extra == 'dev'
Provides-Extra: otel
Requires-Dist: opentelemetry-sdk>=1.24; extra == 'otel'
Provides-Extra: otel-export
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.24; extra == 'otel-export'
Requires-Dist: opentelemetry-sdk>=1.24; extra == 'otel-export'
Provides-Extra: sqlalchemy
Requires-Dist: sqlalchemy>=2.0; extra == 'sqlalchemy'
Provides-Extra: web
Requires-Dist: fastapi>=0.110; extra == 'web'
Requires-Dist: uvicorn>=0.29; extra == 'web'
Description-Content-Type: text/markdown

# Verdict

Regression testing for AI agent products. Verdict runs your app's real code path against a
recorded world, with the database, external APIs, messages and clock contained at the edges.
It grades what your app *did*, and tells you whether a code change made things better or worse,
beyond noise. Your coding agent can set it up, run it, and use it to fix what it finds.

## Install and try it

```bash
pip install "verdict-evals[all]"
verdict init --example refunds demo && cd demo
verdict run -k 2 --label baseline                  # every case, 2 trials each
verdict run -k 2 --app-root candidate              # a version of the app with a bug
verdict compare label:baseline latest --gate       # exit 1: the candidate regressed
verdict trial latest refund-within-window          # why: each failed check and the step behind it
verdict serve --open                               # the web app: cases, runs, traces, compare
```

## With your coding agent

```bash
verdict agent setup        # skills for Claude Code (.claude/skills) and Codex, Cursor, Copilot (.agents/skills)
```

Then ask your agent to set up Verdict (`/verdict-setup` in Claude Code). It reads your code to
find the entry point, the database and every outside service, asks you what must never happen
and which situations matter most, and writes the config, fakes and first cases. It loops on
`verdict lint`, `doctor` and `self-test` until they're green. After a change it runs the cases
and compares (`verdict-check`). When cases fail, it fixes them (`verdict-fix`):

```bash
verdict brief latest                    # the failing cases, the step behind each failure, the rules
verdict candidate new fix-clash-date    # a git worktree for one attempted fix
verdict run --candidate fix-clash-date --cases <failing + guards> -k 2
verdict rank label:baseline <candidate runs…>   # rewards, ranked; the best that breaks nothing
```

Every command takes `--json`. Verdict judges; the agent proposes. It never edits your cases to
make them pass.

## What it does

- **Your code, our edges.** Nothing in your app is mocked except its boundaries. Secrets in the
  environment and `.env` are hidden from it, and an outbound call nothing fakes fails the trial.
- **Outcomes over wording.** Checks run on effects and final state; `judge` checks cover what a
  reply means; `nothing_else` fails on anything the case didn't expect.
- **Honest statistics.** The case is the unit: an A/A noise floor, Holm-adjusted per-case
  tests, a holdout split and a regression gate.
- **Graders you can trust.** Each case carries a known-good and a known-bad result; a grader
  that passes the bad one or fails the good one stops the run.
- **Traces and cost.** OpenTelemetry spans per trial (pydantic-ai, the OpenAI SDK, Logfire) as
  agent, model and tool steps, with the step behind every failed check.
- **Cases at scale.** `verdict generate`: code decides each scenario's correct outcome, Claude
  Code writes the words, gates and a reviewer decide what's kept. Conversations too, with a
  scripted or simulated user.

Docs: the site in `web/content/docs` (served by `verdict serve` at `/docs`).

## Develop

```bash
uv sync --extra dev && uv run pytest -q          # no API keys, network or model calls
cd web && npm install && npm run build           # the UI, landing page and docs, into the package
```

| Where | What |
|---|---|
| `src/verdict/` | the package and the `verdict` CLI; `src/verdict/agent/` the skills |
| `web/` | the product UI, the landing page and the user docs, one Vite app built into the package |
| `docs/` | product, architecture, decisions and learnings, for contributors |
| `examples/refunds/` | a deterministic example app with cases, a chat entry and a generator spec |

Status: 0.1.0, early; APIs may change. Licence: Apache-2.0.
