{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://cueqzapper.github.io/brands/schema/brand-dna.schema.json",
  "title": "Brand DNA",
  "description": "A complete, evidence-aware brand contract with production assets that can be compiled into task-specific context packets.",
  "type": "object",
  "required": [
    "schemaVersion",
    "meta",
    "brand",
    "strategy",
    "verbal",
    "visual",
    "representation",
    "sensory",
    "channels",
    "rules",
    "provenance"
  ],
  "properties": {
    "$schema": { "type": "string", "format": "uri-reference" },
    "schemaVersion": { "enum": ["1.0.0", "1.1.0", "1.2.0"] },
    "meta": { "$ref": "#/$defs/meta" },
    "brand": { "$ref": "#/$defs/brand" },
    "strategy": { "$ref": "#/$defs/strategy" },
    "verbal": { "$ref": "#/$defs/verbal" },
    "visual": { "$ref": "#/$defs/visual" },
    "assets": { "$ref": "#/$defs/assets" },
    "representation": { "$ref": "#/$defs/representation" },
    "sensory": { "$ref": "#/$defs/sensory" },
    "channels": { "$ref": "#/$defs/channels" },
    "rules": { "$ref": "#/$defs/rules" },
    "provenance": { "$ref": "#/$defs/provenance" },
    "extensions": {
      "type": "object",
      "description": "Namespaced optional extensions. Core meaning must not depend on an extension.",
      "additionalProperties": true
    }
  },
  "additionalProperties": false,
  "allOf": [
    {
      "if": { "properties": { "schemaVersion": { "const": "1.1.0" } }, "required": ["schemaVersion"] },
      "then": { "properties": { "assets": { "$ref": "#/$defs/assets" } }, "required": ["assets"] }
    },
    {
      "if": { "properties": { "schemaVersion": { "const": "1.2.0" } }, "required": ["schemaVersion"] },
      "then": {
        "required": ["assets"],
        "properties": {
          "assets": { "$ref": "#/$defs/assets" },
          "visual": {
            "allOf": [{
              "type": "object",
              "properties": {
                "logo": { "type": "object", "properties": { "components": true }, "required": ["components"] }
              }
            }]
          }
        }
      }
    }
  ],
  "$defs": {
    "stringList": {
      "type": "array",
      "items": { "type": "string", "minLength": 1 },
      "uniqueItems": true
    },
    "asset": {
      "type": "object",
      "description": "A production-ready or reference asset with explicit rights and purpose.",
      "required": ["id", "kind", "path", "mediaType", "role", "alt", "description", "licence", "rights", "status"],
      "properties": {
        "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]+$" },
        "kind": { "enum": ["logo", "icon", "photograph", "illustration", "texture", "motion", "audio", "template"] },
        "path": { "type": "string", "format": "uri-reference" },
        "mediaType": { "type": "string", "minLength": 3 },
        "role": { "type": "string", "minLength": 1 },
        "alt": { "type": "string" },
        "description": { "type": "string", "minLength": 1 },
        "licence": { "type": "string", "minLength": 1 },
        "rights": { "type": "string", "minLength": 1 },
        "source": { "type": ["string", "null"], "format": "uri-reference" },
        "status": { "enum": ["reference", "draft", "approved", "deprecated"] },
        "width": { "type": ["integer", "null"], "minimum": 1 },
        "height": { "type": ["integer", "null"], "minimum": 1 },
        "tags": { "$ref": "#/$defs/stringList" },
        "variants": { "$ref": "#/$defs/stringList" }
      },
      "additionalProperties": false
    },
    "assetList": {
      "type": "array",
      "items": { "$ref": "#/$defs/asset" },
      "uniqueItems": true
    },
    "logoComponent": {
      "type": "object",
      "required": ["id", "assetId", "description", "use", "status"],
      "properties": {
        "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]+$" },
        "assetId": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]+$" },
        "description": { "type": "string", "minLength": 1 },
        "use": { "type": "string", "minLength": 1 },
        "status": { "enum": ["draft", "approved", "deprecated"] }
      },
      "additionalProperties": false
    },
    "logoLockup": {
      "type": "object",
      "required": ["id", "assetId", "composition", "orientation", "use", "status"],
      "properties": {
        "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]+$" },
        "assetId": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]+$" },
        "composition": {
          "type": "array",
          "items": { "enum": ["signet", "wordmark"] },
          "minItems": 1,
          "maxItems": 2,
          "uniqueItems": true
        },
        "orientation": { "enum": ["horizontal", "vertical", "compact"] },
        "use": { "type": "string", "minLength": 1 },
        "status": { "enum": ["draft", "approved", "deprecated"] }
      },
      "additionalProperties": false
    },
    "assets": {
      "type": "object",
      "description": "Physical brand assets. Paths are resolved relative to basePath unless absolute.",
      "required": ["basePath", "logos", "icons", "photography", "illustrations", "textures", "motion", "audio", "templates"],
      "properties": {
        "basePath": { "type": "string", "format": "uri-reference" },
        "logos": { "$ref": "#/$defs/assetList" },
        "icons": { "$ref": "#/$defs/assetList" },
        "photography": { "$ref": "#/$defs/assetList" },
        "illustrations": { "$ref": "#/$defs/assetList" },
        "textures": { "$ref": "#/$defs/assetList" },
        "motion": { "$ref": "#/$defs/assetList" },
        "audio": { "$ref": "#/$defs/assetList" },
        "templates": { "$ref": "#/$defs/assetList" }
      },
      "additionalProperties": false
    },
    "meta": {
      "type": "object",
      "required": ["id", "version", "status", "createdAt", "updatedAt", "defaultLocale", "locales", "owner"],
      "properties": {
        "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]+$" },
        "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:[-+][0-9A-Za-z.-]+)?$" },
        "status": { "enum": ["draft", "review", "approved", "deprecated"] },
        "createdAt": { "type": "string", "format": "date-time" },
        "updatedAt": { "type": "string", "format": "date-time" },
        "defaultLocale": { "type": "string", "minLength": 2 },
        "locales": { "$ref": "#/$defs/stringList" },
        "owner": { "type": "string", "minLength": 1 },
        "reviewers": { "$ref": "#/$defs/stringList" },
        "reviewCycle": { "type": "string" },
        "licence": { "type": "string" }
      },
      "additionalProperties": false
    },
    "brand": {
      "type": "object",
      "required": ["identity", "essence", "worldview"],
      "properties": {
        "identity": {
          "type": "object",
          "required": ["name", "website"],
          "properties": {
            "name": { "type": "string", "minLength": 1 },
            "legalName": { "type": ["string", "null"] },
            "pronunciation": { "type": ["string", "null"] },
            "tagline": { "type": ["string", "null"] },
            "descriptor": { "type": ["string", "null"] },
            "website": { "type": "string", "format": "uri" },
            "origin": { "type": ["string", "null"] },
            "nameMeaning": { "type": ["string", "null"] }
          },
          "additionalProperties": false
        },
        "essence": {
          "type": "object",
          "required": ["oneLine", "promise", "personality", "tension"],
          "properties": {
            "oneLine": { "type": "string", "minLength": 1 },
            "promise": { "type": "string", "minLength": 1 },
            "personality": { "$ref": "#/$defs/stringList" },
            "tension": { "type": "string" },
            "archetypes": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        },
        "worldview": {
          "type": "object",
          "required": ["belief", "opposes", "future", "humanRole", "technologyRole"],
          "properties": {
            "belief": { "type": "string" },
            "opposes": { "$ref": "#/$defs/stringList" },
            "future": { "type": "string" },
            "humanRole": { "type": "string" },
            "technologyRole": { "type": "string" },
            "politicalOrSocialBoundaries": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "strategy": {
      "type": "object",
      "required": ["purpose", "positioning", "audiences", "values", "messaging"],
      "properties": {
        "purpose": {
          "type": "object",
          "required": ["why", "mission", "vision"],
          "properties": {
            "why": { "type": "string" },
            "mission": { "type": "string" },
            "vision": { "type": "string" }
          },
          "additionalProperties": false
        },
        "positioning": {
          "type": "object",
          "required": ["category", "audience", "need", "difference", "proof"],
          "properties": {
            "category": { "type": "string" },
            "audience": { "type": "string" },
            "need": { "type": "string" },
            "difference": { "type": "string" },
            "proof": { "$ref": "#/$defs/stringList" },
            "alternatives": { "$ref": "#/$defs/stringList" },
            "pricePosition": { "type": ["string", "null"] }
          },
          "additionalProperties": false
        },
        "offers": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["name", "job", "outcome"],
            "properties": {
              "name": { "type": "string" },
              "job": { "type": "string" },
              "outcome": { "type": "string" },
              "proof": { "$ref": "#/$defs/stringList" },
              "notFor": { "$ref": "#/$defs/stringList" }
            },
            "additionalProperties": false
          }
        },
        "audiences": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": ["id", "name", "context", "job", "barriers", "desiredShift"],
            "properties": {
              "id": { "type": "string" },
              "name": { "type": "string" },
              "context": { "type": "string" },
              "job": { "type": "string" },
              "barriers": { "$ref": "#/$defs/stringList" },
              "desiredShift": { "type": "string" },
              "language": { "type": "string" },
              "evidenceIds": { "$ref": "#/$defs/stringList" }
            },
            "additionalProperties": false
          }
        },
        "values": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": ["name", "meaning", "behaviours", "antiBehaviours"],
            "properties": {
              "name": { "type": "string" },
              "meaning": { "type": "string" },
              "behaviours": { "$ref": "#/$defs/stringList" },
              "antiBehaviours": { "$ref": "#/$defs/stringList" }
            },
            "additionalProperties": false
          }
        },
        "messaging": {
          "type": "object",
          "required": ["masterMessage", "messagePillars", "ctaHierarchy", "storyPattern"],
          "properties": {
            "masterMessage": { "type": "string" },
            "messagePillars": {
              "type": "array",
              "items": {
                "type": "object",
                "required": ["name", "claim", "proof"],
                "properties": {
                  "name": { "type": "string" },
                  "claim": { "type": "string" },
                  "proof": { "$ref": "#/$defs/stringList" }
                },
                "additionalProperties": false
              }
            },
            "ctaHierarchy": { "$ref": "#/$defs/stringList" },
            "storyPattern": { "type": "string" }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "verbal": {
      "type": "object",
      "required": ["voice", "language", "claims", "examples"],
      "properties": {
        "voice": {
          "type": "object",
          "required": ["traits", "dimensions", "toneByContext"],
          "properties": {
            "traits": { "$ref": "#/$defs/stringList" },
            "dimensions": {
              "type": "array",
              "items": {
                "type": "object",
                "required": ["axis", "value", "instruction"],
                "properties": {
                  "axis": { "type": "string" },
                  "value": { "type": "number", "minimum": 0, "maximum": 100 },
                  "instruction": { "type": "string" }
                },
                "additionalProperties": false
              }
            },
            "toneByContext": {
              "type": "object",
              "additionalProperties": {
                "type": "object",
                "required": ["tone", "do", "avoid"],
                "properties": {
                  "tone": { "$ref": "#/$defs/stringList" },
                  "do": { "$ref": "#/$defs/stringList" },
                  "avoid": { "$ref": "#/$defs/stringList" }
                },
                "additionalProperties": false
              }
            }
          },
          "additionalProperties": false
        },
        "language": {
          "type": "object",
          "required": ["locales", "defaultRegister", "sentenceRhythm", "preferred", "avoid", "terminology", "formatting"],
          "properties": {
            "locales": { "$ref": "#/$defs/stringList" },
            "defaultRegister": { "type": "string" },
            "sentenceRhythm": { "type": "string" },
            "preferred": { "$ref": "#/$defs/stringList" },
            "avoid": { "$ref": "#/$defs/stringList" },
            "terminology": { "type": "object", "additionalProperties": { "type": "string" } },
            "formatting": { "$ref": "#/$defs/stringList" },
            "inclusiveLanguage": { "type": "string" }
          },
          "additionalProperties": false
        },
        "claims": {
          "type": "object",
          "required": ["allowed", "requiresEvidence", "forbidden"],
          "properties": {
            "allowed": { "$ref": "#/$defs/stringList" },
            "requiresEvidence": { "$ref": "#/$defs/stringList" },
            "forbidden": { "$ref": "#/$defs/stringList" },
            "disclaimers": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        },
        "examples": {
          "type": "object",
          "required": ["onBrand", "offBrand"],
          "properties": {
            "onBrand": { "$ref": "#/$defs/stringList" },
            "offBrand": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "visual": {
      "type": "object",
      "required": ["concept", "colors", "typography", "logo", "layout", "shapes", "iconography", "illustration", "photography", "motion"],
      "properties": {
        "concept": {
          "type": "object",
          "required": ["direction", "rationale", "keywords", "visualTension"],
          "properties": {
            "direction": { "type": "string" },
            "rationale": { "type": "string" },
            "keywords": { "$ref": "#/$defs/stringList" },
            "visualTension": { "type": "string" }
          },
          "additionalProperties": false
        },
        "aesthetic": {
          "type": "object",
          "description": "Operational aesthetic direction: the sensory rules that make the brand recognisable across web, print, imagery and motion.",
          "required": ["northStar", "principles", "composition", "surface", "imageDirection", "motionDirection", "application", "avoid"],
          "properties": {
            "northStar": { "type": "string" },
            "principles": { "$ref": "#/$defs/stringList" },
            "composition": { "$ref": "#/$defs/stringList" },
            "surface": { "$ref": "#/$defs/stringList" },
            "imageDirection": { "$ref": "#/$defs/stringList" },
            "motionDirection": { "$ref": "#/$defs/stringList" },
            "application": { "type": "object", "additionalProperties": { "$ref": "#/$defs/stringList" } },
            "avoid": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        },
        "colors": {
          "type": "object",
          "required": ["palette", "pairings", "usage"],
          "properties": {
            "dtcgVersion": { "type": "string" },
            "palette": {
              "type": "array",
              "minItems": 2,
              "items": {
                "type": "object",
                "required": ["id", "name", "hex", "role", "meaning", "use", "avoid"],
                "properties": {
                  "id": { "type": "string", "pattern": "^[a-z0-9-]+$" },
                  "name": { "type": "string" },
                  "hex": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" },
                  "role": { "type": "string" },
                  "meaning": { "type": "string" },
                  "use": { "$ref": "#/$defs/stringList" },
                  "avoid": { "$ref": "#/$defs/stringList" },
                  "print": { "type": "object", "additionalProperties": true },
                  "$type": { "const": "color" }
                },
                "additionalProperties": false
              }
            },
            "pairings": {
              "type": "array",
              "items": {
                "type": "object",
                "required": ["foreground", "background", "ratio", "use"],
                "properties": {
                  "foreground": { "type": "string" },
                  "background": { "type": "string" },
                  "ratio": { "type": "number", "minimum": 1, "maximum": 21 },
                  "use": { "type": "string" }
                },
                "additionalProperties": false
              }
            },
            "usage": { "$ref": "#/$defs/stringList" },
            "gradients": { "type": "array", "items": { "type": "object", "additionalProperties": true } }
          },
          "additionalProperties": false
        },
        "typography": {
          "type": "object",
          "required": ["families", "roles", "scale", "rules"],
          "properties": {
            "families": {
              "type": "array",
              "items": {
                "type": "object",
                "required": ["family", "source", "weights", "licence", "use"],
                "properties": {
                  "family": { "type": "string" },
                  "source": { "type": "string" },
                  "weights": { "type": "array", "items": { "type": ["integer", "string"] } },
                  "licence": { "type": "string" },
                  "use": { "type": "string" },
                  "fallback": { "$ref": "#/$defs/stringList" }
                },
                "additionalProperties": false
              }
            },
            "roles": { "type": "object", "additionalProperties": { "type": "string" } },
            "scale": { "type": "object", "additionalProperties": { "type": "string" } },
            "rules": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        },
        "logo": {
          "type": "object",
          "required": ["idea", "variants", "clearspace", "minimumSize", "placement", "do", "dont"],
          "properties": {
            "idea": { "type": "string" },
            "components": {
              "type": "object",
              "description": "The reusable logo system. Signet and wordmark are independent source components; lockups define approved combinations.",
              "required": ["signet", "wordmark", "lockups"],
              "properties": {
                "signet": { "anyOf": [{ "$ref": "#/$defs/logoComponent" }, { "type": "null" }] },
                "wordmark": { "$ref": "#/$defs/logoComponent" },
                "lockups": {
                  "type": "array",
                  "minItems": 1,
                  "items": { "$ref": "#/$defs/logoLockup" }
                }
              },
              "additionalProperties": false
            },
            "variants": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
            "clearspace": { "type": "string" },
            "minimumSize": { "type": "object", "additionalProperties": { "type": ["string", "number"] } },
            "placement": { "$ref": "#/$defs/stringList" },
            "do": { "$ref": "#/$defs/stringList" },
            "dont": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        },
        "layout": {
          "type": "object",
          "required": ["principle", "grid", "spacingScale", "density", "composition", "responsive"],
          "properties": {
            "principle": { "type": "string" },
            "grid": { "type": "string" },
            "spacingScale": { "type": "object", "additionalProperties": { "type": "string" } },
            "density": { "type": "string" },
            "composition": { "$ref": "#/$defs/stringList" },
            "responsive": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        },
        "shapes": {
          "type": "object",
          "required": ["geometry", "corners", "strokes", "motifs", "avoid"],
          "properties": {
            "geometry": { "type": "string" },
            "corners": { "type": "string" },
            "strokes": { "type": "string" },
            "motifs": { "$ref": "#/$defs/stringList" },
            "avoid": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        },
        "iconography": {
          "type": "object",
          "required": ["job", "metaphor", "grid", "stroke", "corners", "detail", "color", "opticalRules", "do", "dont"],
          "properties": {
            "job": { "type": "string" },
            "metaphor": { "type": "string" },
            "grid": { "type": "string" },
            "stroke": { "type": "string" },
            "corners": { "type": "string" },
            "detail": { "type": "string" },
            "color": { "type": "string" },
            "opticalRules": { "$ref": "#/$defs/stringList" },
            "do": { "$ref": "#/$defs/stringList" },
            "dont": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        },
        "illustration": { "type": "object", "additionalProperties": true },
        "photography": {
          "type": "object",
          "required": ["job", "subjects", "environment", "moment", "composition", "camera", "lens", "light", "palette", "grade", "texture", "do", "dont"],
          "properties": {
            "job": { "type": "string" },
            "subjects": { "$ref": "#/$defs/stringList" },
            "environment": { "$ref": "#/$defs/stringList" },
            "moment": { "type": "string" },
            "composition": { "$ref": "#/$defs/stringList" },
            "camera": { "type": "string" },
            "lens": { "type": "string" },
            "light": { "type": "string" },
            "palette": { "type": "string" },
            "grade": { "type": "string" },
            "texture": { "type": "string" },
            "do": { "$ref": "#/$defs/stringList" },
            "dont": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        },
        "motion": { "type": "object", "additionalProperties": true },
        "dataVisualization": { "type": "object", "additionalProperties": true }
      },
      "additionalProperties": false
    },
    "representation": {
      "type": "object",
      "required": ["principle", "casting", "sensitiveAttributePolicy", "consent", "avoid"],
      "properties": {
        "principle": { "type": "string" },
        "casting": {
          "type": "object",
          "required": ["people", "age", "gender", "ethnicity", "ability", "roles", "wardrobe", "behaviour"],
          "properties": {
            "people": { "type": "string" },
            "age": { "type": "string" },
            "gender": { "type": "string" },
            "ethnicity": { "type": "string" },
            "ability": { "type": "string" },
            "roles": { "type": "string" },
            "wardrobe": { "type": "string" },
            "behaviour": { "type": "string" }
          },
          "additionalProperties": false
        },
        "sensitiveAttributePolicy": { "type": "string" },
        "consent": { "type": "string" },
        "avoid": { "$ref": "#/$defs/stringList" }
      },
      "additionalProperties": false
    },
    "sensory": {
      "type": "object",
      "required": ["sonicIdentity", "music", "voiceover", "soundEffects", "silence"],
      "properties": {
        "sonicIdentity": { "type": "string" },
        "music": { "type": "object", "additionalProperties": true },
        "voiceover": { "type": "object", "additionalProperties": true },
        "soundEffects": { "type": "object", "additionalProperties": true },
        "silence": { "type": "string" }
      },
      "additionalProperties": false
    },
    "channels": {
      "type": "object",
      "required": ["linkedin", "website", "brochure", "advertising", "video", "presentations"],
      "properties": {
        "linkedin": { "$ref": "#/$defs/channel" },
        "website": { "$ref": "#/$defs/channel" },
        "brochure": { "$ref": "#/$defs/channel" },
        "advertising": { "$ref": "#/$defs/channel" },
        "video": { "$ref": "#/$defs/channel" },
        "presentations": { "$ref": "#/$defs/channel" },
        "email": { "$ref": "#/$defs/channel" }
      },
      "additionalProperties": false
    },
    "channel": {
      "type": "object",
      "required": ["job", "audience", "format", "structure", "tone", "visual", "cta", "avoid"],
      "properties": {
        "job": { "type": "string" },
        "audience": { "type": "string" },
        "format": { "$ref": "#/$defs/stringList" },
        "structure": { "$ref": "#/$defs/stringList" },
        "tone": { "$ref": "#/$defs/stringList" },
        "visual": { "$ref": "#/$defs/stringList" },
        "cta": { "$ref": "#/$defs/stringList" },
        "avoid": { "$ref": "#/$defs/stringList" }
      },
      "additionalProperties": false
    },
    "rules": {
      "type": "object",
      "required": ["universal", "accessibility", "legal", "quality"],
      "properties": {
        "universal": { "$ref": "#/$defs/stringList" },
        "accessibility": {
          "type": "object",
          "required": ["standard", "contrast", "motion", "text", "media"],
          "properties": {
            "standard": { "type": "string" },
            "contrast": { "$ref": "#/$defs/stringList" },
            "motion": { "$ref": "#/$defs/stringList" },
            "text": { "$ref": "#/$defs/stringList" },
            "media": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        },
        "legal": {
          "type": "object",
          "required": ["trademarks", "assets", "claims", "privacy"],
          "properties": {
            "trademarks": { "$ref": "#/$defs/stringList" },
            "assets": { "$ref": "#/$defs/stringList" },
            "claims": { "$ref": "#/$defs/stringList" },
            "privacy": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        },
        "quality": {
          "type": "object",
          "required": ["beforeRelease", "failConditions"],
          "properties": {
            "beforeRelease": { "$ref": "#/$defs/stringList" },
            "failConditions": { "$ref": "#/$defs/stringList" }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "provenance": {
      "type": "object",
      "required": ["sources", "decisions", "openQuestions"],
      "properties": {
        "sources": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["id", "type", "url", "title", "capturedAt"],
            "properties": {
              "id": { "type": "string" },
              "type": { "enum": ["official-website", "public-register", "social", "document", "interview", "owner-input", "observation", "other"] },
              "url": { "type": "string", "format": "uri-reference" },
              "title": { "type": "string" },
              "capturedAt": { "type": "string", "format": "date-time" },
              "notes": { "type": "string" }
            },
            "additionalProperties": false
          }
        },
        "decisions": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["path", "state", "confidence", "sourceIds", "rationale"],
            "properties": {
              "path": { "type": "string", "pattern": "^/" },
              "state": { "enum": ["declared", "observed", "inferred", "owner-approved"] },
              "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
              "sourceIds": { "$ref": "#/$defs/stringList" },
              "rationale": { "type": "string" },
              "approvedBy": { "type": ["string", "null"] },
              "approvedAt": { "type": ["string", "null"], "format": "date-time" }
            },
            "additionalProperties": false
          }
        },
        "openQuestions": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["id", "question", "affects", "priority"],
            "properties": {
              "id": { "type": "string" },
              "question": { "type": "string" },
              "affects": { "$ref": "#/$defs/stringList" },
              "priority": { "enum": ["low", "medium", "high", "blocking"] }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    }
  }
}
