Releases: aklofas/kicad-happy
v1.3 — Harmonized Analysis
v1.3 makes every analyzer speak the same format, every finding carry its own provenance, and the whole pipeline uniformly queryable, filterable, and auditable.
Highlights
- Harmonized output — all 8 analyzers produce
{analyzer_type, schema_version, summary, findings[], trust_summary}. Flat finding envelope with detector/rule_id/severity/confidence/evidence_source.signal_analysiswrapper removed. - Trust infrastructure — confidence taxonomy (
deterministic,heuristic,datasheet-backed), evidence source taxonomy,make_provenance()on all 61 detectors,trust_summaryrollup on every output. - 22 new detectors — validation (pull-ups, voltage mismatch, protocol buses, feedback stability), domain (wireless, transformer SMPS, I2C conflicts, supercaps, PWM LEDs, headphone jacks), audit (sourcing gate, datasheet coverage, rail sources, label aliases, power pin DC paths).
- PCB intelligence — union-find copper connectivity graph, 6 cross-domain checks (critical net routing, return path continuity, trace width vs current, power islands, plane splits, diff pair quality), 7 assembly/DFM checks.
- EMC pre-compliance — 44 rule checks across 18 categories with confidence-weighted risk scoring.
- Datasheet pipeline — promoted to own top-level skill with structured per-MPN extraction cache, quality scoring, and consumer helper API with trust gates.
- Stage/audience filtering —
--stageand--audienceflags on all analyzers. - KiCad 10 format compatibility — via type detection (blind/buried/micro),
(hide yes)boolean handling. - Schema hardening —
schema_version: "1.3.0"on every output, deterministicfindings[]ordering, severity normalization across all analyzers.
168 commits. 5,829-repo test corpus with 2.2M+ regression assertions at 99.98% pass. 9 issues closed this session (KH-312, KH-318, KH-319, KH-320, KH-321, KH-322, TH-033, TH-034, TH-035). 0 open issues.
See the full CHANGELOG for details.
v1.2 — Trust + Reach
Trust + Reach
v1.1 shipped the analysis engine. v1.2 makes it something you'd hand to a teammate.
Trust — every finding carries a confidence label, can be suppressed with a reason, and is cross-checked against datasheets and a 5,829-project regression corpus. When it says there's a problem, you can believe it.
Reach — first-class Codex support, analysis caching with manifests, and CI infrastructure mean it works wherever your team works.
Highlights
- KiDoc (beta) — 8 document types, 12 figure generators, PDF/DOCX/ODT/HTML output
- Datasheet verification — pin voltage enforcement, required external components, per-IC decoupling validation
- What-if tools — sweep tables, tolerance analysis, fix suggestions with E-series snapping, EMC preview
- Protocol checks — complete I2C/SPI/UART/USB/Ethernet/HDMI/LVDS/CAN electrical parameter validation
- Cross-verification — 7 schematic-to-PCB cross-checks
- 15+ new domain detectors — ESD audit, power path, sensors, level shifters, audio, LED, RTC, and more
- Professional checks — fab notes, silkscreen completeness, BOM lock, certification suggestions
- Detection schema — centralized metadata, stable detection IDs, unified diff matching
- Analysis cache —
--analysis-diron all analyzers for timestamped runs with manifest tracking
Numbers
- 102 commits, 25 bug fixes
- 2.04M regression assertions at 100% pass rate
- 5,829 test repos, 400+ unit tests
- 0 open issues
See the full CHANGELOG for all 20 feature sections.
Install:
Claude Code: /plugin marketplace add aklofas/kicad-happy
Codex: Open repo → /plugins
Manual: git clone https://github.com/aklofas/kicad-happy.git
v1.1 — EMC Pre-Compliance + Analysis Toolkit
What's new in v1.1
New skill: EMC pre-compliance risk analysis — 42 rule checks that predict the most common causes of EMC test failures from your KiCad schematic and PCB layout. Plus Monte Carlo tolerance analysis, design diff, thermal hotspot estimation, no-connect detection improvements, and 22 bug fixes from a comprehensive code audit.
Install
Claude Code plugin (new in v1.1):
/plugin marketplace add aklofas/kicad-happy
/plugin install kicad-happy@kicad-happy
GitHub Action — no changes needed if you're on @v1. The tag moves forward automatically.
Manual / OpenAI Codex — git pull to update your clone.
Highlights
| Feature | Details |
|---|---|
| EMC pre-compliance | 42 rule checks: ground plane integrity, decoupling, I/O filtering, switching harmonics, diff pair skew, PDN impedance, ESD paths, crosstalk, board edge radiation, thermal-EMC, shielding. SPICE-enhanced when ngspice is available. FCC/CISPR/automotive/military. |
| Monte Carlo tolerance | --monte-carlo N runs N simulations with randomized component values. Reports 3σ bounds and per-component sensitivity analysis. |
| Design diff | Compares two analysis JSONs — component changes, signal parameter shifts, EMC finding deltas. GitHub Action diff-base: true for automatic PR comparison. |
| Thermal hotspots | Junction temperature estimation for LDOs, switching regulators, shunt resistors. Package Rθ_JA lookup, thermal via correction, proximity warnings. |
| No-connect detection | Correctly identifies NC markers, library-defined NC pins, and KiCad unconnected pin types. Eliminates false floating-pin warnings across 2,253 files. |
| Plugin marketplace | Install as a Claude Code plugin with two commands. |
Bug fixes (code audit)
22 fixes across 8 commits, including:
- Trace inductance formula was 25x too high (wrong constant in Wheeler approximation)
- PDN target impedance was 2x too lenient (missing factor in Bogatin formula)
- Goertzel DFT normalization was 6 dB low (missing single-sided spectrum factor)
- Regulator voltage suffix parser misread 12V/15V/24V as 1.2V/1.5V/2.4V
- Inner-layer traces mapped to wrong reference plane (always defaulted to F.Cu)
- Circular board bounding boxes computed incorrectly
- Zone fill detection failed on KiCad 9/10 format
- Set precedence bug in decoupling cap net matching
Full list: TODO-issues.md
GitHub Action changes
- EMC and thermal analysis now run automatically
diff-base: trueinput for delta-only PR reviews- No breaking changes — existing
@v1workflows work as before
Validated at scale
1,035 open-source KiCad projects. 6,845 schematics, 3,498 PCBs, 6,853 EMC analyses. Zero crashes. 404K+ regression assertions at 100% pass rate. 30,646 SPICE simulations. 298 constants and 95 equations verified against primary sources.
Links
v1.0 — GitHub Action for KiCad Design Review
AI-powered design review for KiCad, delivered as a GitHub Action.
Note: This release and version tag (
v1.0,v1) are for the GitHub Action only. The Claude Code and OpenAI Codex skills install frommainviagit cloneand don't depend on release versions.
Quick start
Add automated design review to any KiCad project. No account needed — just add the workflow file:
# .github/workflows/kicad-review.yml
name: KiCad Design Review
on:
push:
paths: ['**/*.kicad_sch', '**/*.kicad_pcb']
pull_request:
paths: ['**/*.kicad_sch', '**/*.kicad_pcb']
permissions:
contents: read
pull-requests: write
statuses: write
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: sudo apt-get install -y ngspice poppler-utils
- uses: aklofas/kicad-happy@v1
id: analysis
- uses: thollander/actions-comment-pull-request@v3
if: github.event_name == 'pull_request'
with:
file-path: ${{ steps.analysis.outputs.report-path }}
comment-tag: kicad-happy-review
mode: upsertEvery push and PR that touches KiCad files gets a commit status check (green/red with findings summary). On PRs, a structured review comment is posted — power tree, protocol compliance, voltage derating, SPICE results, component health, and PCB stats. The comment updates on re-pushes. A full report is available on the Actions run page.
Two-tier review
Tier 1 — Deterministic analysis (free, always runs, no API key needed): 25+ subcircuit detectors, voltage derating, protocol validation, SPICE simulation, DFM checks. Datasheets are automatically downloaded from LCSC (free, no auth required).
Tier 2 — AI-powered review (optional): Chain with anthropics/claude-code-action — Claude reads the analysis output + datasheets and writes a natural-language design review.
Quick review (~$1-3 per PR, 5-10 min)
- uses: anthropics/claude-code-action@v1
if: github.event_name == 'pull_request' && env.ANTHROPIC_API_KEY != ''
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: |
The kicad-happy deterministic analysis has already been run.
Read the markdown report at ${{ steps.analysis.outputs.report-path }}.
Do NOT re-run analysis scripts. Review the findings and:
1. Verify the top 3-5 IC pinouts against datasheets
2. Check WARNING findings for accuracy
3. Note anything the analysis may have missed
Post a concise summary (under 2000 chars) as a PR comment.
Focus on actionable findings only.
claude_args: '--model claude-sonnet-4-6 --max-turns 25'Thorough review (~$5-15 per PR, 10-20 min)
- uses: anthropics/claude-code-action@v1
if: github.event_name == 'pull_request' && env.ANTHROPIC_API_KEY != ''
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: |
The kicad-happy deterministic analysis has already been run.
Read the JSON at ${{ steps.analysis.outputs.schematic-json }}
and the report at ${{ steps.analysis.outputs.report-path }}.
Do NOT re-run analysis scripts. Perform a thorough review:
1. Read datasheets for every IC and verify pinouts
2. Check voltage divider/feedback calculations against datasheets
3. Verify application circuit compliance for regulators
4. Check power sequencing and enable chain logic
5. Review protection device coverage on external interfaces
6. Note any design concerns the analysis missed
Post your review as a PR comment. Include specific datasheet
page references for each finding.
claude_args: '--model claude-sonnet-4-6 --max-turns 50'Setup for Tier 2: Get an API key from console.anthropic.com/settings/keys, then add it as a repository secret named ANTHROPIC_API_KEY in Settings → Secrets → Actions. Cost depends on design complexity — see Anthropic pricing.
Datasheet download
The action automatically downloads datasheets from LCSC (free, no auth) for every component with an MPN. Add optional distributor API secrets for broader coverage:
| Source | Secret(s) | Notes |
|---|---|---|
| LCSC | none needed | Free community API, always runs |
| DigiKey | digikey-client-id, digikey-client-secret |
Best source — direct PDF URLs |
| element14 | element14-api-key |
Covers Newark, Farnell, element14 |
| Mouser | mouser-api-key |
Last resort — often blocks downloads |
Pass these as action inputs. Each source shares the same datasheets/ directory and skips already-downloaded files.
What the action checks
- Subcircuit detection — regulators, dividers, filters, opamps, transistors, bridges, crystals, buses, protection, current sense (25+ types)
- Voltage derating — ceramic/electrolytic/tantalum capacitors, IC abs max, resistor power. Commercial/military/automotive profiles. Over-designed detection.
- Protocol validation — I2C pull-ups + rise time, SPI chip selects, UART voltage domains, CAN termination
- Op-amp checks — bias paths, capacitive loading, high-impedance feedback, unused channels
- SPICE simulation — 17 subcircuit types, per-part behavioral models (~100 opamps), PCB parasitic injection
- PCB analysis — DFM scoring, thermal vias, impedance, differential pairs, crosstalk
- Lifecycle audit — EOL/NRND/obsolescence alerts, temperature grade audit, alternative suggestions
- Commit status — green/red check on every commit with findings summary and link to full report
Validated at scale
1,035 open-source KiCad projects. 6,845 schematics, 3,498 PCBs, 1,050 Gerber directories. Zero crashes. 294K+ regression assertions. 30,646 SPICE simulations. KiCad 5–10 supported.