{
  "type": "object",
  "properties": {
    "dependencies": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "scene_index": {"type": "integer"},
          "shot_index": {"type": "integer"},
          "location_refs": {
            "type": "array",
            "maxItems": 1,
            "description": "At most 1 previous shot reference for background continuity",
            "items": {
              "type": "object",
              "properties": {
                "scene_index": {"type": "integer"},
                "shot_index": {"type": "integer"},
                "reason": {"type": "string", "description": "Brief reason for this reference"},
                "ref_usage": {
                  "type": "string",
                  "enum": ["zoom_in_detail", "exact_background", "atmosphere_reference"],
                  "description": "zoom_in_detail: same moment/space/subject, camera reframed (close-up/zoom) — reuse entire frame, add nothing new. exact_background: same room, different moment/pose — keep background as-is, ignore moving people. atmosphere_reference: different room/angle — style/mood only, do not copy layout."
                },
                "ignore_elements": {
                  "type": "string",
                  "description": "What to IGNORE in the reference image. Use common nouns only (no entity IDs). No add/replace/adjust instructions. No conditional phrasing (no 'if...', 'when...', 'only if'). Leave as empty string ('') if nothing needs to be ignored. E.g. 'Ignore the standing man by the door.' or ''."
                },
                "keep_elements": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "Visual description of the non-human element to keep (natural language, common nouns only, no entity IDs, no person/character/body descriptions). E.g. 'wooden bench against the wall', 'broken vase on the table', 'warm ceiling lamp casting yellow light'."
                      },
                      "kind": {
                        "type": "string",
                        "enum": ["environment", "static_prop"],
                        "description": "environment: walls, floors, furniture layout, lighting, background structure. static_prop: non-human objects (tools, bags, documents, photos, broken items, etc.). PERSON/CHARACTER/BODY descriptions are FORBIDDEN — character state (dead/unconscious/pose) is handled by separate layers (scene_consistency / character_state_variant / semantic_contract_router), not keep_elements."
                      }
                    },
                    "required": ["label", "kind"],
                    "additionalProperties": false
                  },
                  "description": "Structured list of non-human elements to keep from the previous shot reference. Each entry has a label (visual description) and a kind (environment / static_prop only). Character state, person pose, dead/unconscious bodies must NOT appear here — those are routed to scene_consistency.character_state, character_state_variant ref, and semantic_contract_router. For zoom_in_detail, include the main non-human environment/prop carrying over. For atmosphere_reference, usually [] is appropriate."
                }
              },
              "required": ["scene_index", "shot_index", "reason", "ref_usage", "ignore_elements", "keep_elements"],
              "additionalProperties": false
            }
          }
        },
        "required": ["scene_index", "shot_index", "location_refs"],
        "additionalProperties": false
      }
    }
  },
  "required": ["dependencies"],
  "additionalProperties": false
}
