{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://law.arxo.io/schema/norm-lifecycle.schema.json",
  "title": "Arxo law norm lifecycle answer 0.1",
  "description": "Static norm templates and compiler-linked rules. The runtime lifecycle needs a case and a legal time, so it is not directly available in 0.1.",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema", "uri", "version", "status", "reason", "norms"],
  "properties": {
    "schema": { "const": "law.norm-lifecycle/0.1" },
    "uri": { "type": "string", "pattern": "^file://" },
    "version": { "type": "integer" },
    "status": { "const": "unavailable" },
    "reason": { "type": "string", "minLength": 1 },
    "norms": {
      "type": "array",
      "items": {
        "type": "object", "additionalProperties": false,
        "required": ["templateId", "modality", "rules"],
        "properties": {
          "templateId": { "type": "string", "minLength": 1 },
          "modality": { "type": "string", "minLength": 1 },
          "rules": {
            "type": "array",
            "items": {
              "type": "object", "additionalProperties": false,
              "required": ["ruleId"],
              "properties": {
                "ruleId": { "type": "string", "minLength": 1 },
                "effective": {}
              }
            }
          }
        }
      }
    }
  }
}
