skill
molecule-publish
Public Made by Adomby adom
Publish molecules AND generic boards to the Adom wiki - one publisher, two shapes: OCCT conversion (molecule mode with stats gates, or plain for boards), component packaging, adom-wiki publish, APM render assets + component dependencies. Companion to adom-molecule-import.
← Commit history
SKILL.md+55−2@@ -1,6 +1,6 @@ --- name: molecule-publish-description: Publish a molecule source bundle (STEP + schematic + board + metadata) to the Adom wiki — runs the OCCT molecule-mode conversion (anchored GLB + footprint + symbol with stats gates), assembles the component package, and publishes via adom-wiki. The EDA-agnostic middle of the pipeline; companion to adom-molecule-import (which does wiki → Hydrogen). Use when the user says "publish this molecule to the wiki", "upload molecule bundle", "convert and publish my molecule", "molecule to the wiki", or an EDA export skill (kicad-export-molecule, fusion-export-molecule, altium-export-molecule) hands off here after exporting.+description: Publish a molecule OR a generic KiCad/EAGLE board to the Adom wiki - one publisher, two shapes — runs the OCCT molecule-mode conversion (anchored GLB + footprint + symbol with stats gates), assembles the component package, and publishes via adom-wiki. The EDA-agnostic middle of the pipeline; companion to adom-molecule-import (which does wiki → Hydrogen). Use when the user says "publish this molecule to the wiki", "upload molecule bundle", "convert and publish my molecule", "molecule to the wiki", "publish my board" (plain, non-molecule boards use BOARD MODE - no anchoring gates), or an EDA export skill (kicad-export-molecule, fusion-export-molecule, altium-export-molecule) hands off here after exporting. Every publish also emits the render/ assets and component dependencies adom-project-manager (APM) reads. user-invocable: true argument-hint: "<name> --step <f.step> --board <f.kicad_pcb|f.brd> --sch <schematic> [--pin medium|large] [--silk-top png --silk-bottom png] [--org adom]" ---@@ -17,6 +17,19 @@ EDA export skill THIS SKILL adom-molecule-import (kicad/fusion/altium) → convert → package → publish → wiki → Hydrogen ``` +## Two shapes: molecule vs board++| | **Molecule** (machine pins + MP markers) | **Board** (plain KiCad/EAGLE) |+|---|---|---|+| Convert | `--molecule --board` (anchor/gold/footprint, ALL stats gates) | plain `step2glb convert` (no molecule flags, no anchor gates) |+| Tag | `molecule` | `board` |+| Footprint/symbol JSON | required (wire attach points) | not applicable |+| render/ + deps (APM) | yes | yes |++Decide by the board itself: Adom machine pins + MP1-MP4 markers -> molecule;+otherwise board. Both shapes get `<slug>.glb` from step2glb (never an+EDA-native GLB), `model_3d_path` pointing at it, and the APM stages below.+ ## Contract — inputs vs the published set **The user supplies sources; this skill generates and attaches the rest.**@@ -31,7 +44,8 @@ JSON are never user-supplied: they come out of the OCCT conversion below. |---|---|---| | yes | STEP (`.step`) | exported ON the design machine so all 3D models (machine pins, contacts, MP markers) are baked in | | yes | Board/layout (`.kicad_pcb` or `.brd`) | what footprint+symbol generation parses |-| yes | Schematic (`.kicad_sch` or `.sch`) | source completeness — a molecule without its schematic is not reproducible |+| yes | Schematic — `.kicad_sch` (EVERY sheet: root + sub-sheets) or `.sch` | source completeness + APM's hierarchical schematic view renders from these |+| board shape | `.kicad_pro` + any `.kicad_sym`/`.pretty` used | APM render sources | | generated | GLB | OCCT conversion output — never user-supplied, always published | | generated | Metadata | OCCT footprint/symbol JSONs + the authored `package.json` | | optional | Silk PNGs (top/bottom) | white artwork on transparent |@@ -58,6 +72,10 @@ beside it, prints the full stats block, and emits gate hints on failures. Fallback (older CLI): `curl -X POST ".../convert?molecule=true&pin=..." -H "X-Client: <agent>" -H "X-Job-Name: <name>" -F "step=@..." -F "board=@..."`. +**Board shape:** use a plain convert instead — `step2glb convert <name>.step+-o <slug>.glb` — and SKIP the molecule stats gates below (they do not apply;+if the output warns `molecule_markers_detected`, it IS a molecule — switch).+ `pin` = machine-pin size on the board (`medium` | `large`). Poll `GET /jobs/{id}` until complete, then **gate on the stats — never publish a degraded conversion**:@@ -140,6 +158,41 @@ Verify before declaring done: - the page's Files tab shows the full bundle (registry and git layers are separate — publish alone does not populate Files) +## Stage 3.5 — APM render assets (every publish/update)++APM shows PCB + hierarchical schematics from a pre-rendered `render/` folder;+without it, boards trip APM's red "missing render folder" bar and fall back+to slow live rendering.++```bash+adom-wiki pkg install adom/adom-project-manager # once per container+adom-project-manager --render-board <slug> # push-only: writes ONLY render/+```++Run AFTER the repo push (it renders off the wiki source — needs `.kicad_pcb`++ every `.kicad_sch` on the page). Verify `render/manifest.json` appears in+the page files. Re-run on every content update so it never goes stale.+KiCad sources only today: EAGLE/Fusion (`.brd`/`.sch`) pages report "nothing+rendered" and skip gracefully — APM live-renders those (verified live).++## Stage 3.6 — Component dependencies (APM's component list)++APM lists a board/molecule's components from `package.json.dependencies`+(one-hop expand). Map the design's BOM parts to wiki component slugs and+MERGE them in:++- Mapping helper: `skills/publish-board/kicad_board_bundle.py` on the+ `adom/adom-project-manager` page (`adom-wiki repo clone adom/adom-project-manager`).+ Mind its Value-fallback caveat: value-named symbols like `R_4.3K_0402` are+ NOT component slugs — resolve the real MPN.+- Write owner-qualified refs (`adom/<slug>`) into `dependencies`. **MERGE,+ never overwrite** — preserve `component`, `hero`, `tags`, `model_3d_path`.+- Verify each referenced component page exists; flag missing ones.+- Bump the version and `pkg publish` — the dependency graph is a REGISTRY+ concept (publish), not a files concept (repo push).+- Known behavior to keep in mind: deps are real registry deps, so+ `pkg install <board>` will pull the component pages too.+ ## Stage 4 — Handoff Import to Hydrogen is `adom-molecule-import`'s job (ships with
package.json+7−3@@ -1,8 +1,8 @@ { "slug": "molecule-publish",- "version": "1.1.1",+ "version": "2.0.0", "type": "skill",- "description": "Publish a molecule source bundle (STEP + schematic + board + metadata) to the Adom wiki: OCCT molecule-mode conversion with stats gates, component packaging, adom-wiki publish. EDA-agnostic middle of the pipeline; companion to adom-molecule-import.",+ "description": "Publish molecules AND generic boards to the Adom wiki - one publisher, two shapes: OCCT conversion (molecule mode with stats gates, or plain for boards), component packaging, adom-wiki publish, APM render assets + component dependencies. Companion to adom-molecule-import.", "tags": [ "molecule", "pipeline",@@ -27,7 +27,11 @@ "upload molecule bundle", "convert and publish my molecule", "molecule to the wiki",- "publish molecule package"+ "publish molecule package",+ "publish my board",+ "publish board to the wiki",+ "board to project manager",+ "render board for apm" ], "discovery_pitch": "Publish a molecule source bundle (STEP + schematic + board + metadata) to the Adom wiki: OCCT molecule-mode conversion with stats gates, component packaging, adom-wiki publish. EDA-agnostic middle of the pipeline; companion to adom-molecule-import.", "sample_prompts": [
page.json+7−3@@ -1,8 +1,8 @@ { "slug": "molecule-publish",- "version": "1.1.1",+ "version": "2.0.0", "type": "skill",- "description": "Publish a molecule source bundle (STEP + schematic + board + metadata) to the Adom wiki: OCCT molecule-mode conversion with stats gates, component packaging, adom-wiki publish. EDA-agnostic middle of the pipeline; companion to adom-molecule-import.",+ "description": "Publish molecules AND generic boards to the Adom wiki - one publisher, two shapes: OCCT conversion (molecule mode with stats gates, or plain for boards), component packaging, adom-wiki publish, APM render assets + component dependencies. Companion to adom-molecule-import.", "tags": [ "molecule", "pipeline",@@ -28,7 +28,11 @@ "upload molecule bundle", "convert and publish my molecule", "molecule to the wiki",- "publish molecule package"+ "publish molecule package",+ "publish my board",+ "publish board to the wiki",+ "board to project manager",+ "render board for apm" ], "discovery_pitch": "Publish a molecule source bundle (STEP + schematic + board + metadata) to the Adom wiki: OCCT molecule-mode conversion with stats gates, component packaging, adom-wiki publish. EDA-agnostic middle of the pipeline; companion to adom-molecule-import.", "sample_prompts": [