{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://plenaverify.com/vrx1-disclosure-demand-receipt.schema.json",
  "title": "PLENA VRX-1 Disclosure Demand Receipt v1",
  "description": "Additive VRX-1 receipt type for the Private AI Use position (Task 17). Records that an institution demanded AI-use disclosure, what was demanded, the stated basis, and how the user responded. Mirrors the Refusal Receipt and Non-Response Receipt structure. The receipt signs proof structure about the demand and response; it does not contain the user's private drafts, prompts, AI outputs, or any document content. Self-attested, tamper-evident via SHA-256 over canonical JSON; not issuer-signed by default, not externally anchored, not certified by PLENA. Voice on the verify page: 'The signer recorded a disclosure demand from [institution] on [date]. The user's response is recorded. Underlying private process records are not disclosed in this receipt.'",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "vrx1_version",
    "schema_version",
    "receipt_id",
    "receipt_type",
    "created_at",
    "demanding_institution",
    "demand_received_at",
    "demand_scope",
    "demand_stated_basis",
    "user_response",
    "privacy_level",
    "verification_url",
    "integrity_note",
    "hash"
  ],
  "$comment": "Privacy-safe architecture: MUST NOT contain private drafts, prompts, AI outputs, or document content. Records the demand and the response only. additionalProperties is false.",
  "properties": {
    "vrx1_version": { "type": "string", "const": "1.0-d19-private-ai-use-disclosure-demand-receipt-reference", "description": "VRX-1 reference-implementation version string." },
    "schema_version": { "type": "string", "const": "vrx1.disclosure-demand-receipt.v1", "description": "Stable schema identifier." },
    "receipt_id": { "type": "string", "pattern": "^PLENA-DDR-[0-9]{8}-[A-F0-9]{4}$", "description": "Unique id. Format: PLENA-DDR-<YYYYMMDD>-<4 uppercase hex>." },
    "receipt_type": { "type": "string", "const": "DISCLOSURE_DEMAND_RECEIPT", "description": "Receipt type discriminator." },
    "created_at": { "type": "string", "format": "date-time", "description": "ISO-8601 date-time from the device that built the receipt." },
    "issuer": { "type": "string", "description": "Optional. Signature-ready issuer identifier when signed via the Issuer Portal." },
    "source_product": { "type": "string", "description": "Optional. Product/surface that generated the receipt." },
    "signed_at": { "type": "string", "format": "date-time", "description": "Optional. Time of issuer signature, if signed." },
    "demanding_institution": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name"],
      "properties": {
        "name": { "type": "string", "minLength": 1, "description": "Name of the institution making the demand." },
        "role": { "type": "string", "description": "Optional. Role/relationship (e.g., school, employer, publisher, client)." },
        "jurisdiction": { "type": "string", "description": "Optional. Jurisdiction, if relevant." }
      },
      "description": "The institution that demanded disclosure."
    },
    "demand_received_at": { "type": "string", "format": "date-time", "description": "When the demand was received." },
    "demand_scope": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": { "type": "string", "enum": ["full_prompt_history", "draft_transparency", "no_ai_attestation", "detector_review_consent", "process_explanation", "data_disclosure_about_third_parties", "other_specified"] },
      "description": "What was demanded. Use 'other_specified' with a free-text note in demand_stated_basis if needed."
    },
    "demand_stated_basis": { "type": "string", "minLength": 1, "description": "The institution's stated reason for the demand (academic integrity, contractual obligation, regulatory compliance, employer policy, court order, etc.)." },
    "user_response": { "type": "string", "enum": ["complied_fully", "complied_minimally", "requested_legitimate_basis", "declined_with_reasons", "appealed", "pending_legal_review"], "description": "How the user responded to the demand." },
    "response_basis": { "type": "string", "description": "Optional. The user's stated reason for the response." },
    "appeal_status": { "type": "string", "enum": ["none", "in_progress", "resolved_in_user_favor", "resolved_against_user"], "description": "Optional. Status of any appeal." },
    "privacy_level": { "type": "string", "enum": ["restricted", "private", "public"], "description": "Privacy classification of the receipt." },
    "verification_url": { "type": "string", "minLength": 1, "description": "URL where the receipt can be opened in the Public Verify panel." },
    "integrity_note": { "type": "string", "minLength": 1, "description": "Plain-language truth boundary. Should state that private process records are not disclosed by this receipt." },
    "hash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$", "description": "SHA-256 hex digest over canonical JSON without the 'hash' field." }
  }
}
