← Commit history

Publish 0.10.0

AravK ·c7a38780eb · ·parent 7235abf
3 files changed +61−8
SKILL.md+59−6
@@ -170,8 +170,21 @@ end as the one seamless full-page README (§5.0).**      the drawing. Layout — click any pad/via/trace/zone to highlight the **whole net** while the      rest dims, hover for pad number/size/shape/side/net + live part data, independent layer      toggles and Top/Bottom mirroring.-   - Embed one `<iframe>` per schematic sheet (name them from the sheet, not `sheet-000`) and one-     for the layout; side panels auto-hide below 620 px, so give each frame real height.+   - **Pass `--sheet-dir` or you silently publish a one-sheet schematic.** `embed --file root.kicad_sch`+     alone reports `0 child sheets bundled` **even when the sub-sheets sit right beside the root** —+     hierarchical children are only pre-rendered when you point at their directory:+     `adom-schematic-viewer embed --file <root>.kicad_sch --sheet-dir <dir> --out sch.html`+     → `3 child sheets bundled`, and the embed's SHEET selector switches between them instantly with+     no reload. One embed covers the whole hierarchy, so you do NOT need one iframe per sheet.+     (On `adom/feeder-reader` the root holds 25 of 138 parts — without the flag the MCU, Power and+     CS sheets were simply absent and the page looked complete.)+   - **Get the sources from the design machine**, not from whatever copy is lying around the+     container: pull with `adom-desktop pull_file '{"filePaths":[...],"saveTo":"<dir>"}'` and+     **sha256-compare the root sheet + board against what the page already publishes** before using+     them. Stale local checkouts of the same project are common and differ silently (a Jul-10 copy+     had 18 root symbols against the published 45).+   - The layout embed needs only the `.kicad_pcb`; side panels auto-hide below 620 px, so give each+     frame real height.    - Install: `adom-wiki pkg install adom/adom-schematic-viewer adom/adom-layout-viewer`. Both need      `KICAD_SERVICE_API` (service-kicad) for the authentic render; the layout viewer self-renders if      it can't reach it (and looks less like KiCad, so prefer having it up).@@ -496,10 +509,43 @@ the viewer, so put it there (§4 builds the geometry; the tooltips below carry t >   Its Static mode is components (and pre-populated molecules) dropping into place, choreographed by the >   author. -An interactive viewer (`<MPN>-viewer.html`) built on **Colby's shipped bundle** (`window.Adom3DViewer`-/ `adom-3d-viewer.min.js`, already in the page repo). Our logic is all host-page code on top of his-**unmodified** bundle — so it's purely additive and could be offered back to Colby. The full worked-reference is the `adom-basic-part-page-upgrade` skill (`assets/viewer-template.html`).+### 🛑 START HERE — never write a viewer from scratch++The viewer is **not** re-invented per page. Every page's viewer is the SAME base plus a config file.+Rebuilding it freehand is how pages drift, and it is the single easiest way to waste a day.++**The base is Colby's shipped bundle** — `adom-3d-viewer.min.js`, exposing `window.Adom3DViewer`+(the same engine as the wiki's own native viewer). It is used **UNMODIFIED**: all our behaviour is+host-page code layered on top, so it stays purely additive and can be offered back upstream. Do not+fork it, patch it, or vendor a different three/Babylon build.++**Copy the template that matches your path, then edit only its config:**++| Path | Template to copy | Live page to compare against |+|---|---|---|+| A — component | `adom-basic-part-page-upgrade` → `assets/viewer-template.html` | `aravk/in-s42atr` |+| B — board/molecule | this skill → `scripts/board-viewer-template.html` | `adom/feeder-reader` |++**The layer cake — know which layer you are allowed to touch:**++| Layer | What it is | Do you edit it? |+|---|---|---|+| `adom-3d-viewer.min.js` | Colby's engine — scene, camera, picking, GLB load | **NEVER** |+| `*-viewer.html` template | our host page: modes, captions, legend, tooltips, timeline | rarely — fix bugs upstream in the template, not per page |+| `viewer-config.json` | **the per-page authoring surface** — blocks, order, timings, captions, static toggles | **YES — this is the file you write** |+| `<slug>.glb` + `board-index.json` | the geometry and its refdes→section index (§5c) | generated, never hand-edited |++So the actual per-page job is: bake the GLB (§5c) → write `viewer-config.json` (Path B item 1) →+drop in the template unchanged. If you find yourself writing scene/camera/animation code, stop —+that belongs in the template, and if the template can't express it, extend the template once so+every page gets it.++**Why this matters beyond tidiness:** the template already encodes the load-sequence fixes (§5b),+the sandbox/storage shims, the cap plumbing for private pages (§8k-vii), the camera-yield+convention, and Colby's exact ground/sky. A from-scratch viewer silently loses all of it and the+failures look like "the viewer is broken on the wiki" rather than "we re-derived it wrong".++The full worked reference is the `adom-basic-part-page-upgrade` skill (`assets/viewer-template.html`).  ### 5.0 Assembling the single-page README (the gold-standard build) @@ -688,6 +734,13 @@ fine but shows up in APM/adom-nucleus with no BOM panel. The graph is 3. 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. The board's `dependencies` is then exactly `{ "<owner>/<board-slug>-library": "*" }`.+   > **Why a separate library page at all?** It is required by `molecule-publish` Stage 2.5 (wiki+   > issue #15), not a convention we invented: the board deliberately does **not** carry the raw+   > parts list, because adom-nucleus/APM is built around a `board → library → components` graph and+   > one-hop dependency expansion. Putting 100+ part refs directly on the board flattens that graph+   > and the BOM panel stops working. Reference shapes:+   > `barrett-land/usb3-to-ethernet-dataonly-molecule-library`, `adom/uv-current-monitor-board-library`.+   > It also gives the BOM one place to record **pending/unresolved rows** without polluting the board. 4. **Auto-create any missing component page** (`type: component`, slug/title = normalized MPN) with    `<MPN>.kicad_sym` + `<MPN>.kicad_mod` + STEP + step2glb GLB + `<MPN>.adom-lbr.json` + hero +    `component` block. Assets come from the KiCad stdlib via `service-kicad` (`fp fetch`, `sym fetch`,
package.json+1−1
@@ -2,7 +2,7 @@   "slug": "adom-hardware-component-publish",   "title": "Publish a Hardware Component to the Adom Wiki",   "type": "skill",-  "version": "0.9.1",+  "version": "0.10.0",   "description": "The one-stop-shop for publishing a hardware component (or molecule/board) to the Adom Wiki. The whole lifecycle: page anatomy, the clone\u2192edit\u2192preview\u2192push loop and its hard rules, making a great hero image (Hero Component Studio \u2014 16:10, overlay-safe, datasheet-backed), the animated 3D composite, the interactive 3D viewer, ct thumbnails, the datasheet-accuracy audit, and every wiki push/pull gotcha we've hit. Now includes the worked Path B (board) pipeline: STEP-to-GLB, refdes tagging, layer de-fighting, two-mode board viewer (Assembly merged with explanation + free-camera Static) template, board maps, preview harness. A living, refinable skill \u2014 add gotchas via PR. Private, Adom-only.",   "tags": [     "skill",
page.json+1−1
@@ -2,7 +2,7 @@   "slug": "adom-hardware-component-publish",   "title": "Publish a Hardware Component to the Adom Wiki",   "type": "skill",-  "version": "0.9.1",+  "version": "0.10.0",   "description": "The one-stop-shop for publishing a hardware component (or molecule/board) to the Adom Wiki. The whole lifecycle: page anatomy, the clone→edit→preview→push loop and its hard rules, making a great hero image (Hero Component Studio — 16:10, overlay-safe, datasheet-backed), the animated 3D composite, the interactive 3D viewer, ct thumbnails, the datasheet-accuracy audit, and every wiki push/pull gotcha we've hit. Now includes the worked Path B (board) pipeline: STEP-to-GLB, refdes tagging, layer de-fighting, two-mode board viewer (Assembly merged with explanation + free-camera Static) template, board maps, preview harness. A living, refinable skill — add gotchas via PR. Private, Adom-only.",   "tags": [     "skill",