{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "axis-implementation-map.schema.json",
  "title": "Axis Implementation Map",
  "description": "figma↔code axis 映射真源 — 每条 instance 登记 figma 组件 axis 在 code 端的实际实现层级 + 锚点。schema 字段同 axis-implementation-map.md 章节 3（plan owner SoT，本 schema 是 audit 消费契约）。",
  "type": "object",
  "required": [
    "version",
    "instances"
  ],
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string"
    },
    "version": {
      "const": 1
    },
    "instances": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "figmaComponent",
          "figmaComponentSetIds",
          "figmaAxis",
          "figmaValue",
          "codeImplementationLayer",
          "codeFile",
          "codeAnchor"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9-]+$",
            "description": "kebab-case 唯一标识"
          },
          "figmaComponent": {
            "type": "string",
            "minLength": 1
          },
          "figmaComponentSetIds": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "pattern": "^[0-9]+:[0-9]+$"
            }
          },
          "figmaAxis": {
            "type": "string",
            "minLength": 1
          },
          "figmaValue": {
            "type": "string",
            "minLength": 1
          },
          "codeImplementationLayer": {
            "enum": [
              "css-class",
              "vue-prop",
              "vue-computed-palette",
              "css-custom-property-chain",
              "cross-component-topology"
            ]
          },
          "codeFile": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            ]
          },
          "codeAnchor": {
            "type": "string",
            "minLength": 1
          },
          "verifyHint": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        }
      }
    }
  }
}
