{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "item_id": {
            "type": "string",
            "description": "S{scene_index}_L{scene_list_idx}_V{variation_idx} — prompt 의 deterministic ID. echo only. SINGLE SOURCE OF TRUTH for fan-out disambiguation."
          },
          "scene_index": {
            "type": ["integer", "null"],
            "description": "보조 정보 (item_id 가 권위). nullable — LLM 이 누락하면 null 반환. OpenAI strict structured output 호환."
          },
          "var_index": {
            "type": ["integer", "null"],
            "description": "보조 정보 (item_id 가 권위). nullable — LLM 이 누락하면 null 반환. OpenAI strict structured output 호환."
          },
          "has_issues": {"type": "boolean"},
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unified diagnostic ID — same value as the surrounding item_id (e.g., S1_L0_V0). Consumer 가 권위 source-of-truth 로 사용."
                },
                "scope": {
                  "type": "string",
                  "enum": ["scene"],
                  "description": "Const 'scene'."
                },
                "issue_code": {
                  "type": "string",
                  "enum": [
                    "missing_ethnicity",
                    "proper_noun_translated",
                    "awkward_translation",
                    "physical_inconsistency",
                    "unshared_fg_bg_actors"
                  ]
                },
                "action": {
                  "type": "string",
                  "enum": ["regen_required"],
                  "description": "Const 'regen_required' — v1 단일 값."
                },
                "hint_diagnostic": {
                  "type": "string",
                  "description": "Non-empty natural-language diagnostic — what is wrong + regen direction. NOT a substring replacement target."
                },
                "item_id": {
                  "type": "string",
                  "description": "Debug alias — same value as id (e.g., S1_L0_V0). Schema required. Consumer reads id as authoritative source-of-truth; id, result-level item_id, and this issue-level item_id must all be equal (mismatch raises t2i_review.diagnostic_alias_mismatch)."
                }
              },
              "required": ["id", "scope", "issue_code", "action", "hint_diagnostic", "item_id"],
              "additionalProperties": false
            }
          }
        },
        "required": ["item_id", "scene_index", "var_index", "has_issues", "issues"],
        "additionalProperties": false
      }
    }
  },
  "required": ["results"],
  "additionalProperties": false
}
