Metadata-Version: 2.4
Name: fabgate
Version: 0.1.0
Summary: Pre-fab PCB design review and release gate for KiCad boards
Project-URL: Homepage, https://pypi.org/project/fabgate/
Project-URL: Repository, https://github.com/coderlifevyn12/fabgate
Author: coderlifevyn12
License-Expression: MIT
License-File: LICENSE
Keywords: dfm,drc,emc,hardware,kicad,pcb,release-gate
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
Requires-Python: >=3.11
Requires-Dist: pydantic-settings>=2.3.0
Requires-Dist: pydantic>=2.7.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.7.0
Requires-Dist: typer>=0.12.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Provides-Extra: emcopilot
Requires-Dist: matplotlib>=3.10.8; extra == 'emcopilot'
Requires-Dist: mcp>=1.0.0; extra == 'emcopilot'
Description-Content-Type: text/markdown

# FabGate

Pre-fab PCB design review and release gate for KiCad boards.

**v0.1** — evaluate your board, get a scored pass/hold/fail report, and a fix checklist before fabrication.

## Prerequisites

- [Python 3.11+](https://www.python.org/downloads/)
- [KiCad 9+](https://www.kicad.org/download/) with `kicad-cli` available

## Install

```powershell
pip install fabgate
```

Optional deep physics review (EMC / power / signal integrity):

```powershell
pip install "fabgate[emcopilot]"
```

## Quick start

```powershell
# Check toolchain
fabgate doctor

# Review an existing KiCad project
fabgate evaluate "C:\path\to\your-kicad-project"

# CI / release gate (exit 0=pass, 1=hold, 2=fail)
fabgate gate "C:\path\to\your-kicad-project"

# Open board in KiCad
fabgate open "C:\path\to\your-kicad-project"
```

Reports are written to `reports/` as HTML + JSON.

## What it checks

| Check | Engine |
|-------|--------|
| DRC violations | KiCad `kicad-cli` |
| Schematic parity | KiCad |
| EMC / power / SI physics | emcopilot (optional) |
| Scoring + pass/hold/fail | FabGate rules |

FabGate does **not** call an LLM. It uses deterministic KiCad and physics-based analyzers.

## Commands

| Command | Purpose |
|---------|---------|
| `fabgate doctor` | Check KiCad CLI + optional emcopilot |
| `fabgate evaluate` | Full evaluation + HTML report |
| `fabgate review` | Basic review |
| `fabgate gate` | CI exit code |
| `fabgate optimize run` | Optimization plan + safe auto-fixes |
| `fabgate auto run` | Autonomous optimize loop (with rollback guardrail) |
| `fabgate design create` | Scaffold new KiCad project |
| `fabgate workflow` | Design → evaluate → optimize |
| `fabgate open` | Open in KiCad GUI |

## Development install

```powershell
git clone <repo-url>
cd fabgate
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev,emcopilot]"
fabgate doctor
```

## License

MIT
