Test-framework lifecycle
beforeAll, beforeEach, act, assert, afterEach, afterAll. Cleanup always runs for what was set up.
Write suites in TypeScript, run every trial in its own sandbox, grade with deterministic checks or an LLM judge, and get CTRF reports.
// examples/hello.eval.ts
import { directory, regex, suite } from "@fluce/proctor"
export default suite("hello")
.variant("baseline", (v) => v.prompt((c) => `Say hello to ${c.context}`))
.variant("polite", (v) => v.prompt((c) => `Say hello politely to ${c.context}`))
.case("greets-world", (c) =>
c
.description("The agent greets the world")
.context("world")
.fixture(directory(new URL("./hello", import.meta.url)))
.expect(regex("says-hello", /hello/i))
.expect(regex("names-world", /world/i))
.timeout("1m"),
)$ npx proctor run examples/hello.eval.ts --agent fake
Running hello: 2 trials (agent fake 0.0.0, sandbox fake, isolation none)
PASS greets-world [baseline] #1 (3ms)
PASS greets-world [polite] #1 (4ms)
2 trials: 2 passed, 0 failed, 0 other, 0 skipped
Wrote results/hello/2026-09-30T16-57-05-888Z-a28a.ctrf.json
Wrote results/hello/2026-09-30T16-57-05-888Z-a28a.summary.mdThe core knows no agent: Claude Code is an adapter today, OpenCode is next.
| I want to | Read |
|---|---|
| write my first suite | Getting started, then Suites, variants, cases |
| grade an answer | Graders, LLM judge |
| run a campaign against Claude Code | CLI, Claude Code |
| read the results | Reports and ablation, CTRF reference |
| add an agent, a sandbox or a grader | Architecture, Extending |