{
  "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": ["exact_background", "atmosphere_reference"],
                  "description": "exact_background: same room, use background as-is. atmosphere_reference: different room/angle, use only as style/mood reference"
                },
                "ignore_elements": {
                  "type": "string",
                  "description": "What to IGNORE in the reference image. Use common nouns only (no entity IDs). No add/replace/adjust instructions. E.g. 'Ignore all people. Ignore the blood on the floor.'"
                },
                "keep_elements": {
                  "type": "array",
                  "items": {"type": "string"},
                  "description": "Background elements to keep (furniture, walls, lighting). No people."
                }
              },
              "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
}
