{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "vclaw-video-core/video/artifacts/project-blueprint",
  "title": "project-blueprint",
  "description": "AI Animation Director blueprint — the project-level visual/film-language bible (visual identity, master color system, lighting grammar, per-character blueprint, environment blueprint, project camera bible, performance rules) that the filmmaking-prompts composer reads to enrich every scene packet.",
  "type": "object",
  "required": [
    "schemaVersion",
    "projectSlug",
    "generatedAt",
    "source",
    "title",
    "visualIdentity",
    "colorSystem",
    "lightingGrammar",
    "characters",
    "environments",
    "cameraBible",
    "performanceRules",
    "output"
  ],
  "properties": {
    "schemaVersion": { "type": "integer", "const": 1 },
    "projectSlug": { "type": "string" },
    "generatedAt": { "type": "string" },
    "source": { "type": "string", "const": "ai-director" },
    "title": { "type": "string" },
    "visualIdentity": {
      "type": "object",
      "required": ["aesthetic", "influences", "texture", "scale", "timeOfDay", "thesis"],
      "properties": {
        "aesthetic": { "type": "string" },
        "influences": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["name", "borrowed"],
            "properties": {
              "name": { "type": "string" },
              "borrowed": { "type": "string" }
            }
          }
        },
        "texture": { "type": "string" },
        "scale": { "type": "string" },
        "timeOfDay": { "type": "string" },
        "thesis": { "type": "string" }
      }
    },
    "colorSystem": {
      "type": "object",
      "required": ["colors", "kelvinRange", "warmShiftMeaning", "coolShiftMeaning", "contrast", "saturation"],
      "properties": {
        "colors": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["name", "where", "emotion"],
            "properties": {
              "name": { "type": "string" },
              "where": { "type": "string" },
              "emotion": { "type": "string" },
              "hex": { "type": "string" }
            }
          }
        },
        "kelvinRange": { "type": "string" },
        "warmShiftMeaning": { "type": "string" },
        "coolShiftMeaning": { "type": "string" },
        "contrast": { "type": "string" },
        "saturation": { "type": "string" },
        "gradeId": { "type": "string" }
      }
    },
    "lightingGrammar": {
      "type": "object",
      "required": ["keyDirection", "quality", "shadowStrategy", "practicals", "signatureSetups"],
      "properties": {
        "keyDirection": { "type": "string" },
        "quality": { "type": "string" },
        "shadowStrategy": { "type": "string" },
        "practicals": { "type": "string" },
        "signatureSetups": {
          "type": "object",
          "required": ["intimate", "tension", "hero"],
          "properties": {
            "intimate": { "type": "string" },
            "tension": { "type": "string" },
            "hero": { "type": "string" }
          }
        }
      }
    },
    "characters": {
      "type": "array",
      "items": { "$ref": "#/$defs/character" }
    },
    "environments": {
      "type": "array",
      "items": { "$ref": "#/$defs/environment" }
    },
    "cameraBible": {
      "type": "object",
      "required": [
        "relationship",
        "whenMoves",
        "whenLocked",
        "dominantShots",
        "rareShots",
        "primaryAngles",
        "primaryMovements",
        "forbiddenMovements",
        "focalFeel",
        "depthStrategy",
        "oneRule"
      ],
      "properties": {
        "relationship": { "type": "string" },
        "whenMoves": { "type": "string" },
        "whenLocked": { "type": "string" },
        "dominantShots": { "type": "array", "items": { "type": "string" } },
        "rareShots": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["shot", "when"],
            "properties": {
              "shot": { "type": "string" },
              "when": { "type": "string" }
            }
          }
        },
        "primaryAngles": { "type": "array", "items": { "type": "string" } },
        "primaryMovements": { "type": "array", "items": { "type": "string" } },
        "forbiddenMovements": { "type": "array", "items": { "type": "string" } },
        "focalFeel": { "type": "string" },
        "depthStrategy": { "type": "string" },
        "oneRule": { "type": "string" }
      }
    },
    "performanceRules": {
      "type": "object",
      "required": ["actingStyle", "dialogueEnergy", "silenceUsage", "intensityScale", "castingPattern", "avoid"],
      "properties": {
        "actingStyle": { "type": "string" },
        "dialogueEnergy": { "type": "string" },
        "silenceUsage": { "type": "string" },
        "intensityScale": { "type": "string" },
        "castingPattern": { "type": "string" },
        "avoid": { "type": "string" }
      }
    },
    "output": {
      "type": "object",
      "required": ["runtimeSeconds", "aspectRatio", "motionStyle", "editingRhythm", "vibeKeywords"],
      "properties": {
        "runtimeSeconds": { "type": "number", "minimum": 0 },
        "aspectRatio": { "type": "string" },
        "motionStyle": { "type": "string" },
        "editingRhythm": { "type": "string" },
        "vibeKeywords": { "type": "array", "items": { "type": "string" } }
      }
    }
  },
  "$defs": {
    "sensory": {
      "type": "object",
      "required": ["smell", "texture", "sound", "feelings"],
      "properties": {
        "smell": { "type": "string" },
        "texture": { "type": "string" },
        "sound": { "type": "string" },
        "feelings": { "type": "array", "items": { "type": "string" }, "minItems": 2, "maxItems": 2 }
      }
    },
    "character": {
      "type": "object",
      "required": [
        "name",
        "role",
        "visualType",
        "silhouette",
        "signatureDetail",
        "palette",
        "costume",
        "communicates",
        "voice",
        "cameraLanguage"
      ],
      "properties": {
        "name": { "type": "string" },
        "role": { "type": "string" },
        "visualType": { "type": "string" },
        "silhouette": { "type": "string" },
        "signatureDetail": { "type": "string" },
        "palette": { "type": "array", "items": { "type": "string" } },
        "costume": { "type": "string" },
        "communicates": { "type": "string" },
        "voice": {
          "type": "object",
          "required": ["ageGender", "timbre", "rhythm", "accent", "emotionalLeak", "anchors"],
          "properties": {
            "ageGender": { "type": "string" },
            "timbre": { "type": "string" },
            "rhythm": { "type": "string" },
            "accent": { "type": "string" },
            "emotionalLeak": { "type": "string" },
            "anchors": { "type": "array", "items": { "type": "string" } }
          }
        },
        "cameraLanguage": {
          "type": "object",
          "required": ["power", "vulnerability", "signature"],
          "properties": {
            "power": { "type": "string" },
            "vulnerability": { "type": "string" },
            "signature": { "type": "string" }
          }
        }
      }
    },
    "environment": {
      "type": "object",
      "required": ["name", "type", "emotionalFunction", "anchors", "scale", "lightColor", "sensory"],
      "properties": {
        "name": { "type": "string" },
        "type": { "type": "string" },
        "emotionalFunction": { "type": "string" },
        "anchors": { "type": "array", "items": { "type": "string" } },
        "scale": { "type": "string" },
        "lightColor": { "type": "string" },
        "sensory": { "$ref": "#/$defs/sensory" }
      }
    }
  }
}
