Skip to content

CTRF reference ​

Every run writes one CTRF document: <out>/<suite>/<runId>.ctrf.json.

text
<out>/<suite>/<runId>.ctrf.json
├── reportFormat "CTRF", specVersion "1.0.0", reportId, runId, timestamp, generatedBy
└── results
    ├── tool          {name "proctor", version}
    ├── summary       {tests, passed, failed, other, skipped, pending, suites, start, stop, duration}
    ├── environment   {reportName, commit, branchName, osPlatform, osRelease}
    │   └── extra     {agent {id, version, details}, sandbox {id}, isolation, judge?}
    ├── tests[]       one per trial, in matrix order
    │   ├── name "case [variant] #n", testId, executionId, suite [suite, case, variant]
    │   ├── status, duration, start, stop, message?, trace?, labels {case, variant, trial}
    │   └── extra     {criteria[], score, costUsd, model, pluginSha, tokens, turns,
    │                  agentDurationMs, transcript, judgeCalls, judgeCostUsd, judgeTokens,
    │                  judgeModel, judgeTranscripts, judgeTruncated,
    │                  mcpStubCalls?, mcpStubFallbacks?}
    └── extra         {aggregates {baseline, groups[], judge}, ablation[], suiteErrors?}
DecisionChoiceWhy
Reference schemactrf.schema.json@66e823c, vendored as is in test/fixtures/ctrf/every test validates the produced reports with ajv, without network
specVersion"1.0.0"SemVer string required by the schema, the value of the official examples
tests[].suitearray [suite, case, variant]the schema defines it as the hierarchy, from the top to the direct parent, minItems: 1
tests[].namecase [variant] #nreadable in CTRF tools
testId / executionIdsuite/case/variant / …#nstable id of the logical test, unique id of the trial
tests[].labelscase, variant, trialfilterable in CTRF tools
tests[].extracriteria[id, met, why, principal, decoy, grader], score, costUsd, model (resolved by the agent), pluginSha, tokens (including cache), turns, agentDurationMs, transcriptcriteria are identified by id, never by index
A single document per runCtrfReporter builds the CTRF once, writes it, then passes it to its sinks (<runId>.summary.md)the markdown comes exactly from the written JSON; two runs never overwrite each other
results.extra.aggregatesper case × variant: trials by status, criteria, decoys, principal, score, cost (mean ± standard deviation), duration, judge calls and cost; judge: run totalcomputed from the tests alone, so also on an archived CTRF
results.extra.ablationper case and variant ≠ --baseline: Δ criteria, Δ score, Δ cost, Δ pass ratethe delta vs baseline of claude plugin eval
tests[].extra.judge*judgeCalls (retries included), judgeCostUsd, judgeTokens, judgeModel, judgeTranscripts, judgeTruncated ({diffBytes, answerBytes} omitted from the prompt)the judge's cost is never mixed with the agent's costUsd
tests[].extra.mcpStub*mcpStubCalls (calls the MCP stubs answered), mcpStubFallbacks (of those, answered by a fallback); absent when no stub answered a callcounts only: a report never holds a tool input or answer; the summary, the HTML report and the console note each trial with a fallback
environment.extra.judge{ id, version, details, sandbox, model? }the report says who judged
results.extra.suiteErrorspresent only if afterAll faileda suite error with no trial to carry it
results.environmentreportName, commit, branchName (omitted on a detached HEAD), osPlatform, osRelease, extra.{agent: {id, version, details}, sandbox, isolation}the schema forbids free fields outside extra; details carries the auth profile
environment.extra.isolationnone (fake), degraded, full; repeated in the summary headera report always says how isolated the run was