{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://canadianrockiesplanner.com/data/agent-demand-schema.v0.json",
  "title": "Agent demand candidate",
  "type": "object",
  "required": [
    "id",
    "site_id",
    "source_type",
    "question_or_requested_action",
    "classification",
    "status",
    "next_action",
    "guardrail"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "site_id": {
      "type": "string"
    },
    "source_type": {
      "enum": [
        "ai_crawler",
        "agent_qna",
        "human_search",
        "internal_review",
        "traffic_signal",
        "external_pattern"
      ]
    },
    "agent_or_surface": {
      "type": "string"
    },
    "destination_or_node": {
      "type": "string"
    },
    "question_or_requested_action": {
      "type": "string"
    },
    "classification": {
      "enum": [
        "answer_gap",
        "source_gap",
        "schema_gap",
        "navigation_tool_gap",
        "local_business_integration",
        "payment_or_booking_request",
        "privacy_or_safety_risk",
        "unsupported_real_world_action"
      ]
    },
    "status": {
      "enum": [
        "candidate",
        "research",
        "queued",
        "blocked",
        "closed"
      ]
    },
    "confidence": {
      "enum": [
        "low",
        "medium",
        "high"
      ]
    },
    "evidence": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "next_action": {
      "type": "string"
    },
    "success_metric": {
      "type": "string"
    },
    "guardrail": {
      "type": "string"
    },
    "created_at": {
      "type": "string"
    },
    "last_seen": {
      "type": "string"
    },
    "review_window": {
      "type": "string"
    }
  },
  "additionalProperties": false
}