by adom
Create a wiki component page the RIGHT way. Pages are keyed manufacturer-mpn and scoped to ONE DATASHEET, so a datasheet covering six voltages and three packages is ONE page covering all of them, never six pages. Two manufacturers publishing the same MPN are two pages, because their limits genuinely differ. Renders through a hand-built readme.html on the Adom theme tokens with a fixed ten-section shape (identity, at a glance, specifications, symbol+footprint viewers, pin map, variants, assets, i
← Commit history
Publish 2.0.0
10 files changed
+1071−103
README.md+24−3@@ -1,9 +1,30 @@ # adom-component-page -Create a wiki component page and link it into a library the right way.+Create a wiki component page the right way. -**The one rule: a wiki component page is keyed by the manufacturer part number (MPN), never by the local KiCad symbol or value name.** A symbol called `C_100nF_0402` (LCSC `C1525`) is the page `cl05b104ko5nnnc`, not `c-100nf-0402`. The MPN is the one identity everyone shares, so pages dedup and libraries resolve to the same part.+## The three rules -This skill covers: resolving an LCSC/JLC code to its MPN, checking for an existing page before creating a duplicate, building the page from KiCad source (symbol + footprint + 3D), publishing it, linking it into a `<Name> Library`, and correcting a page that was published under the wrong name.+1. **Slug is `<manufacturer>-<mpn>`.** `ams-ams1117`, `umw-ams1117`, `microchip-lan7800`. A bare MPN cannot express the case where one part number has two manufacturers, two datasheets and two sets of limits.+2. **One page per datasheet.** The datasheet draws the family boundary. A datasheet covering six voltages and three packages is one page covering all of them, never six pages. Two manufacturers with two datasheets for the same MPN are two pages.+3. **`readme.html` is the page.** Hand-built, on the Adom theme tokens, following a fixed ten-section shape. `README.md` is shadowed by it.++## What is in here++| Path | What |+|---|---|+| `SKILL.md` | The procedure: boundary decision, slug and title, dedup, CAD, the section shape, placeholders, publishing, deprecating, libraries |+| `templates/readme.html` | The section skeleton with the Adom studio-dark tokens |+| `templates/page.json` | Manifest skeleton with the component block |+| `scripts/inject_layers.py` | Fills the fab, silk and courtyard groups that `adom-footprint` 1.0.20 leaves empty, so component outlines are visible |+| `scripts/build_switcher.py` | Wraps N footprint embeds into one package switcher |+| `reference/worked-example.md` | The AMS1117 build end to end, every command in order, including the two places it went wrong first |++## Anything missing gets a placeholder, not silence++If a file or a fact is not available, the page says so and invites a pull request. A missing row reads as "this part has no Altium library". A placeholder reads as "nobody has contributed one yet", which is true and actionable.++## Reference pages++[adom/ams-ams1117](https://wiki.adom.inc/adom/ams-ams1117) and [adom/microchip-lan7800](https://wiki.adom.inc/adom/lan7800) are the standard. Open one before you build. See `SKILL.md` for the full procedure.
SKILL.md+258−49@@ -1,98 +1,307 @@ --- name: adom-component-page-description: Create a wiki component page and link it into a library the RIGHT way. Wiki component pages are keyed by the manufacturer part number (MPN), never by the local KiCad symbol/value name. Use when publishing a part to the Adom wiki, adding a component to a board or circuit library, resolving an LCSC/JLC code to an MPN, deduping against an existing page, or correcting a component page that was published under the wrong name. Trigger words: make a component page, publish this part, add component to library, wiki component by MPN, link component to library, LCSC to MPN, fix component page name, component keyed by MPN.+description: Create a wiki component page the RIGHT way. Pages are keyed manufacturer-mpn and scoped to ONE DATASHEET, so a datasheet covering six voltages and three packages is ONE page covering all of them, never six pages. Renders through a hand-built readme.html on the Adom theme tokens, with the LAN7800 / AMS1117 section shape. Anything not available yet gets a "not available, open a pull request" placeholder rather than being silently dropped. Use when publishing a part to the Adom wiki, adding a component to a board or circuit library, deciding whether a variant deserves its own page, resolving an LCSC/JLC code to an MPN, deduping against an existing page, or correcting a page published under the wrong name. Trigger words: make a component page, publish this part, component page for, add component to library, wiki component by MPN, component family page, which variants go on one page, LCSC to MPN, fix component page name, split a component page by manufacturer. metadata: type: skill --- -# Making and linking wiki component pages (keyed by MPN)+# Making wiki component pages -## The one rule+## The three rules -**A wiki component page is keyed by the part's manufacturer part number (MPN). Never by the local KiCad symbol name or value.**+1. **Slug is `<manufacturer>-<mpn>`.** `ams-ams1117`, `umw-ams1117`, `microchip-lan7800`.+2. **One page per DATASHEET.** The datasheet draws the family boundary. Every variant inside it belongs on that one page. Two manufacturers with two datasheets for the same MPN are two pages.+3. **`readme.html` is the page.** Hand-built, on the Adom theme tokens, following the section shape in §5. `README.md` is shadowed by it and exists only as a text fallback. -A KiCad symbol called `C_100nF_0402` with LCSC `C1525` becomes the page `cl05b104ko5nnnc` (its Samsung MPN). It does NOT become `c-100nf-0402` or `c-100nf-0402-c1525`.+Reference pages that are the standard, both worth opening before you build:+[adom/microchip-lan7800](https://wiki.adom.inc/adom/lan7800) and+[adom/ams-ams1117](https://wiki.adom.inc/adom/ams-ams1117). -Why: every user names parts differently in their own library, but the MPN is the one identity everyone shares. Keying on the MPN is what lets pages dedup, and lets a board or circuit library resolve to the same component everyone else uses. Keying on a local symbol name creates a private duplicate that no one else's design will ever match.+Companion skills: **wiki-component** (the page TYPE and its native viewers),+**adom-theme** (the colour tokens, load it, do not guess hexes),+**adom-hardware-component-publish** (hero images, 3D composites, the push loop). -## Step 1: resolve the MPN+---++## 1. Decide the page boundary BEFORE anything else++This is the step people get wrong, and it is expensive to undo. Ask one question:++> **Which datasheet describes this part?**++That datasheet is the page. Everything it covers goes on that page.++| The datasheet covers | You create |+|---|---|+| Six fixed voltages and three packages | **One** page with all six and all three |+| Two temperature grades and two package codes | **One** page, grades and codes in the variants section |+| One part only | One page |+| The same MPN, but a different manufacturer published it | **A second page.** Different silicon, different limits. |++### Do NOT create a per-variant page++`ams1117-3-3` and `ams1117-1-2` were separate pages before this rule existed. Both were wrong: one datasheet covers the whole voltage range, so one page should have. Splitting a datasheet family into per-variant pages means the electrical tables get copied N times, drift N ways, and no page has the full ordering picture.++Before creating anything, check whether the part is a variant of a family you should be adding to instead:++- Read the datasheet's ordering-information table. If your MPN is one row of it, the page is the whole table.+- Search the wiki for the base part, not just your exact MPN (§3).+- If a family page exists, **add the variant to it and stop.** Do not create a sibling.++### DO split when the manufacturers differ -- An IC's KiCad **Value** is usually already the MPN (for example `MP2393GTL-Z`). Use it directly.-- A passive is named by its value (`C_100nF_0402`, `R_40.2K_0603`) and carries an LCSC/JLC code in its `LCSC PN` or `LCSC` symbol property. Resolve the code to an MPN:+The counter-case is real. `AMS1117` is second-sourced: Advanced Monolithic Systems carries 2.85 V and not 1.2 V, UMW carries 1.2 V and not 2.85 V, and they differ on input maximum (15 V vs 18 V), current limit (0.9 to 1.5 A vs 2.1 to 2.5 A) and thermal shutdown (165 vs 150 C). One page could not hold both without a vendor caveat on every number, which is exactly what gets misread. Two datasheets, two pages, each pure, each linking to the other. - ```- GET https://easyeda.com/api/products/<LCSC>/components- -> result.dataStr.head.c_para["Manufacturer Part"]- ```+The tell: if you find yourself writing "(AMS)" and "(UMW)" after individual numbers, you needed two pages. - Example: `C1525` resolves to `CL05B104KO5NNNC`, `C12447` to `0603WAF4022T5E`.+---++## 2. Slug and title++**Slug** is `<manufacturer>-<mpn>`, lowercased, every run of non-alphanumeric characters collapsed to a single `-`: -- The **slug** is the MPN lowercased with every run of non-alphanumeric characters turned into a single `-`: `cl05b104ko5nnnc`, `mp2393gtl-z`, `0603waf4022t5e`, `744314490`.+| Manufacturer | MPN | Slug |+|---|---|---|+| Advanced Monolithic Systems | AMS1117 | `ams-ams1117` |+| UMW (Youtai Semiconductor) | AMS1117 | `umw-ams1117` |+| Microchip Technology | LAN7800 | `microchip-lan7800` |+| Samsung | CL05B104KO5NNNC | `samsung-cl05b104ko5nnnc` | -## Step 2: check for an existing page FIRST (dedup)+Use the manufacturer's common short name, not its legal name: `ti`, `st`, `nxp`, `microchip`, `samsung`, `yageo`, `bosch`, `ams`, `umw`. The registry lowercases slugs on publish, so capitalisation in `page.json` is not preserved. -A page may already exist under any owner. Before you create anything:+Why the manufacturer prefix: a bare MPN cannot express the AMS1117 case, where one part number has two manufacturers, two datasheets and two sets of limits. Prefixing makes the collision impossible and makes the owner of the numbers obvious in the URL. +**Title** is `<what it is> <MFR> - <MPN>`, function first so the wiki grid is readable:++```+1 A Low-Dropout Regulator AMS - AMS1117+1 A Low-Dropout Regulator UMW - AMS1117+SuperSpeed USB 3.1 to Gigabit Ethernet Controller Microchip - LAN7800 ```-curl -s -o /dev/null -w "%{http_code}" https://wiki.adom.inc/api/pages/adom/<mpn-slug> # 200 = exists++Keep the function phrase short enough to scan. It is what tells a reader what the chip does before they click.++---++## 3. Dedup pre-flight (always, before creating)++A page may already exist under any owner, under the new convention or the legacy bare-MPN one.++```sh+MPN=ams1117; MFR=ams+adom-wiki discover search --query "$MPN" # any owner, any slug shape+curl -s -o /dev/null -w "%{http_code}\n" \+ https://wiki.adom.inc/api/pages/adom/$MFR-$MPN # 200 = new-convention page exists+curl -s -o /dev/null -w "%{http_code}\n" \+ https://wiki.adom.inc/api/pages/adom/$MPN # 200 = legacy bare-MPN page exists ``` -Also search, in case it lives under another owner:+Also search the **base part**, not just your variant: searching `ams1117` finds `ams1117-3-3`, which tells you a family page is what you need.++Outcomes:++- **A correct family page exists** -> add your variant to it, republish, stop.+- **A legacy bare-MPN page exists** -> see §8.+- **Per-variant pages exist** -> build the family page, then deprecate them (§8).+- **Nothing exists** -> continue.++`chip-fetcher` and `chip-fetcher-lite` are wiki-first, so they are the fastest way to find an existing page. Ask the user which to use (see the routing note in memory) before running the heavy one.++---++## 4. Build the CAD++Do not hand-author geometry you can pull from a real library.++**Footprints and 3D, in preference order:**++1. **KiCad's own official library on the user's machine.** This is the best source: real land patterns, matching STEP, clean provenance. Via adom-desktop:++ ```sh+ adom-desktop --ai-thread "<thread>" desktop_list_files \+ '{"path":"C:\\Program Files\\KiCad\\10.0\\share\\kicad\\footprints\\Package_TO_SOT_SMD.pretty","glob":"SOT-223*"}'+ adom-desktop --ai-thread "<thread>" pull_file \+ '{"filePaths":["...\\SOT-223-3_TabPin2.kicad_mod","...\\3dmodels\\Package_TO_SOT_SMD.3dshapes\\SOT-223.step"],"destDir":"/tmp"}'+ ```++ Pick the land pattern that matches the **datasheet's pin function**, not just the package name. The AMS1117 tab is VOUT, which is pin 2, so `SOT-223-3_TabPin2` is correct and plain `SOT-223` is not. Getting this wrong leaves the tab (the heat path) floating.++2. The part's own vendor CAD (chip-fetcher).+3. Generated from the datasheet drawing, last resort, and say so in provenance.++**Renaming a pulled footprint means changing BOTH:** ```-GET https://wiki.adom.inc/api/v1/pages?q=<MPN>+(footprint "AMS1117_SOT-223" <- the node name+(property "Value" "AMS1117_SOT-223" <- the wiki's native viewer displays THIS ``` -Match a result whose slug normalizes to `<mpn-slug>`, or whose title starts with the MPN. The `chip-fetcher` and `chip-fetcher-lite` tools are wiki-first and MPN-keyed, so they are the fastest way to find an existing page.+Renaming only the first leaves the old library name showing on the page.++**Symbol:** `adom-symbol create` from a JSON of `{symbolName, manufacturer, package, description, datasheetUrl, designatorPrefix, footprint, pins:[{number,name,type,side}]}`. `side` accepts `left`/`right`/`bottom`. Unknown fields are silently ignored, so you cannot discover the schema by probing errors.++**Canonical JSON and viewers:**++```sh+step2glb convert part.step --out part.glb+adom-lbr import-kicad --sym part.kicad_sym --fp part.kicad_mod --mpn "<MPN>" --out part.adom-lbr.json+adom-symbol embed --file part.kicad_sym --out viewer-symbol.html+adom-footprint embed --file part.kicad_mod --out /tmp/raw.html+python3 scripts/inject_layers.py /tmp/raw.html part.kicad_mod fp-<pkg>.html # see below+python3 scripts/build_switcher.py <dir> <vendor> viewer-footprints.html # multi-package+```++> **`adom-footprint` 1.0.20 ships the fab, silk and courtyard layer groups EMPTY** (both `embed` and `render`), so the component outline is invisible and you get floating pads with no body. `scripts/inject_layers.py` parses the `.kicad_mod` graphics and fills them, and widens the viewBox (which is computed from copper only, so courtyards clip). Tracked as adom/adom-footprint#2. Drop the workaround once that lands.++**Do NOT ship generated Fusion `.lbr` or Altium `.IntLib`/`.SchLib`/`.PcbLib`.** They are generated rather than hand-verified and the Altium symbol encoder has produced wrong geometry before. Ship the placeholder from §6 instead. Generated-but-unchecked CAD on a public page is worse than a gap, because a reader assumes it was verified.++--- -**If a page already exists, do not create a duplicate.** Link the existing page (owner-qualified) into the library, and stop.+## 5. Build `readme.html` -## Step 3: create the page (only when none exists)+Start from `templates/readme.html`. It carries the Adom **studio-dark** tokens and the full section skeleton. -Build it from the KiCad source:+### Section order (the LAN7800 / AMS1117 shape) -- **Symbol**: take the `lib_symbols` entry the placed symbol references, wrap it in `(kicad_symbol_lib (version ...) (generator "adom") <symbol> )`, and write `<MPN>.kicad_sym`.-- **Footprint**: take the placed `(footprint "Lib:Name" ...)` node from the `.kicad_pcb`, strip its top-level `(at ...)` placement and each pad's `(net ...)`, and write `<MPN>.kicad_mod`.-- **3D model** (required): the footprint references a model with `(model "...step")`, often via `${KICAD9_3DMODEL_DIR}`. Resolve the path, pull the STEP, and convert it: `step2glb convert <part>.step -o <slug>.glb`. Component pages hard-require a 3D source, enforced by the server even with `--skip-lint`.-- **package.json**: `type: "component"`, `slug: "<mpn-slug>"`, `component.mpn: "<MPN>"`, plus `component.lcsc`, `component.category` (Resistors / Capacitors / Inductors / ICs / ...), `component.parts.model_3d`, and a `hero` (a rasterized footprint SVG works as the hero image).+| # | Section | Contents |+|---|---|---|+| 1 | Identity header | `<h1>` MPN, manufacturer, gradient badge, one-paragraph summary, meta chips (package / pins / key ratings) |+| 2 | At a glance | Six stat cards, the numbers someone picks the part on |+| 3 | Specifications | Label to value rows, every headline electrical figure |+| 4 | Symbol and footprint | Two iframes: `viewer-symbol.html`, and `viewer-footprints.html` with a package switcher when there is more than one package |+| 5 | Pin map | Every pin, grouped by function into coloured cards |+| 6 | Component variants | Order-code decoder plus a card per package, and a table of every orderable variant |+| 7 | Assets | CAD download table, with §6 placeholders for anything missing |+| 8 | Implementation | Boards on the wiki that use the part, and sibling pages |+| 9 | Datasheet | Embedded PDF iframe plus a download link |+| 10 | Provenance | The real source of every number and every file | -Publish and make it public:+Add sections when the part earns them (thermal-design tables, application notes, internal structure). Do not drop sections because the data was inconvenient to find: use a placeholder. +### Hard rules++- **Colours come from the `adom-theme` skill**, studio-dark column. Load it, do not guess. `--green` / `--red` / `--yellow` are SEMANTIC (success / destructive / warning) and must not be used as categorical colours. For a pin-map legend needing many hues, derive a ramp across the three non-semantic brand hues (teal `#00b8b1`, blue `#64abff`, purple `#8c6bf7`) plus neutrals.+- **Fonts**: Satoshi for prose, "JetBrains Mono" for code and part numbers.+- **No em-dashes, no en-dashes, no emoji.** House prose rule, and `adom-wiki pkg publish` lints for it. Run `prose-lint README.md`.+- **Every number is attributable.** If it is not in the datasheet, either cite where it came from in Provenance or leave it out.+- Keep the `postMessage` height-reporting script at the bottom of the template. The wiki sizes the readme iframe from it.++### Iframe URLs are absolute and contain the slug++```html+src="https://wiki.adom.inc/api/v1/pages/adom/<slug>/files/viewer-symbol.html"+```++Get the slug wrong here and the viewers are silently blank on the live page. Check them after publishing.++---++## 6. Placeholders: never silently drop something++If a file or a fact is not available yet, **say so on the page and invite a PR.** A missing row reads as "this part has no Altium library". A placeholder reads as "nobody has contributed one yet", which is true and actionable.++In the Assets table:++```html+<tr><td class=tool style="color:#484f58">Fusion 360 / EAGLE</td>+ <td class=na>Not available yet. <a href="https://wiki.adom.inc/adom/<slug>/pulls">Open a pull request</a> to add it.</td></tr> ```-adom-wiki pkg publish --org adom --skip-lint-adom-wiki page visibility adom/<mpn-slug> public++with++```css+.na{color:var(--text-3);font-style:italic} ``` -`--skip-lint` is needed for a bare component (no symbol-viewer video etc.), but the server still enforces the 3D source and a hero. The wiki rate-limits to **10 publishes per minute**, so batch in tens.+Same pattern for a package with no footprint, a variant with no verified limits, a missing datasheet. State what is missing, why if you know, and how to contribute it. Then say the same thing in Provenance, because that is where a careful reader checks.++---++## 7. Publish (both layers, in order) -## Step 4: link the page into a library+```sh+adom-wiki pkg publish --org adom --public --include-media # registry + first-publish hero+adom-wiki repo push adom/<slug> -m "<message>" --files page.json README.md readme.html <cad...> \+ viewer-symbol.html viewer-footprints.html docs/<datasheet>.pdf screenshots/hero.png+``` -The library is a page tagged `library` whose dependencies are the component pages, owner-qualified:+- `pkg publish` writes the **registry** layer (manifest, dependency graph, install payload). The dependency graph comes from here, never from a repo push.+- `repo push` writes the **page repo** (the Files tab, and what the page renders from).+- `--include-media` is only needed on a brand-new page's first publish, to materialise the hero. Drop it after, or the hero rides every install tarball.+- Rate limit is 10 publishes per minute.++Then **verify on the live page**, not just locally:++```sh+curl -s -o /dev/null -w "%{http_code}\n" https://wiki.adom.inc/api/v1/pages/adom/<slug>/files/readme.html+```++and screenshot it. A live page whose `srcdoc` iframes are large needs about 5 s after `networkidle2` before puppeteer paints them, so a blank capture is usually timing rather than a real fault. Compare live against local by **character** count, not bytes (multibyte glyphs like µ and Ω make byte counts differ on identical files).++---++## 8. Fixing a page that has the wrong shape++### A legacy bare-MPN page++Older pages are keyed on the bare MPN (`cl05b104ko5nnnc`). They are not broken and there are a lot of them. Do not mass-rename. When you touch one:++1. Create or update the `<mfr>-<mpn>` page.+2. Repoint any library or board dependency at the new slug and republish it (registry layer).+3. Deprecate the old page (below).++### Per-variant pages that should be one family++Build the family page, repoint dependents, then deprecate each variant page.++### Deprecating so the page LOOKS deprecated, not just so the registry knows++There is **no page-level deprecated field** in the API. A banner in the readme alone is invisible: it renders far below the fold and the header looks like any live page. The visible signal is a convention. Do all of it:++1. **`title`** -> `[DEPRECATED] <old title> → <replacement-slug>`. Use a real `→`, and pass `ensure_ascii=False` when writing `page.json` with `json.dumps` or it becomes `\u2192`.+2. **`tags`** -> `deprecated` FIRST, then `alias`, then the replacement slug(s). The tag chip is what the UI renders.+3. **`brief`** -> lead with "DEPRECATED. Use ...".+4. **hero** -> replace it. It is the largest header element and the gallery-card image.+5. `adom-wiki pkg deprecate <owner>/<slug>@<version>` for **every** published version. It requires an explicit version and there is no whole-package form.+6. A banner at the top of `readme.html` for people who scroll.++Then `repo push` `page.json` **and** `pkg publish`, because the title and brief live in both layers.++Canonical example to copy: [adom/adom-layout-viewer](https://wiki.adom.inc/adom/adom-layout-viewer).++Use `adom-wiki page delete` (soft) only when the page has no useful history. Deprecating and leaving it readable is usually better.++---++## 9. Linking into a library++A library is a page tagged `library` whose dependencies are the component pages, owner-qualified: ```json "dependencies": {- "adom/cl05b104ko5nnnc": "^1.0.0",- "adom/mp2393gtl-z": "^1.0.0"+ "adom/samsung-cl05b104ko5nnnc": "^1.0.0",+ "adom/mps-mp2393gtl-z": "^1.0.0" } ``` -Republish the library. A board or circuit depends on the library, and Nucleus expands the chain board -> library -> components, so each part becomes clickable and opens its Symbol / Footprint / 3D viewer.+Republish the library through `pkg publish` so the registry graph updates. A board depends on the library, and Nucleus expands board -> library -> components so each part becomes clickable. -## Correcting a mis-keyed page+--- -If a page was published under a local symbol/value name (for example `c-100nf-0402-c1525`):+## 10. Batch flows -1. Resolve its real MPN and create-or-find the MPN page (steps 1 to 3).-2. Repoint the library's dependency to the MPN slug and republish the library.-3. Delete the mis-keyed page:+`adom-design-blocks/src/make-components.mjs <sch> <pcb> <outDir> <modelsDir>` walks a KiCad circuit, finds every unique placed part, resolves LCSC to MPN and writes one bundle per part. - ```- adom-wiki page delete adom/<wrong-slug> # soft delete (reversible)- adom-wiki page delete adom/<wrong-slug> --hard # permanent, needs confirm- ```+**It predates this skill and emits bare-MPN slugs and no `readme.html`.** When using it, treat its output as raw CAD only: apply §1 (are several of these parts one datasheet family?), §2 (re-slug), and §5 (build the page) before publishing. Publishing its output directly is how a board import scatters twenty thin per-variant pages across the wiki. -Do the relink before the delete so the library never points at a dead page.+--- -## Tooling+## Files in this skill -`adom-design-blocks/src/make-components.mjs <sch> <pcb> <outDir> <modelsDir>` walks a KiCad circuit, finds every unique placed part, resolves LCSC to MPN, and writes one MPN-keyed component bundle per part (symbol + footprint + 3D + package.json). Publish each bundle (step 3), then wire the library (step 4). It skips a part that has no footprint placed on the board, since there is nothing to build a 3D page from.+| Path | What |+|---|---|+| `templates/readme.html` | The section skeleton with Adom theme tokens |+| `templates/page.json` | Manifest skeleton with the component block |+| `scripts/inject_layers.py` | Fills the empty fab/silk/courtyard groups in an adom-footprint embed |+| `scripts/build_switcher.py` | Wraps N footprint embeds into one package switcher |+| `reference/worked-example.md` | The AMS1117 build end to end, every command in order |
install.sh+15−1@@ -1,7 +1,21 @@ #!/bin/bash+# adom-component-page: install the skill, its templates and its runnable scripts.+# Self-contained: no adompkg, no network. Safe to re-run. set -euo pipefail DIR="$(cd "$(dirname "$0")" && pwd)" DEST="${HOME}/.claude/skills/adom-component-page"+ mkdir -p "$DEST" install -m 0644 "$DIR/SKILL.md" "$DEST/SKILL.md"-echo "Installed adom-component-page skill"++# Symlink the directories the skill references by path so its commands work as written+# and edits in the module dir propagate without a reinstall.+for d in templates scripts reference; do+ [ -d "$DIR/$d" ] && ln -sfn "$DIR/$d" "$DEST/$d"+done++echo "installed: adom-component-page -> $DEST"+echo "entry point: SKILL.md"+echo " templates/ readme.html + page.json skeletons"+echo " scripts/ inject_layers.py (fab/silk/courtyard fill), build_switcher.py"+echo " reference/ worked-example.md (the AMS1117 build, every command in order)"
package.json+38−26@@ -1,42 +1,44 @@ { "slug": "adom-component-page",- "version": "1.1.0",+ "version": "2.0.0", "type": "skill",- "description": "Publish a KiCad part to the Adom wiki the RIGHT way and link it into a library. THE RULE: wiki component pages are keyed by the manufacturer part number (MPN), never the local KiCad symbol or value name (a symbol C_100nF_0402 / LCSC C1525 is the page cl05b104ko5nnnc, not c-100nf-0402). Resolve an LCSC/JLC code to its MPN, dedup against an existing page under any owner before creating a duplicate, extract symbol + footprint + 3D from the KiCad source, publish as type=component, link the page into a <Name> Library so a board/circuit resolves board -> library -> components, and correct a page that was already published under the wrong (symbol) name. Read this before creating any wiki component page or adding a component to a library.",+ "description": "Create a wiki component page the RIGHT way. Pages are keyed manufacturer-mpn and scoped to ONE DATASHEET, so a datasheet covering six voltages and three packages is ONE page covering all of them, never six pages. Two manufacturers publishing the same MPN are two pages, because their limits genuinely differ. Renders through a hand-built readme.html on the Adom theme tokens with a fixed ten-section shape (identity, at a glance, specifications, symbol+footprint viewers, pin map, variants, assets, implementation, datasheet, provenance). Anything not available yet gets a 'not available, open a pull request' placeholder rather than being silently dropped. Covers the boundary decision, dedup against existing and legacy bare-MPN pages, pulling CAD from KiCad's official library, the adom-footprint empty-fab-layer workaround, publishing both the registry and page-repo layers, deprecating a page so it actually looks deprecated, and linking into a library.", "tags": [ "skill", "wiki", "component",+ "datasheet",+ "family", "mpn",+ "manufacturer", "kicad",- "library", "eda",- "lcsc", "publish",- "dedup"+ "dedup",+ "readme-html",+ "provenance" ], "discovery_triggers": [ "make a wiki component page", "publish this part to the wiki",- "add a component to a library",- "add this part to my library",- "wiki component keyed by mpn",- "pages are keyed by mpn",- "resolve lcsc to mpn",- "lcsc to mpn",- "jlc part number to mpn",- "a component page has the wrong name",+ "component page for",+ "should this variant get its own page",+ "component family page",+ "which variants go on one page",+ "add component to library",+ "component keyed by mpn",+ "manufacturer-mpn slug", "fix a component page published under the wrong name",- "component page named by symbol instead of mpn",- "link a component to a library",- "board library components",- "create the component pages for this circuit",- "dedup a component against an existing wiki page"+ "split a component page by manufacturer",+ "deprecate a wiki page" ], "dependencies": {- "adom/step2glb": "^2.0.1",- "adom/chip-fetcher-lite": "^1.1.1",- "adom/adom-wiki-cli": "^1.0.65"+ "adom/adom-step2glb": "^2.0.1",+ "adom/adom-wiki-cli": "^1.0.65",+ "adom/adom-symbol": "^1.0.0",+ "adom/adom-footprint": "^1.0.0",+ "adom/adom-lbr": "^1.0.0",+ "adom/adom-theme": "^1.0.0" }, "scripts": { "install": "./install.sh",@@ -44,17 +46,23 @@ }, "files": [ "SKILL.md",+ "README.md",+ "package.json", "install.sh", "uninstall.sh",- "README.md",- "docs/**"+ "templates/readme.html",+ "templates/page.json",+ "scripts/inject_layers.py",+ "scripts/build_switcher.py",+ "reference/worked-example.md",+ "docs/hero.png" ], "hero": { "headline": "Component pages, keyed by MPN", "subhead": "Resolve LCSC to MPN, dedup, build symbol + footprint + 3D, publish, and link into a library.", "screenshot": "docs/hero.png" },- "discovery_pitch": "The right way to put a component on the Adom wiki: pages are keyed by MPN, not your local symbol name. Resolve LCSC to MPN, dedup against existing pages, build symbol + footprint + 3D, publish, and link into a library \u2014 plus how to correct a mis-keyed page.",+ "discovery_pitch": "The procedure for wiki component pages: one page per datasheet, slugged manufacturer-mpn, rendered through a readme.html on the brand tokens, with PR placeholders instead of silent gaps.", "sample_prompts": [ { "prompt": "Make a wiki component page for this part and link it to my library",@@ -72,5 +80,9 @@ "prompt": "Create the component pages for every part in this circuit and wire them into its library", "label": "Whole circuit -> library" }- ]-}+ ],+ "title": "Make a Wiki Component Page",+ "optionalDependencies": {+ "adom/chip-fetcher-lite": "^1.1.1"+ }+}
page.json+36−24@@ -1,42 +1,44 @@ { "slug": "adom-component-page",- "version": "1.1.0",+ "version": "2.0.0", "type": "skill",- "description": "Publish a KiCad part to the Adom wiki the RIGHT way and link it into a library. THE RULE: wiki component pages are keyed by the manufacturer part number (MPN), never the local KiCad symbol or value name (a symbol C_100nF_0402 / LCSC C1525 is the page cl05b104ko5nnnc, not c-100nf-0402). Resolve an LCSC/JLC code to its MPN, dedup against an existing page under any owner before creating a duplicate, extract symbol + footprint + 3D from the KiCad source, publish as type=component, link the page into a <Name> Library so a board/circuit resolves board -> library -> components, and correct a page that was already published under the wrong (symbol) name. Read this before creating any wiki component page or adding a component to a library.",+ "description": "Create a wiki component page the RIGHT way. Pages are keyed manufacturer-mpn and scoped to ONE DATASHEET, so a datasheet covering six voltages and three packages is ONE page covering all of them, never six pages. Two manufacturers publishing the same MPN are two pages, because their limits genuinely differ. Renders through a hand-built readme.html on the Adom theme tokens with a fixed ten-section shape (identity, at a glance, specifications, symbol+footprint viewers, pin map, variants, assets, implementation, datasheet, provenance). Anything not available yet gets a 'not available, open a pull request' placeholder rather than being silently dropped. Covers the boundary decision, dedup against existing and legacy bare-MPN pages, pulling CAD from KiCad's official library, the adom-footprint empty-fab-layer workaround, publishing both the registry and page-repo layers, deprecating a page so it actually looks deprecated, and linking into a library.", "tags": [ "skill", "wiki", "component",+ "datasheet",+ "family", "mpn",+ "manufacturer", "kicad",- "library", "eda",- "lcsc", "publish",- "dedup"+ "dedup",+ "readme-html",+ "provenance" ], "discovery_triggers": [ "make a wiki component page", "publish this part to the wiki",- "add a component to a library",- "add this part to my library",- "wiki component keyed by mpn",- "pages are keyed by mpn",- "resolve lcsc to mpn",- "lcsc to mpn",- "jlc part number to mpn",- "a component page has the wrong name",+ "component page for",+ "should this variant get its own page",+ "component family page",+ "which variants go on one page",+ "add component to library",+ "component keyed by mpn",+ "manufacturer-mpn slug", "fix a component page published under the wrong name",- "component page named by symbol instead of mpn",- "link a component to a library",- "board library components",- "create the component pages for this circuit",- "dedup a component against an existing wiki page"+ "split a component page by manufacturer",+ "deprecate a wiki page" ], "dependencies": {- "adom/step2glb": "^2.0.1",- "adom/chip-fetcher-lite": "^1.1.1",- "adom/adom-wiki-cli": "^1.0.65"+ "adom/adom-step2glb": "^2.0.1",+ "adom/adom-wiki-cli": "^1.0.65",+ "adom/adom-symbol": "^1.0.0",+ "adom/adom-footprint": "^1.0.0",+ "adom/adom-lbr": "^1.0.0",+ "adom/adom-theme": "^1.0.0" }, "scripts": { "install": "./install.sh",@@ -44,10 +46,16 @@ }, "files": [ "SKILL.md",+ "README.md",+ "package.json", "install.sh", "uninstall.sh",- "README.md",- "docs/**"+ "templates/readme.html",+ "templates/page.json",+ "scripts/inject_layers.py",+ "scripts/build_switcher.py",+ "reference/worked-example.md",+ "docs/hero.png" ], "hero": { "type": "billboard",@@ -55,7 +63,7 @@ "subhead": "Resolve LCSC to MPN, dedup, build symbol + footprint + 3D, publish, and link into a library.", "screenshot": "docs/hero.png" },- "discovery_pitch": "The right way to put a component on the Adom wiki: pages are keyed by MPN, not your local symbol name. Resolve LCSC to MPN, dedup against existing pages, build symbol + footprint + 3D, publish, and link into a library — plus how to correct a mis-keyed page.",+ "discovery_pitch": "The procedure for wiki component pages: one page per datasheet, slugged manufacturer-mpn, rendered through a readme.html on the brand tokens, with PR placeholders instead of silent gaps.", "sample_prompts": [ { "prompt": "Make a wiki component page for this part and link it to my library",@@ -81,5 +89,9 @@ }, "visibility": { "public": true+ },+ "title": "Make a Wiki Component Page",+ "optionalDependencies": {+ "adom/chip-fetcher-lite": "^1.1.1" } }
reference/worked-example.mdadded+194@@ -0,0 +1,194 @@+# Worked example: AMS1117, end to end++The build that produced [adom/ams-ams1117](https://wiki.adom.inc/adom/ams-ams1117) and+[adom/umw-ams1117](https://wiki.adom.inc/adom/umw-ams1117), in order, including the two+places it went wrong first.++## 0. What made this a good test case++`AMS1117` is a jellybean 1 A LDO whose part number is second-sourced. It exercises+every hard part of the skill: a datasheet family (six voltages, three packages), a+manufacturer collision, a footprint whose tab is an electrical net, and two existing+per-variant pages that should never have been created.++## 1. Get the datasheet, then read it before anything else++The datasheet is the page boundary (SKILL.md section 1), so it comes first.++```sh+adom-desktop --ai-thread "<thread>" desktop_list_files \+ '{"path":"C:\\Users\\<user>\\Downloads","glob":"*1117*"}'+adom-desktop --ai-thread "<thread>" pull_file \+ '{"filePaths":["C:\\Users\\<user>\\Downloads\\ds1117.pdf"],"destDir":"/tmp"}'+```++Then Read the PDF with the `pages` parameter and take the ordering table, the+electrical characteristics tables and the package drawings.++> A stalled Chrome download shows up as `Unconfirmed NNNNNN.crdownload` with no+> extension. It is a complete file. Check the magic bytes rather than assuming the+> download failed.++## 2. Decide the boundary++The AMS ordering table lists 1.5 / 1.8 / 2.5 / 2.85 / 3.3 / 5.0 V across SOT-223,+TO-252 and 8-lead SOIC. That is **one page**.++Two existing pages, `adom/ams1117-3-3` and `adom/ams1117-1-2`, were per-variant+splits of that same family. They should not have existed.++Then the second datasheet arrived: **UMW / Youtai Semiconductor**, same part number,+carrying 1.2 V and not 2.85 V, SOT-89 instead of SO-8, 18 V input maximum instead of+15 V, 2.1 to 2.5 A current limit instead of 0.9 to 1.5 A, and thermal shutdown at+150 C instead of 165 C.++**The first attempt merged both onto one page** with a comparison table and an+"available from" column per variant. That was rejected, correctly: a merged page needs+a vendor caveat on every number, which is what gets misread. Two datasheets, two pages.++## 3. CAD, pulled not authored++All three AMS packages and all three UMW packages exist in KiCad 10's official library+on the user's machine, with matching STEP models.++```sh+adom-desktop --ai-thread "<t>" desktop_list_files \+ '{"path":"C:\\Program Files\\KiCad\\10.0\\share\\kicad\\footprints\\Package_TO_SOT_SMD.pretty","glob":"SOT-223*"}'++adom-desktop --ai-thread "<t>" pull_file '{"filePaths":[+ "C:\\Program Files\\KiCad\\10.0\\share\\kicad\\footprints\\Package_TO_SOT_SMD.pretty\\SOT-223-3_TabPin2.kicad_mod",+ "C:\\Program Files\\KiCad\\10.0\\share\\kicad\\3dmodels\\Package_TO_SOT_SMD.3dshapes\\SOT-223.step"+],"destDir":"/tmp"}'+```++`SOT-223-3_TabPin2` and not plain `SOT-223`, because the AMS1117 tab **is VOUT**,+internally bonded to pin 2. The existing `adom/ams1117-3-3` page shipped a SnapEDA+pattern with the tab on pad 4 as its own net, which leaves the heat path floating.++Rename both the node and the Value property:++```python+t = t.replace('(footprint "SOT-223-3_TabPin2"', '(footprint "AMS1117_SOT-223"', 1)+t = re.sub(r'\(property "Value" "[^"]*"', '(property "Value" "AMS1117_SOT-223"', t, count=1)+t = re.sub(r'\(model "[^"]*"', '(model "${KIPRJMOD}/ams1117-sot223.step"', t)+```++Then:++```sh+step2glb convert ams1117-sot223.step --out ams1117-sot223.glb++cat > sym.json <<'JSON'+{"symbolName":"AMS1117","manufacturer":"Advanced Monolithic Systems","package":"SOT-223",+ "description":"AMS1117 1 A low-dropout linear regulator","designatorPrefix":"U",+ "datasheetUrl":"http://www.advanced-monolithic.com/pdf/ds1117.pdf","footprint":"AMS1117_SOT-223",+ "pins":[{"number":"3","name":"VIN","type":"power_in","side":"left"},+ {"number":"2","name":"VOUT","type":"power_out","side":"right"},+ {"number":"1","name":"GND/ADJ","type":"power_in","side":"bottom"}]}+JSON+adom-symbol create --file sym.json --out ./sym+adom-lbr import-kicad --sym ams1117.kicad_sym --fp ams1117-sot223.kicad_mod --mpn AMS1117 --out ams1117.adom-lbr.json+```++## 4. Viewers, with the fab-layer workaround++```sh+adom-symbol embed --file ams1117.kicad_sym --out viewer-symbol.html++for f in sot223 to252 so8; do+ adom-footprint embed --file ams1117-$f.kicad_mod --out /tmp/raw-$f.html+ python3 scripts/inject_layers.py /tmp/raw-$f.html ams1117-$f.kicad_mod fp-$f.html+done+python3 scripts/build_switcher.py . AMS viewer-footprints.html+```++Without `inject_layers.py` the viewer shows floating pads with no body outline,+because adom-footprint 1.0.20 emits the fab, silk and courtyard groups empty+(adom/adom-footprint#2). The viewer's own `LAYER_DEFS` already defines all three and+`groupHasGeo()` shows a row as soon as a group holds geometry, so filling the groups+is the entire fix.++## 5. Hero++three.js plus puppeteer, GLB rendered as a 3/4 product shot inside a floating window,+composited into a billboard on the brand tokens. Two gotchas:++- puppeteer needs `--allow-file-access-from-files` because the three.js importmap uses+ `file://` URLs, and the script must run where `node_modules` resolves (symlink it+ into the scratchpad).+- The SOT-223 GLB needed `root.rotation.z = Math.PI` to face its three leads forward+ instead of the tab. That is an in-plane spin applied before the Z-up+ `rotation.x = -Math.PI/2`, under Euler XYZ order.++## 6. Publish both layers++```sh+adom-wiki pkg publish --org adom --public --include-media+adom-wiki repo push adom/ams-ams1117 -m "AMS1117 (Advanced Monolithic Systems) component page" \+ --files page.json README.md readme.html ams1117.kicad_sym ams1117-so8.kicad_sym \+ ams1117-sot223.kicad_mod ams1117-to252.kicad_mod ams1117-so8.kicad_mod \+ ams1117-sot223.step ams1117-to252.step ams1117-so8.step \+ ams1117-sot223.glb ams1117-to252.glb ams1117-so8.glb ams1117.adom-lbr.json \+ viewer-symbol.html viewer-footprints.html docs/ams1117-datasheet-ams.pdf \+ screenshots/hero.png screenshots/datasheet-cover.png+```++The registry lowercases slugs, so publishing `AMS-AMS1117` yields `ams-ams1117`.+Write the cross-links lowercase from the start.++## 7. Verify live, not locally++```sh+curl -s -o /dev/null -w "%{http_code}\n" \+ https://wiki.adom.inc/api/v1/pages/adom/ams-ams1117/files/readme.html+```++Then screenshot. The first live capture of the footprint switcher came back blank and+looked like a CSP problem; it was puppeteer painting before the large `srcdoc` iframes+had rendered. Wait about 5 s after `networkidle2`. Diff live against local by+**character** count, because µ and Ω make byte counts differ on identical files.++## 8. Deprecate what this replaced++The combined `adom/ams1117` page became wrong once the split happened. A banner in the+readme was not enough: it renders far below the fold and the header looked live. What+made it visibly deprecated (SKILL.md section 8):++```sh+# title -> "[DEPRECATED] 1 A Low-Dropout Regulator - AMS1117 → ams-ams1117 / umw-ams1117"+# tags -> ["deprecated","alias","ams-ams1117","umw-ams1117", ...]+# brief -> leads with "DEPRECATED. Use ..."+# hero -> replaced with a struck-through signpost image+adom-wiki repo push adom/ams1117 --files page.json -m "..."+adom-wiki pkg publish --org adom+for v in 1.0.0 1.1.0 1.2.0 1.2.1 1.2.2; do+ adom-wiki pkg deprecate "adom/ams1117@$v" "Split by manufacturer: use adom/ams-ams1117 or adom/umw-ams1117."+done+```++`json.dumps` escapes the arrow to `\u2192` unless you pass `ensure_ascii=False`.++## 9. Chase the dependents++Repointing is a registry-layer change, so it needs a `pkg publish` on each dependent,+not a repo push. Issues were filed on every page that depended on the old slugs rather+than editing other people's boards:++- `adom/ams1117-3-3` and `adom/ams1117-1-2`: deprecate, pointing at the vendor page+ that matches the silicon. 1.2 V is UMW-only, so that one is unambiguous.+- `adom/ams1117-3v3-molecule` and `adom/large-automotive-eth-switch-molecule`:+ repoint the dependency, and check the tab pad is on the VOUT net given the wrong+ footprint they inherited.++## What was found along the way++Two real defects in pages that already existed, both now written into issues:++1. `adom/ams1117-3-3` ships a footprint with **the tab on pad 4 as its own net**. The+ tab is VOUT (pin 2).+2. `adom/ams1117-1-2` ships a footprint that is **entirely on back layers**+ (B.Cu / B.Mask / B.Paste / B.SilkS / B.Fab / B.CrtYd) with no front geometry at+ all. Anything placed from it lands bottom-side.++Both are the kind of thing that only surfaces when someone rebuilds a page against the+datasheet. That is the argument for this skill existing.
scripts/build_switcher.pyadded+57@@ -0,0 +1,57 @@+#!/usr/bin/env python3+"""Wrap N adom-footprint embeds into one package-switcher iframe page."""+import html, sys, pathlib++def build(pkgs, out, part):+ frames, btns, fmap = [], [], []+ for i, (key, label, path) in enumerate(pkgs):+ doc = html.escape(pathlib.Path(path).read_text(), quote=True)+ hid = "" if i == 0 else " hidden"+ frames.append(f' <iframe id="{key}" title="{part} {label} footprint" srcdoc="{doc}"{hid}></iframe>')+ btns.append(f' <button role="tab" data-t="{key}" aria-selected="{"true" if i == 0 else "false"}">{label}</button>')+ fmap.append(f"{key}:document.getElementById('{key}')")++ pathlib.Path(out).write_text(f'''<!doctype html><html lang="en"><head><meta charset="utf-8">+<meta name="viewport" content="width=device-width,initial-scale=1"><title>{part} footprint</title>+<style>+:root{{color-scheme:light dark}}+html,body{{margin:0;height:100%;background:transparent;font-family:Satoshi,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}}+.wrap{{position:relative;width:100%;height:100%;min-height:500px}}+.switch{{position:absolute;right:12px;bottom:12px;z-index:10;display:inline-flex;padding:3px;border-radius:10px;+ background:rgba(28,33,40,.78);backdrop-filter:blur(6px);box-shadow:0 1px 4px rgba(0,0,0,.35)}}+.switch button{{appearance:none;border:0;cursor:pointer;font:inherit;font-size:12.5px;font-weight:600;+ padding:8px 14px;border-radius:8px;color:#c9d1d9;background:transparent;white-space:nowrap;+ font-family:"JetBrains Mono",ui-monospace,Menlo,monospace;transition:background .15s,color .15s}}+.switch button[aria-selected="true"]{{background:#00b8b1;color:#05221f}}+.frames{{position:absolute;inset:0}}+.frames iframe{{position:absolute;inset:0;width:100%;height:100%;border:0;background:transparent}}+.frames iframe[hidden]{{display:none}}+</style></head><body>+<div class="wrap">+ <div class="frames">+{chr(10).join(frames)}+ </div>+ <div class="switch" role="tablist" aria-label="Footprint variant">+{chr(10).join(btns)}+ </div>+</div>+<script>+var B=document.querySelectorAll('.switch button');+var F={{{','.join(fmap)}}};+B.forEach(function(b){{b.addEventListener('click',function(){{+ var t=b.getAttribute('data-t');+ B.forEach(function(x){{x.setAttribute('aria-selected', x===b?'true':'false');}});+ for(var k in F){{ if(k===t) F[k].removeAttribute('hidden'); else F[k].setAttribute('hidden',''); }}+}});}});+</script></body></html>''')+ print(f" {out}: {', '.join(l for _, l, _ in pkgs)}")+++if __name__ == "__main__":+ base = pathlib.Path(sys.argv[1])+ vendor = sys.argv[2]+ third = ("so8", "SO-8") if vendor == "AMS" else ("sot89", "SOT-89")+ pkgs = [("sot223", "SOT-223", base / "fp-sot223.html"),+ ("to252", "TO-252", base / "fp-to252.html"),+ (third[0], third[1], base / f"fp-{third[0]}.html")]+ build(pkgs, sys.argv[3], "AMS1117")
scripts/inject_layers.pyadded+176@@ -0,0 +1,176 @@+#!/usr/bin/env python3+"""+adom-footprint 1.0.20 emits empty <g class="adom-layer-{fab,silk,courtyard}"> groups —+it only ever populates copper/drill/padnum. The viewer's own LAYER_DEFS already define+those three layers and `groupHasGeo()` shows a toggle row as soon as a group holds+geometry, so filling the groups is enough to light up the layers panel. No JS changes.++Parses the graphics items out of a .kicad_mod and injects matching SVG into the groups,+widening the viewBox when the courtyard/fab outline sits outside the copper extents.+"""+import re, sys, math++COLORS = {"fab": "#6e7681", "silk": "#00cccc", "courtyard": "#FF26E2"}+LAYER_OF = {"F.Fab": "fab", "F.SilkS": "silk", "F.CrtYd": "courtyard"}+++def sexp(text):+ """Minimal s-expression reader -> nested lists of tokens."""+ toks = re.findall(r'\(|\)|"(?:[^"\\]|\\.)*"|[^\s()]+', text)+ stack, cur = [], []+ for t in toks:+ if t == "(":+ stack.append(cur); cur = []+ elif t == ")":+ done, cur = cur, stack.pop(); cur.append(done)+ else:+ cur.append(t[1:-1] if t.startswith('"') else t)+ return cur+++def find(node, key):+ return [c for c in node if isinstance(c, list) and c and c[0] == key]+++def one(node, key):+ r = find(node, key)+ return r[0] if r else None+++def xy(node, key):+ n = one(node, key)+ return (float(n[1]), float(n[2])) if n else None+++def layer_of(item):+ n = one(item, "layer")+ return n[1] if n else None+++def width_of(item):+ st = one(item, "stroke")+ if st:+ w = one(st, "width")+ if w:+ return float(w[1])+ w = one(item, "width")+ return float(w[1]) if w else 0.12+++def filled(item):+ f = one(item, "fill")+ if f and len(f) > 1:+ v = f[1] if not isinstance(f[1], list) else (f[1][1] if len(f[1]) > 1 else "no")+ return v in ("yes", "solid", "true")+ return False+++def arc_path(s, m, e):+ """Three-point arc -> SVG A command."""+ (x1, y1), (xm, ym), (x2, y2) = s, m, e+ d = 2 * (x1 * (ym - y2) + xm * (y2 - y1) + x2 * (y1 - ym))+ if abs(d) < 1e-12:+ return f"M {x1:.4f} {y1:.4f} L {x2:.4f} {y2:.4f}"+ ux = ((x1**2 + y1**2) * (ym - y2) + (xm**2 + ym**2) * (y2 - y1) + (x2**2 + y2**2) * (y1 - ym)) / d+ uy = ((x1**2 + y1**2) * (x2 - xm) + (xm**2 + ym**2) * (x1 - x2) + (x2**2 + y2**2) * (xm - x1)) / d+ r = math.hypot(x1 - ux, y1 - uy)+ cross = (xm - x1) * (y2 - y1) - (ym - y1) * (x2 - x1)+ sweep = 0 if cross > 0 else 1+ a1 = math.atan2(y1 - uy, x1 - ux); a2 = math.atan2(y2 - uy, x2 - ux)+ da = (a2 - a1) % (2 * math.pi) if sweep else (a1 - a2) % (2 * math.pi)+ large = 1 if da > math.pi else 0+ return f"M {x1:.4f} {y1:.4f} A {r:.4f} {r:.4f} 0 {large} {sweep} {x2:.4f} {y2:.4f}"+++def collect(fp):+ """-> {layer_key: [svg_element, ...]}, plus the bbox of everything drawn."""+ out = {k: [] for k in COLORS}+ xs, ys = [], []++ def note(*pts):+ for x, y in pts:+ xs.append(x); ys.append(y)++ for item in fp:+ if not isinstance(item, list) or not item:+ continue+ kind = item[0]+ if not kind.startswith("fp_"):+ continue+ key = LAYER_OF.get(layer_of(item) or "")+ if not key:+ continue+ col, w = COLORS[key], width_of(item)+ common = f'stroke="{col}" stroke-width="{w:.3f}" stroke-linecap="round" fill="none"'++ if kind == "fp_line":+ s, e = xy(item, "start"), xy(item, "end")+ if s and e:+ note(s, e)+ out[key].append(f'<line x1="{s[0]:.4f}" y1="{s[1]:.4f}" x2="{e[0]:.4f}" y2="{e[1]:.4f}" {common}/>')+ elif kind == "fp_rect":+ s, e = xy(item, "start"), xy(item, "end")+ if s and e:+ note(s, e)+ x, y = min(s[0], e[0]), min(s[1], e[1])+ fillv = col if filled(item) else "none"+ out[key].append(f'<rect x="{x:.4f}" y="{y:.4f}" width="{abs(e[0]-s[0]):.4f}" '+ f'height="{abs(e[1]-s[1]):.4f}" stroke="{col}" stroke-width="{w:.3f}" fill="{fillv}"/>')+ elif kind == "fp_circle":+ c, e = xy(item, "center"), xy(item, "end")+ if c and e:+ r = math.hypot(e[0] - c[0], e[1] - c[1])+ note((c[0] - r, c[1] - r), (c[0] + r, c[1] + r))+ fillv = col if filled(item) else "none"+ out[key].append(f'<circle cx="{c[0]:.4f}" cy="{c[1]:.4f}" r="{r:.4f}" '+ f'stroke="{col}" stroke-width="{w:.3f}" fill="{fillv}"/>')+ elif kind == "fp_arc":+ s, m, e = xy(item, "start"), xy(item, "mid"), xy(item, "end")+ if s and m and e:+ note(s, m, e)+ out[key].append(f'<path d="{arc_path(s, m, e)}" {common}/>')+ elif kind == "fp_poly":+ pts = one(item, "pts")+ if pts:+ p = [(float(c[1]), float(c[2])) for c in find(pts, "xy")]+ if p:+ note(*p)+ fillv = col if filled(item) else "none"+ d = " ".join(f"{x:.4f},{y:.4f}" for x, y in p)+ out[key].append(f'<polygon points="{d}" stroke="{col}" stroke-width="{w:.3f}" fill="{fillv}"/>')++ bbox = (min(xs), min(ys), max(xs), max(ys)) if xs else None+ return out, bbox+++def inject(html_path, mod_path, out_path):+ fp = sexp(open(mod_path).read())[0]+ layers, bbox = collect(fp)+ html = open(html_path).read()++ for key, els in layers.items():+ if not els:+ continue+ tag = f'<g class="adom-layer-{key}"></g>'+ if tag not in html:+ print(f" ! no empty {key} group to fill", file=sys.stderr); continue+ html = html.replace(tag, f'<g class="adom-layer-{key}">{"".join(els)}</g>', 1)++ # widen the viewBox if the outline geometry falls outside the copper extents+ m = re.search(r'viewBox="(-?[\d.]+) (-?[\d.]+) ([\d.]+) ([\d.]+)"', html)+ if m and bbox:+ vx, vy, vw, vh = (float(g) for g in m.groups())+ nx0, ny0 = min(vx, bbox[0]), min(vy, bbox[1])+ nx1, ny1 = max(vx + vw, bbox[2]), max(vy + vh, bbox[3])+ pad = 0.15+ nx0 -= pad; ny0 -= pad; nx1 += pad; ny1 += pad+ if (nx0, ny0, nx1 - nx0, ny1 - ny0) != (vx, vy, vw, vh):+ html = html.replace(m.group(0),+ f'viewBox="{nx0:.3f} {ny0:.3f} {nx1-nx0:.3f} {ny1-ny0:.3f}"', 1)++ open(out_path, "w").write(html)+ print(f" {out_path}: " + ", ".join(f"{k}={len(v)}" for k, v in layers.items() if v))+++if __name__ == "__main__":+ inject(*sys.argv[1:4])
templates/page.jsonadded+72@@ -0,0 +1,72 @@+{+ "_comment": "Manifest skeleton for a wiki component page. Replace every {{TOKEN}} and delete this key. The SAME title/description/tags must also go in package.json: page.json drives the page repo (repo push), package.json drives the registry (pkg publish), and the page header reads whichever was written last.",++ "schema_version": 1,+ "type": "component",+ "slug": "{{MANUFACTURER_SHORT}}-{{MPN_LOWER}}",+ "title": "{{WHAT_IT_IS}} {{MFR}} - {{MPN}}",+ "brief": "{{ONE_OR_TWO_SENTENCES}}. Name the manufacturer, the headline rating, the variant range the datasheet covers, and the packages.",+ "version": "1.0.0",++ "tags": [+ "component",+ "ic",+ "{{FUNCTION}}",+ "{{MPN_LOWER}}",+ "{{MANUFACTURER_SHORT}}",+ "kicad",+ "adom-lbr"+ ],++ "sample_prompts": [+ "Pull the {{MFR}} {{MPN}} KiCad symbol, footprint and 3D model into my project",+ "{{A_REAL_SELECTION_QUESTION_SOMEONE_WOULD_ASK}}"+ ],++ "component": {+ "mpn": "{{MPN}}",+ "manufacturer": "{{MANUFACTURER_FULL}}",+ "package": "{{PRIMARY_PACKAGE}}",+ "pin_count": 0,+ "category": "{{CATEGORY}}",+ "subcategory": "{{SUBCATEGORY}}",+ "datasheet": "{{VENDOR_DATASHEET_URL}}",+ "parts": {+ "symbol": "{{SLUG_STEM}}.kicad_sym",+ "footprint": "{{SLUG_STEM}}-{{PKG}}.kicad_mod",+ "footprint_alt": "{{SLUG_STEM}}-{{PKG2}}.kicad_mod",+ "model_3d": "{{SLUG_STEM}}-{{PKG}}.glb",+ "model_3d_chip": "{{SLUG_STEM}}-{{PKG}}.glb",+ "step": "{{SLUG_STEM}}-{{PKG}}.step"+ },+ "distributor_links": {+ "lcsc": "{{LCSC_OR_DELETE}}"+ },+ "datasheet_cover": "screenshots/datasheet-cover.png",+ "viewer_3d": { "ground": false },+ "body": "{{BODY_DIMENSIONS}}",+ "pitch": "{{LEAD_PITCH}}"+ },++ "metadata": {+ "specs": {+ "{{PARAMETER}}": "{{VALUE_WITH_CONDITIONS}}"+ },+ "cad_provenance": "Where the symbol, each footprint and each 3D model actually came from, including original library names before renaming, and anything deliberately NOT shipped."+ },++ "discovery_triggers": [+ "{{MPN_LOWER}}",+ "{{MFR}} {{MPN_LOWER}}",+ "{{WHAT_SOMEONE_SEARCHES_WHEN_THEY_DO_NOT_KNOW_THE_PART_NUMBER}}"+ ],+ "discovery_pitch": "One sentence an agent can surface. Say what the part does, what the page ships, and what makes it worth opening.",++ "org": "adom",+ "visibility": "public",+ "hero": { "type": "image", "path": "screenshots/hero.png" },++ "description": "The long form. Manufacturer, function, the full variant range the datasheet covers, headline limits with their conditions, packages, and any gotcha a reader must not miss (exposed pad net, tab function, second-source differences).",++ "dependencies": {}+}
templates/readme.htmladded+201@@ -0,0 +1,201 @@+<!doctype html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1">+<style>+/* Adom theme system: studio-dark token base (adom/adom-theme-system) */+:root{+ --bg:#0d1117;--surface:#161b22;--elevated:#1c2128;--overlay:#21262d;--border:#30363d;+ --text:#e6edf3;--text-body:#c9d1d9;--text-2:#8b949e;--text-3:#484f58;+ --accent:#00b8b1;--accent-hover:#00d4cb;--accent-bright:#00e6dc;--on-accent:#05221f;+ --blue:#64abff;--blue-fill:#0061ef;--purple:#8c6bf7;+ --green:#3fb950;--red:#f85149;--yellow:#d29922;+}+*{box-sizing:border-box}+html,body{background:var(--bg);margin:0}+body{color:var(--text-body);padding:20px 8px 44px;font-family:Satoshi,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;line-height:1.55;font-size:15px}+.wrap{max-width:1180px;margin:0 auto}+h1{font-size:30px;margin:0;font-weight:800;letter-spacing:-.01em;color:var(--text)}+h2{font-size:20px;font-weight:700;margin:34px 0 14px;padding-bottom:8px;border-bottom:1px solid var(--border);color:var(--text)}+a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}+code{background:rgba(139,148,158,.16);padding:1px 6px;border-radius:5px;font-size:.88em;font-family:"JetBrains Mono",ui-monospace,Menlo,monospace}+.ident{display:flex;align-items:center;gap:12px;flex-wrap:wrap}+.mfr{color:var(--text-2);font-size:15px}+.badge{margin-left:auto;font-size:12px;font-weight:700;letter-spacing:.06em;color:var(--on-accent);background:linear-gradient(90deg,var(--accent-bright),var(--blue));padding:5px 14px;border-radius:20px}+.oneline{color:var(--text-body);font-size:15.5px;margin:14px 0 16px}+.metarow{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}+.m{background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:6px 14px;font-size:12.5px;color:var(--text-2)}+.m b{color:var(--text);font-weight:700}+.callout{background:rgba(0,184,177,.09);border:1px solid rgba(0,184,177,.25);border-left:4px solid var(--accent);border-radius:10px;padding:13px 16px;font-size:14px;color:var(--text-body);margin:6px 0 4px}+.sib{background:rgba(140,107,247,.08);border:1px solid rgba(140,107,247,.24);border-left:4px solid var(--purple);border-radius:10px;padding:13px 16px;font-size:14px;color:var(--text-body);margin:0 0 18px}+.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:6px 0}+@media(max-width:720px){.grid{grid-template-columns:1fr 1fr}}+.card{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:18px 20px}+.card .k{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}+.card .v{font-size:22px;font-weight:800;margin-top:7px;color:var(--text)}+.card .s{color:var(--text-2);font-size:13px;margin-top:5px}+.spec{display:flex;gap:10px;padding:9px 0;border-top:1px solid var(--border);font-size:14px}+.spec:first-child{border-top:0}+.spec .lbl{min-width:200px;color:var(--accent);font-weight:600}+.viewers2{display:grid;grid-template-columns:1fr 1fr;gap:16px}+@media(max-width:820px){.viewers2{grid-template-columns:1fr}}+.vh{font-size:13px;font-weight:600;color:var(--text-2);margin:0 0 7px}+.vframe{width:100%;border:1px solid var(--border);border-radius:12px;background:var(--surface);display:block}+.pinwrap{columns:2;column-gap:20px}+@media(max-width:720px){.pinwrap{columns:1}}+.pg{break-inside:avoid;margin-bottom:16px;background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden}+.pgh{display:flex;align-items:center;gap:9px;font-weight:700;font-size:13px;letter-spacing:.04em;padding:10px 14px;border-left:4px solid;background:var(--elevated);color:var(--text)}+.pgh .dot{width:9px;height:9px;border-radius:50%}+.pgh .ct{margin-left:auto;color:var(--text-2);font-weight:600;font-size:12px}+.pt{width:100%;border-collapse:collapse;font-size:13px}+.pt td{padding:6px 14px;border-top:1px solid var(--border)}+.pt .pn{color:var(--text-2);width:34px;text-align:right;font-variant-numeric:tabular-nums}+.pt .nm{font-family:"JetBrains Mono",ui-monospace,Menlo,monospace;font-weight:600;white-space:nowrap;color:var(--text)}+.pt .fx{color:var(--text-body)}+.vgrid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px}+@media(max-width:820px){.vgrid{grid-template-columns:1fr}}+.vcard{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:16px 18px}+.vcard h3{margin:0;font-size:16px;display:flex;align-items:center;gap:9px;flex-wrap:wrap;color:var(--text)}+.vcard .sub{color:var(--text-2);font-size:12.5px;margin:6px 0 12px}+.vcard .oc{font-size:12px;color:var(--text-2);margin-top:8px}+.vcard .oc b{color:var(--text)}+.vcard code{font-size:12px}+.oc code{background:rgba(100,171,255,.16);color:#dbe9ff;border:1px solid rgba(100,171,255,.32);padding:2px 8px;font-weight:600}+.occode{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:24px 22px;margin:4px 0 18px;text-align:center}+.ocbig{font-family:"JetBrains Mono",ui-monospace,Menlo,monospace;font-size:clamp(28px,5.5vw,50px);font-weight:800;letter-spacing:2px;line-height:1.1}+.oclegend{display:grid;grid-template-columns:repeat(3,1fr);gap:14px 22px;margin-top:22px;font-size:13.5px;color:var(--text-body);text-align:left}+@media(max-width:640px){.oclegend{grid-template-columns:1fr}}+.ocitem .octop{display:flex;align-items:center;gap:8px}+.ocdesc{color:var(--text-2);font-size:13px;margin-top:5px;line-height:1.35}+.ocitem .sw{width:12px;height:12px;border-radius:3px;flex-shrink:0}+.ocitem b{font-family:"JetBrains Mono",ui-monospace,Menlo,monospace;font-size:15px}+.chip{font-size:10.5px;font-weight:800;letter-spacing:.05em;padding:3px 9px;border-radius:20px;text-transform:uppercase}+.vt{border-collapse:collapse;width:100%;font-size:13.5px}+.vt th{text-align:left;padding:8px 12px;border-bottom:1px solid var(--border);color:var(--accent);font-size:12px;letter-spacing:.06em;text-transform:uppercase}+.vt td{padding:7px 12px;border-top:1px solid var(--border)}+.vt tr td:first-child{font-family:"JetBrains Mono",ui-monospace,Menlo,monospace;font-weight:600;color:var(--text);white-space:nowrap}+.at{border-collapse:collapse;width:100%;font-size:13px}+.at td{text-align:left;padding:7px 10px;border-top:1px solid var(--border);vertical-align:top}+.at .tool{font-weight:700;white-space:nowrap}+.na{color:var(--text-3);font-style:italic}+.ul{list-style:none;padding:0;margin:0}+.ul li{padding:8px 0;border-top:1px solid var(--border)}+.ul li:first-child{border-top:0}+.dsheet{width:100%;height:840px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}+</style></head><body><div class=wrap>++<!-- =========================================================================+ TEMPLATE: wiki component page. Replace every {{TOKEN}}.+ Section order is fixed (see SKILL.md section 5). Add sections the part+ earns; never delete one because the data was hard to find, use the+ "not available yet" placeholder instead.+ No em-dashes, no en-dashes, no emoji. Run: prose-lint README.md+ ========================================================================= -->++<!-- 1. IDENTITY ---------------------------------------------------------- -->+<div class=ident><h1>{{MPN}}</h1><span class=mfr>{{MANUFACTURER}}</span><span class=badge>{{SHORT_BADGE}}</span></div>+<p class=oneline>{{ONE_PARAGRAPH_SUMMARY}}</p>+<div class=metarow>+<span class=m>{{LABEL}} <b>{{VALUE}}</b></span><span class=m>{{LABEL}} <b>{{VALUE}}</b></span><span class=m>{{LABEL}} <b>{{VALUE}}</b></span>+<span class=m>{{LABEL}} <b>{{VALUE}}</b></span><span class=m>Packages <b>{{PACKAGES}}</b></span><span class=m>Pins <b>{{PINS}}</b></span>+</div>++<!-- Sibling-page router. Use ONLY when the same MPN has another manufacturer's+ page (see SKILL.md section 1). Delete otherwise. -->+<div class=sib><b>This page is the {{MANUFACTURER}} part only.</b> Everything below comes from the {{MANUFACTURER}} datasheet. The same part number is second-sourced by {{OTHER_MFR}} with a different lineup and different limits: if your BOM says {{OTHER_MFR}}, use <a href="https://wiki.adom.inc/adom/{{OTHER_SLUG}}">{{OTHER_TITLE}}</a> instead.</div>++<!-- 2. AT A GLANCE ------------------------------------------------------- -->+<h2>At a glance</h2>+<div class=grid>+<div class=card><div class="k" style="color:#00b8b1">{{KEY}}</div><div class=v>{{VALUE}}</div><div class=s>{{DETAIL}}</div></div>+<div class=card><div class="k" style="color:#28c3d4">{{KEY}}</div><div class=v>{{VALUE}}</div><div class=s>{{DETAIL}}</div></div>+<div class=card><div class="k" style="color:#4fb7f0">{{KEY}}</div><div class=v>{{VALUE}}</div><div class=s>{{DETAIL}}</div></div>+<div class=card><div class="k" style="color:#64abff">{{KEY}}</div><div class=v>{{VALUE}}</div><div class=s>{{DETAIL}}</div></div>+<div class=card><div class="k" style="color:#8c6bf7">{{KEY}}</div><div class=v>{{VALUE}}</div><div class=s>{{DETAIL}}</div></div>+<div class=card><div class="k" style="color:#a98bf9">{{KEY}}</div><div class=v>{{VALUE}}</div><div class=s>{{DETAIL}}</div></div>+</div>++<!-- 3. SPECIFICATIONS ---------------------------------------------------- -->+<h2>Specifications</h2>+<div>+<div class=spec><span class=lbl>{{PARAMETER}}</span><span>{{VALUE_WITH_CONDITIONS}}</span></div>+<!-- repeat. Include the test conditions: a limit without its conditions is not a limit. -->+</div>++<!-- 4. SYMBOL AND FOOTPRINT ---------------------------------------------- -->+<h2>Symbol & footprint</h2>+<div class=viewers2>+<div><div class=vh>Schematic symbol. Hover a pin for its function</div>+<iframe class=vframe height=520 loading=lazy title="{{MPN}} schematic symbol" src="https://wiki.adom.inc/api/v1/pages/adom/{{SLUG}}/files/viewer-symbol.html"></iframe></div>+<div><div class=vh>PCB footprint. Switch package bottom-right ({{PACKAGE_LIST}})</div>+<iframe class=vframe height=520 loading=lazy title="{{MPN}} footprint" src="https://wiki.adom.inc/api/v1/pages/adom/{{SLUG}}/files/viewer-footprints.html"></iframe></div>+</div>++<!-- 5. PIN MAP ----------------------------------------------------------- -->+<h2>Pin map <span style="color:var(--text-2);font-weight:400;font-size:14px">{{PIN_SUMMARY}}</span></h2>+<div class=callout>{{ANYTHING_THAT_BITES: exposed pad net, tab function, pin-1 orientation}}</div>+<div class=pinwrap>+<div class=pg><div class=pgh style="border-color:#00b8b1"><span class=dot style="background:#00b8b1"></span>{{GROUP}}<span class=ct>{{COUNT}}</span></div><table class=pt><tbody>+<tr><td class=pn>{{N}}</td><td class=nm>{{NAME}}</td><td class=fx>{{FUNCTION}}</td></tr>+</tbody></table></div>+<!-- repeat per functional group. Colours: derive a ramp across #00b8b1 / #64abff /+ #8c6bf7 plus neutrals. NEVER use --green/--red/--yellow, they are semantic. -->+</div>++<!-- 6. COMPONENT VARIANTS ------------------------------------------------ -->+<h2>Component variants</h2>+<div class=callout>{{WHAT_IS_AND_IS_NOT_DIFFERENT_BETWEEN_VARIANTS}}</div>+<div class=occode>+<div class=ocbig><span style="color:#e6edf3">{{BASE}}</span><span style="color:#8c6bf7">{{PKG_CODE}}</span><span style="color:#00e6dc">{{SUFFIX}}</span></div>+<div class=oclegend>+<div class=ocitem><div class=octop><span class=sw style="background:#8b949e"></span><b style="color:#e6edf3">{{BASE}}</b></div><div class=ocdesc>{{MEANING}}</div></div>+<div class=ocitem><div class=octop><span class=sw style="background:#8c6bf7"></span><b style="color:#a98bf9">{{PKG_CODE}}</b></div><div class=ocdesc>{{MEANING}}</div></div>+<div class=ocitem><div class=octop><span class=sw style="background:#00e6dc"></span><b style="color:#00e6dc">{{SUFFIX}}</b></div><div class=ocdesc>{{MEANING}}</div></div>+</div>+</div>+<div class=vgrid>+<div class=vcard>+<h3>{{PACKAGE}}<span class=chip style="background:rgba(139,148,158,.18);color:#8b949e">{{CODE}}</span></h3>+<div class=sub>{{BODY_DIMENSIONS_PITCH_TAB}}</div>+<div class=oc><b>Order codes:</b> <code>{{CODE}}</code></div>+</div>+</div>+<h2>{{VARIANT_TABLE_HEADING}}</h2>+<table class=vt><thead><tr><th>{{COL}}</th></tr></thead><tbody>+<tr><td>{{ORDER_CODE}}</td><td>{{VALUE}}</td></tr>+</tbody></table>++<!-- 7. ASSETS ------------------------------------------------------------ -->+<h2>Assets</h2>+<table class=at><tbody>+<tr><td class=tool style="color:#00b8b1">KiCad symbol</td><td><a href={{SYM}}>{{SYM}}</a></td></tr>+<tr><td class=tool style="color:#28c3d4">KiCad footprints</td><td><a href={{FP}}>{{FP_NAME}}</a></td></tr>+<tr><td class=tool style="color:#64abff">3D models</td><td><a href={{STEP}}>.step</a> / <a href={{GLB}}>.glb</a></td></tr>+<tr><td class=tool style="color:#8c6bf7">Canonical</td><td><a href={{LBR_JSON}}>{{LBR_JSON}}</a></td></tr>+<!-- PLACEHOLDER PATTERN: state what is missing and invite a PR. Never drop the row. -->+<tr><td class=tool style="color:#484f58">Fusion 360 / EAGLE</td><td class=na>Not available yet. <a href="https://wiki.adom.inc/adom/{{SLUG}}/pulls">Open a pull request</a> to add it.</td></tr>+<tr><td class=tool style="color:#484f58">Altium</td><td class=na>Not available yet. <a href="https://wiki.adom.inc/adom/{{SLUG}}/pulls">Open a pull request</a> to add it.</td></tr>+</tbody></table>++<!-- 8. IMPLEMENTATION ---------------------------------------------------- -->+<h2>Implementation</h2>+<ul class=ul>+<li><a href="https://wiki.adom.inc/adom/{{BOARD_SLUG}}"><b>{{BOARD}}</b></a> {{HOW_IT_IS_USED}}</li>+</ul>++<!-- 9. DATASHEET --------------------------------------------------------- -->+<h2>Datasheet</h2>+<iframe class=dsheet loading=lazy title="{{MPN}} datasheet" src="https://wiki.adom.inc/api/v1/pages/adom/{{SLUG}}/files/docs/{{DATASHEET_PDF}}"></iframe>+<p style="margin:8px 0 0;font-size:13px"><a href=docs/{{DATASHEET_PDF}}>Download the full datasheet (PDF)</a> · {{MANUFACTURER}}, <i>{{DOC_TITLE}}</i> · <a href="{{VENDOR_URL}}">{{VENDOR_HOST}}</a></p>++<!-- 10. PROVENANCE ------------------------------------------------------- -->+<h2>Provenance</h2>+<ul class=ul>+<li><b>Every electrical number on this page</b> is read from the {{MANUFACTURER}} datasheet embedded above: {{WHICH_PAGES_FOR_WHAT}}. Nothing from any second source is mixed in.</li>+<li><b>Symbol:</b> generated with <code>adom-symbol</code> to the datasheet pin connections.</li>+<li><b>Footprints:</b> {{SOURCE_LIBRARY_AND_ORIGINAL_NAMES}}, renamed. {{WHY_THIS_LAND_PATTERN}}</li>+<li><b>3D models:</b> {{SOURCE}}, converted to GLB with <code>step2glb</code>.</li>+<li><b>Canonical JSON:</b> imported with <code>adom-lbr import-kicad</code>.</li>+<li><b>Fusion and Altium libraries are deliberately absent.</b> They are generated rather than hand-verified, and the generated Altium symbol encoding has produced wrong geometry before.</li>+</ul>++</div>+<script>(function(){function ph(){var h=Math.min(16000,document.documentElement.scrollHeight);parent.postMessage({type:'readme-height',height:h},'*');parent.postMessage({type:'resize',height:h},'*');}window.addEventListener('load',ph);window.addEventListener('resize',ph);if(window.ResizeObserver)new ResizeObserver(ph).observe(document.body);setTimeout(ph,250);setTimeout(ph,1000);setTimeout(ph,2500);ph();})();</script>+</body></html>