{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://law.arxo.io/schema/concept-rule-alignment-policy.schema.json",
  "type": "object",
  "properties": {
    "format": {
      "const": "arxo.concept-rule-alignment.policy/0.1"
    },
    "profile": {
      "enum": [
        "lean-stacks-conditional-rules/0.1",
        "isabelle-order-conditional-rules/0.1",
        "lean-order-conditional-rules/0.1"
      ]
    },
    "enabled": {
      "type": "boolean"
    },
    "package": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "version": {
          "type": "string",
          "minLength": 1
        },
        "namespace": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "name",
        "version",
        "namespace"
      ],
      "additionalProperties": false
    },
    "source_project": {
      "type": "string",
      "minLength": 1
    },
    "target_packages": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "interpretation_basis": {
      "const": "declared_mapping_assumption"
    },
    "interpretation_hash": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$"
    },
    "projection_hash": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$"
    }
  },
  "required": [
    "format",
    "profile",
    "enabled",
    "package",
    "source_project",
    "target_packages",
    "interpretation_basis",
    "interpretation_hash",
    "projection_hash"
  ],
  "additionalProperties": false
}
