{
  "$id": "https://targetspace.ai/platform/schemas/scoring-report.schema.json",
  "title": "ScoringReport",
  "type": "object",
  "required": [
    "run_id",
    "submitter",
    "n_instances",
    "skill_vs_r1_bits",
    "skill_vs_r2_bits",
    "brier",
    "calibration",
    "gates"
  ],
  "properties": {
    "run_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._-]{3,64}$"
    },
    "submitter": {
      "type": "string"
    },
    "n_instances": {
      "type": "integer",
      "minimum": 1
    },
    "skill_vs_r1_bits": {
      "type": "number"
    },
    "skill_vs_r2_bits": {
      "type": "number"
    },
    "brier": {
      "type": "number"
    },
    "calibration": {
      "type": "object",
      "properties": {
        "avg_confidence": {
          "type": "number"
        },
        "accuracy": {
          "type": "number"
        },
        "gap": {
          "type": "number"
        },
        "bins": {
          "type": "array"
        }
      }
    },
    "wrong_target_skill_vs_r1_bits": {
      "type": "number"
    },
    "retrieval_only_skill_vs_r1_bits": {
      "type": "number"
    },
    "by_regime": {
      "type": "object"
    },
    "ablation": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "missingness": {
      "type": "object"
    },
    "gates": {
      "type": "object",
      "description": "validity-stack gate results: pass / fail / needs-review"
    },
    "evidence_efficiency": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "generated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
