{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://taxonmark.com/api/v1/types/ai-decision-attestation",
    "title": "AI Decision / Output Attestation",
    "type": "object",
    "required": [
        "decision_domain",
        "deployment_doi",
        "decision_timestamp",
        "input_hash",
        "output_hash",
        "human_in_loop",
        "personal_data_offregistry"
    ],
    "properties": {
        "decision_domain": {
            "title": "Decision domain",
            "type": "string",
            "enum": [
                "credit",
                "insurance",
                "medical-triage",
                "legal-drafting",
                "employment",
                "public-benefits",
                "other"
            ]
        },
        "deployment_doi": {
            "title": "Deployment ID",
            "type": "string",
            "format": "doi",
            "description": "A Taxonmark ID (for example TM.AI.2026.7KQ2X) or a DOI registered elsewhere"
        },
        "decision_timestamp": {
            "title": "Decision timestamp",
            "type": "string",
            "format": "date-time"
        },
        "input_hash": {
            "title": "Input hash",
            "type": "string",
            "pattern": "^(sha256:)?[A-Fa-f0-9]{64}$",
            "description": "SHA-256 hex (optionally prefixed sha256:)"
        },
        "output_hash": {
            "title": "Output hash",
            "type": "string",
            "pattern": "^(sha256:)?[A-Fa-f0-9]{64}$",
            "description": "SHA-256 hex (optionally prefixed sha256:)"
        },
        "human_in_loop": {
            "title": "Human in the loop",
            "type": "boolean"
        },
        "contest_url": {
            "title": "Contest / appeal URL",
            "type": "string",
            "format": "uri"
        },
        "retention_until": {
            "title": "Retention until",
            "type": "string",
            "format": "date"
        },
        "personal_data_offregistry": {
            "title": "Confirm: no personal data in this record",
            "type": "boolean"
        }
    },
    "additionalProperties": true
}