{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://publedge.org/schema/rma.schema.json",
  "title": "PubLedge Regulatory Mitigation Agreement (RMA)",
  "description": "Frontmatter schema for a PubLedge RMA instrument — a formal contract between a regulator and a regulated party that specifies mitigations in exchange for reduced enforcement risk. Binds to Semantic Arts gist via @type and w3id.org IRIs.",
  "type": "object",
  "required": ["@type", "id", "name", "authority", "jurisdiction", "type", "status"],
  "properties": {
    "@type": {
      "type": "string",
      "description": "JSON-LD type. Canonical value for RMAs.",
      "const": "https://w3id.org/semanticarts/ns/ontology/gist/Contract"
    },
    "id": {
      "type": "string",
      "description": "Permanent PubLedge identifier in the form PL-RMA-NNNN.",
      "pattern": "^PL-RMA-[0-9]{4}$"
    },
    "name": { "type": "string", "minLength": 3 },
    "authority": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
    "jurisdiction": { "type": "string", "pattern": "^[a-z]{2,3}(-[a-z0-9]{2,})?$" },
    "type": { "const": "rma" },
    "status": {
      "type": "string",
      "enum": ["draft", "reviewed", "published", "superseded"]
    },
    "enacted": { "type": "string", "format": "date" },
    "effective": { "type": "string", "format": "date" },
    "term_start": { "type": "string", "format": "date" },
    "term_end": { "type": "string", "format": "date" },
    "supersedes": {
      "type": "string",
      "pattern": "^PL-RMA-[0-9]{4}$"
    },
    "official_url": { "type": "string", "format": "uri" },
    "statute_anchors": {
      "type": "array",
      "items": { "type": "string", "format": "uri" }
    },
    "program": {
      "type": "string",
      "description": "Named program or sandbox under which the RMA was issued (e.g. Utah AI Learning Lab)."
    },
    "mitigations": {
      "type": "array",
      "description": "Summary list of mitigations the regulated party has agreed to implement.",
      "items": { "type": "string" }
    },
    "participating_party": { "type": "string" },
    "issuing_authority": { "type": "string" },
    "review_date": { "type": "string", "format": "date" },
    "last_verified": { "type": "string", "format": "date" },
    "disclaimer": { "type": "string" }
  },
  "additionalProperties": true
}
