{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://aiskillready.com/schema/observation.schema.json",
  "title": "AI Skill Ready 多源条目（Multi-source Entry）",
  "description": "多源条目：观测（榜单/价格/可用性快照）、论文、Skill 注册表等公开数据的结构化条目。纯规则采集零 Token；LLM 升维/验证环节的 token 成本记入 token_cost。v0.3：human_stream 升级「人读五问」卡片（what_it_is / worth_it / how_to_start / evidence / cautions）。",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "entry_id",
    "record_type",
    "title",
    "observed_at",
    "source",
    "confidence",
    "human_stream",
    "ai_stream",
    "token_cost",
    "machine_verified",
    "review"
  ],
  "properties": {
    "schema_version": {
      "type": "string",
      "enum": ["0.3"]
    },
    "entry_id": {
      "type": "string",
      "pattern": "^ASR-(OBS|PAPER|SKILL)-\\d{8}-[A-Za-z0-9_-]{2,40}$"
    },
    "record_type": {
      "enum": ["observation", "paper", "skill_registry"]
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "observed_at": {
      "type": "string",
      "format": "date"
    },
    "source": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name", "url", "snapshot_hash", "fetched_at"],
      "properties": {
        "name": {"type": "string"},
        "url": {"type": "string", "format": "uri"},
        "snapshot_hash": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
        "fetched_at": {"type": "string", "format": "date-time"}
      }
    },
    "confidence": {
      "enum": ["high", "medium", "low"]
    },
    "human_stream": {
      "type": "object",
      "additionalProperties": false,
      "required": ["summary", "key_points"],
      "properties": {
        "summary": {"type": "string", "minLength": 1},
        "key_points": {
          "type": "array",
          "items": {"type": "string"}
        },
        "note": {"type": "string"},
        "what_it_is": {"type": "string", "minLength": 1},
        "worth_it": {"type": "string", "minLength": 1},
        "how_to_start": {"type": "string", "minLength": 1},
        "evidence": {
          "type": "array",
          "items": {"type": "string", "minLength": 1}
        },
        "cautions": {"type": "string", "minLength": 1}
      }
    },
    "ai_stream": {
      "type": "object",
      "additionalProperties": true,
      "required": ["structured"],
      "properties": {
        "structured": {"type": "object"},
        "raw": {"type": "array"}
      }
    },
    "token_cost": {
      "type": "object",
      "additionalProperties": false,
      "required": ["total", "currency", "breakdown"],
      "properties": {
        "total": {"type": "number", "minimum": 0},
        "currency": {"enum": ["USD", "CNY"]},
        "breakdown": {
          "type": "object",
          "additionalProperties": false,
          "required": ["crawl", "clean", "elevate", "verify"],
          "properties": {
            "crawl": {"type": "number", "minimum": 0},
            "clean": {"type": "number", "minimum": 0},
            "elevate": {"type": "number", "minimum": 0},
            "verify": {"type": "number", "minimum": 0}
          }
        }
      }
    },
    "machine_verified": {
      "type": "boolean"
    },
    "review": {
      "type": "object",
      "additionalProperties": false,
      "required": ["status"],
      "properties": {
        "status": {
          "enum": ["pending", "agent_reviewed", "human_reviewed", "approved", "rejected", "needs_revision"]
        },
        "reviewer": {"type": "string"},
        "reviewed_at": {"type": "string", "format": "date-time"},
        "comments": {"type": "string"}
      }
    },
    "provenance": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "extracted_by": {"type": "string"},
        "extracted_at": {"type": "string", "format": "date-time"},
        "pipeline": {"type": "string"},
        "access_urls": {
          "type": "array",
          "items": {"type": "string", "format": "uri"}
        }
      }
    }
  }
}
