{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://open-coder-ai.github.io/chock/schemas/v0/guardrails.schema.json",
  "title": "chock guardrails toggle file",
  "description": ".chock/guardrails.json (repo scope) or ~/.chock/guardrails.json (user scope): which members of an installed chock bundle are switched off. An absent entry is on. On and off only, never a pattern or a rule. A file that does not match this schema switches nothing off. Written only by `chock bundle on|off`.",
  "type": "object",
  "additionalProperties": false,
  "required": ["version", "bundles"],
  "properties": {
    "version": {"type": "integer", "const": 1},
    "bundles": {
      "type": "object",
      "description": "bundle.name -> its members' states.",
      "propertyNames": {"pattern": "^[a-z][a-z0-9-]{2,63}$"},
      "additionalProperties": {
        "type": "object",
        "description": "policy id -> on | off.",
        "propertyNames": {"pattern": "^[a-z][a-z0-9-]{2,63}$"},
        "additionalProperties": {"type": "string", "enum": ["on", "off"]}
      }
    }
  }
}
