← Commit history

Publish 1.1.0

Drew Owens ·98a38ad78d ·3mo ago ·parent 5777cf3
3 files changed +59−66
SKILL.md+22−54
@@ -48,65 +48,31 @@ Optional but recommended — silkscreen overlays (top + bottom): Gotcha: never write or touch KiCad files with PowerShell `Set-Content` — the UTF-8 BOM corrupts S-expression files. Use the bridge's file verbs. -Pull everything to the container: `adom-desktop pull_file` for `ABC.step`,-`ABC.kicad_pcb`, and any silk PNGs.+**Never use KiCad-native GLB export** (`kicad-cli pcb export glb` or+`service-kicad pcb export glb`) for molecules — it bypasses anchoring, gold+materials, normalization, and footprint emit. STEP only; OCCT makes the GLB. -## Stage 2 — Convert (OCCT molecule mode)+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. -```bash-curl -s -X POST "https://step2glb-gmdoncpxdwx0.adom.cloud/convert?molecule=true&pin=medium" \-  -H "X-Client: <agent-name>" -H "X-Job-Name: ABC" \-  -F "[email protected]" -F "[email protected]_pcb" \-  # optional: -F "silk_top=@silk_top.png" -F "silk_bottom=@silk_bottom.png"-```--`pin` = the machine-pin size on the board (`medium` | `large`). Poll-`GET /jobs/{id}` until `status: complete`, then **verify the stats — do not-proceed on a degraded conversion**:--| Field | Must be | If not |-|---|---|---|-| `anchored` | `true` | Markers missing/undetected — fix Stage 0, re-export |-| `footprint_applied` | `true` | Board parse failed — check `warnings[]` (Cloudflare/UA, format) |-| `contact_z` | sane mm value (≈2.8–8.4) | Wrong `pin` param or missing contact models |-| `warnings[]` | empty | Read each one; "anchor skipped"/"footprint gen failed" are stop-signs |--Download the artifact set:-```bash-GET /jobs/{id}/result     → ABC.glb-GET /jobs/{id}/footprint  → ABC_footprint.json-GET /jobs/{id}/symbol     → ABC_symbol.json-```+## Stage 2 — Hand off to molecule-publish -> Upgrade path: once the `step2glb` CLI grows molecule flags-> (adom/adom-step2glb discussion #99), replace the curl with-> `step2glb convert ABC.step --molecule --board ABC.kicad_pcb --pin medium`.+Conversion, packaging, and wiki publish are the **`molecule-publish`** skill's+job (EDA-agnostic; shared with the Fusion and Altium flows). Hand it the+bundle from Stage 1: -## Stage 3 — Publish to the wiki--Component package dir:--```-abc/-  package.json          # slug, version, type: "component", description, tags-  ABC.glb               # the anchored, optimized model (reused at import — never regenerated)-  ABC.kicad_pcb         # board source-  ABC_footprint.json    # OCCT-authored (per-pad wire-attach z included)-  ABC_symbol.json-  README.md-```--```bash-adom-wiki pkg publish                      # registry layer-adom-wiki repo push <owner>/abc --files ABC.glb ABC.kicad_pcb ABC_footprint.json ABC_symbol.json README.md package.json -m "ABC molecule"-```+- STEP + board (`.kicad_pcb`) + schematic (`.kicad_sch`) + silk PNGs+- `pin` size (medium|large) and the target slug/org -Verify: the page renders, the 3D model shows, and `metadata.model_3d_path` is-set (`adom-wiki api /api/v1/pages/abc`). The packaged `*_footprint.json` is-what Hydrogen's import prefers — publishing it here is what makes the import-zero-regeneration.+It runs the OCCT molecule-mode conversion with the stats gates (`anchored`,+`footprint_applied`, `contact_z`, `warnings[]`), assembles the component+package (GLB + board + schematic + footprint + symbol + metadata), publishes+via `adom-wiki`, and verifies `model_3d_path`. Do not re-implement any of+that here. -## Stage 4 — Import to Hydrogen (handoff)+## Stage 3 — Import to Hydrogen (handoff)  Follow the **`adom-molecule-import`** skill (ships with `adom/adom-molecule`). Short form:@@ -133,7 +99,9 @@ private-safe.  ## Related -- `adom-molecule-import` — the import half (this skill's Stage 4)+- `molecule-publish` — convert + package + publish (this skill's Stage 2)+- `adom-molecule-import` — the import half (this skill's Stage 3)+- `molecule-pipeline` — the top-level router across the whole chain - `fusion-export-molecule` / `altium-export-molecule` — same job, other EDAs - `kicad-to-molecule` — make a plain PCB molecule-ready first (wings + pins) - `adom-desktop-kicad-bridge` — the laptop KiCad verbs Stage 1 drives
package.json+34−10
@@ -1,27 +1,51 @@ {   "slug": "kicad-export-molecule",-  "version": "1.0.0",+  "version": "1.1.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": ["molecule", "kicad", "export", "hydrogen", "skill"],+  "tags": [+    "molecule",+    "kicad",+    "export",+    "hydrogen",+    "skill"+  ],   "dependencies": {     "adom/adom-desktop": "^1.9.0",-    "adom/adom-molecule": "^1.1.3"+    "adom/adom-molecule": "^1.1.3",+    "adom/molecule-publish": "^1.0.0"+  },+  "scripts": {+    "install": "./install.sh",+    "uninstall": "./uninstall.sh"   },-  "scripts": { "install": "./install.sh", "uninstall": "./uninstall.sh" },   "hero": {     "headline": "KiCad board to wiki molecule",     "subhead": "export, OCCT-convert, publish, and import to Hydrogen in one flow",     "screenshot": "docs/shot.png"   },   "discovery_triggers": [-    "publish my kicad molecule", "kicad molecule to the wiki", "upload molecule from kicad",-    "kicad to hydrogen", "ship this board as a molecule", "export molecule from kicad", "kicad export molecule"+    "publish my kicad molecule",+    "kicad molecule to the wiki",+    "upload molecule from kicad",+    "kicad to hydrogen",+    "ship this board as a molecule",+    "export molecule from kicad",+    "kicad export molecule"   ],   "discovery_pitch": "Take a molecule designed in local KiCad all the way to the wiki and a Hydrogen account: bridge-driven STEP export, OCCT molecule pipeline, component publish, import handoff.",   "sample_prompts": [-    { "label": "Publish a molecule", "prompt": "Publish my KiCad molecule ABC to the wiki and import it into my Hydrogen account" },-    { "label": "Ship a board", "prompt": "Ship piprobe from my KiCad to Hydrogen" },-    { "label": "Export only", "prompt": "Export my kicad board as a molecule bundle and publish it" }+    {+      "label": "Publish a molecule",+      "prompt": "Publish my KiCad molecule ABC to the wiki and import it into my Hydrogen account"+    },+    {+      "label": "Ship a board",+      "prompt": "Ship piprobe from my KiCad to Hydrogen"+    },+    {+      "label": "Export only",+      "prompt": "Export my kicad board as a molecule bundle and publish it"+    }   ]-}+}\ No newline at end of file
page.json+3−2
@@ -1,6 +1,6 @@ {   "slug": "kicad-export-molecule",-  "version": "1.0.0",+  "version": "1.1.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,8 @@   ],   "dependencies": {     "adom/adom-desktop": "^1.9.0",-    "adom/adom-molecule": "^1.1.3"+    "adom/adom-molecule": "^1.1.3",+    "adom/molecule-publish": "^1.0.0"   },   "scripts": {     "install": "./install.sh",