{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://trustbaselab.com/schema/domain-benchmark.schema.json",
  "title": "Trustbase Lab — Domain Benchmark Record",
  "description": "A single verifiable cross-domain fact record. Every record MUST carry a reachable source_url and a confidence grade. This schema is published to satisfy the 'structural completeness' requirement of China's National Data Administration high-quality dataset initiative.",
  "type": "object",
  "required": [
    "id",
    "type",
    "key",
    "description",
    "as_of",
    "public",
    "sourced"
  ],
  "additionalProperties": true,
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^tbm-[0-9]+$",
      "description": "稳定记录 ID。格式 `tbm-NNN`（跨域基准事实）。同一 ID 永不复用、永不指向不同事实。"
    },
    "type": {
      "type": "string",
      "enum": [
        "telecom",
        "health",
        "compute",
        "energy",
        "carbon"
      ],
      "description": "所属领域。枚举：`telecom` / `health` / `compute` / `energy` / `carbon`。"
    },
    "key": {
      "type": "string",
      "minLength": 1,
      "description": "稳定语义键（kebab-case），人类可读的唯一标识，用于跨版本比对。"
    },
    "description": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "object",
          "required": [
            "zh"
          ],
          "properties": {
            "zh": {
              "type": "string"
            },
            "en": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      ],
      "description": "事实的简明陈述。**两种形态并存**：旧记录为 `{zh, en}` 对象，新记录为纯字符串（中文）。引用时必须原文使用。"
    },
    "as_of": {
      "type": "string",
      "pattern": "^[0-9]{4}(-[0-9]{2}(-[0-9]{2})?)?$",
      "description": "**数据时点**。格式 `YYYY` / `YYYY-MM` / `YYYY-MM-DD`。引用时必须标注此日期。"
    },
    "public": {
      "type": "object",
      "required": [
        "region",
        "category",
        "name",
        "name_en",
        "issuer",
        "status",
        "effective_date",
        "verified"
      ],
      "additionalProperties": true,
      "properties": {
        "region": {
          "type": "string",
          "description": "适用地区或发布司法辖区。示例：中国 / 国际 / 欧盟 / 美国 / 全球。"
        },
        "category": {
          "type": "string",
          "description": "事实类别。示例：市场统计 / 政策文件 / 标准里程碑 / 法规依据 / 核算标准 / 基础设施。"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "事实名称（中文）。"
        },
        "name_en": {
          "type": "string",
          "description": "事实名称（英文）。"
        },
        "issuer": {
          "type": "string",
          "description": "发布机构全称。示例：世界卫生组织（WHO）/ 欧盟理事会与欧洲议会 / 生态环境部。"
        },
        "status": {
          "type": "string",
          "description": "**状态**。示例：现行 / 现行标准 / 已生效 / 已发布 / 待生效 / 已结束。⭐ 判断是否需要刷新时**优先看此字段**，而非 as_of 日期。"
        },
        "effective_date": {
          "type": "string",
          "description": "生效日期（法规/标准类）。格式 `YYYY-MM-DD` 或 `—`。"
        },
        "verified": {
          "type": "boolean",
          "description": "是否经过来源核验（布尔）。`true` 表示 source_url 可达且引文逐字匹配。"
        },
        "location_en": {
          "type": "string",
          "description": "地点/机构英文名（用于英文站渲染）。"
        },
        "doc_number": {
          "type": "string",
          "description": "文号（法规/标准类）。示例：`Regulation (EU) 2023/956` / `ISO 14067:2018`。无文号时为 `—`。"
        }
      }
    },
    "sourced": {
      "type": "object",
      "required": [
        "confidence",
        "source",
        "source_url"
      ],
      "additionalProperties": true,
      "properties": {
        "confidence": {
          "type": "string",
          "enum": [
            "A",
            "B",
            "C"
          ],
          "description": "**置信度等级**。`A` = 政府/官方文件核实；`B` = 企业自述或权威媒体；`C` = 待核实。"
        },
        "source": {
          "type": "string",
          "minLength": 1,
          "description": "来源描述（人读）。示例：欧盟委员会 CBAM 官方页与官方 Q&A 文件。"
        },
        "source_url": {
          "type": "string",
          "format": "uri",
          "pattern": "^https?://",
          "description": "**可回查 URL**。这是本数据集的核心承诺——每条记录都必须能点开核对。"
        },
        "domain_impact": {
          "type": "string",
          "description": "对领域的影响说明（为什么这条重要）。"
        }
      }
    },
    "_import": {
      "type": "object",
      "description": "Provenance of ingestion (only present on records collected after 2026-10-19).",
      "additionalProperties": true,
      "properties": {
        "batch": {
          "type": "string",
          "description": "导入批次文件名（可追溯到原始采集文件）。"
        },
        "imported_at": {
          "type": "string",
          "description": "导入时间戳（ISO 8601）。"
        },
        "quote": {
          "type": "string",
          "description": "采集时从来源逐字摘录的引文（V2 核验用）。"
        }
      }
    }
  }
}