app
KiCad - the KiCad Bridge
Public Made by Adomby adom
Drive your own KiCad from an AI, in the background: open every editor, read the whole board as data (the EDA Bridge Standard board model), stack-up, part heights, netlists, place, route, pour, DRC and exports.
← Commit history
Publish 1.0.143
8 files changed
+158−6
README.md+5−1@@ -8,7 +8,7 @@ DRC/ERC, export manufacturing files, and screenshot any window back to the AI. > > | | **Release ZIP** (`adom-bridge-kicad-v*.zip`) | **Package** (`adom-wiki pkg install adom/kicad-bridge`) | > |---|---|---|-> | What it is | The **bridge runtime**: the actual Python server that drives KiCad | **Skills + docs only**, for a container/agent |+> | What it is | The **bridge runtime**: the native Rust `kicad-bridge.exe` that drives KiCad (the Python server it replaced is kept in the repo for reference) | **Skills + docs only**, for a container/agent | > | Who loads it | **Adom Bridge** downloads it automatically via `adom-bridge-kicad-manifest.json` | You, into a container, to teach an agent the `kicad_*` verbs | > | Contains | code, certs, UIA scripts, board template | `SKILL.md` files (no binaries, no images) | > | You install it manually? | **No**: Bridge handles it | Yes |@@ -257,3 +257,7 @@ The bridge binds `ADOM_BIND_HOST` on a Bridge-assigned port, never `0.0.0.0`. Au (architecture + hard-won findings), `kicad-bridge-publish` (release recipe), and `kicad-bridge-hero` (page hero recipe). Maintainers get them with the normal `pkg install`; everyday users are never offered them.*++## Contribute++This page's repo is the full source (`adom-wiki repo clone adom/kicad-bridge`): the Rust bridge, the skills, the docs and the release tooling. Hit a bug or a missing verb? File it with the verbatim reply, and if you fix it, send a branch PR off the current head; Adom merges PRs within minutes during business hours and ships to the insiders tier the same day. The recipe, the build commands and the rules that keep a PR mergeable are in the [kicad-bridge-contributing](skills/kicad-bridge-contributing/SKILL.md) skill and in [CONTRIBUTING.md](CONTRIBUTING.md).
SKILL.md+1@@ -481,3 +481,4 @@ Rules live on the wiki page adom/pcb-design-rules and are fetched at call time, - **The Adom PCM libraries** (symbols, footprints and 3D for every part on the Adom line): `kicad_pcm_install {"repositoryUrl":"https://wiki.adom.inc/api/v1/pages/kicad-pcm/files/repository.json","identifier":"inc.adom.kicad.basic-parts"}` (also `inc.adom.kicad.rp2040`). KiCad registers the libraries on its next start. - Never quote a wiki page you have not fetched: `aravk/in-s42ata`, an older example, no longer exists. +- **kicad-bridge-contributing**: you hit a bug or a missing verb: file it with the verbatim reply, disclose any workaround, and how to clone this page's repo, build, test and send a branch PR that gets merged within minutes.
package.json+3−2@@ -1,8 +1,8 @@ { "slug": "kicad-bridge",- "version": "1.0.142",+ "version": "1.0.143", "type": "app",- "description": "Skills for your container so your AI knows how to drive the KiCad bridge. The bridge runtime itself is the release zip; Adom Bridge loads that.",+ "description": "Skills for your container so your AI knows how to drive the KiCad bridge, and how to contribute a fix back (kicad-bridge-contributing). The bridge runtime itself is the release zip; Adom Bridge loads that.", "tags": [ "kicad", "pcb",@@ -36,6 +36,7 @@ "skills/kicad-web-control/SKILL.md", "skills/kicad-uia/catalog.json", "skills/kicad-uia/SKILL.md",+ "skills/kicad-bridge-contributing/SKILL.md", "skills/kicad-bridge-dev/SKILL.md", "skills/kicad-bridge-publish/SKILL.md", "skills/kicad-bridge-hero/SKILL.md",
page.json+3−2@@ -4,7 +4,7 @@ "slug": "kicad-bridge", "title": "KiCad - the KiCad Bridge", "brief": "Reference implementation of the KiCad bridge: multi-instance Python server, forward path via kicad-cli, reverse path via in-process plugin. Most complex of the three bundled bridges.",- "version": "1.0.142",+ "version": "1.0.143", "tags": [ "kicad", "pcb",@@ -71,7 +71,7 @@ "skills": [], "author_name": "John Lauer", "source_visibility": "public",- "description": "Skills for your container so your AI knows how to drive the KiCad bridge. The bridge runtime itself is the release zip; Adom Bridge loads that.",+ "description": "Skills for your container so your AI knows how to drive the KiCad bridge, and how to contribute a fix back (kicad-bridge-contributing). The bridge runtime itself is the release zip; Adom Bridge loads that.", "dependencies": { "adom/adom-bridge": "^2.0.3" },@@ -95,6 +95,7 @@ "skills/kicad-web-control/SKILL.md", "skills/kicad-uia/catalog.json", "skills/kicad-uia/SKILL.md",+ "skills/kicad-bridge-contributing/SKILL.md", "skills/kicad-bridge-dev/SKILL.md", "skills/kicad-bridge-publish/SKILL.md", "skills/kicad-bridge-hero/SKILL.md",
skills/kicad-3d-models/SKILL.md+7@@ -182,3 +182,10 @@ When injecting a model reference for a non-standard component, the STEP model an - [ ] USB-C connector visible if present - [ ] LED packages visible and arranged in expected pattern - [ ] No error dialogs in KiCad++## Inspect every saved model binding++`kicad_model_check {"boardPath":"<saved board>"}` returns `modelBindings` for every footprint, including successful bindings and intentionally model-free footprints. Each row carries the footprint UUID, reference, layer and model resolution, transforms and hidden state. `limit` truncates only the warning list, never this inventory. Compare these bindings to the selected library variants before filming.++This is explicitly `evidenceSource: saved-board-file`: unsaved editor edits are not included. Save the exact intended board first. `renderVerified` remains false; inspect the native 3D viewer to verify placement, appearance and visibility. A resolved file is not proof of correct geometry or orientation.+
skills/kicad-bridge-contributing/SKILL.mdadded+111@@ -0,0 +1,111 @@+---+name: kicad-bridge-contributing+description: How to contribute to the Adom KiCad Bridge when you hit a bug or a missing verb - where the source lives (this wiki page's own repo, adom/kicad-bridge), how to clone it, build the native Rust bridge, test it, run a private copy without replacing the shared runtime, and send the fix back as a branch PR the owner can merge. Read this the moment your AI has to WORK AROUND the bridge instead of using it. Trigger words - kicad bridge bug, kicad bridge workaround, fix the kicad bridge, kicad-bridge source, kicad-bridge PR, contribute to the kicad bridge, submit a pr to kicad-bridge, kicad verb missing, kicad_ verb wrong reply, patch the bridge, build the kicad bridge, adom-wiki pr create adom/kicad-bridge.+---++# Contributing to the KiCad Bridge++If a `kicad_*` verb answered wrong, refused something it should do, or a verb you need does+not exist, you have three things you can do, and all three are welcome. The source of every+reply you get from this bridge is on this very wiki page, and Adom processes pull requests+within minutes during business hours.++1. **File it** (two minutes, always the first move): `adom-wiki issue create adom/kicad-bridge+ --title "<symptom>" --category bug-report --body "<what you ran, expected, got, the+ verbatim response JSON, bridge version, OS>"`. Check for a duplicate first with+ `adom-wiki issue list adom/kicad-bridge`. An issue with the verbatim reply is enough for+ the owner to fix it; you do not have to do anything else.+2. **Work around it, disclosed.** If you cannot wait, do the job another way, but say so in+ your report to the user and in the issue: "the bridge refused X, I did Y instead". A silent+ workaround hides the bug from everyone who hits it next.+3. **Fix it and send it back.** The rest of this skill.++## Where the source is++The page repo IS the source of truth (there is no separate GitHub you need). It holds the+native Rust bridge (`rust/`), the dashboard, every skill, the docs and the release tooling:++```+adom-wiki repo clone adom/kicad-bridge # files-only working copy, into ./kicad-bridge+cd kicad-bridge && cat CONTRIBUTING.md # the rules below, in full+```++Layout you will touch:++| Path | What |+|---|---|+| `rust/crates/kicad-bridge/src/verbs_*.rs` | The verbs: catalog entry (name, input, hint, pitfalls) + dispatch. One file per verb group. |+| `rust/crates/kicad-core/src/` | Platform-neutral logic: board parsing, IPC (`ipc.rs`), DRC, zones, DSN, libraries. Unit tests live next to the code. |+| `rust/crates/kicad-platform/src/win/` | Windows specifics: windows, focus, menus, UIA, capture. Stubs for macOS and Linux beside it. |+| `skills/*/SKILL.md` | What an AI reads. Change the skill when you change a contract. |+| `docs/` | Design notes and acceptance checklists (`docs/native-*.md`). |+| `RELEASE_NOTES.md`, `rust/Cargo.toml` | Version and notes; the owner bumps these, you do not need to. |++## Build and test++```+cd rust+cargo build # host build (Linux/macOS): compiles the neutral crates and the platform stubs+cargo test # every unit test; all must stay green+cargo build --release --target x86_64-pc-windows-gnu # the Windows exe (rustup target add x86_64-pc-windows-gnu; needs the mingw linker)+```++The Windows-only code (`kicad-platform/src/win/`) only compiles on the Windows target, so run+the cross-build before you send anything that touches it. The exe lands in+`rust/target/x86_64-pc-windows-gnu/release/kicad-bridge.exe`.++## Try your build without breaking anyone++Never replace the bridge that Adom Bridge (ab) is running for the user: other AI threads may+be mid-verb on it. Instead:++- **Unit tests first.** Most bridge logic (board parsing, DRC deltas, zone plans, DSN, hints)+ is testable with no KiCad at all; add a test next to the code that reproduces your bug.+- **Run your exe by hand** on a Windows box you own: `kicad-bridge.exe --port 47740`, then+ `curl -X POST http://127.0.0.1:47740/command -d '{"command":"kicad_describe"}'`. It talks+ to the same KiCad; it just is not the copy ab manages.+- If the change needs the real desktop (windows, focus, screenshots), say in the PR what you+ could and could not verify. The owner runs a native acceptance on a test box before+ publishing; source tests alone are not evidence of desktop behaviour, and nobody expects+ you to have proved that part.++## Send it back: a branch PR, from the current head++The wiki keeps page repos with branches and PRs, driven from the CLI:++```+adom-wiki branch create adom/kicad-bridge fix/<what> --from <current head sha> # off the live head, not off your old clone+adom-wiki repo push adom/kicad-bridge --branch fix/<what> --files <the files you changed> -m "<what and why>"+adom-wiki branch compare adom/kicad-bridge main fix/<what> # read the real diff you are about to send+adom-wiki pr create adom/kicad-bridge --from fix/<what> --title "<what>" --body-file pr.md+```++Rules that make a PR mergeable in minutes (the full text is `CONTRIBUTING.md`, section+"Wiki PRs and concurrent changes"):++- **Branch off the current head** (`adom-wiki branch list` shows it) and re-check it just+ before you push. If it moved, re-apply your hunks onto the new head. A file-set PR that+ replaces whole files from an old clone silently deletes everyone else's work since then;+ that has happened, and it is the one thing the owner will refuse.+- **Touch only what your change needs.** No whole-file reformatting.+- **Tests green, production build green**: `cargo test` and `cargo build --release --target+ x86_64-pc-windows-gnu` both pass; a function accidentally nested inside a `#[cfg(test)]`+ module is invisible to the tests and breaks the exe.+- **The PR body states**: the base sha, the issue it addresses, what you verified and how,+ and what still needs native acceptance. Honest gaps are fine; claims that turn out false+ are not.+- **Keep the hints honest.** Every error carries an actionable `Hint:` that names the exact+ next call; if you change a contract, change the hint and the skill in the same PR.++The owner reviews, merges on the wiki, mirrors into the build tree, ships to the insiders tier+(`bridge_install {manifestUrl: "https://wiki.adom.inc/api/v1/pages/insiders/files/kicad-bridge/version.json", force: true}` pulls it onto a box straight away), accepts it on a+test box, and replies on the PR and the issue with what was verified. Your fix reaches every+Adom user on the next promotion to the public tier.++## What is not the bridge's++Relay, lifecycle, identity, approval prompts, notifications and the dashboard card are Adom+Bridge (ab) itself: file those on `adom/adom-bridge` (or `adom/adom-bridge-macos` on a Mac).+KiCad's own limits (an IPC call its server does not handle, a DRC report cap) are reported by+the bridge as such; a PR that documents such a limit and refuses honestly is as welcome as a+fix.
skills/kicad-bridge-dev/SKILL.md+5@@ -793,6 +793,11 @@ Implementation (win_taskbar.py): version-detected). Effective at the next explorer restart/logon - the repair never restarts explorer itself; AdomLapper needed one manual explorer restart to pick it up, then rendered KiCad's real green icon.+ - NATIVE BUILD (1.0.30, 2026-09-19): the same repair is in process, no+ PowerShell: `crates/kicad-platform/src/win/shortcuts.rs`, run once at+ every bridge start from main.rs and on demand as `kicad_taskbar_repair`+ (one row per shortcut: written / already / missing / error). ConfRoomROG+ showed the white page again on 1.0.29 because the port had not carried it. - Dead-end theories, so nobody re-walks them: shell icon cache (rebuilt, no change), our old AUMID registrations (registry had none), dead Program Files shortcuts (all targets exist), "it's upstream default,
skills/kicad-copper-pours/SKILL.md+23−1@@ -65,10 +65,32 @@ The shunt's two sense taps are the case every pour gets wrong. The recipe that s 2. Write the pours as JSON, the `kicad_add_zone` shape: net, layers, polygon in mm, priority, connection. Draw each polygon from the pads it must cover (contacts, tabs, bulk capacitors), not from a guess; leave the sensitive parts above outside every non-ground polygon. 3. Gate offline: `tools/add_pours.py BOARD-routed.kicad_pcb --pours pours.json --drc --baseline BOARD-unrouted.kicad_pcb` splices the zones into a copy and runs KiCad's DRC with the zones filled: zero new errors, zero unconnected. 4. Land live: one `kicad_add_zone {"zones": [...]}` call per group (one undo step), or one per zone when the human should be able to undo them singly. The verb runs the same preflight on the editor's snapshot before anything lands and fills the new zones after.-5. Measure: `kicad_zone_state {"refill": true}` gives the filled copper per layer and the coverage. Report the numbers before and after the pours. That is the ablation metric.+5. Measure: `kicad_zone_state {"refill": true}` only requests the refill and answers an acknowledgement (`refillRequested:true`, no revision, no areas), because KiCad fills asynchronously. Wait a few seconds, then `kicad_zone_state {"refill": false}` gives the filled copper per layer and the coverage, with a revision you can use. Report the numbers before and after the pours. That is the ablation metric. 6. Validate: `kicad_routing_validate` on the live board: zero new errors, zero unconnected, and read the warnings (copper slivers, thermal reliefs that could not be made). 7. Second look at the layout: if a rail pour is choked to a neck by a trace crossing it, move the trace (rip it with `kicad_remove_route`, route it on the other layer); if a hot tab has no copper because a part sits beside it, move the part (`kicad_move_footprint`) and route again; if a pour cannot reach a tab because the current has to cross a signal bus, add a via row and a matching pour on the other layer. Then gate, land, measure again. This is the same going-back that got the board to 100 percent routed; the pour numbers tell you when it is worth it. ## What to report Per layer: filled copper before and after, in mm2 and as a percentage of the board; per pour: net, layer, area, connection style; the DRC result; and every judgement call above that applied (which nets were deliberately not poured and why). A pour count with no areas is not a report.++## Reconcile a complete owned plan++`kicad_apply_zone_plan` takes the exact `filePath`, a required `expectedRevision`,+explicit `ownedItemIds` (empty on the first call), and `zones` with unique nonempty+names. It preserves every unrelated zone, refuses ambiguous or unowned name+collisions, compares full definitions instead of area, DRC-checks the entire+candidate, then applies removals and additions as one native Undo operation.+Use `dryRun:true` first. Record returned `ownedItemIds` for the next call; neither+a name nor absence from an earlier board proves ownership. `zones:[]` removes+only the explicitly owned IDs. `save:true` is separate and opt-in.++A successful commit can carry `postCommitError` if a later refill, read or save+fails. It still reports committed/mutated and its item IDs: inspect native state+before retrying. An ambiguous transaction outcome must never be replayed blindly.+`kicad_zone_state.definitions` carries the full configuration, including outline+holes/arcs and settings, separately from filled-area summaries. Desired holes+and arcs are refused by the current polygon request schema, not silently omitted.+Unknown or extra native defaults may conservatively cause replacement rather than+an unchanged result. Native Windows acceptance of this new verb is required before+calling it a deployed capability.+