{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audit-domains/json-schema/audit-domains-appraisal-schema.json",
  "title": "Appraisal",
  "description": "The locked v1 projection. Keys are contract-locked; new keys only arrive with a version bump.",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audit-domains-openapi.json#/components/schemas/Appraisal",
  "type": "object",
  "properties": {
    "domain": {
      "type": "string"
    },
    "valueUSD": {
      "type": "number"
    },
    "valueRange": {
      "type": "object",
      "properties": {
        "low": {
          "type": "number"
        },
        "mid": {
          "type": "number"
        },
        "high": {
          "type": "number"
        }
      }
    },
    "tier": {
      "type": "string"
    },
    "confidence": {
      "type": "number"
    },
    "factors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Factor"
      }
    },
    "methodologyVersion": {
      "type": [
        "string",
        "null"
      ]
    },
    "engineVersion": {
      "type": "string"
    },
    "comps": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Comp"
      },
      "maxItems": 5
    },
    "appraisalHash": {
      "type": "string",
      "description": "SHA-256 over {commitment, result, hashVersion} - the appraisal's stable id (ODVS)."
    },
    "inputCommitment": {
      "type": "string",
      "description": "SHA-256 over {domain, engineId, engineVersion} - identity of the computation (ODVS)."
    },
    "resultDigest": {
      "type": "string",
      "description": "SHA-256 over the canonical numeric outputs (ODVS)."
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "dataEdition": {
      "type": [
        "string",
        "null"
      ],
      "description": "Version of the comparables snapshot in effect, when known."
    }
  },
  "$defs": {
    "Comp": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string"
        },
        "priceUsd": {
          "type": "number"
        },
        "year": {
          "type": "string"
        },
        "venue": {
          "type": [
            "string",
            "null"
          ]
        },
        "similarity": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "basis": {
          "type": [
            "string",
            "null"
          ],
          "description": "Why this sale was matched, naming the channel the matcher scored on (shared keyword, word family, same industry, structural cohort, spelling, length/zone). null means the basis was not recorded for this comp - the match is unexplained, not explained by something unstated."
        }
      }
    },
    "Factor": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "score": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        }
      }
    }
  }
}