{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "ai.stravica.knowledge.research/rounds.schema.json",
  "title": "Research deep-mode round audit trail",
  "description": "rounds.json at sessions/<sessionId>/rounds.json — one record per deepen round plus an optional test-knob bag (deep-mode only; arch doc §4.2/§4.6/§5.2). Absent for normal/light sessions. Validator: src/store/rounds.mjs.",
  "type": "object",
  "additionalProperties": false,
  "required": ["rounds"],
  "properties": {
    "rounds": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["round", "newSubQuestions", "claimsAdded", "confirmedDelta"],
        "properties": {
          "round": { "type": "integer", "minimum": 1, "description": "1-based round number (unique within the session)." },
          "newSubQuestions": { "type": "array", "items": { "type": "string" }, "description": "Sub-questions raised by this round's reflection step." },
          "claimsAdded": { "type": "integer", "minimum": 0, "description": "Claims added by this round." },
          "confirmedDelta": { "type": "integer", "description": "Change in confirmed-central count vs the prior round (may be negative)." },
          "stopReason": {
            "type": "string",
            "enum": ["reflection", "round-cap", "budget", "zero-new-confirmed", "ceiling"],
            "description": "Why the deepen loop ended. Present only on the terminating round (arch §4.2 stop criteria + §4.6 ceiling)."
          }
        }
      }
    },
    "overrides": {
      "type": "object",
      "description": "Free-form self-identifying record of the deep testOverrides knob active for this run (arch §5.2). Absent on production runs."
    }
  }
}
