# acadlab/spicepilot architecture

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

- Interactive diagram: https://gitdiagram.com/acadlab/spicepilot
- Repository: https://github.com/acadlab/spicepilot

## Overview

SPICEPilot is represented here primarily by prompt guidance, benchmark criteria, and a corpus of model-generated PySpice circuit examples—not by a shared generation or evaluation runtime. The documented workflow is to provide the prompt and a circuit description to an LLM, then run and assess generated circuit code. The graph highlights the benchmark’s Claude/GPT and difficulty-level branches, plus sampled simulation behavior. Some README capabilities, including data augmentation and error mitigation, have no identifiable implementation in the supplied tree.

Main entry points: [`New_bench-mark.md`](https://github.com/acadlab/spicepilot/blob/main/New_bench-mark.md) (Benchmark Criteria), [`Pilot_prompt.md`](https://github.com/acadlab/spicepilot/blob/main/Pilot_prompt.md) (Generation Guidance), [`Claude_tests/easy`](https://github.com/acadlab/spicepilot/tree/main/Claude_tests/easy) (Easy Circuits), [`Claude_tests/medium`](https://github.com/acadlab/spicepilot/tree/main/Claude_tests/medium) (Medium Circuits)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guidance["Prompt and Criteria"]
  node_prompt["Generation Guidance<br/>[Pilot_prompt.md]"]
  node_criteria["Benchmark Criteria<br/>[New_bench-mark.md]"]
end

subgraph group_claude["Claude Examples"]
  node_claude_easy["Easy Circuits"]
  node_claude_medium["Medium Circuits"]
  node_claude_hard["Hard Circuit<br/>[claude_high_1.py]"]
  node_decoder["2-to-4 Decoder<br/>[claude_medium2.py]"]
  node_fulladder["Full Adder<br/>[claude_medium1.py]"]
  node_dff["D Flip-Flop<br/>[claude_medium4.py]"]
end

subgraph group_gpt["GPT Examples"]
  node_gpt_easy["Easy Circuits"]
  node_gpt_medium["Medium Circuits"]
  node_gpt_hard["Hard Circuit<br/>[gpt_high_1.py]"]
  node_mux["4:1 Multiplexer"]
end

node_engineer(("Circuit Designer"))
node_llm(("LLM"))
node_simulator{{"PySpice"}}

node_engineer -->|"uses guidance"| node_prompt
node_engineer -->|"provides description"| node_llm
node_prompt -->|"guides generation"| node_llm
node_llm -.->|"generates examples"| node_claude_easy
node_llm -.->|"generates examples"| node_claude_medium
node_llm -.->|"generates example"| node_claude_hard
node_llm -.->|"generates examples"| node_gpt_easy
node_llm -.->|"generates examples"| node_gpt_medium
node_llm -.->|"generates example"| node_gpt_hard
node_criteria -->|"classifies difficulty"| node_claude_easy
node_criteria -->|"classifies difficulty"| node_claude_medium
node_criteria -->|"classifies difficulty"| node_claude_hard
node_criteria -->|"classifies difficulty"| node_gpt_easy
node_criteria -->|"classifies difficulty"| node_gpt_medium
node_criteria -->|"classifies difficulty"| node_gpt_hard
node_decoder -->|"runs transient"| node_simulator
node_fulladder -.->|"simulates circuit"| node_simulator
node_dff -.->|"simulates circuit"| node_simulator
node_mux -->|"runs transient"| node_simulator

click node_prompt "https://github.com/acadlab/spicepilot/blob/main/Pilot_prompt.md"
click node_criteria "https://github.com/acadlab/spicepilot/blob/main/New_bench-mark.md"
click node_claude_easy "https://github.com/acadlab/spicepilot/tree/main/Claude_tests/easy"
click node_claude_medium "https://github.com/acadlab/spicepilot/tree/main/Claude_tests/medium"
click node_claude_hard "https://github.com/acadlab/spicepilot/blob/main/Claude_tests/hard/claude_high_1.py"
click node_decoder "https://github.com/acadlab/spicepilot/blob/main/Claude_tests/medium/claude_medium2.py"
click node_fulladder "https://github.com/acadlab/spicepilot/blob/main/Claude_tests/medium/claude_medium1.py"
click node_dff "https://github.com/acadlab/spicepilot/blob/main/Claude_tests/medium/claude_medium4.py"
click node_gpt_easy "https://github.com/acadlab/spicepilot/tree/main/GPT_tests/easy"
click node_gpt_medium "https://github.com/acadlab/spicepilot/tree/main/GPT_tests/medium"
click node_gpt_hard "https://github.com/acadlab/spicepilot/blob/main/GPT_tests/hard/gpt_high_1.py"
click node_mux "https://github.com/acadlab/spicepilot/blob/main/GPT_tests/medium/gpt_medium_final.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_prompt,node_criteria toneBlue
class node_claude_easy,node_claude_medium,node_claude_hard,node_decoder,node_fulladder,node_dff toneAmber
class node_gpt_easy,node_gpt_medium,node_gpt_hard,node_mux toneMint
class node_engineer,node_llm,node_simulator toneIndigo
```

## Components

### Prompt and Criteria

- [Generation Guidance](https://github.com/acadlab/spicepilot/blob/main/Pilot_prompt.md): `Pilot_prompt.md`
- [Benchmark Criteria](https://github.com/acadlab/spicepilot/blob/main/New_bench-mark.md): `New_bench-mark.md`

### Claude Examples

- [Easy Circuits](https://github.com/acadlab/spicepilot/tree/main/Claude_tests/easy): `Claude_tests/easy`
- [Medium Circuits](https://github.com/acadlab/spicepilot/tree/main/Claude_tests/medium): `Claude_tests/medium`
- [Hard Circuit](https://github.com/acadlab/spicepilot/blob/main/Claude_tests/hard/claude_high_1.py): `Claude_tests/hard/claude_high_1.py`
- [2-to-4 Decoder](https://github.com/acadlab/spicepilot/blob/main/Claude_tests/medium/claude_medium2.py): `Claude_tests/medium/claude_medium2.py`
- [Full Adder](https://github.com/acadlab/spicepilot/blob/main/Claude_tests/medium/claude_medium1.py): `Claude_tests/medium/claude_medium1.py`
- [D Flip-Flop](https://github.com/acadlab/spicepilot/blob/main/Claude_tests/medium/claude_medium4.py): `Claude_tests/medium/claude_medium4.py`

### GPT Examples

- [Easy Circuits](https://github.com/acadlab/spicepilot/tree/main/GPT_tests/easy): `GPT_tests/easy`
- [Medium Circuits](https://github.com/acadlab/spicepilot/tree/main/GPT_tests/medium): `GPT_tests/medium`
- [Hard Circuit](https://github.com/acadlab/spicepilot/blob/main/GPT_tests/hard/gpt_high_1.py): `GPT_tests/hard/gpt_high_1.py`
- [4:1 Multiplexer](https://github.com/acadlab/spicepilot/blob/main/GPT_tests/medium/gpt_medium_final.py): `GPT_tests/medium/gpt_medium_final.py`

### Other components

- **Circuit Designer**
- **LLM**
- **PySpice**

## Connections

- Circuit Designer → Generation Guidance: uses guidance (evidence: `README.md`)
- Circuit Designer → LLM: provides description (evidence: `README.md`)
- Generation Guidance → LLM: guides generation (evidence: `README.md`)
- LLM → Easy Circuits: generates examples
- LLM → Medium Circuits: generates examples
- LLM → Hard Circuit: generates example
- LLM → Easy Circuits: generates examples
- LLM → Medium Circuits: generates examples
- LLM → Hard Circuit: generates example
- Benchmark Criteria → Easy Circuits: classifies difficulty (evidence: `README.md`)
- Benchmark Criteria → Medium Circuits: classifies difficulty (evidence: `README.md`)
- Benchmark Criteria → Hard Circuit: classifies difficulty (evidence: `README.md`)
- Benchmark Criteria → Easy Circuits: classifies difficulty (evidence: `README.md`)
- Benchmark Criteria → Medium Circuits: classifies difficulty (evidence: `README.md`)
- Benchmark Criteria → Hard Circuit: classifies difficulty (evidence: `README.md`)
- 2-to-4 Decoder → PySpice: runs transient (evidence: `Claude_tests/medium/claude_medium2.py`)
- Full Adder → PySpice: simulates circuit
- D Flip-Flop → PySpice: simulates circuit
- 4:1 Multiplexer → PySpice: runs transient (evidence: `GPT_tests/medium/gpt_medium_final.py`)
