# circuit-synth/circuit-synth architecture

> Architecture diagram of the GitHub repository circuit-synth/circuit-synth, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/circuit-synth/circuit-synth
- Repository: https://github.com/circuit-synth/circuit-synth

## Overview

circuit-synth is a Python-based, code-first electronic circuit design system that turns reusable circuit definitions into KiCad projects while supporting round-trip KiCad editing. Its principal workflow is defining circuit components and nets, exporting a netlist, and generating a schematic/project. The README also documents AI-assisted design, simulation and validation, PCB/manufacturing support, and BOM workflows. These subsystem links reflect the documented capabilities and module names; sampled excerpts were limited, so uncertain internal call wiring is omitted.

Main entry points: [`src/circuit_synth/core/circuit.py`](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/core/circuit.py) (Circuit model), [`src/circuit_synth/ai_integration/plugins/ai_design_bridge.py`](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/ai_integration/plugins/ai_design_bridge.py) (AI design bridge), [`src/circuit_synth/core/netlist_exporter.py`](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/core/netlist_exporter.py) (Netlist export), [`src/circuit_synth/kicad/sch_gen/main_generator.py`](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/kicad/sch_gen/main_generator.py) (Schematic generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_design["Circuit design"]
  node_circuit["Circuit model<br/>[circuit.py]"]
  node_components["Components and nets<br/>[component.py]"]
  node_netlist["Netlist export"]
  node_placement["PCB placement<br/>[placement.py]"]
end

subgraph group_kicad["KiCad integration"]
  node_schematic["Schematic generation<br/>[main_generator.py]"]
  node_project["Project generation"]
  node_importer["KiCad importer<br/>[importer.py]"]
  node_sync["Bidirectional sync"]
  node_bom["BOM export<br/>[bom_exporter.py]"]
end

subgraph group_analysis["Design analysis"]
  node_simulation["SPICE simulation<br/>[simulator.py]"]
  node_qa["Circuit validation<br/>[validation.py]"]
  node_dfm["Manufacturing analysis<br/>[dfm_analyzer.py]"]
end

subgraph group_assistance["AI assistance"]
  node_ai["AI design bridge"]
  node_agents["Design agents"]
end

node_engineer(("Engineer"))
node_kicad(("KiCad"))
node_llm(("LLM service"))
node_parts(("Parts suppliers"))

node_engineer -->|"defines circuit"| node_circuit
node_circuit -->|"creates components"| node_components
node_circuit -->|"exports netlist"| node_netlist
node_netlist -->|"generates schematic"| node_schematic
node_schematic -->|"writes project"| node_project
node_engineer -->|"imports design"| node_importer
node_importer -->|"loads into Python"| node_circuit
node_engineer -->|"requests sync"| node_sync
node_sync -->|"updates KiCad"| node_kicad
node_engineer -->|"runs analysis"| node_simulation
node_engineer -->|"validates design"| node_qa
node_engineer -->|"checks manufacturability"| node_dfm
node_engineer -->|"exports BOM"| node_bom
node_engineer -->|"requests design"| node_agents
node_agents -->|"uses bridge"| node_ai
node_ai -.->|"sends design request"| node_llm
node_ai -.->|"searches components"| node_parts
node_engineer -->|"arranges components"| node_placement

click node_circuit "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/core/circuit.py"
click node_components "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/core/component.py"
click node_netlist "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/core/netlist_exporter.py"
click node_placement "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/component_placement/placement.py"
click node_schematic "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/kicad/sch_gen/main_generator.py"
click node_project "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/kicad/schematic/project_generator.py"
click node_importer "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/kicad/importer.py"
click node_sync "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/tools/kicad_integration/python_to_kicad_sync.py"
click node_bom "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/kicad/bom_exporter.py"
click node_simulation "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/simulation/simulator.py"
click node_qa "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/quality_assurance/validation.py"
click node_dfm "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/design_for_manufacturing/dfm_analyzer.py"
click node_ai "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/ai_integration/plugins/ai_design_bridge.py"
click node_agents "https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/ai_integration/claude/agents/circuit_design_agents.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_circuit,node_components,node_netlist,node_placement toneBlue
class node_schematic,node_project,node_importer,node_sync,node_bom toneAmber
class node_simulation,node_qa,node_dfm toneMint
class node_ai,node_agents toneRose
class node_engineer,node_kicad,node_llm,node_parts toneIndigo
```

## Components

### Circuit design

- [Circuit model](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/core/circuit.py): `src/circuit_synth/core/circuit.py`
- [Components and nets](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/core/component.py): `src/circuit_synth/core/component.py`
- [Netlist export](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/core/netlist_exporter.py): `src/circuit_synth/core/netlist_exporter.py`
- [PCB placement](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/component_placement/placement.py): `src/circuit_synth/component_placement/placement.py`

### KiCad integration

- [Schematic generation](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/kicad/sch_gen/main_generator.py): `src/circuit_synth/kicad/sch_gen/main_generator.py`
- [Project generation](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/kicad/schematic/project_generator.py): `src/circuit_synth/kicad/schematic/project_generator.py`
- [KiCad importer](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/kicad/importer.py): `src/circuit_synth/kicad/importer.py`
- [Bidirectional sync](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/tools/kicad_integration/python_to_kicad_sync.py): `src/circuit_synth/tools/kicad_integration/python_to_kicad_sync.py`
- [BOM export](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/kicad/bom_exporter.py): `src/circuit_synth/kicad/bom_exporter.py`

### Design analysis

- [SPICE simulation](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/simulation/simulator.py): `src/circuit_synth/simulation/simulator.py`
- [Circuit validation](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/quality_assurance/validation.py): `src/circuit_synth/quality_assurance/validation.py`
- [Manufacturing analysis](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/design_for_manufacturing/dfm_analyzer.py): `src/circuit_synth/design_for_manufacturing/dfm_analyzer.py`

### AI assistance

- [AI design bridge](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/ai_integration/plugins/ai_design_bridge.py): `src/circuit_synth/ai_integration/plugins/ai_design_bridge.py`
- [Design agents](https://github.com/circuit-synth/circuit-synth/blob/main/src/circuit_synth/ai_integration/claude/agents/circuit_design_agents.py): `src/circuit_synth/ai_integration/claude/agents/circuit_design_agents.py`

### Other components

- **Engineer**
- **KiCad**
- **LLM service**
- **Parts suppliers**

## Connections

- Engineer → Circuit model: defines circuit
- Circuit model → Components and nets: creates components
- Circuit model → Netlist export: exports netlist
- Netlist export → Schematic generation: generates schematic
- Schematic generation → Project generation: writes project
- Engineer → KiCad importer: imports design
- KiCad importer → Circuit model: loads into Python
- Engineer → Bidirectional sync: requests sync
- Bidirectional sync → KiCad: updates KiCad
- Engineer → SPICE simulation: runs analysis
- Engineer → Circuit validation: validates design
- Engineer → Manufacturing analysis: checks manufacturability
- Engineer → BOM export: exports BOM
- Engineer → Design agents: requests design
- Design agents → AI design bridge: uses bridge
- AI design bridge → LLM service: sends design request
- AI design bridge → Parts suppliers: searches components
- Engineer → PCB placement: arranges components
