{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://proofet.com/atlas/schemas/0.1.0/classification-assertion.schema.json",
  "title": "Proofet Atlas Classification Assertion",
  "type": "object",
  "additionalProperties": false,
  "required": ["characteristic", "value", "evidence"],
  "properties": {
    "characteristic": {
      "type": "string",
      "pattern": "^atlas\\.(artifact|credential|representation|claims|semantics|mechanism|context)\\.[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"
    },
    "value": {},
    "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
    "basis": { "enum": ["observed", "declared", "context_supplied", "inferred", "unknown"] },
    "evidence": {
      "type": "array",
      "items": { "$ref": "#/$defs/evidence" },
      "minItems": 1
    },
    "limitations": {
      "type": "array",
      "items": { "type": "string", "minLength": 1 },
      "uniqueItems": true
    }
  },
  "$defs": {
    "evidence": {
      "type": "object",
      "additionalProperties": false,
      "required": ["source", "path", "observation"],
      "properties": {
        "source": { "type": "string", "minLength": 1 },
        "path": { "type": "string" },
        "value": {},
        "value_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
        "redaction": { "type": "string", "minLength": 1 },
        "observation": { "type": "string", "minLength": 1 }
      }
    }
  }
}