{
  "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": "string"},
                  "description": "Elements to keep: environment (furniture, walls, lighting) and immobile characters (dead/unconscious bodies). For zoom_in_detail, include the main subject/frame carrying over."
                }
              },
              "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
}
