{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Professional evidence dataset",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "subject", "supported_domains", "evidence"],
  "properties": {
    "schema_version": {"const": "1.0"},
    "canonical_url": {"type": "string", "format": "uri"},
    "subject": {
      "type": "object",
      "additionalProperties": false,
      "required": ["canonical_name", "verified_public_forms", "candidate_name_variants", "identity_note"],
      "properties": {
        "canonical_name": {"const": "Stas Sultanov"},
        "verified_public_forms": {"$ref": "#/$defs/strings"},
        "candidate_name_variants": {"$ref": "#/$defs/strings"},
        "identity_note": {"type": "string", "minLength": 1}
      }
    },
    "supported_domains": {"$ref": "#/$defs/strings"},
    "evidence": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/record"}}
  },
  "$defs": {
    "strings": {"type": "array", "uniqueItems": true, "items": {"type": "string", "minLength": 1}},
    "optionalUrl": {"type": ["string", "null"], "format": "uri"},
    "record": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "title", "date", "category", "source_url", "source_type", "source_strength", "independence", "observed_fact", "external_validation", "technical_domains", "related_people", "related_organizations", "confidence", "ambiguities", "notes", "checked_on", "verification_scope"],
      "properties": {
        "id": {"type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"},
        "title": {"type": "string", "minLength": 1},
        "date": {"type": ["string", "null"], "pattern": "^\\d{4}(-\\d{2}(-\\d{2})?)?$"},
        "category": {"enum": ["software", "public-speaking", "publication", "career", "vendor-platform-debugging", "commercial-development", "technical-leadership"]},
        "source_url": {"type": "string", "format": "uri"},
        "source_type": {"enum": ["vendor-public-issue", "public-repository", "package-registry", "official-conference", "conference-biography", "original-publication", "official-credits", "secondary-report", "self-reported-profile"]},
        "source_strength": {"enum": ["primary", "strong-secondary", "self-reported", "unverified"]},
        "independence": {"enum": ["subject-controlled", "vendor", "organizer", "independent-secondary", "mixed", "unknown"]},
        "observed_fact": {"type": "string", "minLength": 1},
        "external_validation": {"type": ["string", "null"], "minLength": 1},
        "technical_domains": {"$ref": "#/$defs/strings"},
        "related_people": {"$ref": "#/$defs/strings"},
        "related_organizations": {"$ref": "#/$defs/strings"},
        "confidence": {"enum": ["high", "medium", "low"]},
        "ambiguities": {"$ref": "#/$defs/strings"},
        "notes": {"type": "string", "minLength": 1},
        "checked_on": {"type": "string", "format": "date"},
        "verification_scope": {"type": "string", "minLength": 1},
        "record_url": {"type": "string", "format": "uri"},
        "talk": {
          "type": "object",
          "additionalProperties": false,
          "required": ["path", "event", "location", "language", "video_url", "slides_url", "transcript_status", "transcript_url", "caption_urls", "transcript_note"],
          "properties": {
            "path": {"type": "string", "pattern": "^talks/[a-z0-9-]+/$"},
            "event": {"type": "string", "minLength": 1},
            "location": {"type": ["string", "null"]},
            "language": {"type": ["string", "null"], "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]+)*$"},
            "video_url": {"$ref": "#/$defs/optionalUrl"},
            "slides_url": {"$ref": "#/$defs/optionalUrl"},
            "transcript_status": {"enum": ["unavailable"]},
            "transcript_url": {"type": "null"},
            "caption_urls": {"type": "array", "maxItems": 0},
            "transcript_note": {"type": "string", "minLength": 1}
          }
        }
      }
    }
  }
}
