{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:awoooi:ai-technology-watch-report-v1",
  "title": "AWOOOI AI 技術雷達來源監控報告 (v1)",
  "type": "object",
  "required": [
    "schema_version",
    "generated_at",
    "mode",
    "registry",
    "cadence",
    "policy",
    "summary",
    "technology_area_counts",
    "technologies",
    "review_queue",
    "new_technology_discovery",
    "failures"
  ],
  "properties": {
    "schema_version": {
      "type": "string",
      "const": "ai_technology_watch_report_v1"
    },
    "generated_at": {
      "type": "string",
      "minLength": 1
    },
    "mode": {
      "type": "string",
      "enum": ["offline", "live"]
    },
    "registry": {
      "type": "object",
      "required": ["path", "schema_version", "updated_at"],
      "properties": {
        "path": {"type": "string"},
        "schema_version": {"type": "string"},
        "updated_at": {"type": "string"}
      },
      "additionalProperties": true
    },
    "cadence": {
      "type": "object",
      "additionalProperties": true
    },
    "policy": {
      "type": "object",
      "required": [
        "read_only",
        "sdk_installation_approved",
        "paid_api_calls_approved",
        "production_routing_approved",
        "telegram_send_approved",
        "model_provider_switch_approved",
        "host_write_approved"
      ],
      "properties": {
        "read_only": {"type": "boolean", "const": true},
        "sdk_installation_approved": {"type": "boolean", "const": false},
        "paid_api_calls_approved": {"type": "boolean", "const": false},
        "production_routing_approved": {"type": "boolean", "const": false},
        "telegram_send_approved": {"type": "boolean", "const": false},
        "model_provider_switch_approved": {"type": "boolean", "const": false},
        "host_write_approved": {"type": "boolean", "const": false}
      },
      "additionalProperties": true
    },
    "summary": {
      "type": "object",
      "required": [
        "technology_count",
        "technology_area_count",
        "source_count",
        "changed_technologies",
        "watch_only_technologies",
        "review_queue_count",
        "source_failure_count",
        "high_priority_count"
      ],
      "properties": {
        "technology_count": {"type": "integer", "minimum": 0},
        "technology_area_count": {"type": "integer", "minimum": 0},
        "source_count": {"type": "integer", "minimum": 0},
        "changed_technologies": {"type": "integer", "minimum": 0},
        "watch_only_technologies": {"type": "integer", "minimum": 0},
        "review_queue_count": {"type": "integer", "minimum": 0},
        "source_failure_count": {"type": "integer", "minimum": 0},
        "high_priority_count": {"type": "integer", "minimum": 0}
      },
      "additionalProperties": true
    },
    "technology_area_counts": {
      "type": "object",
      "additionalProperties": {"type": "integer", "minimum": 0}
    },
    "technologies": {
      "type": "array",
      "items": {"$ref": "#/$defs/technology"}
    },
    "review_queue": {
      "type": "array",
      "items": {"type": "object", "additionalProperties": true}
    },
    "new_technology_discovery": {
      "type": "array",
      "items": {"type": "object", "additionalProperties": true}
    },
    "failures": {
      "type": "array",
      "items": {"type": "string"}
    }
  },
  "$defs": {
    "technology": {
      "type": "object",
      "required": [
        "technology_id",
        "display_name",
        "technology_area",
        "integration_surface",
        "awoooi_role",
        "evaluation_priority",
        "requires_cost_approval",
        "requires_dependency_approval",
        "requires_security_review",
        "sources",
        "changed",
        "decision",
        "recommended_actions"
      ],
      "properties": {
        "technology_id": {"type": "string", "minLength": 1},
        "display_name": {"type": "string", "minLength": 1},
        "technology_area": {"type": "string", "minLength": 1},
        "integration_surface": {"type": "string"},
        "awoooi_role": {"type": "string"},
        "evaluation_priority": {"type": "string"},
        "requires_cost_approval": {"type": "boolean"},
        "requires_dependency_approval": {"type": "boolean"},
        "requires_security_review": {"type": "boolean"},
        "sources": {
          "type": "array",
          "items": {"type": "object", "additionalProperties": true}
        },
        "changed": {"type": "boolean"},
        "decision": {"type": "string"},
        "recommended_actions": {
          "type": "array",
          "items": {"type": "string"}
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": false
}
