[SKiDL Feature Request] RFC: layout-preserving KiCad schematic regeneration
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- embedded-iot
Research direction
Start by locating SKiDL's existing KiCad schematic-generation entry point and tracing how it serializes logical circuit data into .kicad_sch. Compare generated and manually edited schematics to determine whether stable identities and conflict diffs can be defined before any merge logic is added. Done means maintainers choose the architecture and define preservation, update, conflict, and user-action behavior; no concrete files or tests are named in the issue.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
This is a feature request / RFC rather than a bug report.
SKiDL's code-first circuit generation is useful, and generated KiCad schematics are a promising bridge between code and normal hardware review workflows. However, generated schematics often need manual cleanup in Eeschema before they are readable enough for debugging, review, and handoff.
In practice, firmware/debug/layout engineers often read the schematic to understand power flow, probe points, functional blocks, and fault isolation paths. A generated schematic may be electrically correct but still hard to debug if symbol placement, wire routing, labels, and grouping are poor.
The current concern is that rerunning schematic generation can overwrite manual readability improvements made in KiCad, even when the logical netlist has not changed.
Describe the solution you'd like
I would like to discuss whether SKiDL could support layout-preserving KiCad schematic regeneration.
A possible workflow:
- Generate a
.kicad_schfrom SKiDL. - User opens it in KiCad/Eeschema and improves readability by moving symbols, rerouting wires, adjusting labels, and grouping functional blocks.
- User reruns SKiDL generation.
- If the logical identity is unchanged, preserve the existing schematic layout:
- symbol position and rotation
- label position and orientation
- wire geometry
- field/text placement when possible
- Update logical fields such as value, footprint, part metadata, and generated properties.
- If the code-generated netlist differs from the existing KiCad schematic netlist, do not silently overwrite the schematic. Instead, report a diff and require user action.
The matching identity could be something like:
RefDes + pin number + net name
or another stable internal identity if SKiDL already has a better model.
New parts could be placed in a staging area such as NEEDS_PLACEMENT. Deleted parts or changed pin-net connections could be reported as conflicts.
Ideally this could be exposed as something like:
generate_schematic(preserve_layout=True)
or as a separate reconciliation step:
existing.kicad_sch + generated canonical netlist -> merged.kicad_sch + diff report
Describe alternatives you've considered
Alternatives I have considered:
- Always regenerate the schematic from scratch. This is simple, but loses manual cleanup and makes generated schematics unpleasant for real debugging/review.
- Improve auto-placement and auto-routing heuristics only. This helps first-generation output, but still does not protect human edits.
- Treat generated SVG/PDF as the review artifact. This is not enough because engineers need an editable KiCad schematic.
- Build this as an external KiCad schematic reconciler library that SKiDL can call, rather than putting all merge logic in SKiDL core.
I am not sure whether this belongs in SKiDL core, a plugin, or an external helper library. I am opening this issue to ask about the preferred architecture and whether this workflow fits SKiDL's direction.
Additional context
This feature would make code-first hardware design feel closer to a practical workflow:
SKiDL code -> tested/generated schematic -> human-readable KiCad schematic -> PCB
rather than replacing the editable schematic with a one-time generated artifact.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 184
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from devbisme/skidl
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
SPICE netlist wires the wrong node to a subcircuit port when an earlier pin is unconnectedPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
[SKiDL BUG] Using components that do not contain a defined datasheet property throws 'Key Error'Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pimutils/vdirsyncer#1242 ·
-
priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
QuantConnect/lean-cli#792 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
open-webui/open-webui#35360 · 1 comment ·
Maintainers usually reply within 1 day
-
Suggest link: Destiny Verify (MIT zero-dependency pre-commit security, citation & link hygiene CLI)Open
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day