{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Competitor",
  "type": "object",
  "properties": {
    "id": { "type": "string" },
    "name": { "type": "string" },
    "url": { "type": "string" },
    "logo_url": { "type": "string" },
    "tagline": { "type": "string" },
    "description": { "type": "string" },
    "market_position": { "type": "string", "enum": ["direct", "adjacent", "aspiration"] },
    "threat_level": { "type": "string", "enum": ["low", "medium", "high"] },
    "primary_color": { "type": "string" },
    "research_depth": { "type": "string", "enum": ["shallow", "deep"] },
    "selected_for_deep": { "type": "boolean", "default": false },

    "deep": {
      "type": "object",
      "description": "Populated only when research_depth = deep",
      "properties": {
        "visual_identity": {
          "type": "object",
          "properties": {
            "colors": { "type": "array", "items": { "type": "string" } },
            "typography": { "type": "string" },
            "photography_style": { "type": "string" },
            "design_language": { "type": "string" }
          }
        },
        "positioning": { "type": "string" },
        "messaging": { "type": "string" },
        "ux_patterns": { "type": "array", "items": { "type": "string" } },
        "content_strategy": { "type": "string" },
        "social_presence": { "type": "string" },
        "strengths": { "type": "array", "items": { "type": "string" } },
        "weaknesses": { "type": "array", "items": { "type": "string" } },
        "threat_score": { "type": "number", "minimum": 0, "maximum": 100 },
        "key_signals": { "type": "array", "items": { "type": "string" }, "maxItems": 3 }
      }
    }
  },
  "required": ["id", "name", "url", "market_position", "threat_level", "research_depth"]
}
