KiCad 10  ·  Python 3.10+  ·  MIT License

CIRCUIT
WEAVER

KiCad automation, schematic generation, and PCB design workflows for real hardware teams.

Circuit Weaver is an open-source electronic design automation tool that turns hardware design intent into KiCad schematics, strict validation, BOM sourcing workflows, and an API-ready circuit design pipeline.

6
SUBCIRCUIT TEMPLATES
4
VALIDATION LAYERS
~90%
AUTOMATION COVERAGE

From Hardware Design Intent to KiCad Schematic and PCB Outputs

Seven clear, connected steps. The KiCad automation engine handles the heavy lifting so you arrive at real schematics, not stubs.

INPUTS
01
>_ rails:

Requirements Capture

Engineer + Codex / Claude define block intent, interfaces, power rails, buses, and constraints — no hand-drawing every schematic page first.

AI AGENT ENGINEER
02

Part Sourcing + Symbol Pull

Distributor workflow skills resolve vague component choices into concrete MPNs, datasheets, and pricing. KiCad symbols are pulled directly from DigiKey and JLCPCB — no manual library management.

DIGIKEY SYMBOLS JLCPCB SYMBOLS MOUSER LCSC
ENGINE
03

Build the Canonical Spec

circuit_weaver assembles part bindings, block topology, support-circuit requirements, and all overrides into a single machine-readable YAML design IR.

DESIGN IR YAML BOM
04

Generate Schematics ★ CORE

Emits .kicad_sch files, placement hints, review SVGs, and design reports. Auto-generates bypass caps, support passives, and topology motifs. Runs four grouped validity checks.

AUTO PASSIVES STRICT VALIDATION KICAD SCH
05

KiCad Review + Human Polish

Generated schematics are typically ~90% complete for serious hardware work. The last editorial pass — page aesthetics, label readability — is done in KiCad.

HUMAN REVIEW KICAD APP
OUTPUTS
06

PCB Update + Route

Pull the schematic into KiCad PCB, place parts, route critical nets manually. Use autoroute / Freerouting for non-critical nets where it actually helps.

KICAD PCB FREEROUTING
07

Quote-Ready Manufacturing Package

BOMs, sourcing data, review artifacts, and KiCad files ready to hand to PCBWay, JLCPCB, or your preferred fabrication vendor.

PCBWAY JLCPCB GERBERS BOM

Structural

Topology, connections, hierarchy coherence

PASS

Electrical

Power, ground, net integrity, ERC pass

PASS

Implementation

Part bindings, footprint assignments, MPNs

PASS

Presentation

Labels, pin numbers, net names, readability

PASS

KiCad schematic generation needs real validation.

Most automation tools stop at "did the output file exist." Circuit Weaver runs four grouped validation passes so the schematic is structurally sound, electrically consistent, properly sourced, and actually reviewable — before you ever open KiCad.

Failures are grouped and labeled. You know exactly what category failed and why, not just that something went wrong in the hardware design workflow.

~90%
Programmatic automation Heavy lifting: requirements, part binding, support circuitry, validation, sheet generation, report generation
~10%
Human judgment in KiCad Page aesthetics, editorial cleanup, readability decisions that are inherently design-specific

What This KiCad Automation Engine Does

A complete electronic design automation surface, not a collection of one-off scripts.

Schematic Generation

Emits real .kicad_sch files from a canonical YAML spec. Auto-adds bypass caps, support passives, and topology motifs. Outputs review-ready SVGs and design reports.

Strict Validation

Four grouped checks: structural, electrical, implementation, and presentation. The output must be loadable, coherent, sourced, and reviewable — not just "did the export finish."

Transactional Patching

Apply design mutations atomically — reject on failure, never silently corrupt the spec. Diff two canonical designs semantically. Ingest PCB feedback as constraints back into the spec.

BOM, Sourcing + Symbol Pull

KiCad symbols pulled directly from DigiKey and JLCPCB — no manual library hunting. Mouser, LCSC, and PCBWay workflow skills resolve the rest: MPNs, package decisions, datasheets, and pricing.

HTTP API Service

A full FastAPI server wraps every engine capability over HTTP. Generate schematics from YAML, validate specs, apply patches, and diff designs — all accessible over REST.

AI

Agent-Compatible

Designed as a machine-readable contract. Codex, Claude, and any LLM-based agent can validate, patch, diff, and generate through the Python API or HTTP endpoints predictably.

KiCad Automation API for Hardware Design Workflows

Every engine capability is exposed over HTTP so you can run it locally or deploy it as a circuit design API.

GET
/health
Service health check — version, template count, status
GET
/templates
List all available subcircuit templates with param schemas
POST
/generate
YAML spec → ZIP of .kicad_sch files + design report
POST
/generate/from-bom
CSV BOM file upload → ZIP of schematics
POST
/validate
YAML spec → full validation results JSON
POST
/mvp/validate
Canonical spec → mvp_strict grouped validation report
POST
/mvp/generate
Canonical spec → full KiCad artifact ZIP (strict mode)
POST
/mvp/apply-patch
Transactional patch application + re-validation
POST
/mvp/diff
Semantic diff between two canonical design specs
POST
/mvp/pcb-feedback
Merge PCB layout feedback back into the design spec
generate.py
# Install
# pip install -e ".[all]"

from circuit_weaver.mvp import (
    validate_design,
    apply_design_patch,
    generate_artifacts,
    diff_designs,
    ingest_pcb_feedback,
)

# Load your canonical spec
spec = yaml.safe_load(open("design.yaml"))

# Validate (4 grouped checks)
report = validate_design(spec)

# Apply a transactional patch
result = apply_design_patch(spec, patch)

# Generate the full KiCad bundle
bundle = generate_artifacts(
    spec,
    output_dir="out/design",
    profile="mvp_strict",
)

Python-first KiCad automation in minutes.

Install the package, point it at a YAML spec, and generate real KiCad schematics without building bespoke hardware automation scripts.

validate_design(spec)

Strict grouped validation — returns a report with structural, electrical, implementation, and presentation results

apply_design_patch(spec, patch)

Atomic in-memory mutation — reject on failure, never silently corrupt the design state

generate_artifacts(spec, output_dir)

Emits the full KiCad bundle: .kicad_sch files, placement hints, review SVGs, and a design report

diff_designs(old_spec, new_spec)

Semantic change report — understand exactly what changed between two design revisions

KiCad Automation and Schematic Generation FAQ

Short answers for the search intents this site should actually rank for.

What is Circuit Weaver?

Circuit Weaver is an open-source KiCad automation engine for schematic generation, validation, BOM workflows, and API-driven hardware design. It is built for teams that want machine-readable design intent without giving up real KiCad outputs.

Does it generate real KiCad schematic files?

Yes. Circuit Weaver generates real .kicad_sch files, review artifacts, and reports so the output can move into actual engineering review and PCB implementation.

Is this useful for PCB design automation?

Yes, especially upstream. It helps define the canonical spec, generate schematic inputs, validate design intent, and feed PCB feedback back into the system before layout decisions drift.

Can it help with BOM sourcing and vendor prep?

Yes. The workflow layer is built around BOM auditing, vendor sourcing, package selection, datasheets, and fabrication-oriented prep for teams using DigiKey, Mouser, LCSC, JLCPCB, or PCBWay.