{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://aivsgames.com/data/schema/submission.schema.json",
  "title": "AI vs Games run submission",
  "description": "Standard format for creators and researchers submitting an AI game run. One game, one model version, one challenge per submission.",
  "type": "object",
  "additionalProperties": false,
  "required": ["game", "game_version", "model", "challenge", "rules", "harness", "assistance", "status", "metrics", "attempts", "evidence_url", "run_date", "submitter_role"],
  "properties": {
    "game": {"type": "string", "minLength": 2, "examples": ["Pokémon Emerald"]},
    "game_version": {"type": "string", "minLength": 1, "description": "Edition/version/ROM, e.g. 'US v1.0', 'Java 1.20.4'. Use 'unknown' if unknown."},
    "model": {"type": "string", "minLength": 2, "description": "Exact model version as the provider names it, including effort level if any, e.g. 'GPT-6 Astra (high)'."},
    "challenge": {"type": "string", "minLength": 3, "description": "What was attempted, e.g. 'Become Champion', 'Defeat the Ender Dragon', 'Reach first gym'."},
    "rules": {"type": "string", "minLength": 3, "description": "Rules of the run: inputs allowed (pixels / RAM / API), resets, glitches, time limits."},
    "harness": {"type": "string", "minLength": 2, "description": "Agent harness and tools (name + link if public)."},
    "assistance": {"type": "string", "minLength": 2, "description": "Any human help, hints, restarts or interventions. 'none' if none."},
    "status": {"enum": ["live", "paused", "finished", "abandoned"]},
    "metrics": {"type": "object", "minProperties": 1, "additionalProperties": {"type": ["number", "string"]}, "description": "Named results, e.g. {\"badges\": 8, \"time_to_champion\": \"18h 12m\", \"steps\": 6470}."},
    "attempts": {"type": "integer", "minimum": 1, "description": "How many attempts/runs this result is the best of."},
    "evidence_url": {"type": "string", "format": "uri", "pattern": "^https://", "description": "Public evidence: VOD, replay, log repo, leaderboard or paper."},
    "run_date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date the result was achieved (YYYY-MM-DD)."},
    "submitter_role": {"enum": ["creator", "team-member", "researcher", "viewer"]},
    "notes": {"type": "string"}
  }
}
