Catch KiCad fab blockers before prototypes — DRC, schematic parity, physics review, scored pass/hold/fail reports, and CI integration.
Project description
FabGate
Pre-fab release gate for KiCad — catch fab blockers before you order prototypes.
One command runs DRC, schematic parity, and physics review, then returns a scored pass / hold / fail verdict with a prioritized fix list your team can act on.
pip install fabgate
fabgate evaluate "C:\path\to\your-kicad-project"
Why not just run KiCad DRC?
KiCad DRC finds clearance and shorting errors — but it does not:
- Gate release with a scored pass / hold / fail verdict
- Flag schematic vs layout mismatches (parts on PCB missing from schematic, and vice versa)
- Run EMC / power / signal-integrity physics review
- Produce a shareable HTML report + fix checklist with KiCad jump coordinates
- Plug into CI with standard exit codes
FabGate bundles that into one pre-fab gate.
What you get
Core (works out of the box)
| Feature | What it does |
|---|---|
| KiCad DRC | Clearance, shorts, edge violations, silkscreen — via kicad-cli |
| Schematic parity | Catches layout/schematic mismatches before they become rework |
| Scored verdict | 0–100 score, pass / hold / fail — cosmetic noise capped so one silk warning won't zero your score |
| HTML + JSON reports | Audit trail you can share with your team or client |
| Fix checklist | Prioritized actions with KiCad jump coords — press Ctrl+F and go |
Deep review (optional)
| Feature | What it does |
|---|---|
| Physics review | EMC, power integrity, signal integrity via emcopilot |
| Power trace checks | IPC-based width recommendations for high-current nets |
Install emcopilot separately:
pip install git+https://github.com/RFingAdam/mcp-pcb-emcopilot.git
Automation & CI
| Feature | What it does |
|---|---|
| CI gate | fabgate gate → exit 0 (pass), 1 (hold), 2 (fail) for GitHub Actions / Jenkins |
| Safe auto-fixes | Board outline, thickness, GND/power zones, power trace widening |
| Rollback guardrail | Auto-fixes are undone if blocking issue count goes up |
| Design scaffold | Create blank KiCad projects from a YAML spec |
| Full workflow | Design → evaluate → optimize in one pipeline |
No LLM calls. Deterministic KiCad rules and physics-based analyzers only.
Quick start
Prerequisites: Python 3.11+ and KiCad 9+ with kicad-cli.
fabgate doctor
fabgate evaluate "C:\path\to\your-kicad-project"
fabgate open "C:\path\to\your-kicad-project"
Reports are written to reports/:
*-review.html— full report (open in browser)*-evaluation.json— machine-readable results*-optimization-checklist.md— what to fix first
Example output
FAIL Score 72/100
Findings: 48 (blocking 3, warnings 12)
Fix first:
- Board edge clearance violation @ 89.28, 28.24 mm
- J101 in schematic but missing from layout
- +3V3 power trace too narrow @ 126.0, 63.9 mm
Projected score if blocking fixed: 91/100
Checklist: reports\my-board-optimization-checklist.md
CI example
fabgate gate "C:\path\to\your-kicad-project"
# exit 0 = pass (OK to fab)
# exit 1 = hold (human review)
# exit 2 = fail (blocking issues)
Commands
| Command | Purpose |
|---|---|
fabgate doctor |
Check KiCad CLI + optional emcopilot |
fabgate evaluate |
Full evaluation + HTML report + checklist |
fabgate review |
Basic review |
fabgate gate |
CI exit code for release pipelines |
fabgate optimize run |
Optimization plan + optional safe auto-fixes |
fabgate auto run |
Auto-fix loop with rollback guardrail |
fabgate design create |
Scaffold new KiCad project from spec |
fabgate workflow |
Design → evaluate → optimize |
fabgate open |
Open project in KiCad GUI |
Who it's for
- Hardware teams — run a pre-fab gate before every prototype order
- Freelance PCB designers — deliver scored, auditable releases to clients
- Startups — add a KiCad release check to CI without manual DRC hunting
Development install
git clone <repo-url>
cd fabgate
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev,emcopilot]"
fabgate doctor
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fabgate-0.1.2.tar.gz.
File metadata
- Download URL: fabgate-0.1.2.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
696f711965258afc7abd148d75442209896ae4ecf6433e8d0061cc262bf22fbe
|
|
| MD5 |
1e9491d6ff445d915060fb70810ebd7e
|
|
| BLAKE2b-256 |
5bb684fc34d0b567d3bf882ac29f1bb41de3f543afd7591c8e5b65bdddf01db3
|
File details
Details for the file fabgate-0.1.2-py3-none-any.whl.
File metadata
- Download URL: fabgate-0.1.2-py3-none-any.whl
- Upload date:
- Size: 54.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fcff173be6efb08bd34cf79471bda4daa7bcca389f67b10568ef846b8ae25ff
|
|
| MD5 |
f0232bdfca6630d11f5647841c0b400b
|
|
| BLAKE2b-256 |
f1cb5c3814789314fabf865ab8e12d8115ad99f32eacb557f619df2b1938caa8
|