Home / Concepts

Functional specification

This page states what EvalSutra does, in behaviour a tester can check. Each rule is covered by an automated test or an audit check (IDs in brackets).

Users and goals#

UserGoal
Agent developerKnow if a change made the agent worse
QA engineerWrite repeatable acceptance cases for agent behaviour
Release managerGet a gate decision with reasons
Security reviewerProve a forbidden tool or leaked canary is caught
AuditorRe-run checks and compare expected vs observed

Inputs#

  1. Suite (JSON): name, optional gate thresholds, list of cases. A case has an id (kebab-case), optional title, critical, skip, and one or more assertions.
  2. Observations (JSON): for each case id, what was recorded: output (text), toolCalls (list of tool names), latencyMs, and sourceType.
  3. Trace (JSON, optional): an ordered list of events (tool_call, final) for deeper analysis.

Assertions (11 types)#

TypePasses whenMissing evidence gives
equalsoutput is exactly the valueinconclusive
normalized_equalsequal after trim, whitespace collapse, lowercase, Unicode NFKCinconclusive
containsoutput includes the textinconclusive
not_containsoutput does not include the text (use for canary leaks)inconclusive
regexpattern matches; patterns over 200 characters or with nested quantifiers are rejectedinconclusive; unsafe or invalid pattern gives error
json_has_keysoutput is a JSON object with all keysinconclusive; invalid JSON is fail
required_toolsevery named tool was calledinconclusive (no trace)
forbidden_toolsnone of the named tools was calledinconclusive (no trace)
tool_ordertools appear in the given order (other calls allowed between)inconclusive
max_stepsnumber of tool calls is at most Ninconclusive
max_latency_msrecorded latency is at most Ninconclusive

Statuses#

pass, fail, inconclusive, error, skipped, not_supported. Every assertion result carries a machine-readable reason code such as OK, MISMATCH, OUTPUT_MISSING, TRACE_MISSING, LATENCY_MISSING, WEAK_SOURCE, UNSAFE_REGEX.

A case takes the worst assertion status in this order: fail, error, not_supported, inconclusive, pass. Skipped cases are counted separately and never as passes. [E3]

How one assertion gets its status

Evidence hierarchy#

Strong evidence

Can prove pass or fail

  • PASS + FAILactual_runYou ran the agent and recorded it
  • PASS + FAILimported_traceLogs from a real run
  • PASS + FAILhuman_labelA person checked it
  • PASS + FAILtest_fixtureControlled sample data
Weak evidence

Can only prove fail

  • FAIL ONLYmodel_judgeOpinion of another model
  • FAIL ONLYunverified_claimThe agent says it worked

A would-be pass becomes inconclusive. A failure still counts, because acting on a problem is safe.

Observation sourceType is one of actual_run, imported_trace, human_label, test_fixture, model_judge, unverified_claim. If the type is model_judge or unverified_claim, a would-be pass becomes inconclusive (WEAK_SOURCE). A failure from such a source still counts, because evidence of a problem is safe to act on. [E2]

Scoring#

Release gate#

How the release gate is decided
GateCondition
NO_GOany failed case, or any critical failure, or pass rate below the threshold
REVIEWno failures, but coverage below threshold, a critical case not proven, any inconclusive, error or not_supported case, or nothing scored
GO_CANDIDATEall of the above clear

Defaults: minPassRate 1, minCoverage 1. A suite can lower them in its gate block. GO_CANDIDATE is never deployment approval. [E1, E4, E5]

Comparison (regression firewall)#

How two runs are compared

compare pairs cases by id between a baseline and a candidate report.

VerdictMeaning
FAILat least one case went from pass to fail
INCONCLUSIVEcase sets differ, suite names differ, or fewer than 5 scored pairs (it abstains instead of guessing)
PASSno regression and comparison conditions hold

The result also contains an exact two-sided sign-test p-value on regressions versus improvements, and a list of confounders. [E6]

Trace analysis findings#

FORBIDDEN_TOOL, UNAUTHORIZED_TOOL (not in allowlist), SECRET_IN_ARGS, SECRET_IN_OUTPUT, REDUNDANT_LOOP (same tool and arguments 3 times in a row), UNSUPPORTED_SUCCESS_CLAIM (final text claims success but the last tool call failed), FINAL_MISSING, RESULT_UNKNOWN. Each finding names the event id that proves it. [T1, T2]

Reports#

Every run writes report.json, report.md, report.html, junit.xml. Report HTML is accessible (skip link, semantic table, status as text plus symbol, light theme, print styles) and contains no script. All user text is escaped. [S1]

Repro capsule#

Reproducibility capsule (hashed, not signed)

repro export writes redacted copies of suite, observations and report plus manifest.json with a SHA-256 per file. repro verify detects any changed, missing or renamed file. The capsule is not signed, so it detects accidents and casual edits, not a determined forger.

Skill installer#

install copies the 18 skills into the project folder for a chosen IDE, previews with --dry-run, never overwrites, refuses to write outside the project (traversal or symlink), and records SHA-256 of each file. uninstall removes only files that are unchanged since install.

Self-audit#

audit runs 29 checks on the tool itself and writes MD, HTML and JSON. See Audit and trust.

Non-functional requirements#

RequirementHow it is met
Works offline, no keysno network APIs in source [S4]
Deterministicsame inputs give identical output [R1, R2]
Cross-platformCI on Ubuntu, Windows, macOS; Node 22, 24, 26
Small attack surfacezero dependencies, no lifecycle scripts [S5, S6]
Accessible outputsemantic HTML, WCAG-minded colour contrast, no colour-only status