{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://aivsgames.com/data/schema/run-record.schema.json",
  "title": "AI vs Games run record",
  "description": "One achievement by one model (or agent) in one game under one configuration. Records are never combined across games.",
  "type": "object",
  "required": [
    "id",
    "game",
    "game_name",
    "section",
    "model",
    "model_as_published",
    "config",
    "achievement",
    "evidence",
    "verification",
    "last_checked"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9-]+$"
    },
    "game": {
      "type": "string",
      "description": "Game slug. One game per record."
    },
    "game_name": {
      "type": "string"
    },
    "section": {
      "enum": [
        "pokemon",
        "kaggle",
        "minecraft",
        "more"
      ]
    },
    "project": {
      "type": "string",
      "description": "Run, stream or benchmark that produced the record."
    },
    "model": {
      "type": "string",
      "description": "Canonical exact model version (see data/model_map.json)."
    },
    "model_as_published": {
      "type": "string",
      "description": "Model label exactly as the source writes it."
    },
    "agent": {
      "type": [
        "string",
        "null"
      ],
      "description": "Agent / team name when the entrant is an agent rather than a bare model."
    },
    "config": {
      "type": "object",
      "required": [
        "harness",
        "inputs",
        "tools",
        "assistance",
        "budget"
      ],
      "properties": {
        "harness": {
          "type": "string"
        },
        "inputs": {
          "type": "string"
        },
        "tools": {
          "type": "string"
        },
        "assistance": {
          "type": "string",
          "description": "Human help, resets, hints. 'not disclosed' when unknown."
        },
        "budget": {
          "type": "string",
          "description": "Reasoning effort, time, step or cost budget. 'not disclosed' when unknown."
        }
      }
    },
    "achievement": {
      "type": "object",
      "required": [
        "summary"
      ],
      "properties": {
        "summary": {
          "type": "string"
        },
        "metric": {
          "type": "string"
        },
        "value": {},
        "rank": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "run_status": {
      "enum": [
        "live",
        "finished",
        "idle",
        "paused",
        "published",
        "unknown"
      ]
    },
    "started": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "achieved": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "Date of the achievement if the source states it; else null."
    },
    "evidence_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "Date of the newest evidence used."
    },
    "evidence": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "label",
          "url"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "kind": {
            "enum": [
              "primary",
              "operator",
              "creator",
              "secondary"
            ]
          }
        }
      }
    },
    "verification": {
      "enum": [
        "verified",
        "creator-reported",
        "awaiting"
      ],
      "description": "verified = checked against primary evidence (game telemetry, save/turn logs, official leaderboard or replays). creator-reported = stated by the run's creator or authors, not independently checked. awaiting = unconfirmed, conflicting, or missing key facts."
    },
    "verification_note": {
      "type": "string"
    },
    "story": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional fan-facing note: memorable moment or failure."
    },
    "unknowns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "last_checked": {
      "type": "string",
      "format": "date"
    },
    "track": {
      "enum": [
        "adventure",
        "benchmark"
      ],
      "description": "adventure = an open-ended run of a full game (Agent Adventures); benchmark = a fixed evaluation or ladder run by an operator (Official Benchmarks)."
    },
    "failure": {
      "type": "boolean",
      "description": "Shown as a memorable failure, not an achievement."
    },
    "last_verified": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "Last date the value was confirmed against primary evidence. Null for creator-reported/awaiting records."
    },
    "change_note": {
      "type": "string",
      "description": "Plain statement of the last detected change, or that nothing changed."
    },
    "source_run": {
      "type": "string"
    },
    "discovered": {
      "type": "string",
      "format": "date",
      "description": "Date AI vs Games first recorded this result (never confused with the published date)."
    },
    "published": {
      "type": [
        "string",
        "null"
      ],
      "description": "Date the evidence was published (null if unknown)."
    }
  }
}