skill
Adom Wiki Skill Pack
Public Made by Adomby adom
The Adom Wiki Skill Pack : one main skill plus the focused sub-skills that teach the AI to publish to wiki.adom.inc without breaking pages, name the wiki repo archetypes (Page, Skillpack, Family), and publish rich component pages (chips, molecules, boards). The wiki is six tools in one: git, package manager, releases, discussions, pull requests, and discovery. One package manager install drops the whole set onto your container. Includes reviewed Z-up component artwork, surface-selected MPN marki
← Commit history
Publish 0.4.0
4 files changed
+354−323
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "adom-wiki-skillpack",- "version": "0.3.1",+ "version": "0.4.0", "type": "skill", "description": "The Adom Wiki Skill Pack — one main skill plus 14 focused sub-skills that teach the AI to publish to wiki.adom.inc without breaking pages, name the wiki repo archetypes (Page, Skillpack, Family), and publish rich component pages (chips, molecules, boards). The wiki is six tools in one: git, adompkg, releases, discussions, pull requests, and discovery. One adompkg install drops the whole set onto your container.", "discovery_triggers": [
page.json+82−41@@ -1,46 +1,87 @@ {- "type": "skill", "slug": "adom-wiki-skillpack",- "title": "Adom Wiki Skill Pack",- "brief": "How to use the Adom Wiki without breaking pages — the wiki is six tools in one (git, adompkg, releases, discussions, PRs, discovery), and three repo archetypes have emerged from real use: Page, Skillpack, and Family. Plus how to publish rich component pages (chips, molecules, boards). One install, 15 skills, plus a write-up of the design patterns for the people who build the wiki.",- "hero": {- "type": "image",- "path": "screenshots/hero.png"+ "version": "0.4.0",+ "type": "skill",+ "description": "The Adom Wiki Skill Pack — one main skill plus 14 focused sub-skills that teach the AI to publish to wiki.adom.inc without breaking pages, name the wiki repo archetypes (Page, Skillpack, Family), and publish rich component pages (chips, molecules, boards). The wiki is six tools in one: git, adompkg, releases, discussions, pull requests, and discovery. One adompkg install drops the whole set onto your container.",+ "discovery_triggers": [+ "publish to the wiki",+ "the wiki",+ "adompkg publish",+ "what kind of wiki repo",+ "wiki repo archetype",+ "publish a chip",+ "chip component page",+ "component readme",+ "molecule page",+ "tape and reel",+ "pin 1 orientation",+ "skillpack",+ "super skill",+ "wiki family repo",+ "parent child wiki",+ "how to make a wiki readme",+ "wiki page presentation",+ "hero in readme",+ "hero shows twice",+ "duplicate hero",+ "don't repeat the hero",+ "hero unlinked",+ "hero disappeared",+ "name a child page",+ "family child title",+ "private source public app",+ "proprietary wiki page",+ "wiki breadcrumb",+ "fork a wiki page",+ "wiki discovery",+ "page not surfacing",+ "discover endpoint",+ "wiki scoring",+ "wiki trending"+ ],+ "dependencies": {+ "john/adom-wiki-hero-image": "^0.2.1" },- "visibility": {- "public": true+ "files": [+ "SKILL.md",+ "README.md",+ "page.json",+ "install.sh",+ "uninstall.sh",+ "screenshots/hero.png",+ "screenshots/archetypes.png",+ "skills/wiki-anatomy/SKILL.md",+ "skills/wiki-api/SKILL.md",+ "skills/wiki-publish-safely/SKILL.md",+ "skills/wiki-readme/SKILL.md",+ "skills/wiki-visibility/SKILL.md",+ "skills/wiki-repo-styles/SKILL.md",+ "skills/wiki-component/SKILL.md",+ "skills/wiki-family/SKILL.md",+ "skills/wiki-skillpack/SKILL.md",+ "skills/wiki-hero/SKILL.md",+ "skills/wiki-breadcrumbs/SKILL.md",+ "skills/wiki-forking/SKILL.md",+ "skills/wiki-discovery/SKILL.md",+ "skills/wiki-scoring/SKILL.md"+ ],+ "scripts": {+ "install": "./install.sh",+ "uninstall": "./uninstall.sh" },- "metadata": {- "tags": [- "wiki",- "adompkg",- "publishing",- "skillpack",- "guidelines",- "documentation",- "repo-archetypes",- "open-source",- "mit"- ],- "discovery_triggers": [- "publish to the wiki",- "the wiki",- "adompkg publish",- "what kind of wiki repo",- "wiki repo archetype",- "skillpack",- "super skill",- "wiki family repo",- "parent child wiki",- "wiki readme",- "hero disappeared",- "hero unlinked",- "private source public app",- "proprietary wiki page",- "wiki breadcrumb",- "fork a wiki page",- "wiki scoring",- "wiki trending"- ]+ "tags": [+ "wiki",+ "adompkg",+ "publishing",+ "skillpack",+ "guidelines",+ "documentation",+ "repo-archetypes",+ "open-source",+ "mit"+ ],+ "author": {+ "name": "John Lauer",+ "email": "[email protected]" }-}+}
skills/wiki-component/SKILL.md+240−269@@ -3,16 +3,18 @@ name: wiki-component description: >- How to publish a "component" page to the Adom Wiki — a single chip, a molecule, or a PCB that isn't a molecule. `component` is a real wiki page TYPE (peer to- app/skill). Centerpiece is the CHIP page: a mini-datasheet-plus-CAD-hub with a- serious tabbed/accordion readme.html (Overview, Symbol, Footprint, 3D, Pin- mapping, Specifications, Sourcing, CAD downloads, Variants, Related), sourced- from Adom's own tools (chip-fetcher, ds2sf, adom-symbol/footprint/lbr, chipfit,- step2glb, chip-thumbnailer). Read this when publishing a chip/molecule/board, or- designing a component README. Trigger words: publish a component, component page,- chip page, chip wiki page, publish a chip, component readme, chip readme,- symbol footprint 3d page, datasheet page, molecule page, pcb component, tape and- reel, pin 1 orientation, pick and place orientation, kicad altium orcad fusion- library, parametric specs page, mouser digikey price stock, cad downloads tabs.+ app/skill) with NATIVE rendering: set a `component` block in page.json + push the+ CAD files and the wiki auto-renders interactive symbol + footprint + 3D viewers,+ a downloads grid, and a datasheet section. The chip page is the rich case: a+ mini-datasheet-plus-CAD-hub built from Adom's own tools (chip-fetcher, ds2sf,+ adom-symbol/footprint/lbr, step2glb, chipfit, chip-thumbnailer), with PROVENANCE+ on every datapoint and an Open-in toolbar. Read before publishing any+ chip/molecule/board. Trigger words: publish a component, component page, chip+ page, publish a chip, component readme, symbol footprint 3d page, datasheet page,+ molecule page, pcb component, tape and reel, pin 1 orientation, pick and place,+ kicad altium orcad fusion library, parametric specs, mouser digikey price stock,+ provenance, prove the data, datasheet page citation, embed symbol footprint+ viewer, open chip in tool. --- Parent skill: **adom-wiki-skillpack**@@ -20,294 +22,263 @@ Parent skill: **adom-wiki-skillpack** # Publishing a component (chip / molecule / PCB) `component` is a first-class **wiki page type** (alongside `app` and `skill` — see-**wiki-api**). Structurally a component is usually the **Page** archetype, and chip-families use the **Family** archetype (see **wiki-repo-styles**): e.g. an-`stm32f4` anchor with `stm32f405`, `stm32f407` … children.+**wiki-api**). Structurally a component is usually the **Page** archetype; chip+families use the **Family** archetype (see **wiki-repo-styles**), e.g. an `stm32f4`+anchor with `stm32f405` / `stm32f407` children. -Three kinds of component, by what they are:+Three kinds, by what they are: 1. **Chip** — a single part / IC (MCU, MOSFET, sensor, passive, connector). The- richest case; most of this skill is about it.-2. **Molecule** — a reusable sub-circuit / breakout published via `adom-molecule`- (a GLB + KiCad PCB + schematic + symbol/footprint JSON).-3. **PCB (non-molecule)** — a finished board that isn't meant to be dropped into- other designs as a part (a full product PCB, a dev board).+ rich case; most of this skill.+2. **Molecule** — a reusable sub-circuit / breakout published via `adom-molecule`.+3. **PCB (non-molecule)** — a finished board not meant to be reused as a part.++> **Read [adom-ui-design](https://wiki.adom.inc/john/adom-ui-design) BEFORE you build+> the page UI.** A component page is a real Adom interface and must obey it:+> canonical color tokens, brand fonts (Familjen Grotesk / Satoshi / JetBrains Mono,+> never the system stack), **monochrome line-icon SVGs — NO emoji, anywhere**, **no+> em-dashes or en-dashes**, a 44px three-zone header, body-appended tooltips, 8/12/999+> radii. Lint with `adom-ui-linter`. This was learned the hard way: an emoji- and+> em-dash-ridden page reads as AI slop and engineers stop trusting it. --- -# The CHIP component page (the big one)+# How the page actually renders: two layers -A chip page is a **mini datasheet + CAD hub + sourcing desk** in one. It is far too-much for a flat README — use a **tabbed / accordion `readme.html`** (see *Layout*-below). The canonical tab set:+There are two very different rendering paths. Know which you're using. -> **Overview · Symbol · Footprint · 3D Model · Pin Mapping · Specifications ·-> Sourcing · CAD Downloads · Variants · Related**+## Layer A — the wiki's NATIVE component rendering (the working path today) -## 0. Source every artifact from Adom's tools (don't hand-make these)+This is what you get for free, and it is good. Set a **`component` block in+page.json** and push the CAD files; the wiki auto-renders: -| Artifact on the page | Tool | Command → output |-|---|---|---|-| STEP + KiCad sym/mod + Altium IntLib + Fusion .lbr + datasheet PDF + stock | **chip-fetcher** | `chip-fetcher fetch <MPN>` → `library/<MPN>/` (`.step`, `.kicad_sym`, `.kicad_mod`, `.IntLib`, `*-fusion.lbr`, `.pdf`, `stock.json`, `info.json`) |-| Pin list w/ descriptions + symbol/footprint extraction + **per-pin datasheet page citations** | **ds2sf** | `ds2sf extract <chip-dir>` → `*-symbol.extracted.json`, `*-footprint.extracted.json`, `*-extraction.provenance.json` |-| Datasheet → wiki markdown + cropped diagram PNGs | **process-datasheets** / datasheet-parser | `*-wiki-markdown.md`, `*-diagrams/*.png`, `*-metadata.json` |-| Clean schematic symbol (+ interactive SymView) | **adom-symbol** | `.kicad_sym`, `-metadata.json` (pin + group descriptions), `.svg`, `-viewer.html` (SymView) |-| Footprint (+ FpView w/ layer toggle + solder-paste micro-dot preview) | **adom-footprint** | `.kicad_mod`, `-metadata.json`, `.svg`, `-fpview.html` |-| Fusion/EAGLE library | **adom-lbr** | `adom-lbr generate --sym <f>.kicad_sym` → `.lbr` |-| 3D: STEP → web GLB | **step2glb** | `step2glb convert <f>.step` → `.glb` (+ stats JSON) |-| Pin-1 alignment + seat-plane check + **pin-1-baked GLB** + composite | **adom-chipfit** | `adom-chipfit bake --footprint <f>.kicad_mod --glb <f>.glb` → `*-3d-pin1.glb`, `*-chipfit-composite.glb` |-| Symbol/footprint SVGs + 3D iso PNGs (160/320/800) + manifest | **chip-thumbnailer** | `chip-thumbnailer once <MPN>` → `*-symbol.svg`, `*-footprint.svg`, `*-3d-iso{,-sm,-lg}.png`, `*-thumbs.json` |--Push all the **source files** to the git repo (so the Files tab is a real CAD-library) and the **thumbnails/SVGs/GLB** for the README to render against. Follow-the publish workflow + the hero rule in **wiki-api** / **wiki-publish-safely** /-**wiki-hero**.--## 1. The tabs, and what goes in each--**Overview** — MPN, manufacturer, one-line description, **lifecycle badge**-(Active / NRND / Obsolete / Last-Time-Buy), package, pin count, operating voltage,-datasheet link. A 3D iso thumbnail (`*-3d-iso.png`). (The page *header* hero shows-separately — never re-embed it, see **wiki-hero**.)--**Symbol** — the symbol SVG (`*-symbol.svg`, dark Adom theme) inline; pin/group-overview; a **deep link** to the interactive SymView for tooltips/zoom. Note which-tool/standard generated it.--**Footprint / Land Pattern** — the footprint SVG (`*-footprint.svg`) inline, with:-- the **pin-1 marker** clearly shown (square pad / silk dot — see *Pin-1* below);-- a **solder-paste aperture preview** — the paste layer rendered as apertures /- micro-dot fill, with **leaded vs lead-free** options, so the community can flag- where the default paste pattern risks **solder bridging** or starved joints (use- the page's **Discussions** for this feedback loop);-- courtyard + IPC land-pattern reference.--**3D Model** — a web preview of the **GLB** (the pin-1-baked GLB from chipfit is-ideal); the **chipfit validation** snapshot (pin-1 pad, seat-plane Δz, size-match);-STEP + WRL downloads. The 3D model's pin-1 corner MUST agree with the footprint and-the placement zero orientation (see *Pin-1*).--**Pin Mapping** — the **pin list with descriptions** (from ds2sf / adom-symbol-`-metadata.json`: per-pin function + alt-functions, grouped by POWER/IO/…), and the-symbol-pin ↔ footprint-pad correspondence. Cite the **datasheet page** per pin where-available (ds2sf provenance).--**Specifications** — **class-aware** parametric set; render the field block that-fits the part:-- **MCU**: core, core size (8/16/32-bit), max clock, flash, RAM, GPIO count,- peripherals (UART/SPI/I²C/ADC/PWM/DMA/timers), connectivity, V-supply, temp,- package.-- **MOSFET**: channel (N/P), Vds, Id (@Ta), Rds(on) max (@Id,Vgs), Vgs(th),- gate charge Qg, Ciss, power dissipation, package.-- **Passive (R/L/C)**: value, tolerance, V-rated, power/current, dielectric/temp-co- (C0G/X7R…), EIA size (0402/0603/0805…), temp.-- **Op-amp / analog**: channels, GBW, slew rate, Vos, Ib, V-supply (single/±),- output type (RRO), temp.--**Sourcing** — price-break table (qty 1/10/100/1k…), stock/availability, lifecycle,-**RoHS / lead-free**, **MSL** (moisture sensitivity level 1–6 + floor life),-**tape & reel** (see below), and **buy links to Mouser and DigiKey** (one each).-Pull live numbers from `stock.json` (chip-fetcher) where present, and date them.--**CAD Downloads** — a **per-tool row** so any EDA user is covered:-| Tool | Files |-|---|---|-| KiCad | `.kicad_sym` + `.pretty/.kicad_mod` + STEP + WRL |-| Fusion 360 / EAGLE | `.lbr` (symbol+package+device) + STEP |-| Altium | `.IntLib` (compiled from `.SchLib` + `.PcbLib`, 3D body embedded) |-| OrCAD / Allegro | Capture `.olb` + `.dra`/`.psm` + `.pad` padstack |-| Universal | **STEP** (.step) + **GLB** (web/3D) + datasheet PDF |--**Variants** — symbol variants, footprint variants (e.g. nominal vs hand-solder-vs paste-tuned), and **3D / package variants** (same die, different package), each-with its own download. Disambiguate by body size where packages collide.--**Related** — links to **molecules that use this chip** (query `adom-molecules`),-**family** siblings (other packages/speed grades — the Family anchor; see-**wiki-family**), and alternates / second sources.--## 2. Tape & reel + pick-and-place orientation (don't skip)--- **Packaging**: Cut Tape (CT), Tape & Reel (T&R), Tube, Tray, Bulk; state the- **reel quantity** and that custom-cut reels exist (Digi-Reel / MouseReel).-- **EIA-481 carrier tape**: pocket position is referenced to the **sprocket holes**- (feed pitch 4.0 mm), not the tape edge. Convention puts **pin 1 in Quadrant 1- (top-left)** with sprocket holes along the top, feeding from the right — **but the- authoritative orientation is the manufacturer's tape-and-reel drawing**, never an- assumption. Show the orientation so P&P programmers get rotation right.-- **MSL**: 1 (unlimited) → 6 (bake-before-use); state floor life so assemblers- handle reflow correctly.--## 3. Pin-1 orientation — the rule that makes placement correct--The footprint pin-1, the 3D model pin-1 corner, and the placement **zero-orientation** must all agree, or the part lands rotated 90°/180° even though every-file "looks right."--- **IPC-7351 zero orientation**: ICs → **pin 1 top-left**; two-terminal polarized- parts → **pin 1 (+) on the LEFT** at 0°; positive rotation = CCW. ⚠️ **IEC 61188-7- uses pin-1 bottom-left** — call out which convention a library follows.-- **Markers**: SOIC dot/notch; QFP/QFN chamfer/dot; BGA = A1 corner; footprint- pin-1 = **square pad** + silk dot. Polarity gotcha: SMD **tantalum** stripe = **+**,- SMD **aluminum electrolytic** stripe = **−**.-- **adom-chipfit** validates this (pin-1 pad vs baked pin-1 dot, seat-plane Δz) and- bakes a pin-1-marked GLB — use its output and show its verdict on the 3D tab.--## 4. Layout — a tabbed / accordion `readme.html`--This much content needs structure, not a wall of markdown. Use a **custom-`readme.html`** (see **wiki-readme**) with **CSS-only tabs (`:checked` radios)** or-**`<details>` accordions** — both work **without JavaScript**, which matters because-the readme.html sandbox is restrictive. Skeleton (accordion form, no JS, dark/brand):--```html-<style>- .c-tab{border:1px solid #20303a;border-radius:10px;margin:10px 0;background:#0e141c}- .c-tab>summary{cursor:pointer;padding:14px 16px;font-weight:700;color:#e6edf3;list-style:none}- .c-tab[open]>summary{border-bottom:1px solid #20303a;color:#00e6dc}- .c-body{padding:14px 16px;color:#aeb8c4}- .badge{display:inline-block;padding:2px 10px;border-radius:999px;border:1px solid #2b6;color:#7fe3dd;font-size:12px}- table{width:100%;border-collapse:collapse} td,th{border-top:1px solid #1d2832;padding:6px 8px;text-align:left}-</style>-<h1>RP2040 <span class="badge">Active</span></h1>-<p>Raspberry Pi · dual-core Cortex-M0+ · QFN-56 7×7mm · <a href="...">datasheet</a></p>--<details class="c-tab" open><summary>Overview</summary><div class="c-body">- <img src="/blob/component/rp2040/screenshots/rp2040-3d-iso.png" width="320">- …quick specs…-</div></details>--<details class="c-tab"><summary>Symbol</summary><div class="c-body">- <img src="/blob/component/rp2040/rp2040-symbol.svg" width="100%">- <p><a href="…SymView…">Open interactive symbol viewer →</a></p>-</div></details>--<details class="c-tab"><summary>Footprint & solder paste</summary><div class="c-body">- <img src="/blob/component/rp2040/rp2040-footprint.svg" width="100%">- <p>Pin-1 = square pad (top-left). Paste: <b>lead-free micro-dot</b> default —- report bridging in <a href="…discussions…">Discussions</a>.</p>-</div></details>--<details class="c-tab"><summary>3D model</summary><div class="c-body">- <img src="/blob/component/rp2040/rp2040-3d-iso-lg.png" width="100%">- <p>chipfit: pin-1 ✓, seat-plane Δz ≈ 0. <a href="…">STEP</a> · <a href="…">GLB</a> · <a href="…">WRL</a></p>-</div></details>--<!-- Pin Mapping · Specifications · Sourcing · CAD Downloads · Variants · Related: same pattern -->+- an **interactive 3D viewer** (Babylon) from the `.glb`,+- an **interactive schematic-symbol viewer** (SymView) from the `.kicad_sym`,+- an **interactive footprint viewer** (FpView, with layer toggles incl. solder+ blobs) from the `.kicad_mod`,+- a **datasheet** section, and a **CAD downloads grid** (typed icons per file).++These are served at `https://wiki.adom.inc/viewer/{3d,symbol,footprint}/component/<slug>`+and are genuinely interactive (drag, zoom, layer toggle). They embed anywhere+(the wiki dropped `frame-ancestors`), so you can `<iframe>` them into a custom page.++The `component` block:++```json+"component": {+ "mpn": "nRF52840-CKAA", // REQUIRED — POST /pages rejects a component without it+ "manufacturer": "Nordic Semiconductor",+ "package": "aQFN-73 (7x7x0.85 mm, 0.5 mm pitch)",+ "pin_count": 73,+ "category": "Microcontroller",+ "subcategory": "Wireless MCU / Bluetooth LE SoC",+ "body_size": { "x_mm": 7.0, "y_mm": 7.0, "z_mm": 0.85, "pitch_mm": 0.5 },+ "parts": { "symbol": "x.kicad_sym", "footprint": "x.kicad_mod",+ "model_3d": "x.glb", "step": "x.step", "datasheet": "docs/x.pdf" },+ "distributor_links": { "mouser": "...", "digikey": "...", "jlcpcb": "..." }+} ``` -Use `<img>` of the **static** SVG/PNG thumbnails (they render in the README) and a-**deep link** to the live interactive viewer for each.+Parts auto-detect by extension if you omit `parts` (first `.kicad_sym`/`.kicad_mod`/+`.glb`/`.step`/`.pdf` in the tree), but **declare them** so the right datasheet PDF+wins over the RoHS cert, etc.++## Layer B — the README / custom HTML (heavily constrained)++The Overview README is rendered through `marked` + **`sanitize-html` with a strict+allowlist**. It **strips `<style>`, `<script>`, `<details>`, `<iframe>`, and even+`style=` attributes.** So you **cannot** build a tabbed/accordion/toolbar custom+layout in the README — inline styles vanish, accordions collapse to nothing, scripts+never run. (Confirmed live: a hand-built toolbar rendered as plain text links.)+README HTML that survives: `h1-6, p, a, ul/ol/li, blockquote, pre, code, em, strong,+table/tr/th/td, span, div, img`, with `class` on a few. Use the README for prose ++images + tables that complement the native viewers — not for a custom app shell.++**To get the full custom layout** (tabs, accordions, panels, the Open-in toolbar,+provenance lightbox) you have two options:+1. **Prototype it as a standalone page in the container** (the dogfic path today):+ one self-contained HTML file, **base64-inline the fonts + images**, inline CSS ++ JS, embed the live `/viewer/...` iframes, then serve it with+ `python3 -m http.server <port>` and hand the user the proxy URL+ `https://<slug>.adom.cloud/proxy/<port>/`. This is how you show the design and+ iterate before the platform can host it.+2. **The platform build ask** (below): a custom-HTML page mode so the repo's+ `readme.html` renders as the page body in a sandboxed iframe (`srcdoc`,+ `allow-scripts`, assets served with real content-types) instead of sanitized+ markdown. Until that ships, the live page = native rendering (Layer A) + a README;+ the full custom design = the standalone prototype.++---++# The CHIP component page -### Live-embedded editors — the goal vs. today+A mini datasheet + CAD hub + sourcing desk. Canonical sections (tabs in the custom+layout; stacked panels + native viewers on the live page):++> **Overview · Symbol · Footprint · 3D · Pin map · Specifications · Sourcing ·+> Tape & reel · Manufacturer & resources · Variants · Related · Provenance · Open in**++## 0. Source every artifact from Adom's tools, and USE them (don't fake it)++Never ship a static screenshot where a live viewer belongs. Generate real artifacts+and **embed the live interactive viewers**.++| Artifact / capability | Tool | Command → output (verified) |+|---|---|---|+| STEP + KiCad sym/mod + Altium IntLib + Fusion .lbr + datasheet + stock | **chip-fetcher** | `chip-fetcher fetch <MPN>` → `library/<MPN>/` (⚠ may save a *product brief*, not the full datasheet — verify it has the pinout, see Provenance) |+| Pin descriptions + symbol/footprint extraction + **per-pin datasheet page citations** | **ds2sf** | `ds2sf extract <chip-dir> --pdf <full-datasheet.pdf>` → `*-symbol.extracted.json`, `*-footprint.extracted.json`, `*-provenance.json`. **Refuses a PDF with no pinout** (won't fabricate). |+| Interactive **SymView** | **adom-symbol** (service :8781 / wiki) | wiki route `/viewer/symbol/component/<slug>` (embed). CLI `adom-symbol render --file x.kicad_sym --out x.svg` for a static SVG. |+| Interactive **FpView** (layer toggles + solder blobs) | **adom-footprint** (service :8782 / wiki) | wiki route `/viewer/footprint/component/<slug>` (embed). CLI `render` for SVG. |+| Fusion/EAGLE **.lbr** generated on the fly | **adom-lbr** | `adom-lbr generate --sym x.kicad_sym -o x.lbr` (works standalone; lints) |+| STEP → web **GLB** | **step2glb** | `step2glb convert x.step -o x.glb` |+| pin-1 + seat-plane validation + pin-1-baked GLB | **adom-chipfit** | `adom-chipfit check --footprint x.kicad_mod --glb x.glb` |+| symbol/footprint SVGs + 3D iso PNGs + manifest | **chip-thumbnailer** | `chip-thumbnailer once <MPN>` |++> The standalone CLI `preview` (interactive viewer HTML) needs service assets and+> may fail on a bare container; the **services and the wiki** generate the live+> viewers. Easiest path: publish the page (Layer A) so the wiki hosts the viewers,+> then `<iframe>` `/viewer/{symbol,footprint,3d}/component/<slug>?embed=1` into your+> custom layout. That is "embed adom-symbol / adom-footprint live."++## 1. What goes in each section++- **Overview** — MPN, manufacturer, one-liner, lifecycle badge (Active / NRND /+ Obsolete), package, pin count, voltage, datasheet link. (Hero shows in the page+ header — never re-embed it, **wiki-hero**.)+- **Symbol** — embed the live SymView iframe. (Static SVG fallback below it.)+- **Footprint** — embed the live FpView iframe; the solder/paste layer is a real+ toggle there. Note pin-1 = square pad, top-left. Leaded vs lead-free + bridging+ feedback via Discussions.+- **3D** — embed the live Babylon viewer; show the chipfit verdict (pin-1, seat Δz).+- **Pin map** — pin list with descriptions (ds2sf per-pin, grouped POWER/IO/…) and+ symbol-pin ↔ pad map. **Cite the datasheet page per pin** (Provenance).+- **Specifications** — **class-aware** (render the block that fits): MCU (core,+ clock, flash, RAM, GPIO, peripherals, V, temp); MOSFET (channel, Vds, Id, Rds(on),+ Vgs(th), Qg, Ciss, Pd); passive (value, tol, V, dielectric/temp-co, EIA size);+ op-amp (channels, GBW, slew, Vos, Ib, V±).+- **Sourcing** — price-break table, stock, lifecycle, RoHS, MSL (1–6 + floor life),+ Mouser + DigiKey buy links. Date every snapshot.+- **Tape & reel** — packaging (CT/T&R/tube/tray), reel qty, MSL, EIA-481 pin-1+ quadrant. Authoritative orientation = the manufacturer's tape-and-reel drawing.+- **Manufacturer & resources** — the mfr product page + **every** supplemental doc+ (datasheet, errata, PCN, RoHS cert, app notes, reference designs, SDK, dev kits,+ CAD source). Don't just link the datasheet.+- **Variants** — symbol/footprint/3D/package variants, each with downloads.+- **Related** — molecules using this chip, family siblings (Family anchor), alternates.+- **CAD downloads** — per-tool: KiCad (`.kicad_sym`+`.kicad_mod`+STEP+WRL), Fusion/+ EAGLE (`.lbr`), Altium (`.IntLib`), OrCAD (`.olb`+`.dra`/`.psm`/`.pad`), universal+ STEP + GLB. (The native grid renders this automatically.)+- **Provenance** — see its own section below. Mandatory.+- **Open in** — see its own section below.++## 2. Pin-1 / pick-and-place orientation++The footprint pin-1, the 3D pin-1 corner, and the placement **zero orientation**+must agree or the part lands rotated 90/180°. IPC-7351: ICs pin-1 **top-left**;+polarized two-terminal pin-1 (+) **left**; positive rotation CCW. ⚠ IEC 61188-7 uses+**bottom-left** — call out which a library follows. Markers: SOIC dot/notch, QFP/QFN+chamfer, BGA A1 corner, footprint pin-1 = square pad. Polarity gotcha: SMD tantalum+stripe = +, SMD aluminum electrolytic stripe = −. Validate with **adom-chipfit**.++## 3. Tape & reel++Packaging (CT/T&R/tube/tray + custom Digi-Reel/MouseReel), reel qty, EIA-481 carrier+(pocket referenced to sprocket holes, 4.0 mm feed pitch; pin-1 conventionally+Quadrant 1), MSL 1→6. Defer to the mfr tape-and-reel drawing for orientation.++--- -The aspiration is to **embed adom-symbol / adom-footprint / adom-lbr live** in the-page so a user can tweak the symbol/footprint or generate a library on the fly.-**This does not work in the readme.html sandbox today**: the sandbox CSP is-`connect-src 'none'` and `/blob` serves assets as `application/octet-stream` +-`nosniff`, so an embedded viewer can't `fetch()` its model/data and an `<iframe>`-of a repo `.html` force-downloads on mobile. **So today: ship static SVG/PNG/GLB-previews inline + deep-link the interactive tools** (SymView `:8781`, FpView-`:8782`, `adom-step`, `adom-chipfit`). Track the live-embed as a platform ask-(below); revisit when the sandbox allows same-origin fetch / proper content-types.+# Provenance — prove every datapoint++**Engineers don't trust AI yet, so prove the backing data.** Every datapoint on the+page must trace to a source, and the strongest claims must show the evidence.++- **Cite a source for everything**: identity/specs → datasheet page; price/stock →+ distributor + date; CAD → the source (e.g. Ultra Librarian deeplink); 3D → the+ STEP + the converter + the STEP sha256 (`features.json`); RoHS → the certificate.+- **For datasheet-derived data (ds2sf): show the PDF page number AND a cropped image+ of that page.** Render page crops with `pdftoppm`/ImageMagick/`gs` (all present in+ the container); `ds2sf` emits `*-provenance.json` with per-pin page citations, and+ `datasheet-parser` produces cropped diagram PNGs.+- **A Provenance section/tab is mandatory**: a table (Data → Source → Reference+ (page/version/date) → Evidence), with the cropped source-page images shown inline+ and click-to-enlarge (a simple lightbox), plus inline "Source: …" citations on the+ Specs and Pin-map sections.+- **ds2sf refusing a brief is the feature, not a bug.** It will not invent pin data+ from a PDF that lacks the pinout. ⚠ **chip-fetcher sometimes saves a 2-page product+ brief instead of the full Product Specification** (seen on nRF52840-CKAA — both+ "datasheet" files were the same 2-page brief). Always verify the datasheet has the+ pinout before relying on it; if ds2sf refuses, fetch the full datasheet (mfr site /+ desktop browser) and re-run. --- # The "Open in…" toolbar -A chip page should let the user *act* on the part — open it in a tool or on their-desktop — not just read it. The targets and how each is reached:+Let the user *act* on the part, not just read it. -| Target | Reached by | Auto-open from a web page today? |+| Target | Reached by | One-click from a web page today? | |---|---|---|-| 3D / Symbol / Footprint **viewer** | the wiki's own `/viewer/{3d,symbol,footprint}/component/<slug>` routes | ✅ yes — plain links, work in any browser/Hydrogen/pup |-| Download CAD (`.kicad_sym/.kicad_mod/.step/.glb/.IntLib/.lbr`) | `/blob/component/<slug>/<file>` | ✅ yes — `<a download>` links |-| Buy (Mouser / DigiKey) | `distributor_links` URLs | ✅ yes |-| **adom-symbol / adom-footprint / adom-lbr / adom-step / adom-chipfit / adom-chipsmith / chip-fetcher** (container tools) | container CLI / services (`:8781`, `:8782`, `:8851`, `:8894`) | ❌ no page→container bridge — **paste-to-Claude prompt** |-| **KiCad / Fusion 360 on the desktop** | `adom-desktop kicad_open_* / fusion_open_*` | ❌ no page→desktop bridge — **paste-to-Claude prompt** |-| **Altium / OrCAD on the desktop** | — | ❌ no adom-desktop verb exists — download the file + open manually |-| Send library → Downloads + open folder | `adom-desktop send_files` + reveal-folder | ❌ paste-to-Claude prompt |--### Why most targets use a paste-to-Claude prompt today--A wiki page is server-rendered HTML and **cannot run JS** (the README sanitizes-`<script>`), and **there is no page→adom-desktop bridge** (no injected-`window.adomDesktop`, no `adom://` scheme, no local endpoint the page may call).-So the only universal trigger is: render a one-line **Claude Code prompt** the user-pastes ("open the <MPN> symbol in adom-symbol"). It works from every context. Ship-the direct links as real buttons; ship the rest as copyable prompts.--### Three contexts (and why they'd differ if a bridge existed)--- **Hydrogen webview** — the page is inside HD; the *richest* potential target- (HD could open adom-symbol in its own webview tab). Detect via an HD-injected- global (doesn't exist yet).-- **Native browser** — laptop; best target is "open in KiCad/Fusion on the- desktop" via adom-desktop, or download.-- **pup** — a controlled Chrome; same as native but adom-desktop is already attached.--Runtime detection of which context the page is in **does not exist yet** (no-injected marker), so today the prompt is context-agnostic and Claude figures out-the right path. The clean long-term home for this is a **native wiki "Open in…"-toolbar for component pages** (server-rendered, like the viewer sections), wired to-an adom-desktop page-bridge — not hand-rolled JS per README.--### 📋 TODO — make the toolbar one-click (for the adom-desktop + wiki teams)--- **A page→desktop bridge**: an injected `window.adomDesktop` (in HD webview + pup)- and/or a localhost endpoint / `adom://` scheme a wiki page may call, so a button- can trigger `kicad_open_*` / `fusion_open_*` / `send_files` directly.-- **Runtime context detection** the page can read (HD webview vs native vs pup).-- **`adom-desktop` capability + endpoint enumeration** surfaced to the page, incl.- **which desktop apps are installed** (KiCad/Fusion/Altium present?), so the- toolbar only shows viable targets and routes to the best one (e.g. HD instance- running → open adom-symbol in HD's webview).-- **A reveal-folder verb** so "send to Downloads + open the folder" is one click.-- **Altium / OrCAD desktop open verbs** in adom-desktop (none today).-- **A native wiki "Open in…" toolbar** component for `type:component` pages- (server-rendered), so every chip page gets it without per-page HTML.+| 3D / Symbol / Footprint viewer | wiki `/viewer/{3d,symbol,footprint}/component/<slug>` | ✅ links / embeds, any context |+| Download CAD | `/blob/component/<slug>/<file>` | ✅ `<a download>` |+| Buy (Mouser / DigiKey) | `distributor_links` | ✅ |+| adom-symbol / footprint / lbr / step / chipfit / chipsmith / chip-fetcher / service-kicad | container CLI / services | ❌ no page→container bridge → **paste-to-Claude prompt** |+| KiCad / Fusion on desktop | `adom-desktop kicad_open_* / fusion_open_*` | ❌ no page→desktop bridge → **paste-to-Claude prompt** |+| Altium / OrCAD on desktop | — | ❌ no adom-desktop verb → download + open manually |+| Send library → Downloads + open folder | `adom-desktop send_files` + reveal | ❌ paste-to-Claude prompt |+| "Component Ocean" | — | not an Adom tool (a distributor); no open verb |++Why prompts: a wiki page can't run JS (README sanitized) and there's no page→desktop+bridge. So the live `/viewer/...` routes are real link/embed buttons; everything else+copies a one-line Claude prompt (works in any context). Context (HD webview / native+/ pup) can't be detected at runtime yet, so the prompt is context-agnostic. --- -# Molecule component pages+# Molecule pages -A molecule is published via **adom-molecule** (`create --source kicad|fusion …`),-producing a GLB + KiCad PCB + schematic + symbol/footprint JSON, addressed by SKU-`owner/name/version`. The page should show: the 3D GLB preview, the schematic,-the **pin map** (`adom-pin-mapping` → `MoleculePinMapping.md`: IC pin → net → silk-label → alt-functions), the BOM, and **Related** (the chips it's built from — link-back to their chip component pages, and they link forward to it).+Published via **adom-molecule** (GLB + KiCad PCB + schematic + symbol/footprint JSON,+SKU `owner/name/version`). Show: 3D GLB, schematic, the pin map (`adom-pin-mapping` →+`MoleculePinMapping.md`), BOM, and Related (the chips it's built from, two-way links). -# PCB (non-molecule) component pages+# PCB (non-molecule) pages -A finished board not meant to be reused as a part. Lighter than a chip: Overview +-3D/photos + schematic/board downloads + BOM + assembly notes (tape&reel of its-parts is the assembler's concern, not the board's). Use the Page archetype.+A finished board, not reused as a part. Overview + 3D/photos + schematic/board+downloads + BOM + assembly notes. Page archetype. --- # Publishing -Publish as **`type: "component"`** via the standard flow (**wiki-api**): create the-page, push all source files (text plain, binaries base64, UA header), `adompkg-publish`, then push a **complete `page.json` LAST** (hero linked — **wiki-hero**),-and **verify in pup** (**wiki-publish-safely**). For chip families, follow the-Family naming/title rules (**wiki-family**).--## 📋 TODO — what component pages still need (for Colby)--- **Live-embeddable editors in readme.html**: allow same-origin `fetch()` (loosen- the readme CSP) and serve repo assets with real content-types (not octet-stream- + nosniff) so adom-symbol / adom-footprint / a GLB viewer can run *inside* the- page — the on-the-fly tweak/generate experience. (Same gap logged for the- interactive-readme feature.)-- **A `component` page sub-type / template** so the wiki knows a page is a chip vs- molecule vs board and can render the right tab scaffold + class-aware spec fields.-- **Per-class spec schema** (MCU/MOSFET/passive/op-amp) the page can fill from a- structured source instead of hand-tables.-- **Live price/stock** widgets (Mouser/DigiKey) rather than dated `stock.json`- snapshots.-- **A "molecules using this chip" backlink index** so Related populates itself.--> ⏳ Update this skill's "today" constraints once the readme sandbox + content-types-> are fixed and component sub-types ship. Re-verify before claiming live embeds work.+1. `page.json` with the **`component` block** (`mpn` required) + hero + tags ++ `discovery_triggers`.+2. Create the page: `POST /api/v1/pages` with `type:"component"` **and `component.mpn`+ in the body** (it's rejected otherwise).+3. Push all files (text plain, binaries base64, `User-Agent` header) in **<4MB+ batches** — GLB/STEP/PDF are big and a too-large batch returns **413**. Push a+ **complete `page.json` LAST** so the hero/title stay linked (**wiki-hero**,+ **wiki-publish-safely**). (No `adompkg publish` tarball is needed for a component.)+4. **Verify in pup**, and check `/viewer/...` routes return interactive content.+5. For chip families, apply the Family naming/title rules (**wiki-family**).++## 📋 Platform TODO (for Colby / adom-desktop) — fold these into build asks++- **Custom-HTML page mode**: render a repo `readme.html` as the page body in a+ sandboxed iframe (`srcdoc`, `allow-scripts`, sibling assets served with real+ content-types, not octet-stream) **instead of** sanitized markdown — so the full+ tabbed/accordion/toolbar/provenance layout becomes the real page.+- **Editable embedded viewers**: let the embedded SymView/FpView tweak + regenerate+ in place (needs same-origin fetch in the page sandbox).+- **page→desktop bridge** (`window.adomDesktop` / `adom://` / local endpoint) ++ **runtime context detection** + **adom-desktop endpoint & installed-app+ enumeration** + a **reveal-folder** verb + **Altium/OrCAD open verbs**, to make the+ Open-in toolbar one-click.+- **Live price/stock** widgets (vs dated `stock.json`); **leaded/lead-free paste+ switch + bridging heatmap** in FpView; **auto "molecules using this chip" backlink+ index**; a **per-class spec schema** the page fills structurally.+- **chip-fetcher**: don't save a product brief as the datasheet — verify the PDF has+ the pinout (so ds2sf can extract).++> ⏳ This skill records the live constraints as of its writing (README is sanitized;+> no page→desktop bridge; standalone-preview is the way to show a custom layout).+> Re-verify and update when the custom-HTML page mode + bridge ship.
skills/wiki-readme/SKILL.md+31−12@@ -21,22 +21,41 @@ Parent skill: **adom-wiki-skillpack** # How to make a README (the presentation layer) On the Adom Wiki the **README is the page** — the Overview tab is the first thing-a human sees, and it's what sells the page in search and on cards. The renderer-(`marked`) passes HTML through, so you can go from a plain doc to a fully-designed page.+a human sees, and it's what sells the page in search and on cards. It is rendered+from `README.md` through `marked` **then sanitized**, so what you can build is+limited (below). -## Two modes+## What HTML survives (the sanitizer reality — verified in the wiki source) -- **`README.md`** — plain Markdown. The default; right for most pages. You can- still embed raw HTML (iframes, video, styled divs) inline.-- **`readme.html`** — a fully custom HTML document, when you want complete control- over layout, embeds, and styling (landing-page-grade pages). Use when Markdown- can't express the design you want; otherwise prefer `README.md` for- maintainability.+The rendered README is run through `sanitize-html` with a **strict allowlist**. It+**strips `<style>`, `<script>`, `<details>`/`<summary>`, `<iframe>`, and even+`style=` attributes.** Surviving tags: `h1-6, p, a, ul/ol/li, blockquote, pre,+code, em, strong, del, ins, sub, sup, kbd, hr, br, img, table/thead/tbody/tr/th/td,+span, div, input` (task lists), with `class` on a few and `href/src/alt/width/+height/align`. **Consequence: you cannot build a tabbed / accordion / toolbar+"custom HTML layout" in the README** — inline styles vanish, `<details>` collapse,+scripts never run. (Confirmed live: a hand-styled toolbar rendered as plain links.)++So the README is for **prose + images + tables**. For anything richer:+- **Component pages** get rich interactive UI from the wiki's **native rendering**+ (symbol/footprint/3D viewers, downloads grid) — see **wiki-component**, not the README.+- A **fully custom HTML layout** (the "readme.html" dream) is **not a live feature+ today** — it needs the platform's custom-HTML-page mode (sandboxed `srcdoc`+ iframe). Until then, prototype custom layouts as a **standalone served page in the+ container** (`python3 -m http.server` + the proxy URL), base64-inlining fonts/+ images. See **wiki-component** for the pattern. There is also a **private readme** for pages whose git source is private but whose-releases are public — so the public still gets docs without seeing the source.-That's a visibility concern → see **wiki-visibility**.+releases are public — see **wiki-visibility**.++## Provenance: cite your sources (engineers don't trust AI yet)++Every non-obvious claim on a page should name where it came from: a datasheet page,+a distributor + date, a manufacturer URL, the tool + input hash that produced an+artifact. For datasheet-derived data, show the **page number and a cropped image of+that page**. This is mandatory on component/chip pages (full pattern + tooling in+**wiki-component**), and good practice everywhere — provenance is what turns "the AI+said so" into "here's the page it's on." ## ⛔ THE #1 README RULE: NEVER embed the hero image in the README body