# KiCad Native Evidence

Prefer native .kicad_sch and .kicad_pcb sources over screenshots.

Run:
python scripts/kicad_pcb_probe.py path/to/board.kicad_pcb > board-probe.json

The probe does not execute the board. It reports SHA-256, file size, KiCad format identity, layers, net names, footprint/segment/via/zone counts, segment-width range, and via geometry range.

Example constraint contract:
{
  "required_layers": ["F.Cu", "B.Cu"],
  "min_copper_layers": 2,
  "min_track_width_mm": 0.15,
  "min_via_diameter_mm": 0.45,
  "min_via_drill_mm": 0.20,
  "required_nets": ["GND"],
  "min_footprints": 1
}

Run:
python scripts/pcb_constraint_gate.py board-probe.json board-contract.json

The gate fails only on implemented explicit rules. It cannot infer missing engineering constraints.

When kicad-cli is installed, record its exact version first and use the commands supported by that installed release for ERC, DRC, and exports. Preserve exit status and output. Do not guess command switches across versions.

Probe PASS plus constraint-gate PASS is not equivalent to KiCad DRC PASS. Keep evidence classes separate.

Visual inspection is useful for placement, return-path discontinuities, reference transitions, neck-downs, thermal paths, connector mechanics, and markings, but it cannot override parser or DRC evidence.
