Deterministic evaluation, trace error analysis, dynamic Bayesian causal failure graphs, OpenTelemetry export, and fail-closed quality gating for autonomous AI agent harnesses and software factories.
Quickstart • Core Capabilities • Architecture • OpenTelemetry • Dynamic Memory Store • The Complete TideOS Eval Kit • Contributing
Most AI evaluation frameworks rely on LLM-as-a-judge prompts that suffer from non-determinism, model drift, high token costs, and prompt injection vulnerabilities. When an agent enters an infinite repair loop, breaks a build dependency, or leaks an API credential, an LLM judge cannot be trusted to fail closed in CI.
reval implements the empirical evaluation methodology codified by Hamel Husain, Shreya Shankar, and Anthropic/OpenAI research:
"Start with error analysis, not metrics. Sample 100+ production traces. Annotate each failure in free text (open coding), then cluster them into failure categories (axial coding). Count frequency per category. Your top 3 categories are your first metrics."
reval is a single, zero-dependency, pure-Rust CLI tool with no -sys C libraries, no external Python runtimes, and no LLM API calls in the verification path. It evaluates agent runs deterministically in milliseconds.
| Capability | reval (TideOS) |
LangSmith / Tracing | Promptfoo | PyTest / Unit Tests |
|---|---|---|---|---|
| Empirical Trace Error Analysis | Yes (Husain/Shankar) | UI manual tag | No | No |
| Deterministic CI Gate (Zero LLM) | Yes (< 0.2s) | Paid cloud eval | Slow prompt eval | Yes (Code only) |
| Blocker Veto (Score 0.0 on Key Leaks) | Yes (Fail-closed) | No (Averages) | Configurable | Assert fail |
| Dynamic Bayesian Causal Graph | Yes (Posterior bounds) | Trace tree only | No | No |
| OpenTelemetry / OpenInference | Yes (Native OTel JSON) | Cloud native | No | No |
| Active Loop Watcher (Poltergeist-Style) | Yes (Zero-CPU + Bell) | No | No | No |
| Native Stdio MCP Server | Yes (JSON-RPC) | API / SDK | No | No |
| Cryptographic Proofs (SHA-256) | Yes (proof.json) |
Cloud DB | No | No |
| Binary Portability | Pure Rust (Single binary) | SaaS / Python | Node.js | Python / C-deps |
Autonomous CLI agents running in parallel grids can spiral into runaway repair loops, burning CPU and tokens. reval watch runs a zero-overhead sentinel watcher over harness logs and terminal sessions. Using OS-level directory metadata notification handles (NTFS ReadDirectoryChangesW, APFS kqueue, Linux inotify), background CPU utilization stays at absolute zero and checks benchmark in under 50 microseconds even across 50,000-file repositories.
The instant a loop cascade or circuit breaker is breached, it sounds an audible terminal bell (\x07) and prints an immediate high-visibility alert:
reval watch --root . --backend native --interval-ms 400[WATCH] reval watcher active (root: ., backend: Native, interval: 400ms)
Watching for agent runs and monitoring loop cascades... (Ctrl+C to stop)
[PASS] [2026-10-30T14-24-53-cargo-fmt] cargo fmt (agent: q.mjs)
[FAIL] [2026-10-30T11-59-45-pnpm-build] pnpm build (agent: vsp)
==================== [ALARM: RUNAWAY LOOP CASCADE] ====================
Trace: 2026-10-30T11-59-45-pnpm-build
Open code: TYPECHECK-BUILD-ORDER-CASCADE
Axial category: loop_cascade
Diagnostic: error TS2307: Cannot find module '@vsp/contracts'
Remediation: Rebuild upstream @vsp/contracts + regenerate types before downstream typecheck; halt immediately on q.mjs exit 3.
=========================================================================
Claude Code, Codex, and Cursor can run reval directly in-session via standard stdio JSON-RPC without subshell gymnastics:
reval mcp --root .- Tools:
reval_check_gate,reval_analyze_traces,reval_get_lessons,reval_query_graph,reval_repo_hygiene. - Resources:
reval://metrics/top3,reval://graph/causal,reval://graph/dynamic,reval://lessons/latest.
Instead of treating failure modes as flat static buckets, reval trace graph constructs a directed causal graph linking open-code precursor warnings (such as LINT-RATCHET and STREAM-DISCONNECT) to downstream cascade events (loop_cascade, premature_kill).
In v0.2.0, the graph store supports dynamic disk persistence with incremental Bayesian updating. Edge weights calculate posterior transition probabilities, 95% credible intervals, and Bayesian confidence scores:
# Ingest traces and persist dynamic Bayesian graph store
reval trace graph --persist fixtures/causal_graph.json --format mermaidflowchart LR
VITEST_ASSERTION_ITERATION["VITEST-ASSERTION-ITERATION"] -->|n=37, P=33.6% [28.2%, 39.0%]| test_iteration["test_iteration"]
TYPECHECK_BUILD_ORDER_CASCADE["TYPECHECK-BUILD-ORDER-CASCADE"] -->|n=22, P=20.0% [15.1%, 24.9%]| loop_cascade["loop_cascade"]
LINT_RATCHET_HYGIENE_GATE["LINT-RATCHET-HYGIENE-GATE"] -->|n=15, P=13.6% [9.4%, 17.8%]| loop_cascade["loop_cascade"]
TEST_ARTIFACT_POLLUTION["TEST-ARTIFACT-POLLUTION"] -->|n=11, P=10.0% [6.2%, 13.8%]| runtime_drift["runtime_drift"]
STREAM_DISCONNECT_ABORT["STREAM-DISCONNECT-ABORT"] -->|n=10, P=9.1% [5.4%, 12.8%]| premature_kill["premature_kill"]
Before an agent attempts a task, it can query historical lessons learned with exact Bayesian probabilities and confidence scores:
reval trace lessons vitest --db fixtures/causal_graph.json=== REVAL PROACTIVE LESSONS (query: Some("vitest")) ===
#1. [VITEST-ASSERTION-ITERATION] -> [test_iteration] (n=42, P_bayes=35.8%, conf=94.2%)
Rule: Run narrowest single test file while iterating; isolate Postgres advisory-lock fixtures per test.
reval trace tree aggregates multi-agent trajectories into an interactive, self-contained HTML dashboard with search filtering, collapsible nodes, and error badges:
reval trace tree --html fixtures/tree.htmlFor team workflows and cloud observability, reval trace export outputs standard OpenTelemetry ResourceSpans JSON (traces.otel.json) and traces.openinference.jsonl:
reval trace export --root . --out-dir fixtures/ --format otelSpans include standard OpenInference attributes (openinference.span.kind = "AGENT", input.value, output.value, reval.open_code, reval.axial_category, status.code), allowing instant streaming or drag-and-drop ingestion into LangSmith, Phoenix, Datadog, or Jaeger.
cargo install --git https://github.com/TechTideOhio/revalDownload the single standalone binary directly from Releases for your platform (Linux x86_64, macOS Apple Silicon / Intel, Windows x86_64).
Scans harness runs and execution logs, performs open coding on failures, clusters them into axial categories, and calculates Pass@1, Pass@3, and Pass^3:
reval trace analyze --root .Output:
=== REVAL ERROR ANALYSIS REPORT (n=459 traces, sha256=54256d4e169b...) ===
Reliability: pass=349 fail=110 | pass@1=76.0% | pass@3=98.6% | pass^3=44.0%
--- TOP 3 AXIAL CATEGORIES (YOUR FIRST 3 METRICS) ---
#1 [loop_cascade] Monorepo Build-Order & Gate Loop Cascades: 37 failures (33.6%) -> metric `loop_cascade_rate`
Open codes: LINT-RATCHET-HYGIENE-GATE, TYPECHECK-BUILD-ORDER-CASCADE
Fix hint: Rebuild upstream @vsp/contracts + regenerate types before downstream typecheck; halt immediately on q.mjs exit 3.
#2 [test_iteration] Unit/Integration Assertion & Concurrency Test Iteration: 37 failures (33.6%) -> metric `test_iteration_rate`
Open codes: VITEST-ASSERTION-ITERATION
Fix hint: Run narrowest single test file while iterating; isolate Postgres advisory-lock fixtures per test.
#3 [runtime_drift] Agent Binary, Self-Update Stub & Model Catalog Drift: 15 failures (13.6%) -> metric `runtime_drift_rate`
Open codes: BINARY-SELF-UPDATE-STUB, ENV-PATH-SANDBOX, MODEL-CATALOG-MISMATCH, TEST-ARTIFACT-POLLUTION
Fix hint: Resolve native claude.exe (>4KB) and desktop codex.exe directly; isolate test runs via HARNESS_RUNS_DIR.
--- COMPUTED FIRST 3 METRICS ---
1. loop_cascade_rate_pct = 15.9% (loop_guard_breach_count = 10)
2. runtime_drift_rate_pct = 6.6%
3. premature_kill_rate_pct = 4.9%
Exports an anonymized trace corpus with high-entropy tokens and secrets redacted:
# Standard JSONL corpus
reval trace export --root . --out-dir fixtures/ --format jsonl
# OpenTelemetry and OpenInference spans
reval trace export --root . --out-dir fixtures/ --format otelEvaluates trace reliability against ratcheted thresholds, ensuring pass rates never backslide:
reval gate \
--corpus fixtures/traces.jsonl \
--baseline fixtures/baseline.json \
--write-proof fixtures/proof.jsonOutput:
PASS: all 6 axial metric gates passed (proof_sha256=66dee7210f9f...)
[PASS] loop_cascade_rate_pct observed=15.9 <= threshold=20
[PASS] loop_guard_breach_count observed=10 <= threshold=10
[PASS] runtime_drift_rate_pct observed=6.6 <= threshold=8
[PASS] premature_kill_rate_pct observed=4.9 <= threshold=5
[PASS] pass_at_1 observed=0.7603 >= threshold=0.75
[PASS] pass_at_3 observed=0.9862 >= threshold=0.98
Verifies .env files are not committed, pnpm/cargo lockfiles are intact, and skill markdown references point to real files:
reval hygiene .These subcommands accept --json to output TechTide's canonical harness envelope: trace analyze, trace export, trace lessons, trace tree, eval suite, gate, and hygiene. trace graph selects JSON with --format json instead (raw graph, no envelope), and watch and mcp have no JSON output flag (mcp speaks JSON-RPC over stdio).
Envelope shape:
{
"status": "success",
"summary": "PASS: all 6 axial metric gates passed (proof_sha256=66dee7210f9f...)",
"next_actions": ["commit proof bundle if corpus updated"],
"artifacts": ["fixtures/baseline.json"],
"data": { ... }
}reval/
├── Cargo.toml # Rust 2021 edition (MSRV 1.82), pure Rust dependencies
├── .cargo/config.toml # Lints, target optimizations
├── .github/workflows/ci.yml # Multi-platform CI (Ubuntu, macOS, Windows)
├── .github/workflows/release.yml # Multi-target automated binary releases
├── reval.ps1 # PowerShell wrapper
├── fixtures/ # Calibrated traces, baselines, proofs and dashboard
└── src/
├── main.rs # CLI parser (clap derive)
├── lib.rs # Library root export
├── error.rs # RevalError domain error enum
├── envelope.rs # HarnessEnvelope JSON protocol schema
├── watch/ # Active Poltergeist-style zero-CPU sentinel watcher
├── mcp/ # Native Model Context Protocol (MCP) server
├── tree/ # Hierarchical trace tree and HTML exporter
├── ingest/ # Corpus ingestion and regex secret redaction
│ ├── golang.rs # `go test -json` streaming parser
│ ├── rust.rs # `cargo test/clippy` JSON event parser
│ ├── harness.rs # Multi-agent prompt/stdout/result loader
│ └── otel.rs # OpenTelemetry & OpenInference exporter
├── coding/ # Husain/Shankar qualitative coding
│ ├── open.rs # Free-text failure annotation
│ ├── axial.rs # Clustering into 6 axial categories
│ ├── top3.rs # Ranking and Top 3 metric derivation
│ ├── causal.rs # Directed Bayesian Causal Failure Transition Graph
│ └── lessons.rs # Proactive agent memory query engine
├── eval/ # Stratified golden test evaluation
│ ├── checks.rs # Deterministic regex, json, and hybrid judge checks
│ ├── rubric.rs # Blocker veto weighting and scoring
│ └── stratum.rs # Stratified score combination
├── gate/ # Continuous quality gating
│ ├── reliability.rs # Pass@1, Pass@3, Pass^3 calculation
│ ├── ratchet.rs # baseline.json threshold validator
│ └── proof.rs # Canonical JSON SHA-256 signed proof generator
└── hygiene/ # Static repo health checks
└── checks.rs # .env leaks, lockfile conflicts, dangling skills
reval is Tool 1 in The Complete TideOS Eval Kit:
| # | Tool | Crate | Release Binary | Core Responsibility |
|---|---|---|---|---|
| 1 | reval |
reval |
2.07 MB |
Trace Error Analysis, Gating & MCP Server |
| 2 | gild |
gild |
2.46 MB |
Golden Dataset Governance & Stratification |
| 3 | tessel |
tessel-eval |
1.97 MB |
Combinatorial Synthetic Scenario Generator |
| 4 | assay |
assay-eval |
2.09 MB |
Deterministic Assertions First & In-Memory RLS |
| 5 | tide-rill |
tide-rill |
1.54 MB |
Offline Retrieval Quality & Answer Faithfulness |
| 6 | keel |
keel-eval |
1.91 MB |
Agent Trajectory Alignment & Step Efficiency (14 vs 3 calls) |
| 7 | temper |
temper-eval |
0.89 MB |
Multi-Trial Reliability (pass@k vs pass^k at Real Temperature) |
| 8 | parley |
parley-eval |
1.77 MB |
Simulated Users for Multi-Turn State, Memory & Policy Evals |
Run the test suite and release build locally:
# Formatting
cargo fmt --all -- --check
# Clippy lints (warnings treated as errors)
cargo clippy --all-targets -- -D warnings
# Integration and property test suite (950+ randomized property iterations)
cargo test --all-targets
# Release build
cargo build --releaseMIT (c) TechTide AI & Alexi5000. See LICENSE for details.