Generate KiCad-compatible schematics from declarative YAML, validate against electrical rules, export BOM and netlist — driven by a Claude Code skill.
Project description
CircuitSmith
CircuitSmith forges schematics. PartsLedger keeps the record CircuitSmith reads.
⚠️ Concept stage. Everything below describes the target state of the project. None of the pipeline, skill, or component library exists yet — they are work items in EPIC-001..006. Phase 0 (EPIC-007) bootstraps the Python project config; Phase 1 (EPIC-001) produces the first component profile. Read this README as a design preview, not a manual.
CircuitSmith generates circuit schematics from declarative YAML, validates them against electrical rules, and exports both a bill of materials and a KiCad-compatible netlist — all driven by a Claude Code skill so that contributors describe what they want in natural language rather than writing Schemdraw code.
Status: concept stage. The full design dossier was copied from
AwesomeStudioPedal's IDEA-027
companion files, archived on conversion to EPIC-001..006, and now lives in
docs/developers/ideas/archived/idea-001-circuit-skill.md.
Predecessor artefacts the dossier references —
scripts/generate-schematic.py,
data/config.json,
docs/builders/wiring/ —
live in that repo, not here. Implementation has not started.
Why
The project this skill grew out of generates schematics from hand-authored Python (Schemdraw). Adding a sensor means knowing Schemdraw's API. There is no validation that the drawn circuit is electrically safe, no machine-readable component list, and no path from the diagram to PCB tools.
CircuitSmith answers four questions the current pipeline cannot:
- How does a contributor add a sensor without learning Schemdraw or electronics?
- How does a reviewer know the circuit is electrically sound without reading code?
- Where does the shopping list come from?
- How does the schematic feed a PCB tool when IDEA-011 starts?
What it produces
A single .circuit.yml is the source of truth. The pipeline emits:
| Artifact | Purpose |
|---|---|
main-circuit.svg |
Schematic, rendered via Schemdraw |
erc-report.md |
Electrical rule check findings, with rationale + source links |
bom.md / bom.csv |
Bill of materials |
main-circuit.net |
KiCad-compatible netlist |
meta.yml |
Layout provenance + readability rubric scores |
Pipeline
.circuit.yml
→ schema validation (rejects unknown components / pins)
→ ERC (structural S1–S3 + electrical E1–E10)
→ layout kernel (canonical-slot placement)
→ Manhattan router (wire geometry)
→ Schemdraw render (SVG emission)
→ rubric + meta.yml (readability scoring + sidecar)
ERC runs strictly pre-layout: a malformed circuit never reaches the router.
Architecture
Status: the architecture below describes the target state. None of the product code exists yet — Phase 1 (EPIC-001) starts the scaffolding. Today the repo holds only the design dossier and the task-system infra.
Everything ships inside .claude/skills/circuit/ — a self-contained,
path-agnostic Claude Code skill. The same directory is the library that
the CI script imports, so there is no duplication between "the skill" and
"the project's generator".
Key decoupling: bom_exporter.py walks components directly;
netlist_exporter.py walks NetGraph. They never reach into each other.
The one-page top-down view, including the pipeline mermaid, module
boundaries, component table, decoupling seams, AI-containment property,
and ADR cross-references, lives at
docs/developers/ARCHITECTURE.md.
Skill behaviour
The skill instructs Claude to act as an electronics engineer who:
- Resolves all component types from
components/— never invents pin names. - Writes and edits YAML, not Python.
- Enforces layout conventions (signal left → right, VCC top, GND bottom).
- Applies best practices grounded in the rule catalog — every default traces back to a
source_of_truthlink; no free-form runtime generation of hardware rules. - Batches ambiguous-pin questions into a single message rather than looping.
- Runs ERC before declaring a circuit done.
- Can add new component profiles and reports which ERC checks they activate.
Phase plan
Phase 0 Project bootstrap (pyproject.toml, pytest config, CI workflow)
Phase 1 Component library + schema
Phase 2a Renderer + v0.1 deterministic kernel + cutover from legacy generator
Phase 2b AI placer (contingent on observed kernel-failure modes)
Phase 3 ERC engine + rule catalog
Phase 4 BOM + netlist exporters
Phase 5 Markdown ``` ```circuit ``` ``` integration
Phase 6 The Claude Code skill itself
Phase 7 Extract `.claude/skills/circuit/` into a standalone repo
Phase 0 (EPIC-007) is a hard prerequisite of Phase 1 — the prose-only dependency declaration in the skill-packaging dossier becomes machine-readable, the test runner gets configured, and CI gets a workflow, all before EPIC-001 produces real Python code. Phases 1–7 then follow the staging described above.
Phase 2b is gated on real failure data, not a calendar — the v0.1 kernel ships first and stays in production until concrete escalations justify the AI placer. See the phase plan for prerequisites and acceptance criteria.
Deep-dive docs
Each module has its own companion specification:
| Companion | Covers |
|---|---|
| Skill packaging | SKILL.md frontmatter, dependencies, layout, install paths, acceptance tests |
| YAML format | pins / path / bus connection forms, schema validation |
| Layout engine | Slot vocabulary, kernel, incremental placer, rubric, sidecar, CI contract |
| ERC engine | Three-level config, structural + electrical checks, report format |
| Rule catalog | Format, licensing, 30–50-rule scope, authoring workflow |
| Components | Profile format, pin aliasing, adding a component |
| Exporters | BOM markdown/CSV, KiCad .net flattening rules |
Related projects
| Project | Relationship |
|---|---|
| PartsLedger | Parts inventory; CircuitSmith reads from it |
AwesomeStudioPedal — IDEA-027 |
Spiritual predecessor; CircuitSmith generalises that idea |
| IDEA-011 (PCB design) | Consumes CircuitSmith's .net file as the KiCad seed |
| IDEA-022 (MkDocs site) | Renders circuit blocks via pymdownx.superfences |
Explicit non-goals
- Audio signal conditioning (no analog path in the current target).
- Title block / branding overlay inside the SVG.
- PNG conversion as a dedicated pipeline step.
- General-purpose auto-layout (force-directed, hierarchical, etc.).
- An in-repo electronics textbook — the rule catalog links out for theory.
- Runtime LLM generation of hardware rules. The catalog is authoritative; the LLM is only used to understand the maker's natural-language request.
Contributing
See CONTRIBUTING.md for the first-time-setup steps —
in particular bash scripts/install_git_hooks.sh to install the
pre-commit wrapper and the security-review hooks
(pre-merge-commit, post-merge, pre-rebase) that scan incoming
changes from pulls/merges/rebases.
Participation is governed by the project Code of Conduct.
License
MIT (planned, alongside the standalone-skill repo in Phase 7).
Project details
Release history Release notifications | RSS feed
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 circuitsmith-0.1.0.tar.gz.
File metadata
- Download URL: circuitsmith-0.1.0.tar.gz
- Upload date:
- Size: 125.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b72d5b889d90a303933bc2f3c6eee858071c474ff04d086822650202cb9afebc
|
|
| MD5 |
3a54e094787093c954216d19ede873dc
|
|
| BLAKE2b-256 |
997cf48e2ced60c609c1e71645fcac83ea959a004ac20f350fe58454fdb303ef
|
Provenance
The following attestation bundles were made for circuitsmith-0.1.0.tar.gz:
Publisher:
release.yml on tgd1975/CircuitSmith
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
circuitsmith-0.1.0.tar.gz -
Subject digest:
b72d5b889d90a303933bc2f3c6eee858071c474ff04d086822650202cb9afebc - Sigstore transparency entry: 1525561152
- Sigstore integration time:
-
Permalink:
tgd1975/CircuitSmith@722d7f1bd0ea1f32c441c8360b06818cc12450e9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tgd1975
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@722d7f1bd0ea1f32c441c8360b06818cc12450e9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file circuitsmith-0.1.0-py3-none-any.whl.
File metadata
- Download URL: circuitsmith-0.1.0-py3-none-any.whl
- Upload date:
- Size: 90.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4ef1cc576ba2e386e4656d371388d3a973cebde61077225cfa4b90f532b455e
|
|
| MD5 |
feb977915936afb12233bcbd87fd1d31
|
|
| BLAKE2b-256 |
b8492018b028431936815bc07d24931b251bb3778fd587181e8256a2fb7c2795
|
Provenance
The following attestation bundles were made for circuitsmith-0.1.0-py3-none-any.whl:
Publisher:
release.yml on tgd1975/CircuitSmith
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
circuitsmith-0.1.0-py3-none-any.whl -
Subject digest:
e4ef1cc576ba2e386e4656d371388d3a973cebde61077225cfa4b90f532b455e - Sigstore transparency entry: 1525561193
- Sigstore integration time:
-
Permalink:
tgd1975/CircuitSmith@722d7f1bd0ea1f32c441c8360b06818cc12450e9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tgd1975
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@722d7f1bd0ea1f32c441c8360b06818cc12450e9 -
Trigger Event:
push
-
Statement type: