{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "divergences-decisions.schema.json",
  "title": "Divergences Decisions",
  "description": "翻译层显式不映射 / dual-form / API split / migration plan / accepted divergence / pipeline limitation 全部决议真源。category-specific 字段验证延后到 audit:translation-completeness。",
  "type": "object",
  "required": [
    "version",
    "decisions"
  ],
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string"
    },
    "version": {
      "const": 1
    },
    "decisions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "category",
          "subject"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9-]+$"
          },
          "category": {
            "enum": [
              "resolved",
              "dual-form-mapping",
              "api-split",
              "migration-plan",
              "accepted-divergence",
              "figma-pipeline-limitation",
              "code-side-dual-source",
              "component-level-translation"
            ]
          },
          "component": {
            "type": [
              "string",
              "null"
            ]
          },
          "components": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "subject": {
            "type": "string",
            "minLength": 1
          },
          "figmaSide": {
            "type": [
              "string",
              "null"
            ]
          },
          "codeSide": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "resolved",
              "accepted-documented-divergence",
              "accepted-documented-divergence-with-exceptions",
              "approved-dual-form-mapping",
              "approved-api-split",
              "approved-migration-plan",
              null
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
          },
          "resolutionRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "phase": {
            "type": [
              "string",
              "null"
            ]
          },
          "verifyHint": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}
