{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://vaultfire.example/schemas/v3-migration-completeness-ledger.schema.json",
  "title": "Vaultfire V2 to V3 migration completeness ledger",
  "type": "object",
  "required": [
    "schemaVersion",
    "supportedDispositions",
    "canonicalSources",
    "canonicalSourceSha256",
    "reconciliation",
    "categoryCounts",
    "items"
  ],
  "properties": {
    "schemaVersion": {"const": "1.1.0"},
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "category",
          "v2Source",
          "v3Disposition",
          "v3Target",
          "implementationObligation",
          "v3SupportStatus",
          "evidenceStatus",
          "deploymentStatus",
          "missionBoundaryRationale",
          "exactTargetModules",
          "bugOrRiskCarriedFromV2",
          "missionPrivacyClassification",
          "requiredTests",
          "evidence",
          "ownerAuthorityDependency",
          "activationGate",
          "influencePolicy"
        ],
        "properties": {
          "id": {"type": "string", "minLength": 3},
          "category": {"type": "string", "minLength": 1},
          "v2Source": {"type": "object"},
          "v3Disposition": {
            "enum": [
              "ported",
              "compatibility-wrapper",
              "intentionally-retired",
              "blocked",
              "not-applicable",
              "redesigned",
              "retired",
              "deferred"
            ]
          },
          "v3Target": {"type": "string", "minLength": 1},
          "implementationObligation": {"type": "string", "minLength": 1},
          "v3SupportStatus": {
            "enum": [
              "ported",
              "redesigned",
              "retired",
              "deferred",
              "unresolved",
              "not-applicable"
            ]
          },
          "evidenceStatus": {"type": "string", "minLength": 1},
          "deploymentStatus": {"type": "string", "minLength": 1},
          "missionBoundaryRationale": {"type": "string", "minLength": 1},
          "exactTargetModules": {
            "type": "array",
            "items": {"type": "string", "minLength": 1}
          },
          "bugOrRiskCarriedFromV2": {"type": "string", "minLength": 1},
          "missionPrivacyClassification": {
            "type": "object",
            "required": ["mission", "privacy"]
          },
          "requiredTests": {"type": "array", "minItems": 1},
          "evidence": {"type": "array"},
          "ownerAuthorityDependency": {"type": "string", "minLength": 1},
          "activationGate": {"type": "string", "minLength": 1},
          "influencePolicy": {
            "type": "object",
            "required": ["signals", "controls", "controlAllowed", "decision"]
          }
        }
      }
    }
  }
}
