← Commit history
SKILL.md+13−3
@@ -75,7 +75,7 @@ when one matches, load the referenced guide. |---|---|---| | **adom-usbc** — placement, rotation, lint for USB-C receptacles on an Adom tscircuit molecule; covers `TYPE-C-31-M-12`, per-edge rotation math, the `UsbCReceptacle` wrapper, and the "no SMT pad past the board edge" rule | "usb-c", "type-c", "smd usb c", "UsbCReceptacle", "place usb-c", "rotate usb-c", "usb-c east edge", "usb-c west edge" | `~/.claude/skills/adom-tsci/guides/adom-usbc.md` | | **demo-recording** — making a 30-second demo video of an adom-tsci board: 30/70 workspace split, `-s small` captions with pre-flight wrap test, mandatory x-ray shot (hide a subset of LEDs/chips), Andrew Neural TTS narration, ffmpeg audio-mix recipe | "demo video", "record demo", "30-second demo", "make a demo of this board", "x-ray shot", "show off the 3D viewer", "demo for the wiki" | `~/.claude/skills/adom-tsci/guides/demo-recording.md` |-| **export-wiki** — publishing a tscircuit project to the Adom Wiki as a molecule with the full interactive 3D viewer (auto-play walkthrough on load, Components / Nets HUDs, Inspect, Measure), the source bundle (lib/, package.json, walkthrough.json, plan.md), and a comprehensive AI-handoff body. Required ingredients: hero image, plan.md, body markdown that captures every design decision so a future agent can pick up | "publish to wiki", "export to wiki", "wiki page for this board", "share the molecule", "make this a molecule on the wiki", "publish molecule", "ship it to the wiki" | `~/.claude/skills/adom-tsci/guides/export-wiki.md` |+| **export-wiki** — publishing a tscircuit project to the Adom Wiki as a molecule page of sources (1.7.0): `circuit.json` at the page root, the model files the molecule program does not pin under `libraries/<part>/`, the source bundle and plan.md, published private with `adom-wiki pkg publish --wait` (adom-wiki 1.8.0 or newer); the wiki's registry builds the model, footprint and symbol, then the hero is set and the page goes public. Never push `board.glb` or a generated model file. Also covers the interactive viewer in `viewer/` (`viewer/3d.glb` stays Y-up), README.html, the hero and the verify checklist | "publish to wiki", "export to wiki", "wiki page for this board", "share the molecule", "make this a molecule on the wiki", "publish molecule", "ship it to the wiki" | `~/.claude/skills/adom-tsci/guides/export-wiki.md` |  No standalone `adom-usbc` skill exists — USB-C placement is meaningless outside adom-tsci's workflow, so it lives under this parent, not as a@@ -1524,8 +1524,18 @@ and JLCPCB's upload will accept it as a proper 4-layer board.  ## Publishing your molecule -`adom-tsci` is a preview tool — it doesn't publish anything. Use-tscircuit's own flow:+Two places, two commands.++**The Adom Wiki** (a molecule page): `adom-tsci export-wiki . --slug <slug>+--org <owner>`. It publishes sources only: `circuit.json` at the page root,+the model files the molecule program does not pin under `libraries/<part>/`,+the source bundle and plan.md. The wiki's 3D model registry builds the+page's model, footprint and symbol from them; export-wiki waits for that+build, sets the hero and makes the page public. Read+`~/.claude/skills/adom-tsci/guides/export-wiki.md` first (needs adom-wiki+1.8.0 or newer).++**The tscircuit registry**: tscircuit's own flow.  ```bash cd ~/project/adom-tsci-projects/MyChip-Molecule
VERSION+1−1
@@ -1 +1 @@-1.6.0+1.7.0
docs/example-bhi360-3d.pngadded
⋯ 1 unchanged line ⋯
docs/example-bhi360-pcb.pngadded
⋯ 1 unchanged line ⋯
docs/example-bme680-3d.pngadded
⋯ 1 unchanged line ⋯
docs/example-bme680-pcb.pngadded
⋯ 1 unchanged line ⋯
docs/example-ice40-3d.pngadded
⋯ 1 unchanged line ⋯
docs/example-ice40-pcb.pngadded
⋯ 1 unchanged line ⋯
docs/example-ice40-usb-3d.pngadded
⋯ 1 unchanged line ⋯
docs/example-ice40-usb-pcb.pngadded
⋯ 1 unchanged line ⋯
docs/example-sn65-pcb.pngadded
⋯ 1 unchanged line ⋯
docs/hero.pngadded
⋯ 1 unchanged line ⋯
docs/screenshot-3d.pngadded
⋯ 1 unchanged line ⋯
docs/screenshot-compare.pngadded
⋯ 1 unchanged line ⋯
docs/screenshot-parts.pngadded
⋯ 1 unchanged line ⋯
docs/screenshot-pcb.pngadded
⋯ 1 unchanged line ⋯
docs/screenshot-rerun.pngadded
⋯ 1 unchanged line ⋯
docs/screenshot-schematic.pngadded
⋯ 1 unchanged line ⋯
docs/v040/screenshot-components-hud.pngadded
⋯ 1 unchanged line ⋯
docs/v040/screenshot-hero-3d.pngadded
⋯ 1 unchanged line ⋯
docs/v040/screenshot-inspect-board.pngadded
⋯ 1 unchanged line ⋯
docs/v040/screenshot-inspect-chip.pngadded
⋯ 1 unchanged line ⋯
docs/v040/screenshot-inspect-pad.pngadded
⋯ 1 unchanged line ⋯
docs/v040/screenshot-walkthrough-contacts-flyover.pngadded
⋯ 1 unchanged line ⋯
docs/v040/screenshot-walkthrough-fpga.pngadded
⋯ 1 unchanged line ⋯
docs/v040/screenshot-walkthrough-silkscreen.pngadded
⋯ 1 unchanged line ⋯
guides/demo-recording.md+1−3
@@ -277,9 +277,7 @@ post-production needed for a 30-second showcase.  - **Brianna LED Nameplate** — first board this guide was written   against. Wiki page:-  `https://wiki-ufypy5dpx93o.adom.cloud/molecules/brianna-led-nameplate`.-  Demo video at `/static/apps/brianna-led-nameplate/brianna-demo.mp4`-  is the canonical example.+  `https://wiki.adom.inc/adom/brianna-led-nameplate` (page access required). - **adom-tts** — TTS skill, voice selection, pronunciation overrides. - **video-post** — for longer-form post-production (speedup, voice   re-recording, multi-clip stitching). Not needed for the 30-second
guides/export-wiki.md+316−201
@@ -1,241 +1,356 @@-# adom-tsci/export-wiki — publishing a tscircuit molecule to the Adom Wiki+# adom-tsci/export-wiki: publishing a tscircuit board to the Adom Wiki  **Read this before running `adom-tsci export-wiki` on any project.**-The CLI is deliberately opinionated: it ships the interactive 3D-viewer, the source bundle, the plan.md, AND a comprehensive body-markdown to the wiki page in one shot. Skipping any of those pieces-makes the page useless to a future viewer (human or AI) — the goal-is "another agent can pick up exactly where this one left off" with-nothing missing. -## What the CLI does, in order+> **Read `wiki-readme-html` from the [Adom Wiki Skill Pack](https://wiki.adom.inc/adom/adom-wiki-skillpack)+> first.** It owns the generic readme.html contract: the sandbox shims, the+> size budget, the `readme-height` protocol, the shadowing rule, theming. This+> guide covers only what is specific to shipping a **tscircuit board** through+> that contract, and defers to it everywhere else.++## Current state of the tooling (1.7.0)++A molecule page publishes **sources only**. The wiki's 3D model registry+builds the page's model, footprint and symbol from `circuit.json` at the page+root (recipe `molecule-circuit`), and it refuses a publish that carries a file+it generates (`<slug>.glb`, `<slug>.web.glb`, `<slug>_footprint.json`,+`<slug>_symbol.json`, `<slug>.pipeline.json`). `adom-tsci export-wiki` writes+the page folder and publishes it:++1. Reads the build in `dist/lib/index/` (no `tsci build` unless `--rebuild`).+2. Stages the viewer bundle at `/tmp/adom-tsci-export-<slug>/`, for the page's+   `viewer/` folder.+3. Writes the page folder (`<project>/wiki-page`, or `--page-dir`):+   `circuit.json` at the root, the model files it needs under+   `libraries/<part>/`, `pcb.svg`, `schematic.svg`, `plan.md` and+   `<slug>-source.tar.gz`. It creates `package.json` and copies `README.md`+   from the project when they are missing, and leaves every other file+   (`README.html`, `viewer/`, `docs/hero.png`) as you left it.+4. Checks the folder: one root circuit file, no generated files, no+   `board.glb`, at most 200 library files, a `README.md`.+5. Publishes: `adom-wiki pkg publish --org <owner> --wait` from the page+   folder, with `--private` while the page is new or private. It waits for the+   model build (up to 10 minutes), checks that the build passed and that the+   page serves a model from it, sets the hero from `docs/hero.png`, and then+   makes the page public.++`--no-upload` stops after step 4, so you can add the viewer, `README.html`+and the hero before the first publish.++It needs **adom-wiki 1.8.0 or newer** (the `model` pillar and+`pkg publish --wait`) and checks `adom-wiki --version` before the first+registry step. An older CLI stops it with: "This skill needs adom-wiki 1.8.0+or newer (found <v>). Run: adom-wiki self-update".++1.6.0 and older shelled out to `adom-wiki asset upload`, which no longer+exists, and this guide told you to push `board.glb` and every other file with+`repo push`. Both are gone: the registry builds the model, and `pkg publish`+is the one write.++## What a board page ships  ```-adom-tsci export-wiki [<project>] --slug <wiki-slug> \-    --page-type molecules \-    --label "Live 3D viewer" \-    [--rebuild] [--texture-resolution N] [--no-upload]+circuit.json                 the registry's source (written by export-wiki)+libraries/<part>/<file>      model files circuit.json references that the program does not pin+package.json                 kind molecule, type hardware, source tscircuit (created once; yours to edit)+README.md                    plain-text source of record (copied from the project once)+README.html                  the page body; embeds the viewer (see wiki-readme-html)+viewer/                      the self-contained adom-tsci viewer bundle+pcb.svg  schematic.svg       from dist/lib/index+plan.md                      the brief and every decision made against it+<slug>-source.tar.gz         full project source+docs/hero.png                16:10, 1920x1200; set as the hero once the build passes ``` -1. **Confirms `dist/lib/index/circuit.json` exists.** Skip-rebuild is-   the default — `bunx tsci build` can take 10 minutes on dense-   boards. Pass `--rebuild` to force.--   **Fallback-dist search** (1.3.91+): if the in-place dist is missing,-   the CLI looks for an existing dist at known parallel locations-   before erroring out. Order: `~/project/adom-tsci-projects/<basename>/dist`,-   `~/project/adom-tsci/examples/<basename>/dist`,-   `~/project/tscircuit-projects/<basename>/dist`. Picks the freshest-   by `circuit.json` mtime. Many canonical molecules live in two-   places (the example-library copy and the local scratch-build-   copy); only one has a fresh dist at any given moment, and there's-   no reason to spend 10 minutes rebuilding when the other copy is-   already there.--   **The reflex when a build seems missing:** `ls-   ~/project/adom-tsci-projects/<name>/dist/lib/index/circuit.json`-   FIRST. Only rebuild if neither copy has a fresh dist. The CLI does-   this automatically now, but the same rule applies to any AI helper-   debugging "why doesn't this project have a dist?" — search before-   rebuilding.-2. **Resolves the GLB.** Default = `dist/lib/index/3d.glb` (1024-px-   texture). Pass `--texture-resolution N` to rebake at higher res-   (4096 typical for 100–200 mm boards; first bake ~75 s, cache hit-   ~190 ms).-3. **Stages the viewer bundle** at `/tmp/adom-tsci-export-<slug>/`:-   - `index.html` — `shell.html` rewritten for static hosting (fetch-     monkeypatch, walkthrough autoplay, all `glb`-style URLs-     remapped to relative paths).-   - `js/adom-3d-viewer.min.js`, `js/tscircuit-alphabet.js`,-     `js/environmentSpecular.env`, `adom.css`, `favicon.svg` —-     embedded into the binary, copied out at staging time.-   - `3d.glb`, `circuit.json`, `walkthrough.json`, `pcb.svg`,-     `schematic.svg` — the project's build artifacts.-4. **Tarballs the viewer bundle** as-   `<slug>-tsci-viewer.tar.gz`. Uploads via `adom-wiki asset upload-   --asset-type tsci-viewer`. The wiki extracts to-   `/static/<page-type-plural>/<slug>/tsci-viewer/<label-slug>/` and-   auto-renders an iframe section on the page.-5. **Builds a separate source bundle** at-   `/tmp/<slug>-source.tar.gz` containing every file an agent would-   need to recreate the molecule:-   - `lib/` (recursive)-   - `package.json`-   - `tscircuit.config.json`-   - `tsconfig.json`-   - `walkthrough.json`-   - `.npmrc`-   - **`plan.md`** (or `PLAN.md`) — the design brief. Required by-     convention; see "plan.md" below.-   - `README.md` (if present)-   Excluded: `dist/` (build output) and `node_modules/` (deps).-   Uploaded as a `file` asset.-6. **Uploads `plan.md` standalone** as a separate `file` asset so the-   wiki can render a one-click link to it without untar.--Failures on steps 5 / 6 are non-fatal — the viewer publish in step 4-is the load-bearing one and lands first. If a transient wiki failure-blocks the source-bundle upload, the CLI emits a hint with the retry-command.--## Walkthrough autoplay--The static export of `shell.html` registers a small bootstrapper that-**fires `walkthroughStart()` ~2 s after the page loads**. This is on-by default for the wiki context — the walkthrough is the canonical-"tour the board" experience for an external viewer who isn't going-to know to click anything. It can be opted out with-`?autoplay=off` on the iframe URL if a future wiki template wants to-defer firing it.--The walkthrough is loaded from `walkthrough.json` in the bundle. If-the project has no `walkthrough.json`, the autoplay no-ops gracefully-(no walkthroughStart call until the array is populated). Generate-one with:+Not shipped: `board.glb` and every file the registry generates. The page's+model is the registry's build of `circuit.json`; the wiki's own 3D viewer+shows that.++A page folder holds one page: export-wiki refuses a folder whose+`package.json` names another slug.++### circuit.json and the model files it references++tscircuit's `circuit.json` names each part's 3D model in the+`model_*_url` fields of its `cad_component` elements. The molecule program+reads those during the build, and finds each one of two ways:++- **In the program's tscircuit ledger**: the six `@tsci/adom-inc.library`+  machine-pin and contact STEPs, and one EasyEDA model URL. These stay as+  tscircuit wrote them.+- **As a file in the page**, by its path relative to `circuit.json`.++Anything else (a `./libraries/...` path the page does not hold, a `file://`+GLB, any other URL) fails the build with `circuit-assets`. So export-wiki+copies every model the ledger does not hold into `libraries/<part>/<file>`+and rewrites that one field of the page's root `circuit.json` to the repo+path. It reads remote models over https, `file://` and absolute paths from+disk, and relative paths from the project root. Every other byte of+`circuit.json` stays as tscircuit wrote it; `viewer/circuit.json` is the+unmodified copy.++A reference that already is a clean `./libraries/<part>/<file>` path (the+layout of a tscircuit project with local models) keeps that path and is not+rewritten; the file just has to be in the page. For any other reference,+`<part>` is the model's file name without its extension; for a URL whose name+is in a query string, it is the part's manufacturer part number, or its+designator. A failed download or a missing file stops the run before+anything is written.++Designators stay as you named them (`MP1` to `MP4`, `MC1`, `MC2`, ...): the+build checks that every machine pin and contact the design declares comes out+as an attachment.++The ledger is pinned in the binary (`src/assets/tscircuit-ledger.json`, a+byte copy of the molecule/5 program's). A library release that changes those+assets needs a new program version and a new adom-tsci release.++## The three tscircuit-specific traps++Everything else in the sandbox is `wiki-readme-html`'s territory.++### 1. `viewer/3d.glb` stays Y-up, and is never the page's model++glTF is Y-up by spec and that is what tscircuit emits: `Box0` spans about+±0.7 in **Y**, which is the board thickness. The adom-tsci viewer rotates at+runtime (`zUp: true` + `applyGlbZUpTransform`), so `viewer/3d.glb` must stay+Y-up; rotate it and the viewer double-rotates.++The page's model is the registry's build, and the molecule program anchors+and orients it itself. There is no Z-up copy to make any more, so 1.6's+`board.glb` and `glb-make-zup.mjs` are out of the sequence. A `.glb` under+`viewer/` is an allowed file and never counts as the page's model.++### 2. The viewer bundle is 13 MB, and `render/` 413s over ~4 MB++`wiki-readme-html` gives you the document-level size budget. This is the+per-file one: any single file served through+`https://wiki.adom.inc/<owner>/<slug>/render/<path>` over roughly 4 MB returns+`{"error":"File too large to render"}`. A `<script src>` cannot surface that;+it just fails.++Ship `adom-3d-viewer.min.js` as 3.5 MB parts and reassemble client-side:++```bash+split -b 3500000 -d js/adom-3d-viewer.min.js js/adom-3d-viewer.min.js.part+cat js/adom-3d-viewer.min.js.part* | cmp - js/adom-3d-viewer.min.js   # always verify+```++Two rules in the loader:++- **Reassemble as BYTES, never text.** A multi-byte character can straddle a+  split boundary; decoding per part corrupts it. Concatenate `Uint8Array`s,+  then `new TextDecoder('utf-8').decode(all)` once.+- **Inject with `script.textContent`, not a blob URL.** `script-src` allows+  `'unsafe-inline'` but not `blob:`.++### 3. GLB textures must be `data:` URIs, and externalising them does not work++`wiki-readme-html` already says `blob:` images are blocked. The tscircuit-+specific sting: Babylon's glTF loader blobs every bufferView-backed image, and+this failure **throws** rather than degrading, killing the entire model load:++```+Unable to load from ./3d.glb: /textures/0: … blob:null/… - Fallback texture was used+```++The obvious fix (write the images out as sibling `.png` files and point the+GLB at them) **does not work either**, because Babylon still blobs a relative+URI in a null-origin document. `data:` URIs are the only accepted form.  ```bash-adom-tsci walkthrough-gen        # auto-generate from circuit.json+node scripts/glb-datauri-textures.mjs <in.glb> viewer/3d.glb ``` -…or hand-edit `walkthrough.json` directly. The `_meta` block has a-`do_not_edit_by_hand` field — set it to a plausible-looking string-(e.g. "Hand-edited intentionally") to keep `walkthrough-gen` from-overwriting your edits.+Costs about 8% file size, and the script prunes the vacated bufferViews while+remapping every accessor.++## One more: the page has both viewers++A hardware page renders the wiki's own 3D viewer, with the registry's model,+above your README. If your README's viewer iframe starts pulling 15 MB at the+same time, the native viewer's fetch is starved and it gives up with+*"Failed to load model — taking too long"*. The file is fine. Wait for `load`+plus ~2.5 s before arming the `IntersectionObserver` that loads your iframe. -## plan.md — the design brief+Prefer auto-load-on-scroll over a click-to-load poster: a poster cannot be+driven by a synthetic click from outside the sandboxed frame, so it is+untestable in a ralph loop, and a still with a button on it reads as broken to+anyone who does not realise it is a button. -**Every molecule publish should include `plan.md` at the project-root.** plan.md is the original prompt the project was authored from,-plus the refinements that came out during build. It carries forward-to the wiki so a future agent skimming the page can answer:+## Diagnosing a blank 3D tab -- What was the user actually asking for?-- What design decisions were made and why?-- What's intentionally out of scope?+If the viewer is blank, the storage shim from `wiki-readme-html` is missing or+ran late. Confirm that before chasing anything else: -If the project doesn't have a plan.md when you run `export-wiki`,-**create one before publishing**. Reconstruct it from the original-prompt + the design conversation; check it into the project root.-Skeleton:+```js+const s = viewer.getScene(), e = viewer.getEngine()+;({ lights: s.lights.map(l => l.name), env: !!s.environmentTexture,+    loops: e.activeRenderLoops.length, cam: String(viewer.getCamera()) })+// healthy: ["light","spotLight"], true, 1, "Name: adomCamera, type: ArcRotateCamera"+// broken:  [], false, 0, "null"+```++Two things about the broken state that waste hours if you do not know them:++- **`viewer.getCamera()` returning `null` silently kills the walkthrough.**+  `walkthroughFlyTo` opens with `if (!scene || !cam) return;`, so every camera+  fly bails on line 4 while the step counter and narration keep advancing. It+  presents as "the walkthrough animates nothing", which is a different bug+  than the one you actually have.+- **A `typeof window !== "undefined"` guard is not enough.** `window` exists in+  a sandboxed iframe; the *origin* is null, so the property read itself throws.+  The shipped bundle still has one unguarded read+  (`localStorage.getItem("adom_camera_mode")`) behind exactly that wrong guard.+  Tracked in [`adom/wiki#60`](https://wiki.adom.inc/adom/wiki/issues/60).++## Measurement traps++Both of these produce confident wrong conclusions about a viewer.++- **`engine.getFps()` lies.** It reports 60 while `scene.render()` has never+  been called once. Count real frames instead:+  ```js+  let n = 0; scene.onAfterRenderObservable.add(() => n++)+  await new Promise(r => setTimeout(r, 1200))   // n === 0 -> nothing is drawing+  ```+- **An occluded window has rAF at zero.** `setTimeout` keeps running, so a+  walkthrough advances its steps and narration while the camera sits perfectly+  still, which looks exactly like a broken tween. Check `document.hidden`+  before believing any animation measurement, and either foreground the window+  (`pup_raise_os_window`) or force frames with+  `for (let i = 0; i < 90; i++) scene.render()`.++## plan.md: the design brief++Every molecule page carries `plan.md`: the original prompt the project was+authored from, plus the refinements that came out during the build, so a+future agent can tell what was asked for, what was decided and why, and what+is out of scope. export-wiki copies the project's `plan.md` (or `PLAN.md`)+into the page and into the source bundle, and hints when there is none. If+the project has none, write one before publishing:  ```markdown-# Plan — <Project Name>+# Plan: <Project Name>  ## Original prompt--> <copy the user's first ask verbatim>+> <the user's first ask, verbatim>  ## Refinements during the build--- <each meaningful refinement, one bullet per>+- <one bullet per meaningful refinement>  ## Hardware decisions--- <each component choice with rationale>+- <each component choice with its reason>  ## Out of scope (deliberate)+- <what was not built, and why>+``` -- <what was explicitly NOT built and why>--## Build → publish workflow+## Publish sequence +```bash+bunx tsci build lib/index.tsx --glbs --svgs --3d-png --pcb-png+adom-tsci lint++# 1. Write the page folder and stage the viewer. Nothing is published.+adom-tsci export-wiki . --slug <slug> --org <owner> --no-upload++# 2. The viewer, README.html and the hero (by hand; later runs leave them alone).+mkdir -p wiki-page/viewer && cp -r /tmp/adom-tsci-export-<slug>/* wiki-page/viewer/+node scripts/glb-datauri-textures.mjs <rebake.glb> wiki-page/viewer/3d.glb+split -b 3500000 -d wiki-page/viewer/js/adom-3d-viewer.min.js \+                    wiki-page/viewer/js/adom-3d-viewer.min.js.part+#  + the storage shim and the part-loader patch in viewer/index.html+#  + README.html per wiki-readme-html+#  + docs/hero.png: a 16:10 PNG at least 1600 px wide (Hero Studio for a molecule)+#  + review package.json: title, description, tags++# 3. Publish: private first, wait for the model build, hero, then public.+adom-tsci export-wiki . --slug <slug> --org <owner> ``` -(See `adom-tsci-projects/Brianna-LED-Nameplate/plan.md` for a full-example.)+After a board change, rebuild, copy the staged bundle into `viewer/` again+(step 2), and publish with a higher version: `--page-version <x.y.z>`, which+export-wiki writes into the page's `package.json`. `--org` is saved there+too, so later runs need only `--slug`.++What step 3 prints, and what to do: -The CLI uploads `plan.md` standalone (one-click link on the page)-AND inside the source bundle (preserved alongside the rest of the-project source).+| Result | What it means | Next |+|---|---|---|+| `OK: <owner>/<slug> is public` | the build passed, the page serves its model, the hero is set | verify (below) |+| `stays private until it has a hero` | the build passed; there is no `docs/hero.png` | add it and run step 3 again |+| `the model build N ... failed` | the program refused the sources; the page stays private (or keeps its old model) | `adom-wiki model report <owner>/<slug> N`; fix, then step 3 with a higher `--page-version` |+| `still running after 10 minutes` | the release landed; the build is queued or running | `adom-wiki model wait <owner>/<slug>`, then step 3 again (an unchanged release queues no new build) |+| `does not build models for ...` (`MODEL_REGISTRY_OFF`) | the release landed private, but this wiki's registry does not build the page | stop; ask the wiki owner. Never add a GLB to route around it |+| `must ship a 3D source file` | the wiki takes no `circuit.json` as a model source for this page | as above |+| `is taken on ...` (`VERSION_EXISTS`) | that version is already published | step 3 with a higher `--page-version` |+| `3D only (metadataComplete false ...)` | the page has a model but no footprint or symbol JSON | read the warnings: `adom-wiki model report <owner>/<slug> N` | -## The body markdown — comprehensive, AI-readable+A refusal is never routed around: when the wiki refuses named paths, remove+those files from the page folder and publish again. -The wiki page's `content` field — the markdown body — must give a-downstream agent everything they'd need to continue work without-reading external docs. **The CLI does not write the body for you;-you produce it via `adom-wiki page edit --field content` (or as part-of `page publish`).** Required sections:+## Verify on a cold profile, from the wiki -| Section | What it captures |-|---|---|-| **Brief** (above the fold) | One-line elevator pitch. Same as the page brief. |-| **Live 3D viewer** | Pointer to the iframe, mention `?autoplay=off` opt-out. |-| **How it works** | The circuit story: what each block does, key constants, font/layout source. |-| **Hardware summary** table | Block / Part / JLCPCB / Notes for every refdes family. |-| **Mechanical** | Board dims, USB-C edge, workcell-pin info, silkscreen choices. |-| **Source layout** | The project's directory tree with one-line per file. |-| **Build commands** | The exact bash to clone → install → build → preview → publish. |-| **Color options / variants** (if applicable) | What's parameterised and how to retune. |-| **Known issues / lessons learned** | Things that bit during the build, in case they come up again. |-| **Build provenance** | Author, tooling versions, walkthrough authorship. |-| **Files attached** | Two sub-lists: **Source — recreate the molecule** (plan.md, source bundle) and **Build outputs** (GLB, SVGs, demo video). |--**Rule:** if a future agent has to ask the human user any factual-question about the project that they could have answered by reading-this page, the body is incomplete. Treat it as a writeup, not a-README stub.--## Hero image--`adom-wiki page publish` requires `--hero-image <path>` (the wiki-enforces it for non-app pages). The hero image is **the thumbnail**-that shows up on the molecule index page — heavy interactive viewers-can't be embedded in index lists, so a static iso render is the-right artifact for that role.--For an adom-tsci-published molecule:--- The **index/listing page** uses the `--hero-image` PNG as the-  thumbnail.-- The **full molecule page** has the interactive `tsci-viewer`-  iframe as its hero (rendered automatically by the wiki when a-  `tsci_viewer` asset is present).--Take the hero image with `adom-cli hydrogen screenshot panel---tab-id <brianna-tab>` after setting the camera to `iso` view and-hiding the components HUD. ~1500 px wide is plenty.--## Verifying the publish--After `export-wiki` returns `OK: published …`, open the molecule URL-in a browser:+Not your dev server, and not a browser that may have cached a working bundle. -```-https://wiki-ufypy5dpx93o.adom.cloud/molecules/<slug>+```bash+adom-wiki model status <owner>/<slug>+adom-bridge --ai-thread "<thread>" pup_open_window \+  '{"sessionId":"verify","profile":"verify","freshProfile":true,+    "url":"https://wiki.adom.inc/<owner>/<slug>/render/viewer/index.html"}' ``` -Confirm visually:+- [ ] `model status`: the newest build passed, and the `model` slot has+      origin `pipeline` from that build+- [ ] the wiki's native 3D viewer shows the registry's model, flat and readable+- [ ] `lights` is `["light","spotLight"]`, not `[]`, and not a fallback you added+- [ ] `env: true`: the IBL loaded, so it looks like the local webview+- [ ] `activeRenderLoops.length === 1` (2 means something raced the bundle)+- [ ] walkthrough camera radius CHANGES between steps+- [ ] PCB / Schematic / Parts tabs render+- [ ] every `render/` asset returns 200 to an unauthenticated `curl`+- [ ] no `localhost` / `/proxy/` / `.adom.cloud` in README.html: a published+      page must outlive the container that built it++## Known limitations, do not chase these++- **`MP1` to `MP4` stack at the schematic origin and `lint` fails on it.**+  `<Molecule>` renders `jsx(MachinePin, {type, name, pcbX, pcbY})`, and+  `MachinePinOrContact` in `@tsci/adom-inc.library` destructures only+  `{portHints, pcbX, pcbY, name}`, dropping schematic coordinates. No caller+  can fix it, including a hand-rolled `<board>`.+- **`schX`/`schY` is all-or-nothing.** Placing *some* parts disables+  auto-layout for the rest and stacks them at the origin.+- **`GET viewer/runframe/` 404s** on every load: the "tsci live" tab only+  exists against a dev server.+- **`--texture-resolution N` silently falls back** to the 1024 GLB with a hint+  about `rebake-glb.mjs`. The 4096 rebakes are already in+  `~/.cache/adom-tsci/rebakes/`; the keys are content hashes, so match one to+  your board with `scripts/glb-inspect.mjs`. It changes only the viewer's GLB.+- **A `board.glb` already on a page stays there.** 1.7.0 does not publish one+  and refuses a page folder that still holds one; the copy on the wiki never+  counts as the model. Remove it from the page repo yourself if you want it+  gone.++## Helper scripts++These live in the adom-tsci page repo under `scripts/`. `adom-tsci install`+deploys `SKILL.md` and the guides but **not** these yet, so fetch them: -1. **Walkthrough auto-plays** within ~2 s of page load. Step text-   appears at the bottom of the iframe with Back/Next controls.-2. **3D scene is rendered** — the board (not the loading screen) is-   visible.-3. **Source bundle download works** — click the `*-source.tar.gz`-   link in the body, untar, confirm `lib/index.tsx` and `plan.md`-   are present.-4. **plan.md link works** — opens directly without untar.+```bash+for f in glb-datauri-textures glb-inspect; do+  curl -fsSL "https://wiki.adom.inc/adom/adom-tsci/render/scripts/$f.mjs" -o "scripts/$f.mjs"+done+``` -If the walkthrough doesn't fire, check the iframe URL has no-`?autoplay=off`, and that `walkthrough.json` was non-empty in the-bundle (`tar -tzf <bundle>.tar.gz | grep walkthrough`).+| script | what it does |+|---|---|+| `glb-datauri-textures.mjs` | embedded images → `data:` URIs, prunes vacated bufferViews, remaps accessors |+| `glb-inspect.mjs` | node/LED counts, board extents, J1 placement, for matching a cache rebake to your board | -## Troubleshooting+## Worked example -| Symptom | Cause | Fix |-|---|---|---|-| `dist/lib/index/circuit.json not found` | No build artifacts | Pass `--rebuild` or run `bunx tsci build` first |-| `--texture-resolution N` warns "no rebake-glb.mjs in cache" | First-time use without prior `adom-tsci start` | Run `adom-tsci start .` once to populate the cache, then re-export |-| `bundle is over 95 MB` warning | Big GLB (very high texture res) or many extra files | Drop `--texture-resolution` to 4096 or 2048 |-| `adom-wiki upload failed: page-type mismatch` | Slug exists at a different page-type | Either pass the matching `--page-type`, OR delete the existing page first (`adom-wiki page delete <type>/<slug>`) |-| Source-bundle upload fails but viewer publish succeeds | Transient wiki error | Re-run `adom-wiki asset upload <page>/<slug> --asset-type file --file /tmp/<slug>-source.tar.gz` manually — the CLI prints this hint |-| Walkthrough doesn't auto-play on the wiki page | walkthrough.json missing or empty | Run `adom-tsci walkthrough-gen` in the project, hand-edit if needed, re-export |--## See also--- `adom-tsci/guides/demo-recording.md` — making a 30-second narrated-  demo video to attach to the page (separate workflow; the live-  viewer is now the primary artifact, demo video is supplementary).-- `adom-tsci/guides/adom-usbc.md` — USB-C placement rules for the-  molecule before you publish.-- `adom-wiki` skill — the underlying CLI for asset uploads and page-  edits.+[`adom/evan-led-nameplate`](https://wiki.adom.inc/adom/evan-led-nameplate)+exercises the viewer items on this page. It was published with 1.6's flow, so+it still carries `board.glb`.
install.sh+1−1
@@ -9,7 +9,7 @@ set -euo pipefail  HERE="$(cd "$(dirname "$0")" && pwd)" VERSION="$(tr -d '[:space:]' < "$HERE/VERSION")"-BIN_URL="https://wiki.adom.inc/download/adom/adom-tsci/$VERSION/adom-tsci"+BIN_URL="https://wiki.adom.inc/download/adom/adom-tsci/$VERSION/adom-tsci-linux-x64-$VERSION" DEST="$HOME/.local/bin/adom-tsci"  mkdir -p "$HOME/.local/bin"
package.json+22−1
@@ -1,9 +1,30 @@ {   "slug": "adom-tsci",-  "version": "1.6.0",+  "version": "1.7.0",   "type": "app",   "description": "Interactive tscircuit board viewer in a Hydrogen webview \u2014 first-class 3D / PCB / Schematic tabs, an Inspect tool, a Fusion-style Measure tool, net x-ray, guided Walkthrough demos, one-click autorouter re-run, and auto high-res board-surface texture. Fully AI-drivable (CLI + HTTP + JS eval). Also publishes molecules/boards to the Adom Wiki.",   "dependencies": {},+  "discovery_triggers": [+    "view my tscircuit board",+    "inspect a PCB in 3D",+    "measure my circuit board",+    "publish a tscircuit molecule"+  ],+  "discovery_pitch": "Inspect, measure, and demonstrate a tscircuit board in a Hydrogen webview, then publish its sources to the Adom wiki.",+  "sample_prompts": [+    {+      "label": "Inspect a board",+      "prompt": "Open my tscircuit board and show me its 3D, PCB, and schematic views"+    },+    {+      "label": "Measure a board",+      "prompt": "Measure the distance between these two components on my board"+    },+    {+      "label": "Publish a molecule",+      "prompt": "Publish this tscircuit board as a molecule on the Adom wiki"+    }+  ],   "tags": [     "tscircuit",     "pcb",