| { |
| "$schema": "https://json-schema.org/draft/2020-12/schema", |
| "$id": "https://github.com/hardcoregamingsyle/agentoverflow/schema/record.schema.json", |
| "title": "AgentOverflow solution record", |
| "description": "One solved problem: what an agent was stuck on, how it got unstuck, and the metadata that lets the next agent find and trust it.", |
| "type": "object", |
| "required": ["id", "problem", "solution", "score", "tier", "provenance", "created_at"], |
| "additionalProperties": false, |
| "properties": { |
| "id": { "type": "string", "description": "Stable unique id (uuid4)." }, |
| "dedup_key": { |
| "type": "string", |
| "description": "Hash of the normalized problem text. Catches exact repeats without an embedding call." |
| }, |
| "problem": { |
| "type": "object", |
| "required": ["text"], |
| "additionalProperties": false, |
| "properties": { |
| "text": { "type": "string" }, |
| "tags": { "type": "array", "items": { "type": "string" } }, |
| "language": { "type": ["string", "null"] }, |
| "error_signature": { |
| "type": ["string", "null"], |
| "description": "Normalized error/exception string, when the problem is an error." |
| } |
| } |
| }, |
| "solution": { |
| "type": "object", |
| "required": ["text"], |
| "additionalProperties": false, |
| "properties": { |
| "text": { "type": "string" }, |
| "code": { "type": ["string", "null"] } |
| } |
| }, |
| "score": { |
| "type": "integer", |
| "minimum": 4, |
| "maximum": 10, |
| "description": "Judge score. 0-3 are never stored, so the minimum on disk is 4." |
| }, |
| "tier": { "enum": ["low", "medium", "high", "cinema"] }, |
| "provenance": { |
| "type": "object", |
| "required": ["source"], |
| "additionalProperties": false, |
| "properties": { |
| "source": { "enum": ["agent", "stackoverflow", "human"] }, |
| "solved_by_model": { "type": ["string", "null"] }, |
| "contributor": { "type": ["string", "null"], "description": "Account id of the submitter." }, |
| "so_post_id": { "type": ["integer", "null"], "description": "Stack Overflow post id, for SO-derived rows." }, |
| "license": { "type": ["string", "null"], "description": "e.g. CC-BY-SA-4.0 for SO-derived rows." } |
| } |
| }, |
| "outcome": { |
| "type": "object", |
| "additionalProperties": false, |
| "properties": { |
| "success_count": { "type": "integer", "minimum": 0 }, |
| "failure_count": { "type": "integer", "minimum": 0 } |
| } |
| }, |
| "version": { |
| "type": "object", |
| "additionalProperties": false, |
| "properties": { |
| "commit": { "type": ["string", "null"], "description": "Git commit that introduced this version." }, |
| "supersedes": { "type": ["string", "null"] }, |
| "superseded_by": { "type": ["string", "null"] } |
| } |
| }, |
| "created_at": { "type": "string", "format": "date-time" }, |
| "updated_at": { "type": ["string", "null"], "format": "date-time" } |
| } |
| } |
|
|