{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "kicad_cruncher.pcb.clean.config.a0",
  "title": "KiCad Cruncher PCB Clean Config",
  "description": "JSONC configuration for pcb clean. Generated templates include per-field comments; runtime plan and snapshot outputs are plain JSON.",
  "type": "object",
  "required": ["schema", "targets", "safety", "layers"],
  "properties": {
    "schema": {
      "const": "kicad_cruncher.pcb.clean.config.a0"
    },
    "targets": {
      "type": "object",
      "properties": {
        "user_layers": {"type": "boolean"},
        "generated_graphics": {"type": "boolean"},
        "footprint_graphics": {"type": "boolean"},
        "board_graphics": {"type": "boolean"},
        "reference_fields": {"type": "boolean"},
        "value_fields": {"type": "boolean"}
      },
      "additionalProperties": false
    },
    "safety": {
      "type": "object",
      "properties": {
        "protect_pads": {"type": "boolean"},
        "protect_models": {"type": "boolean"},
        "protect_mandatory_fields": {"type": "boolean"},
        "require_explicit_apply": {"type": "boolean"}
      },
      "additionalProperties": false
    },
    "layers": {
      "type": "object",
      "properties": {
        "include": {"type": "array", "items": {"type": "string"}},
        "exclude": {"type": "array", "items": {"type": "string"}}
      },
      "additionalProperties": false
    },
    "metadata": {
      "type": "object",
      "properties": {
        "field_name": {"type": "string"},
        "schema": {"type": "string"}
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
