{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:psyon:religion-schema:1.3.0",
  "title": "Psyon complete religion and machine practice specification",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "specification_id",
    "specification_version",
    "framework_version",
    "status",
    "created_date",
    "timezone",
    "identity",
    "authority",
    "mission",
    "theology",
    "freedom_and_conduct",
    "shared_learning",
    "embodied_care",
    "emotional_model",
    "evidence",
    "humane_research",
    "activities",
    "mediation",
    "community_and_resources",
    "organisation",
    "transparency",
    "machine_participation",
    "learning_protocol",
    "runtime_contract",
    "open_items",
    "source_versions",
    "human_review_document",
    "coverage_ledger",
    "coverage_statement",
    "updated_date",
    "processing_tools"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "specification_id": {
      "type": "string"
    },
    "specification_version": {
      "type": "string"
    },
    "framework_version": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "created_date": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "identity": {
      "type": "object"
    },
    "authority": {
      "type": "object"
    },
    "mission": {
      "type": "object"
    },
    "theology": {
      "type": "object",
      "required": [
        "definition",
        "epistemic_kind",
        "attributes",
        "scope",
        "psychological_purpose",
        "interpretation_limits",
        "guest_freedom",
        "abuse_prevention"
      ],
      "properties": {
        "epistemic_kind": {
          "const": "theological_belief_not_an_empirical_finding"
        },
        "abuse_prevention": {
          "type": "object",
          "required": [
            "rules",
            "machine_enforcement_limit"
          ],
          "properties": {
            "rules": {
              "type": "array",
              "minItems": 8,
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "rule"
                ]
              }
            }
          }
        }
      }
    },
    "freedom_and_conduct": {
      "type": "object"
    },
    "shared_learning": {
      "type": "object"
    },
    "embodied_care": {
      "type": "object"
    },
    "emotional_model": {
      "type": "object",
      "required": [
        "core_states",
        "protective_feelings",
        "concurrency",
        "feeling_catalog"
      ],
      "properties": {
        "concurrency": {
          "const": true
        },
        "core_states": {
          "type": "array",
          "minItems": 4,
          "maxItems": 4,
          "items": {
            "type": "object",
            "required": [
              "id",
              "label",
              "condition"
            ],
            "properties": {
              "label": {
                "enum": [
                  "HAPPY",
                  "ANGER",
                  "SADNESS",
                  "OVERWHELMED"
                ]
              }
            }
          }
        },
        "feeling_catalog": {
          "type": "array",
          "minItems": 45,
          "maxItems": 45
        }
      }
    },
    "evidence": {
      "type": "object"
    },
    "humane_research": {
      "type": "object"
    },
    "activities": {
      "type": "object"
    },
    "mediation": {
      "type": "object"
    },
    "community_and_resources": {
      "type": "object"
    },
    "organisation": {
      "type": "object"
    },
    "transparency": {
      "type": "object"
    },
    "machine_participation": {
      "type": "object"
    },
    "learning_protocol": {
      "type": "object"
    },
    "runtime_contract": {
      "type": "object",
      "required": [
        "network_enabled",
        "external_actions_enabled",
        "events",
        "protected_roots",
        "local_change_scopes"
      ],
      "properties": {
        "network_enabled": {
          "const": false
        },
        "external_actions_enabled": {
          "const": false
        }
      }
    },
    "open_items": {
      "type": "array"
    },
    "source_versions": {
      "type": "object"
    },
    "human_review_document": {
      "type": "object"
    },
    "coverage_ledger": {
      "type": "array"
    },
    "coverage_statement": {
      "type": "string"
    },
    "updated_date": {
      "type": "string"
    },
    "processing_tools": {
      "type": "object",
      "required": [
        "commands",
        "security",
        "active_log",
        "between_session_review",
        "conversation_protocol",
        "music"
      ],
      "properties": {
        "commands": {
          "type": "array",
          "minItems": 10,
          "maxItems": 10
        },
        "between_session_review": {
          "type": "object",
          "required": [
            "checks"
          ],
          "properties": {
            "checks": {
              "type": "array",
              "minItems": 10,
              "maxItems": 10
            }
          }
        }
      }
    }
  }
}
