evals schema (v0.2)
The models/evals.json file is validated by the normative JSON Schema published at its canonical URL:
- $id: https://contextbrew.dev/schemas/evals/v0.2/schema.json
- Format version:
0.2.0 - Schema dialect: draft-07
- Validate with:
ctx schema evalsor any JSON Schema validator (ajv, VS Code, …)
Root object: EvalsFile
Section titled “Root object: EvalsFile”| Property | Type | Required | Description |
|---|---|---|---|
kind | "evals-file" | yes | |
schemaVersion | "0.2.0" | "0.1.0" | yes | 0.2.0 — usage-evidence spike (2026-11-06): negative case kind and the optional requiresSection per case (the load-dependence hook — any runner can record "the served context contained this section"). 0.1.0 — initial version. The union keeps the additive contract per the model-schema versioning convention (read old, write current — see formats/registry.ts). |
suites | EvalSuite[] | yes | |
notes | string | no |
Definitions
Section titled “Definitions”EvalCase
Section titled “EvalCase”| Property | Type | Required | Description |
|---|---|---|---|
id | string | yes | Stable within its suite. |
kind | EvalCaseKind | yes | How this case judges — see EvalCaseKind . |
subject | string | yes | The element this case exercises (usually a member of the suite's targets). |
input | string | yes | Prompt / probe question / fixture reference. |
expectation | string | yes | Ground truth, property, or gherkin asset path. |
requiresSection | string | no | 0.2.0 — the pour section key this case depends on (e.g. recipe:recipe-005, task:<id>, a project-relative file path — the same keys pours and the pour meter address). A runner records the "loaded" dimension per case by checking the served context for this key. Absent = the case makes no load-dependence claim. |
tolerance | string | no | Grading tolerance for graded probes (free text; runner-interpreted). |
EvalCaseKind
Section titled “EvalCaseKind”How one case judges its subject.
Type: "golden" | "property" | "probe" | "gherkin" | "negative"
EvalSuite
Section titled “EvalSuite”| Property | Type | Required | Description |
|---|---|---|---|
kind | "eval-suite" | yes | |
id | string | yes | Stable handle — recipe manifests reference suites by this id. |
name | string | yes | |
tier | EvalTier | yes | |
targets | | yes | Model-element ids this suite exercises: CBRL requirement ids, DDD aggregate names, SCM screen ids, … — the linkage that makes the eval-coverage term computable per scope (regen dry-run, planned). |
cases | EvalCase[] | yes | |
provenance | string | no | Where the expectations came from — free text or a decision id. |
EvalTier
Section titled “EvalTier”The three evaluation tiers (“Evaluations Are the Real Codebase”).
Type: "generation" | "understanding" | "behavior"
Sample documents
Section titled “Sample documents”Expand a sample below to inspect its JSON or download the source file.
Download demo-01-travel-booking-suites.evals.json
demo-01-travel-booking-suites.evals.json — Demo 1 — Eval suites for the travel-booking sample: one generation-tier suite (golden + property cases against the CBRL requirement and DDD aggregate) and one behavior-tier probe suite (form validation copy against an SCM screen). (expand for full JSON)
{ "kind": "evals-file", "schemaVersion": "0.1.0", "suites": [ { "kind": "eval-suite", "id": "EVAL-GEN-TRAVEL-001", "name": "Travel booking generation checks", "tier": "generation", "targets": ["REQ-001-create-booking", "Booking"], "cases": [ { "kind": "golden", "id": "CASE-001-booking-golden", "subject": "REQ-001-create-booking", "input": "Generate the booking creation flow from the CBRL requirement.", "expectation": "fixtures/travel-booking/booking-golden.json" }, { "kind": "property", "id": "CASE-002-booking-idempotent", "subject": "Booking", "input": "Create the same booking twice with the same request id.", "expectation": "Exactly one booking row exists; the second call returns the first booking.", "tolerance": "strict" } ], "provenance": "Derived from the travel-booking CBRL requirements and DDD aggregate." }, { "kind": "eval-suite", "id": "EVAL-BEH-TRAVEL-001", "name": "Travel booking behavior probes", "tier": "behavior", "targets": ["SCM-SCREEN-BOOKING-FORM"], "cases": [ { "kind": "probe", "id": "CASE-003-form-validation-copy", "subject": "SCM-SCREEN-BOOKING-FORM", "input": "What validation copy does the booking form show for a past return date?", "expectation": "Return date must be after the departure date.", "tolerance": "graded" } ], "provenance": "ADR-002-auth-system" } ], "notes": "Demo suite pair covering the generation and behavior tiers against the travel-booking sample."}What this model produces
Section titled “What this model produces”The evals model is one of the richly-curated records — every downstream surface (CLI, MCP, docs, tests) reads from one record. The pasteable snippet below is the Door 1 anchor a downstream agent should see before touching this model.
- **Evals v0.2.0** — `models/evals.json`. Produces: Eval suites referenced by id from recipe manifests (`RecipeManifest.evals`, 0.2.0) and consumed by the eval-coverage term; runner wiring lands with the regen dry-run work (planned). Oracle: a suite's own cases are the oracle — golden/property/probe/gherkin; understanding probes grade agent answers against ground truth derived from the model itself. Downstream: `ctxbrew semantics evals` · `ctxbrew://semantics/evals/v0.2.0` — read the record first.The full record (every door — anchor template, tool description hint, response annotations, behavior tripwire, and the complete produced-surface list) is served as JSON at:
- CLI —
ctxbrew semantics evals --schema-version 0.2.0 - MCP —
ctxbrew://semantics/evals/v0.2.0 - HTTP —
https://contextbrew.dev/schemas/evals/v0.2/semantics.json
See the schemas overview for the versioning policy and how these files are generated and kept in sync.
