{
  "type": "object",
  "properties": {
    "scene_index": {
      "type": "integer",
      "description": "씬 번호"
    },
    "analysis_summary": {
      "type": "string",
      "description": "교차 샷 일관성 분석 요약 (1-2문장, 한국어)"
    },
    "fixed_elements": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "element_id": {
            "type": "string",
            "description": "고유 ID (snake_case, 보통명사 조합. 시나리오 고유명사 금지)"
          },
          "element_type": {
            "type": "string",
            "enum": ["character_state", "environment_state", "persistent_prop"]
          },
          "character_name": {
            "type": "string",
            "description": "character_state일 때 인물 이름. 그 외 빈 문자열."
          },
          "description": {
            "type": "string",
            "description": "고정 시각 묘사 (영어, 2-4문장, 보통명사만, 엔티티 ID 금지)"
          },
          "applies_to_shots": {
            "type": "array",
            "items": {"type": "integer"},
            "minItems": 2,
            "description": "이 요소가 동일하게 나타나야 할 샷 인덱스 목록 (반드시 2개 이상). 같은 인물의 전신형과 확대형은 서로 겹치지 않도록 분리."
          },
          "source_facts": {
            "type": "array",
            "items": {"type": "string"},
            "description": "원문/씬/샷에서 인용·요약한 사실. 영어 또는 원어. hallucination 방지 텍스트 근거. 사실이 없으면 빈 배열 (그러면 confidence=low 필수)."
          },
          "visual_inferences": {
            "type": "array",
            "items": {"type": "string"},
            "description": "원문에 없으나 시각화 위해 추론한 항목. source_facts 와 명확 분리."
          },
          "creative_decisions": {
            "type": "array",
            "items": {"type": "string"},
            "description": "framing/composition/atmosphere 등 작가적 선택. 사실/추론 외 모든 결정."
          },
          "confidence": {
            "type": "string",
            "enum": ["high", "medium", "low"],
            "description": "high=facts 위주 / medium=balanced / low=대부분 inference. LLM 출력은 이 3개만 — 절대 'legacy' 출력 금지 ('legacy' 는 옛 cp adapter 전용)."
          }
        },
        "required": [
          "element_id", "element_type", "character_name", "description", "applies_to_shots",
          "source_facts", "visual_inferences", "creative_decisions", "confidence"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": ["scene_index", "analysis_summary", "fixed_elements"],
  "additionalProperties": false
}
