{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/bitwise-media-group/evolve/main/schemas/results.schema.json", "title": "evolve results file (schema 5)", "description": "One skill's committed results (evals//results.; format selected by results_format). The file is nested model-major: each model key maps to that model's trigger and eval entries (skill -> model -> {triggers, evals}). Each per-eval result is a superset of a skill-creator grading.json document. Entries also retain prior states — previous (the run replaced) on both tiers and baseline (the same evals run without the skill) on the eval tier — as a trimmed results array, so deltas are computable without re-running. Consumers must treat an absent key and an explicit null identically.", "type": "object", "required": ["schema", "plugin", "skill"], "properties": { "$schema": { "type": "string" }, "schema": { "const": 5 }, "plugin": { "type": "string" }, "skill": { "type": "string" }, "models": { "allOf": [{ "$ref": "common.schema.json#/$defs/modelKeyMap" }], "additionalProperties": { "$ref": "#/$defs/modelEntry" } } }, "additionalProperties": true, "$defs": { "modelEntry": { "description": "One model's trigger and eval entries; either may be absent when that tier has not run.", "type": "object", "properties": { "triggers": { "$ref": "#/$defs/triggerEntry" }, "evals": { "$ref": "#/$defs/evalEntry" } }, "additionalProperties": true }, "triggerEntry": { "allOf": [ { "$ref": "common.schema.json#/$defs/header" }, { "type": "object", "required": ["results", "summary"], "properties": { "results": { "type": "array", "items": { "$ref": "#/$defs/triggerResult" } }, "summary": { "$ref": "#/$defs/triggerSummary" }, "previous": { "$ref": "#/$defs/triggerSnapshot" } } } ] }, "triggerSnapshot": { "description": "A record of one prior trigger run: its summary plus a results array of the same triggerResult shape as the live run.", "type": "object", "required": ["summary"], "properties": { "ran_at": { "type": "string", "format": "date-time" }, "summary": { "$ref": "#/$defs/triggerSummary" }, "results": { "type": "array", "items": { "$ref": "#/$defs/triggerResult" } } }, "additionalProperties": true }, "triggerResult": { "type": "object", "required": ["query", "should_trigger"], "properties": { "query": { "type": "string" }, "should_trigger": { "type": "boolean" }, "hits": { "type": "integer", "minimum": 0 }, "runs": { "type": "integer", "minimum": 1 }, "passed": { "type": ["boolean", "null"] }, "avg_run_seconds": { "type": "number", "minimum": 0 }, "estimate": { "$ref": "common.schema.json#/$defs/estimate" }, "spec_hash": { "description": "Fingerprint of this trigger's authored JSON definition when the result was written; `evolve run --modified` reruns the query when it differs. Absent on results written before fingerprinting.", "type": "string" } }, "additionalProperties": true }, "triggerSummary": { "type": "object", "required": ["total"], "properties": { "passed": { "type": "integer", "minimum": 0 }, "failed": { "type": "integer", "minimum": 0 }, "total": { "type": "integer", "minimum": 0 }, "pass_rate": { "type": "number", "minimum": 0, "maximum": 1 }, "avg_run_seconds": { "type": "number", "minimum": 0 }, "estimate": { "$ref": "common.schema.json#/$defs/estimate" } }, "additionalProperties": true }, "evalEntry": { "allOf": [ { "$ref": "common.schema.json#/$defs/header" }, { "type": "object", "required": ["results", "summary"], "properties": { "results": { "type": "array", "items": { "$ref": "#/$defs/evalResult" } }, "summary": { "$ref": "#/$defs/evalSummary" }, "baseline": { "$ref": "#/$defs/evalSnapshot" }, "previous": { "$ref": "#/$defs/evalSnapshot" } } } ] }, "evalSnapshot": { "description": "A record of one prior eval run (previous or without-skill baseline): its summary plus a results array of the same evalResult shape as the live run, trimmed of the bulky expectations/execution-metrics/timing detail.", "type": "object", "required": ["summary"], "properties": { "ran_at": { "type": "string", "format": "date-time" }, "summary": { "$ref": "#/$defs/evalSummary" }, "results": { "type": "array", "items": { "$ref": "#/$defs/evalResult" } } }, "additionalProperties": true }, "evalResult": { "description": "One eval's outcome: grading.json's expectations/summary/execution_metrics/timing (and, once populated, claims/user_notes_summary/eval_feedback) plus evolve's identity, token, and cost extras. Count-only runs carry just id and estimate.", "type": "object", "required": ["id"], "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "passed": { "type": ["boolean", "null"] }, "estimate": { "$ref": "common.schema.json#/$defs/estimate" }, "measured": { "$ref": "common.schema.json#/$defs/measured" }, "expectations": { "type": "array", "items": { "$ref": "grading.schema.json#/$defs/expectation" } }, "summary": { "$ref": "grading.schema.json#/$defs/summary" }, "execution_metrics": { "$ref": "metrics.schema.json" }, "timing": { "$ref": "timing.schema.json" }, "claims": { "type": "array", "items": { "$ref": "grading.schema.json#/$defs/claim" } }, "user_notes_summary": { "$ref": "grading.schema.json#/$defs/userNotesSummary" }, "eval_feedback": { "$ref": "grading.schema.json#/$defs/evalFeedback" }, "spec_hash": { "description": "Fingerprint of this eval's authored JSON definition when the result was written; `evolve run --modified` reruns the eval when it differs. Absent on results written before fingerprinting.", "type": "string" }, "fingerprint": { "description": "Baseline-snapshot results only: the eval spec+fixtures fingerprint the baseline was run against, so a baseline is recomputed only when the eval changes. Absent elsewhere.", "type": "string" } }, "additionalProperties": true }, "evalSummary": { "type": "object", "required": ["total"], "properties": { "passed": { "type": "integer", "minimum": 0 }, "failed": { "type": "integer", "minimum": 0 }, "total": { "type": "integer", "minimum": 0 }, "pass_rate": { "type": "number", "minimum": 0, "maximum": 1 }, "avg_run_seconds": { "type": "number", "minimum": 0 }, "estimate": { "$ref": "common.schema.json#/$defs/estimate" }, "measured": { "$ref": "common.schema.json#/$defs/measured" } }, "additionalProperties": true } } }