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+34−24@@ -1,6 +1,6 @@ --- name: molecule-publish-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", "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 (including Nucleus's per-version render archive behind the board version selector) and component dependencies adom-nucleus reads.+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", "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 (including APM's per-version render archive behind the board version selector) 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]" ---@@ -24,11 +24,11 @@ EDA export skill THIS SKILL adom-molecule-import | 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 (Nucleus) | yes | yes |+| 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 Nucleus stages below.+EDA-native GLB), `model_3d_path` pointing at it, and the APM stages below. ## Contract — inputs vs the published set @@ -44,8 +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` (EVERY sheet: root + sub-sheets) or `.sch` | source completeness + Nucleus's hierarchical schematic view renders from these |-| board shape | `.kicad_pro` + any `.kicad_sym`/`.pretty` used | Nucleus render sources |+| 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 |@@ -141,10 +141,10 @@ your anchored GLB is the one `model_3d_path` resolves to. ## Stage 2.5 — Component dependencies (AUTOMATED, BEFORE publish) -Nucleus lists a board/molecule's components from `package.json.dependencies`+APM lists a board/molecule's components from `package.json.dependencies` (one-hop expand). This stage is NOT optional and NOT the user's job — a publish that skips it produces a board that looks successful but shows up-in Nucleus with no BOM panel (#247, the Taprite carriers). Do it every publish:+in APM with no BOM panel (#247, the Taprite carriers). Do it every publish: 1. **Parse the BOM** (BOM CSV beside the sources, else the `.kicad_sch`). 2. **Electrical rows only** — skip logos, silkscreen art, fiducials,@@ -152,14 +152,22 @@ in Nucleus with no BOM panel (#247, the Taprite carriers). Do it every publish: 3. **Resolve the real MPN** for each row (never value names — #142). A row with no MPN and no unambiguous standard part = FLAG for human resolution; report it, never silently drop it.-4. **MERGE** owner-qualified refs into the Stage 2 `package.json` — before- Stage 3's publish, so each publish cycle produces exactly ONE registry- version (a deps-only follow-up publish creates an extra version whose- renders are identical: harmless under Nucleus's dedup, but noise in the- version selector).+4. **Publish the refs through a LIBRARY page (#15)** — the board does NOT+ carry the raw parts list. Create/update `<board-slug>-library`+ (`type: component`, `tags: ["library"]`, a `library.step` so the 3D+ lint passes, hero + description) whose `dependencies` are the+ owner-qualified component refs; then the board's `dependencies` is+ exactly `{ "<owner>/<board-slug>-library": "*" }`. Graph:+ `board -> library -> components` (matches APM's board->library+ architecture; reference shape:+ barrett-land/usb3-to-ethernet-dataonly-molecule-library).+5. **Order + one version per cycle**: publish component pages first, then+ the library, then the board — a dep must exist when the depender+ publishes. Merge everything BEFORE the board's Stage 3 publish so each+ cycle produces exactly ONE registry version. - Mapping helper: `skills/publish-board/kicad_board_bundle.py` on the- `adom/adom-nucleus` page (`adom-wiki repo clone adom/adom-nucleus`).+ `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,@@ -223,18 +231,19 @@ Verify before declaring done: - the registry tarball is the **source of record per version**: Stage 2's layout means every publish carries the full board source, and `adom-wiki pkg install <owner>/<slug>@<version>` delivers any past- version's files (Nucleus's version selector relies on this for "give me the+ version's files (APM's version selector relies on this for "give me the source of an older version" — render/ is previews only, never source). -## Stage 3.5 — Nucleus render assets + version archive (AFTER publish, every time)+## Stage 3.5 — APM render assets + version archive (AFTER publish, every time) -Nucleus shows PCB + hierarchical schematics + the board **version selector**-from a pre-rendered `render/` folder; without it, boards trip Nucleus's red+APM shows PCB + hierarchical schematics + the board **version selector**+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-nucleus # once per container (needs >= 0.4.1)-adom-nucleus --render-board <slug> # push-only: writes ONLY render/+adom-wiki pkg install adom/adom-nucleus # once per container (APM was RENAMED+adom-nucleus --render-board <slug> # to adom-nucleus; the old+# adom-project-manager name still works via the rename shim's symlink) ``` **Ordering is load-bearing: run this AFTER Stage 3's `pkg publish` + repo@@ -242,7 +251,7 @@ push.** `--render-board` stamps the archive with the version it reads from the PUBLISHED `package.json` on the page — run it before the publish and it stamps the previous version. -`--render-board` (Nucleus >= 0.4.0) **fully owns the version archive** — never+`--render-board` (APM >= 0.4.0) **fully owns the version archive** — never write `render/<version>/` or edit `render/manifest.json` yourself (double-writing fights its content dedup). On each run it: - renders + pushes the top-level `render/*` = current version (including@@ -260,14 +269,15 @@ Verify after the run: Re-run on every content update so it never goes stale. KiCad sources render today; EAGLE/Fusion (`.brd`/`.sch`) pages report "nothing rendered" and skip-gracefully — Nucleus shows a static version label for them (Fusion rendering is-landing in Nucleus; nothing changes on this side when it does).+gracefully — APM shows a static version label for them (Fusion rendering is+landing in APM; nothing changes on this side when it does). ## Publish completion checklist (a publish is NOT done until all pass) - [ ] `metadata.model_3d_path` set; page GLB sha256 == your gated conversion-- [ ] `dependencies` populated from the BOM (Stage 2.5) — `{}` on a board- with electrical parts is a FAILED publish, not a done one+- [ ] board `dependencies` = its library page; library page `dependencies`+ = every electrical BOM part (Stage 2.5) — `{}` on a board with+ electrical parts is a FAILED publish, not a done one - [ ] every referenced component page exists (Stage 2.6), or is explicitly flagged pending with what it needs - [ ] `render/manifest.json` on the page with `current` == the version you
package.json+4−4@@ -1,8 +1,8 @@ { "slug": "molecule-publish",- "version": "2.2.0",+ "version": "2.3.0", "type": "skill",- "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, Nucleus render assets + component dependencies. 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",@@ -30,8 +30,8 @@ "publish molecule package", "publish my board", "publish board to the wiki",- "board to nucleus",- "render board for nucleus"+ "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+4−4@@ -1,8 +1,8 @@ { "slug": "molecule-publish",- "version": "2.2.0",+ "version": "2.3.0", "type": "skill",- "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, Nucleus render assets + component dependencies. 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",@@ -31,8 +31,8 @@ "publish molecule package", "publish my board", "publish board to the wiki",- "board to nucleus",- "render board for nucleus"+ "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": [