{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://mcp.exmxc.ai/schemas/consumer-intent-observation-v1",
  "title": "Consumer Intent Graph Observation v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "observation_id",
    "timestamp",
    "collection_date",
    "source",
    "source_type",
    "category",
    "consumer_action",
    "direction",
    "intensity",
    "confidence",
    "methodology_version",
    "model_version"
  ],
  "properties": {
    "observation_id": {
      "type": "string",
      "minLength": 1
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "collection_date": {
      "type": "string",
      "format": "date"
    },
    "source": {
      "type": "string",
      "minLength": 1
    },
    "source_type": {
      "type": "string",
      "minLength": 1
    },
    "source_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "raw_text": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 5000
    },
    "reference": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 1000
    },
    "geography": {
      "type": [
        "string",
        "null"
      ]
    },
    "category": {
      "type": "string",
      "minLength": 1
    },
    "subcategory": {
      "type": [
        "string",
        "null"
      ]
    },
    "entity_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "entity": {
      "type": [
        "string",
        "null"
      ]
    },
    "parent_company_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "parent_company": {
      "type": [
        "string",
        "null"
      ]
    },
    "ticker": {
      "type": [
        "string",
        "null"
      ]
    },
    "consumer_action": {
      "type": "string",
      "enum": [
        "PURCHASE_INTENT",
        "PURCHASE_COMPLETED",
        "PURCHASE_DELAY",
        "PURCHASE_CANCELLED",
        "LOST_INTENT",
        "GAINED_INTENT",
        "TRADE_DOWN",
        "TRADE_UP",
        "BRAND_SUBSTITUTION",
        "RETAILER_SUBSTITUTION",
        "CATEGORY_SUBSTITUTION",
        "DEAL_SEEKING",
        "WAITING_FOR_SALE",
        "DISCRETIONARY_REDUCTION",
        "DISCRETIONARY_EXPANSION",
        "REPEAT_PURCHASE",
        "BRAND_EXIT",
        "BRAND_ENTRY"
      ]
    },
    "direction": {
      "type": "string",
      "enum": [
        "positive",
        "negative",
        "mixed",
        "neutral"
      ]
    },
    "economic_driver": {
      "type": [
        "string",
        "null"
      ]
    },
    "substitute_entity_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "substitute_entity": {
      "type": [
        "string",
        "null"
      ]
    },
    "time_horizon": {
      "type": "string",
      "enum": [
        "completed",
        "immediate",
        "near_term",
        "later",
        "unknown"
      ]
    },
    "intensity": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "methodology_version": {
      "type": "string",
      "const": "consumer-intent-v1.0.0"
    },
    "model_version": {
      "type": "string",
      "minLength": 1
    },
    "duplicate_cluster_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "spam_bot_probability": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 1
    },
    "promotion_probability": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 1
    },
    "entity_resolution_status": {
      "type": "string",
      "enum": [
        "resolved",
        "ambiguous",
        "unresolved"
      ]
    }
  }
}