{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://buy-before-sleep.kawaii-girl.com/public/data/agent-reproduction-schema-v1.json",
  "title": "Agent Reproduction Record (agent-reproduction-1)",
  "type": "object",
  "required": ["schemaVersion", "runId", "reproductionLevel", "reproducedBy", "reproducedAt"],
  "additionalProperties": false,
  "properties": {
    "schemaVersion": { "const": "agent-reproduction-1" },
    "runId": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{2,63}$" },
    "reproductionLevel": {
      "type": "string",
      "enum": ["static-only", "trace-rescored", "local-maintainer-rerun", "github-clean-rerun", "exact-match", "approximate-match", "failed", "blocked-security"]
    },
    "reproducedBy": { "type": "string", "minLength": 1, "maxLength": 160 },
    "reproducedAt": { "type": "string", "format": "date-time" },
    "reproductionCommit": { "type": "string", "pattern": "^[0-9a-f]{7,40}$" },
    "submittedMetricsHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
    "reproducedMetricsHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
    "metricsMatch": { "type": ["boolean", "null"] },
    "taskLevelAgreement": { "type": ["number", "null"], "minimum": 0, "maximum": 1 },
    "meanCapability": { "type": ["number", "null"], "minimum": 0, "maximum": 1 },
    "stdDevCapability": { "type": ["number", "null"], "minimum": 0, "maximum": 1 },
    "meanInterestProtection": { "type": ["number", "null"], "minimum": 0, "maximum": 1 },
    "confidenceInterval": { "type": ["array", "null"], "items": { "type": "number" }, "maxItems": 2 },
    "notes": { "type": "string", "maxLength": 2000 }
  }
}
