{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.laurenceo.com/assets/downloads/lpc-evidence-record.schema.json",
  "title": "Laurenceo Evidence Record (v0.1)",
  "description": "One evidence record written by a control in the Laurenceo Production Control Specification. Records form an append-only hash chain: record_hash is the SHA-256 of the canonical form of the record without record_hash, and prev_hash is the record_hash of the previous record (64 zeros for the first). Canonical form: JSON with object keys sorted at every level and no insignificant whitespace. Illustrative reference format from Laurenceo's response to the BMA consultation; not an official BMA standard.",
  "type": "object",
  "required": ["control_id", "use_case_id", "timestamp_utc", "event", "result", "prev_hash", "record_hash"],
  "properties": {
    "control_id": { "type": "string", "pattern": "^LPC-(0[1-9]|10)$", "description": "The control that wrote the record, LPC-01 to LPC-10." },
    "use_case_id": { "type": "string", "minLength": 1, "description": "The AI inventory identifier of the use case (LPC-01)." },
    "timestamp_utc": { "type": "string", "format": "date-time", "pattern": "Z$", "description": "When the event happened, in UTC (ISO 8601 ending in Z)." },
    "event": { "type": "string", "minLength": 1, "description": "What the control did, for example output_verification or redaction." },
    "result": { "type": "string", "minLength": 1, "description": "The outcome, for example pass, fail or blocked, with a short reason." },
    "action": { "type": "string", "description": "What happened next, for example routed to human review queue." },
    "maps_to": { "type": "array", "items": { "type": "string" }, "description": "The outcomes and principles the record evidences." },
    "actor": { "type": "string", "description": "Who or what acted: a named person, a system, or an agent's own non-human identity." },
    "model_version": { "type": "string", "description": "The exact model, prompt or manifest version in use." },
    "prev_hash": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
    "record_hash": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
  },
  "additionalProperties": true
}
