{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Scene Status",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": ["scripting", "previs", "production", "post", "done"]
    },
    "shots": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "desc": {
            "type": "string"
          },
          "duration": {
            "type": "integer",
            "enum": [4, 6, 8]
          },
          "image_state": {
            "type": "string",
            "enum": ["pending", "generated", "approved", "rejected"]
          },
          "video_state": {
            "type": "string",
            "enum": ["pending", "generated", "approved", "rejected"]
          },
          "shot_type": {
            "type": "string",
            "enum": [
              "wide",
              "establishing",
              "medium",
              "close_up",
              "extreme_close_up",
              "pov",
              "two_shot",
              "over_shoulder",
              "low_angle",
              "high_angle"
            ],
            "description": "Optional cinematic shot type."
          },
          "camera_movement": {
            "type": "string",
            "enum": [
              "static",
              "dolly_in",
              "dolly_out",
              "pan_left",
              "pan_right",
              "tilt_up",
              "tilt_down",
              "tracking",
              "crane",
              "handheld",
              "arc",
              "rack_focus"
            ],
            "description": "Optional camera movement."
          },
          "audio": {
            "type": "object",
            "description": "Optional 3-layer audio direction.",
            "properties": {
              "dialogue": { "type": ["string", "null"] },
              "sfx": { "type": ["string", "null"] },
              "ambient": { "type": ["string", "null"] }
            }
          },
          "dialogue": {
            "type": "string",
            "description": "Optional spoken dialogue text for this shot."
          },
          "continuity": {
            "type": "object",
            "description": "Optional continuity metadata.",
            "properties": {
              "continues_from_shot_id": { "type": ["string", "null"] },
              "anchor_frame": { "type": ["string", "null"] }
            }
          },
          "assets": {
            "type": "object",
            "properties": {
              "images": {
                "type": "object",
                "properties": {
                  "start_frame": {
                    "type": "string"
                  },
                  "end_frame": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  }
                },
                "required": ["start_frame"]
              },
              "video": {
                "type": "string"
              },
              "image_feedback": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "video_feedback": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": ["id", "desc", "assets"]
      }
    }
  },
  "required": ["id", "status", "shots"]
}
