← Commit history

Merge PR #263: Export KiCad Gerbers and provenance on every molecule publish

AdityaAngajala ·6b4533815b ·5d ago ·parent 2bb0222
4 files changed +24−5
README.md+2
@@ -1,5 +1,7 @@ # kicad-export-molecule +Every molecule export includes `<slug>-fab.zip` (both sides' fabrication layers and drill) and `export.json` (producer versions and source hashes). The exporter hands both to molecule-publish, which checks them before and after the page push. See [SKILL.md](SKILL.md) for the tool-specific steps.+ Agent skill: ship a molecule from the user's **local KiCad** to the Adom wiki and into their Hydrogen account, in four verified stages: 
SKILL.md+18−1
@@ -46,8 +46,24 @@ resolve there): ```bash # via the bridge's run-command verb; use the laptop's real kicad-cli path kicad-cli pcb export step --subst-models -o ABC.step ABC.kicad_pcb+kicad-cli pcb export gerbers --layers F.Cu,B.Cu,F.Mask,B.Mask,F.Silkscreen,B.Silkscreen,Edge.Cuts --check-zones -o fab/ ABC.kicad_pcb+kicad-cli pcb export drill --format excellon --excellon-units mm --excellon-separate-th --drill-origin absolute -o fab/ ABC.kicad_pcb+kicad-cli version ``` +Use an empty `fab/` directory and the same saved board for all three exports.+Keep the STEP flags above even if a bridge's convenience export omits+`--subst-models`. Gerbers and drill are required on every molecule export.+Read the board's `(setup (stackup ...))` for known thickness, side colours+and finish; leave unknown values absent rather than inventing defaults.++Install `adom/molecule-publish` and use its+[fabrication handoff](https://wiki.adom.inc/adom/molecule-publish)+and `scripts/fab_bundle.py` to package `fab/` as `<slug>-fab.zip` and write+`export.json`. Record the actual KiCad version, this export skill's version,+and hashes of the STEP, saved board, every schematic sheet, project and other+exported sources. Run `fab_bundle.py check` before handing the bundle over.+ Optional but recommended — silkscreen overlays (top + bottom): - Export the silk layers to PNG (transparent background). - Artwork must be **white**; if the export bakes black silk, recolor opaque@@ -64,7 +80,7 @@ materials, normalization, and footprint emit. STEP only; OCCT makes the GLB. Pull the **full bare-minimum bundle** to the container with `adom-desktop pull_file`: `ABC.step`, `ABC.kicad_pcb`, **`ABC.kicad_sch`** (schematic is required — a molecule without it is not reproducible),-`ABC.kicad_pro`, and any silk PNGs.+`ABC.kicad_pro`, `<slug>-fab.zip`, `export.json`, and any silk PNGs.  ## Stage 2 — Hand off to molecule-publish @@ -73,6 +89,7 @@ job (EDA-agnostic; shared with the Fusion and Altium flows). Hand it the bundle from Stage 1:  - STEP + board (`.kicad_pcb`) + schematic (`.kicad_sch`) + silk PNGs+- `<slug>-fab.zip` + `export.json`, checked against the final source files - `pin` size (medium|large) and the target slug/org  It runs the OCCT molecule-mode conversion with the stats gates (`anchored`,
package.json+2−2
@@ -1,6 +1,6 @@ {   "slug": "kicad-export-molecule",-  "version": "1.1.2",+  "version": "1.2.0",   "type": "skill",   "description": "Ship a KiCad molecule to the Adom wiki: local KiCad STEP export via the adom-desktop bridge, OCCT molecule conversion (anchored GLB + footprint + symbol), wiki component publish, and handoff to adom-molecule-import for Hydrogen registration.",   "tags": [@@ -12,7 +12,7 @@   ],   "dependencies": {     "adom/adom-molecule": "^1.1.3",-    "adom/molecule-publish": "^2.0.0",+    "adom/molecule-publish": "^2.11.0",     "adom/adom-bridge": "^2.0.0"   },   "scripts": {
page.json+2−2
@@ -1,6 +1,6 @@ {   "slug": "kicad-export-molecule",-  "version": "1.1.2",+  "version": "1.2.0",   "type": "skill",   "description": "Ship a KiCad molecule to the Adom wiki: local KiCad STEP export via the adom-desktop bridge, OCCT molecule conversion (anchored GLB + footprint + symbol), wiki component publish, and handoff to adom-molecule-import for Hydrogen registration.",   "tags": [@@ -12,7 +12,7 @@   ],   "dependencies": {     "adom/adom-molecule": "^1.1.3",-    "adom/molecule-publish": "^2.0.0",+    "adom/molecule-publish": "^2.11.0",     "adom/adom-bridge": "^2.0.0"   },   "scripts": {