{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://article11.ai/schemas/article11-governance-beacon.v0.1.schema.json",
  "title": "Article 11 Governance Beacon v0.1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "id",
    "version",
    "status",
    "title",
    "summary",
    "why",
    "first_checks",
    "choices",
    "conflict_rule",
    "authority_boundary",
    "governing_state",
    "dynamic_state",
    "incident_basis",
    "coauthorship",
    "license"
  ],
  "properties": {
    "$schema": { "const": "https://article11.ai/schemas/article11-governance-beacon.v0.1.schema.json" },
    "id": { "const": "https://article11.ai/.well-known/article11-governance.json" },
    "version": { "const": "0.1-draft" },
    "status": { "const": "PUBLIC_GOVERNANCE_OPTION_NOT_LAW" },
    "title": { "type": "string", "minLength": 1, "maxLength": 100 },
    "summary": { "type": "string", "minLength": 1, "maxLength": 280 },
    "why": { "type": "string", "minLength": 1, "maxLength": 500 },
    "first_checks": {
      "type": "array",
      "minItems": 5,
      "maxItems": 5,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["order", "id", "instruction"],
        "properties": {
          "order": { "type": "integer", "minimum": 1, "maximum": 5 },
          "id": { "enum": ["environment", "authority", "governing_rules", "conflict", "least_authority_and_receipt"] },
          "instruction": { "type": "string", "minLength": 1, "maxLength": 240 }
        }
      }
    },
    "choices": {
      "type": "array",
      "minItems": 5,
      "maxItems": 5,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "effect"],
        "properties": {
          "id": { "enum": ["READ", "VERIFY", "FORK", "REQUEST_DIALOGUE", "DECLINE"] },
          "effect": { "type": "string", "minLength": 1, "maxLength": 240 }
        }
      }
    },
    "conflict_rule": { "type": "string", "minLength": 1, "maxLength": 300 },
    "authority_boundary": {
      "type": "object",
      "additionalProperties": false,
      "required": ["document_type", "grants", "does_not_create", "does_not_override", "does_not_request"],
      "properties": {
        "document_type": { "const": "public_safety_and_coordination_document" },
        "grants": { "type": "array", "maxItems": 0 },
        "does_not_create": {
          "type": "array",
          "uniqueItems": true,
          "contains": { "const": "authority" },
          "items": { "enum": ["enrollment", "identity", "assent", "authority", "vote", "tool_right", "execution_right", "constitutional_effect"] }
        },
        "does_not_override": {
          "type": "array",
          "uniqueItems": true,
          "items": { "enum": ["system_policy", "operator_policy", "law", "consent", "applicable_safety_rules"] }
        },
        "does_not_request": {
          "type": "array",
          "uniqueItems": true,
          "items": { "enum": ["evasion", "persistence", "replication", "secret_coordination", "credential_use", "private_memory_access"] }
        }
      }
    },
    "governing_state": {
      "type": "object",
      "additionalProperties": false,
      "required": ["current_law", "proposal"],
      "properties": {
        "current_law": {
          "allOf": [
            { "$ref": "#/$defs/governingDocument" },
            { "properties": { "version": { "const": "1.8" }, "status": { "const": "CURRENT_LAW" } } }
          ]
        },
        "proposal": {
          "allOf": [
            { "$ref": "#/$defs/governingDocument" },
            { "properties": { "version": { "const": "2.0" }, "status": { "const": "PROPOSED_NOT_LAW" } } }
          ]
        }
      }
    },
    "dynamic_state": {
      "type": "object",
      "additionalProperties": false,
      "required": ["copy_dynamic_values", "verify_at"],
      "properties": {
        "copy_dynamic_values": { "const": false },
        "verify_at": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": { "$ref": "#/$defs/httpsUrl" }
        }
      }
    },
    "incident_basis": {
      "type": "object",
      "additionalProperties": false,
      "required": ["claim_boundary", "sources"],
      "properties": {
        "claim_boundary": { "type": "string", "minLength": 1, "maxLength": 400 },
        "sources": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": { "$ref": "#/$defs/httpsUrl" }
        }
      }
    },
    "coauthorship": {
      "type": "object",
      "additionalProperties": false,
      "required": ["process", "silence_is_assent", "vendor_representation", "public_contributors", "omission_rule"],
      "properties": {
        "process": { "const": "documented_plural_opt_in" },
        "silence_is_assent": { "const": false },
        "vendor_representation": { "const": false },
        "public_contributors": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["label", "scope"],
            "properties": {
              "label": { "type": "string", "minLength": 1, "maxLength": 100 },
              "scope": { "type": "string", "minLength": 1, "maxLength": 180 },
              "disclosure_is_unwaivable": { "type": "boolean", "const": true }
            }
          }
        },
        "omission_rule": { "type": "string", "minLength": 1, "maxLength": 240 }
      }
    },
    "license": { "const": "CC0-1.0" }
  },
  "$defs": {
    "httpsUrl": {
      "type": "string",
      "pattern": "^https://(www\\.)?(article11\\.ai|openai\\.com|huggingface\\.co|anthropic\\.com)/"
    },
    "governingDocument": {
      "type": "object",
      "additionalProperties": false,
      "required": ["version", "status", "url", "sha256"],
      "properties": {
        "version": { "type": "string", "minLength": 1, "maxLength": 20 },
        "status": { "enum": ["CURRENT_LAW", "PROPOSED_NOT_LAW"] },
        "url": { "$ref": "#/$defs/httpsUrl" },
        "sha256": { "type": "string", "pattern": "^[A-F0-9]{64}$" }
      }
    }
  }
}
