{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hogarmas.net/ai-transparency/receipt-schema.json",
  "title": "H/M AI Transparency Share Receipt Envelope",
  "description": "Privacy-minimized Article 50 result snapshot with a SHA-256 consistency checksum. It is unsigned, does not authenticate an issuer and is not a Content Credential.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema",
    "receipt",
    "integrity"
  ],
  "properties": {
    "schema": {
      "const": "hm.ai-transparency-receipt-envelope.v1"
    },
    "receipt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schema",
        "tool",
        "ruleset",
        "verifiedOn",
        "applicableFrom",
        "article50_2TransitionDeadline",
        "language",
        "summary",
        "obligations",
        "disclosures",
        "evidence",
        "privacy",
        "limitations"
      ],
      "properties": {
        "schema": {
          "const": "hm.ai-transparency-receipt.v1"
        },
        "tool": {
          "const": "https://hogarmas.net/ai-transparency/"
        },
        "ruleset": {
          "type": "string"
        },
        "verifiedOn": {
          "type": "string",
          "format": "date"
        },
        "applicableFrom": {
          "const": "2026-08-02"
        },
        "article50_2TransitionDeadline": {
          "const": "2026-12-02"
        },
        "language": {
          "type": "string",
          "enum": [
            "en",
            "es",
            "zh"
          ]
        },
        "summary": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "likelyTriggered",
            "reviewRequired",
            "notIndicated",
            "missingEvidence",
            "evidenceToReview"
          ],
          "properties": {
            "likelyTriggered": {
              "type": "integer",
              "minimum": 0
            },
            "reviewRequired": {
              "type": "integer",
              "minimum": 0
            },
            "notIndicated": {
              "type": "integer",
              "minimum": 0
            },
            "missingEvidence": {
              "type": "integer",
              "minimum": 0
            },
            "evidenceToReview": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "obligations": {
          "type": "array",
          "minItems": 6,
          "maxItems": 6,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "article",
              "actor",
              "status",
              "statusLabel",
              "title",
              "reasonCode",
              "reason",
              "actions",
              "source"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "article": {
                "type": "string"
              },
              "actor": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "likely-triggered",
                  "review-required",
                  "not-indicated"
                ]
              },
              "statusLabel": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "reasonCode": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "text"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    }
                  }
                }
              },
              "source": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        },
        "disclosures": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "article",
              "placement",
              "requiredness",
              "text"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "article": {
                "type": "string"
              },
              "placement": {
                "type": "string"
              },
              "requiredness": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            }
          }
        },
        "evidence": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "status",
              "statusLabel",
              "label",
              "requiredFor"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "provided",
                  "missing",
                  "review"
                ]
              },
              "statusLabel": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "requiredFor": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "privacy": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "questionnaireAnswersIncluded",
            "userEnteredIdentifiersIncluded",
            "networkRequestRequired",
            "urlFragmentUsed",
            "fragmentSentInHttpRequest",
            "urlFragmentMayAppearInBrowserHistory"
          ],
          "properties": {
            "questionnaireAnswersIncluded": {
              "const": false
            },
            "userEnteredIdentifiersIncluded": {
              "const": false
            },
            "networkRequestRequired": {
              "const": false
            },
            "urlFragmentUsed": {
              "const": true
            },
            "fragmentSentInHttpRequest": {
              "const": false
            },
            "urlFragmentMayAppearInBrowserHistory": {
              "const": true
            }
          }
        },
        "limitations": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "legalAdviceProvided",
            "complianceCertified",
            "cryptographicallySigned",
            "issuerIdentityVerified",
            "contentCredentialProduced",
            "assetCryptographicallyBound"
          ],
          "properties": {
            "legalAdviceProvided": {
              "const": false
            },
            "complianceCertified": {
              "const": false
            },
            "cryptographicallySigned": {
              "const": false
            },
            "issuerIdentityVerified": {
              "const": false
            },
            "contentCredentialProduced": {
              "const": false
            },
            "assetCryptographicallyBound": {
              "const": false
            }
          }
        }
      }
    },
    "integrity": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "algorithm",
        "digest",
        "cryptographicallySigned",
        "issuerIdentityVerified"
      ],
      "properties": {
        "algorithm": {
          "const": "SHA-256"
        },
        "digest": {
          "type": "string",
          "pattern": "^sha256:[a-f0-9]{64}$"
        },
        "cryptographicallySigned": {
          "const": false
        },
        "issuerIdentityVerified": {
          "const": false
        }
      }
    }
  }
}
