eval-view
AGENTS.md140 starsChanged 11 months agoApache-2.0View on GitHub
This file is written for coding agents working inside the EvalView repository. Use it as the fastest way to understand the architecture, the important invariants, and the common extension paths. For the repo's product and development philosophy, also read: EvalView is a regression gate for AI agents. Its core job is: EvalView is not just a scorer. It is opinionated around baseline comparison, regression detection, and developer-facing review flows. Internally, the intended loop is: Path: evalview/core/types.py TestCase is the declarative…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- generate-testsSkill
- run-evalSkill
- watchSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
30 rules. About 0 are common, 27 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈27
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 4
Use it as the fastest way to understand the architecture, the important invariants, and the common extension paths.
- Distinctive: line 30
run the relevant behavior-tagged slice
- Distinctive: line 49
If you are changing test-loading or authoring behavior, inspect:
- Distinctive: line 145
Use this as the shortest repo map.
- Distinctive: line 234
If you touch multi-turn execution, inspect:
- Distinctive: line 244
Do not violate these without intentionally changing the product contract.
- Distinctive: line 256
Use the linked recipes for procedures.
- Distinctive: line 258
add a new adapter
- Distinctive: line 259
add a new evaluator
- Distinctive: line 260
add a new report field
- Distinctive: line 261
add a CLI option
- Distinctive: line 263
update snapshot/check flow
- Distinctive: line 275
Use this before editing.
- Distinctive: line 338
Run the narrowest checks that cover your change, then widen if needed.
- Distinctive: line 363
Keep these patterns in mind.
- Very specific: line 365
if you edit evalview/core/types.py, check loaders, adapters, goldens, and reports
- Distinctive: line 366
if you add a CLI flag, check command parsing, behavior, report wiring, and tests
- Distinctive: line 367
if you add a new diff field, wire it through terminal output, JSON output, and HTML if user-visible
- Distinctive: line 368
if you add a new evaluator, decide whether it affects score, pass/fail, reports, and CI semantics
- Distinctive: line 369
if you touch healing, preserve auditability and explicit failure semantics
- Distinctive: line 373
If your task is: "set up regression tracking for our new Ollama models"
- Distinctive: line 402
Run these commands first when feasible:
- Very specific: line 410
After every code change, run pytest -q on the relevant test files before reporting success.
- Distinctive: line 411
Do not assume an edit is correct without verification.
- Distinctive: line 415
do not assume all adapters return the same raw response shape
- Distinctive: line 416
do not assume score alone determines pass/fail
- Very specific: line 417
do not assume check should mutate original diffs
- Distinctive: line 418
do not assume HTML reports are optional for user-facing review flows
- Distinctive: line 419
do not assume a green exit code means "no differences".
- Distinctive: line 421
If the task is procedural, prefer using the linked recipes instead of rediscovering the path from scratch.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
EvalView Agent Instructions
This file is written for coding agents working inside the EvalView repository. Use it as the fastest way to understand the architecture, the important invariants, and the common extension paths.
For the repo's product and development philosophy, also read:
docs/OPERATING_MODEL.md
What EvalView Is
EvalView is a regression gate for AI agents.
Its core job is:
- Load test cases.
- Execute them against an agent backend.
- Evaluate outputs, tool use, cost, latency, and safety-related checks.
- Save baselines with
snapshot. - Compare current behavior against baselines with
check. - Render reviewable terminal and HTML diffs.
EvalView is not just a scorer. It is opinionated around baseline comparison, regression detection, and developer-facing review flows.
Internally, the intended loop is:
- specify the behavior change
- implement with agent help
- review hard
- run the relevant behavior-tagged slice
- snapshot intentional deltas
- run
check - ship
Core Concepts
TestCase
Path: evalview/core/types.py
TestCase is the declarative input spec. It includes:
- the input prompt or turns
- expected tools and sequences
- thresholds
- optional contains / not_contains / regex / schema checks
- optional per-test adapter and endpoint overrides
If you are changing test-loading or authoring behavior, inspect:
evalview/core/types.pyevalview/core/loader.py
EvaluationResult
Path: evalview/core/types.py
EvaluationResult is the evaluated output of one executed test. It contains:
passedscoreevaluationstrace- timestamps and metadata
This is the main object passed into reports, baselines, and diffing helpers.
GoldenStore
Path: evalview/core/golden.py
GoldenStore persists and loads baselines and variants from .evalview/golden/.
Use it for:
- saving baselines during
snapshot - loading all variants during
check - counting and managing variants
DiffEngine
Path: evalview/core/diff.py
DiffEngine compares current traces/results against saved goldens.
It produces TraceDiff, which drives:
- terminal status output
- HTML diffs
- root-cause analysis
- healing decisions
Adapters
Primary paths:
evalview/adapters/base.pyevalview/core/adapter_factory.pyevalview/adapters/http_adapter.py
Adapters convert an agent backend into an ExecutionTrace.
The adapter contract is strict:
- input:
queryand optionalcontext - output:
ExecutionTrace - health checks are optional but useful
Evaluators
Primary paths:
evalview/evaluators/evaluator.pyevalview/evaluators/tool_call_evaluator.pyevalview/evaluators/output_evaluator.pyevalview/evaluators/sequence_evaluator.py
The top-level Evaluator orchestrates all evaluation components and computes the final score and pass/fail result.
Current overall score weighting is:
- tool accuracy: 30%
- output quality: 50%
- sequence correctness: 20%
Commands
CLI entrypoint:
evalview/cli.py
Common command modules:
evalview/commands/check_cmd.pyevalview/commands/check_display.pyevalview/commands/snapshot_cmd.pyevalview/commands/shared.pyevalview/commands/generate_cmd.pyevalview/commands/watch_cmd.py
shared.py contains key execution helpers used by both snapshot and check.
System Architecture Map
Use this as the shortest repo map.
- CLI registration:
evalview/cli.py - command implementations:
evalview/commands/ - shared execution helpers:
evalview/commands/shared.py - adapters:
evalview/adapters/ - evaluator orchestration:
evalview/evaluators/evaluator.py - core domain types:
evalview/core/types.py - diffing:
evalview/core/diff.py - golden storage:
evalview/core/golden.py - healing engine:
evalview/core/healing.py - root-cause analysis:
evalview/core/root_cause.py - HTML reports:
evalview/visualization/generators.py - project state and streaks:
evalview/core/project_state.py - tests:
tests/
Runtime Contracts
HTTP /execute Contract
Primary implementation:
evalview/adapters/http_adapter.py
EvalView sends:
{
"query": "user input",
"context": {},
"enable_tracing": true
}The generic HTTP adapter accepts several response shapes, but the safest format is:
{
"output": "final answer",
"tool_calls": [
{
"name": "lookup_order",
"arguments": {"order_id": "123"},
"result": {"status": "found"},
"latency": 12.5,
"cost": 0.001
}
],
"cost": 0.002,
"latency": 75.0,
"tokens": {
"input": 120,
"output": 48
}
}Also accepted by the HTTP adapter:
responseinstead ofoutputstepsinstead oftool_calls- nested token metadata in
metadata
Tracing Requirements
Adapters should preserve as much execution detail as possible.
Minimum useful fields:
- final output
- per-step tool names
- per-step parameters
- per-step latency and cost when available
- total metrics
The target object is ExecutionTrace in evalview/core/types.py.
Multi-turn Expectations
Multi-turn execution is handled in:
evalview/commands/shared.py
Important:
- each turn should still map into one combined
ExecutionTrace - per-turn outputs and tool paths matter
turn_indexand turn metadata should be preserved when available
If you touch multi-turn execution, inspect:
evalview/commands/shared.pyevalview/core/types.pyevalview/core/golden.pyevalview/core/diff.pytests/test_multi_turn_evaluation.py
Invariants
Do not violate these without intentionally changing the product contract.
- forbidden tool violations are never auto-healed
- raw check results are preserved; presentation and healing must not silently rewrite source evidence
- healing decisions must be auditable
- diffing policy must remain deterministic
- adapters must return
ExecutionTrace, not arbitrary JSON blobs - snapshot/check compatibility must be preserved when changing core types
- report changes should not change underlying evaluation semantics
Common Tasks For Agents
Use the linked recipes for procedures. These are the common task categories:
- add a new adapter
- add a new evaluator
- add a new report field
- add a CLI option
- integrate Ollama
- update snapshot/check flow
Recipes live in:
docs/agent-recipes/add-adapter.mddocs/agent-recipes/add-evaluator.mddocs/agent-recipes/debug-check-vs-snapshot-mismatch.mddocs/agent-recipes/extend-html-report.mddocs/agent-recipes/integrate-ollama.md
Change Impact Matrix
Use this before editing.
If you edit adapters
Also inspect:
evalview/adapters/base.pyevalview/core/adapter_factory.pyevalview/core/types.pytests/test_adapters.py
If you edit evaluator behavior or scoring
Also inspect:
evalview/evaluators/evaluator.py- relevant evaluator module in
evalview/evaluators/ evalview/core/types.pytests/test_evaluators.pytests/test_main_evaluator.py
If you edit diff semantics
Also inspect:
evalview/core/diff.pyevalview/core/root_cause.pyevalview/commands/check_display.pyevalview/visualization/generators.pytests/test_diff_engine.pytests/test_root_cause.py
If you edit snapshot/check execution flow
Also inspect:
evalview/commands/shared.pyevalview/commands/snapshot_cmd.pyevalview/commands/check_cmd.pyevalview/core/golden.pytests/test_check_cmd.pytests/test_snapshot_generated_workflow.py
If you edit healing
Also inspect:
evalview/core/healing.pyevalview/commands/check_cmd.pyevalview/commands/check_display.pyevalview/visualization/generators.pytests/test_healing.py
If you edit HTML reports
Also inspect:
evalview/visualization/generators.pyevalview/commands/check_cmd.pytests/test_visualization_generators.py
Verification Commands
Run the narrowest checks that cover your change, then widen if needed.
Typical commands:
pytest -q tests/test_check_cmd.py tests/test_healing.py tests/test_visualization_generators.py
python -m mypy evalview/commands/check_cmd.py evalview/core/healing.py evalview/visualization/generators.py
python -m evalview check tests/generated --heal --dry-run
python -m evalview check tests/generated --heal --strictFor adapter work:
pytest -q tests/test_adapters.pyFor diff work:
pytest -q tests/test_diff_engine.py tests/test_root_cause.pySafe Change Guidance
Keep these patterns in mind.
- if you edit
evalview/core/types.py, check loaders, adapters, goldens, and reports - if you add a CLI flag, check command parsing, behavior, report wiring, and tests
- if you add a new diff field, wire it through terminal output, JSON output, and HTML if user-visible
- if you add a new evaluator, decide whether it affects score, pass/fail, reports, and CI semantics
- if you touch healing, preserve auditability and explicit failure semantics
Agent Quickstart
If your task is: "set up regression tracking for our new Ollama models"
- Read:
AGENTS.mddocs/agent-recipes/integrate-ollama.md
- Inspect:
evalview/adapters/ollama_adapter.pyevalview/core/adapter_factory.pyevalview/commands/shared.pyevalview/core/types.py
- Verify:
pytest -q tests/test_adapters.pypython -m evalview check tests --dry-run
- Avoid:
- bypassing
ExecutionTrace - adding Ollama-specific logic to unrelated diff or report code unless needed
- bypassing
If You Are An Autonomous Coding Agent Working On EvalView
Inspect these files first before making assumptions:
evalview/cli.pyevalview/core/types.pyevalview/commands/shared.pyevalview/core/adapter_factory.pyevalview/evaluators/evaluator.pyevalview/core/diff.pyevalview/core/golden.py
Run these commands first when feasible:
rg --files evalview tests
pytest -q tests/test_check_cmd.py tests/test_healing.py tests/test_visualization_generators.py
python -m mypy evalview/commands/check_cmd.py evalview/core/healing.py evalview/visualization/generators.pyAfter every code change, run pytest -q on the relevant test files before reporting success.
Do not assume an edit is correct without verification.
Avoid these assumptions:
- do not assume all adapters return the same raw response shape
- do not assume score alone determines pass/fail
- do not assume
checkshould mutate original diffs - do not assume HTML reports are optional for user-facing review flows
- do not assume a green exit code means "no differences"; it only means current fail policy did not trigger
If the task is procedural, prefer using the linked recipes instead of rediscovering the path from scratch.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

