{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://takuo.didac.dev/ai/shooting-plan-v1.schema.json",
  "title": "Takuo Shooting Plan v1",
  "description": "Portable, media-free shooting plan for Takuo and compatible creator tools.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "format",
    "version",
    "project",
    "shots"
  ],
  "properties": {
    "format": {
      "const": "dev.didac.takuo.shooting-plan"
    },
    "version": {
      "const": 1
    },
    "project": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "title",
        "aspectRatio"
      ],
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 140
        },
        "description": {
          "type": "string",
          "maxLength": 2000
        },
        "aspectRatio": {
          "enum": [
            "9:16",
            "16:9",
            "1:1",
            "4:5"
          ]
        },
        "targetDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 86400
        },
        "language": {
          "type": "string",
          "minLength": 2,
          "maxLength": 35
        }
      }
    },
    "shots": {
      "type": "array",
      "minItems": 1,
      "maxItems": 200,
      "items": {
        "$ref": "#/$defs/shot"
      }
    }
  },
  "$defs": {
    "shot": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "title",
        "type",
        "description"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 140
        },
        "type": {
          "enum": [
            "talking-head",
            "b-roll",
            "voiceover",
            "screen-recording",
            "photo",
            "other"
          ]
        },
        "description": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2000
        },
        "durationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "framing": {
          "enum": [
            "wide",
            "medium",
            "close-up",
            "detail",
            "overhead",
            "screen",
            "unspecified"
          ]
        },
        "cameraMovement": {
          "enum": [
            "static",
            "pan",
            "tilt",
            "push-in",
            "pull-out",
            "handheld",
            "orbit",
            "other"
          ]
        },
        "script": {
          "type": "string",
          "maxLength": 10000
        },
        "notes": {
          "type": "string",
          "maxLength": 2000
        },
        "checklist": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          }
        },
        "transitionOut": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type"
          ],
          "properties": {
            "type": {
              "enum": [
                "cut",
                "match-cut",
                "whip-pan",
                "cover-lens",
                "object-wipe",
                "dissolve",
                "jump-cut",
                "none",
                "other"
              ]
            },
            "notes": {
              "type": "string",
              "maxLength": 1000
            }
          }
        }
      }
    }
  }
}
