Skip to content

Commit ef480bc

Browse files
Marcus RübMarcus Rüb
authored andcommitted
Initial release — boardsmith v0.2.0
Text prompt → KiCad schematic, BOM, and firmware. v0.2.0 features: - 9-stage synthesis pipeline (B1-B9), 212 verified components - ERCAgent: LLM-guided ERC repair loop (up to 5 iterations) - boardsmith modify: brownfield schematic patching with confirmation - boardsmith verify: semantic design verification (6 rule-based tools) - Offline mode (--no-llm): no API key required - HITL design chat for vague prompts - ESP32, RP2040, STM32 targets AGPL-3.0 — pip install boardsmith[llm]
0 parents  commit ef480bc

595 files changed

Lines changed: 174562 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Boardsmith — Environment Variables
2+
# Copy this file to .env and fill in your keys.
3+
#
4+
# NOTE: Regex mode (--no-llm) works without any API keys.
5+
# Keys are only needed for LLM-powered synthesis/codegen.
6+
7+
# ── LLM Provider (set at least one for LLM mode) ─────────────────
8+
ANTHROPIC_API_KEY=sk-ant-...
9+
OPENAI_API_KEY=sk-...
10+
11+
# ── Optional Providers ────────────────────────────────────────────
12+
# Ollama (local, no key needed)
13+
# OLLAMA_BASE_URL=http://localhost:11434
14+
15+
# ── LLM Budget ───────────────────────────────────────────────────
16+
# Maximum budget per session in USD (default: no limit)
17+
# BOARDSMITH_BUDGET_USD=1.00
18+
19+
# ── Disable LLM ──────────────────────────────────────────────────
20+
# BOARDSMITH_NO_LLM=true
21+
22+
# ── Web Search (for Knowledge Agent / Component Research) ────────
23+
# TAVILY_API_KEY=tvly-...
24+
# SERPAPI_API_KEY=...
25+
26+
# ── Component Sourcing (Octopart API) ────────────────────────────
27+
# NEXAR_CLIENT_ID=...
28+
# NEXAR_CLIENT_SECRET=...
29+
30+
# ── ESP-IDF (for firmware compilation) ───────────────────────────
31+
# IDF_PATH=/path/to/esp-idf
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Bug Report
3+
about: Something is broken
4+
labels: bug
5+
---
6+
7+
## What happened
8+
9+
<!-- A clear, one-sentence description -->
10+
11+
## To reproduce
12+
13+
```bash
14+
boardsmith build -p "..." --no-llm --seed 42
15+
```
16+
17+
Paste the exact command and prompt.
18+
19+
## Expected behavior
20+
21+
<!-- What should have happened? -->
22+
23+
## Actual behavior
24+
25+
<!-- What actually happened? Paste error output. -->
26+
27+
```
28+
<paste error here>
29+
```
30+
31+
## Environment
32+
33+
- Boardsmith version: (`boardsmith --version`)
34+
- Python version: (`python --version`)
35+
- OS:
36+
- LLM mode: `--no-llm` / with API key (which provider?)
37+
38+
## Output directory contents (if relevant)
39+
40+
```
41+
ls -la boardsmith-output/
42+
```
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Component Request
3+
about: Request a new component be added to the knowledge base
4+
labels: component-request
5+
---
6+
7+
## Component
8+
9+
**MPN:** <!-- e.g. SHT31-DIS -->
10+
**Manufacturer:** <!-- e.g. Sensirion -->
11+
**Datasheet:** <!-- direct PDF link preferred -->
12+
13+
## What I want to build
14+
15+
<!-- One sentence: "ESP32 weather station measuring CO2 and VOC" -->
16+
<!-- This helps prioritize and test the component after adding it. -->
17+
18+
## Basic specs (if you know them)
19+
20+
<!-- Fill in what you know — we'll look up the rest from the datasheet -->
21+
22+
- Interface: <!-- I2C / SPI / UART -->
23+
- Supply voltage: <!-- e.g. 1.8–3.6V -->
24+
- I2C address: <!-- e.g. 0x44 or 0x45 -->
25+
- Typical current: <!-- e.g. 0.3 mA -->
26+
- Package: <!-- e.g. DFN-8 -->
27+
28+
## Is this a commonly available part?
29+
30+
<!-- Available on Digikey/Mouser/LCSC? -->
31+
32+
---
33+
34+
> **Want to add it yourself?** See [CONTRIBUTING.md](../../CONTRIBUTING.md#adding-components) — it takes about 20 minutes and is the most valuable contribution you can make.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Component Request
4+
url: https://github.com/ForestHubAI/boardsmith/issues/new?template=component_request.md
5+
about: Request a new component be added to the knowledge base
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Feature Request
3+
about: Something Boardsmith should do but doesn't
4+
labels: enhancement
5+
---
6+
7+
## What problem does this solve?
8+
9+
<!-- "When I try to build X, I can't because Y" -->
10+
<!-- Be concrete about the use case, not just the feature. -->
11+
12+
## Proposed solution
13+
14+
<!-- How do you think it should work? -->
15+
16+
## What part of the system would this affect?
17+
18+
- [ ] Prompt parsing (B1/B2 -- how prompts are understood)
19+
- [ ] Component selection (B3 -- which parts get chosen)
20+
- [ ] Topology synthesis (B4 -- how components are connected)
21+
- [ ] Schematic export (B8 -- KiCad output quality)
22+
- [ ] Firmware generation (Track A codegen)
23+
- [ ] PCB layout
24+
- [ ] CLI / UX
25+
- [ ] New target MCU
26+
- [ ] Other
27+
28+
## Alternatives considered
29+
30+
<!-- Did you consider a workaround? What didn't work? -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Summary
2+
3+
What does this PR change? (1-3 sentences)
4+
5+
## Type of Change
6+
7+
- [ ] Bug fix
8+
- [ ] New feature
9+
- [ ] Refactoring (no feature/fix)
10+
- [ ] Documentation
11+
- [ ] CI/Build
12+
13+
## Affected Modules
14+
15+
- [ ] Compiler (Track A)
16+
- [ ] Synthesizer (Track B)
17+
- [ ] Shared (HIR, Knowledge DB, LLM Gateway)
18+
- [ ] CLI
19+
- [ ] Tests
20+
21+
## Test Plan
22+
23+
- [ ] Existing tests pass (`pytest tests/ -v`)
24+
- [ ] New tests added for the change
25+
- [ ] Linting passed (`ruff check .`)
26+
- [ ] Manually tested with: `boardsmith build-project --prompt "..." --target ...`
27+
28+
## Checklist
29+
30+
- [ ] Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/)
31+
- [ ] No API keys or secrets in code
32+
- [ ] Documentation updated (if applicable)
33+
- [ ] Breaking changes documented (if any)

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main", "claude/**"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
test:
11+
name: Tests (Python ${{ matrix.python-version }})
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
python-version: ["3.10", "3.11", "3.12"]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
cache: pip
26+
27+
- name: Install dependencies
28+
run: pip install -e ".[dev]"
29+
30+
- name: Run tests (no LLM)
31+
run: pytest -x -q
32+
env:
33+
BOARDSMITH_NO_LLM: "1"

.github/workflows/publish.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
- 'v*.*.*a*'
8+
- 'v*.*.*b*'
9+
- 'v*.*.*rc*'
10+
11+
jobs:
12+
test:
13+
name: Tests (Python ${{ matrix.python-version }})
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: ["3.10", "3.11", "3.12"]
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
cache: pip
25+
- name: Install dependencies
26+
run: pip install -e ".[dev]"
27+
- name: Run tests (no LLM)
28+
run: pytest -x -q
29+
env:
30+
BOARDSMITH_NO_LLM: "1"
31+
32+
build:
33+
name: Build distribution
34+
needs: [test]
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Set up Python 3.12
39+
uses: actions/setup-python@v5
40+
with:
41+
python-version: "3.12"
42+
cache: pip
43+
- name: Install build frontend
44+
run: pip install build
45+
- name: Build wheel and sdist
46+
run: python -m build
47+
- name: Upload dist artifacts
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: dist
51+
path: dist/
52+
if-no-files-found: error
53+
54+
publish:
55+
name: Publish to PyPI
56+
needs: [build]
57+
runs-on: ubuntu-latest
58+
environment: pypi
59+
permissions:
60+
id-token: write
61+
contents: read
62+
steps:
63+
- name: Download dist artifacts
64+
uses: actions/download-artifact@v4
65+
with:
66+
name: dist
67+
path: dist/
68+
- name: Publish to PyPI (OIDC)
69+
uses: pypa/gh-action-pypi-publish@release/v1
70+
71+
release:
72+
name: Create GitHub Release
73+
needs: [publish]
74+
runs-on: ubuntu-latest
75+
permissions:
76+
contents: write
77+
steps:
78+
- uses: actions/checkout@v4
79+
- name: Download dist artifacts
80+
uses: actions/download-artifact@v4
81+
with:
82+
name: dist
83+
path: dist/
84+
- name: Create GitHub Release
85+
uses: softprops/action-gh-release@v2
86+
with:
87+
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}
88+
generate_release_notes: true
89+
files: dist/*
90+
env:
91+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Claude Code local config (not for public repo)
2+
CLAUDE.md
3+
4+
__pycache__/
5+
*.pyc
6+
*.pyo
7+
.venv/
8+
.venv*/
9+
venv/
10+
venv*/
11+
dist/
12+
*.egg-info/
13+
.pytest_cache/
14+
.mypy_cache/
15+
.ruff_cache/
16+
*.so
17+
build/
18+
output/
19+
!examples/output/
20+
!examples/output/**
21+
*.kicad_sch.bak
22+
23+
# KiCad generated / cache files
24+
*.kicad_prl
25+
fp-info-cache
26+
schematic-backups/
27+
ERC.rpt
28+
29+
# Test output directories
30+
test-fix/
31+
test-out/
32+
test-output/
33+
boardsmith-output/
34+
35+
# Dev project artifacts
36+
*.rpt
37+
/tmp/
38+
39+
# macOS
40+
.DS_Store
41+
42+
# Knowledge DB (auto-generated from seed data)
43+
shared/knowledge/boardsmith.db
44+
shared/knowledge/boardsmith.db-shm
45+
shared/knowledge/boardsmith.db-wal
46+
47+
.planning/
48+
49+
# Internal planning/session docs (local only)
50+
DBroadmap.md
51+
CODEBASE_MAP.md
52+
ROADMAP.md
53+
docs/
54+
launch/
55+
test.md
56+
run_tests.sh
57+
RELEASE_CHECKLIST.md
58+
legal/commercial_license_agreement_v1.md
59+
compiler/ROADMAP.md
60+
compiler/VISION.md
61+
62+
# Old project name DB (auto-generated, replaced by boardsmith.db)
63+
shared/knowledge/vibehard.db
64+
shared/knowledge/vibehard.db-shm
65+
shared/knowledge/vibehard.db-wal

0 commit comments

Comments
 (0)