← Commit history

wiki-component: models.json (adom/models@1) and the adom-models widget

John Lauer ·5067cb4dbb ·22d ago ·parent 247e849
3 files changed +30−3
package.json+1−1
@@ -1,7 +1,7 @@ {   "slug": "adom-wiki-skillpack",   "title": "Adom Wiki Skill Pack",-  "version": "0.8.33",+  "version": "0.8.34",   "type": "skill",   "hero": {     "path": "screenshots/hero.png"
page.json+1−1
@@ -131,7 +131,7 @@       "prompt": "Before I create this wiki page, check whether the thing already has a home."     }   ],-  "version": "0.8.33",+  "version": "0.8.34",   "description": "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 marking, reusable thumbnail caches and component-page widgets.",   "dependencies": {     "adom/adom-wiki-hero-image": "^0.2.2",
skills/wiki-component/SKILL.md+28−1
@@ -15,7 +15,7 @@ description: >-   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, reusable component README, generic component page,-  component hero, chip hero, GLB orientation, Z-up, Y-up, chip standing on edge. ordering variants, several part numbers one page, which variant do we stock, basic part reel, datasheet callout, hero note, pads look wrong, copper fill, verified by, verification log, trust mark, adom-verified, datasheet-built 3D model, overlay proof.+  component hero, chip hero, GLB orientation, Z-up, Y-up, chip standing on edge. ordering variants, several part numbers one page, which variant do we stock, basic part reel, datasheet callout, hero note, pads look wrong, copper fill, verified by, verification log, trust mark, adom-verified, datasheet-built 3D model, overlay proof, step variants, which step file, models.json, adom-models, 3D files on a page. ---  Parent skill: **adom-wiki-skillpack**@@ -714,6 +714,33 @@ from the datasheet and redistribute it, but it must be exact: - Keep the builder and its data in `provenance/tools/`, the previous model in `provenance/`, and say in the   README that the model is AI-generated from the datasheet. +## Every 3D file described: `models.json` and the `::adom-models` widget++A component page soon carries several STEPs and GLBs (the maker's or datasheet-built original, an etched copy, an+unmarked copy, earlier models kept in `provenance/`, the hero, a showcase scene, an assembly scene). File names do+not say which is which, so every page with more than one 3D file carries a `models.json` (schema `adom/models@1`):+one record per file with `format`, `title`, `status` (current | previous), `variant` (etched | plain | hero |+showcase | insertion | lod | original), `role` (manufacturer | datasheet-built | photo-matched | derived), `slot`+(the `component.parts` key that points at it), `marking` {text, surface, colour} or null, `colours`, `unique` (one+line: what this file has that its siblings do not), `use` (board-cad | render | wiki-hero | board-insertion |+archive), `derived_from`, `source`, `sha256`, `git_blob`, `bytes`, `thumb`.++- AIs: read `models.json` before choosing or describing a 3D file; never guess from names. Look at the thumbnails+  before writing `unique`: a stale assumption about what a GLB contains is easy to write and wrong.+- Build it with `tools/models_json.py` on john/component-verification inside a page clone: `scan` (adds new files+  with guessed roles, refreshes hashes, drops vanished ones), `set PATH key=value ...` (describe each file),+  `thumbs` (STEP through the step2glb service, GLB through local headless Chromium + three.js; up axis = the+  model's thinnest axis, glow shells hidden), then push `models.json` and `docs/models/*.png`.+- Show it with `::adom-models{src="/OWNER/SLUG/render/models.json"}` in a `## 3D models` section above the 3D model+  provenance: a card per file (thumbnail, STEP/GLB, etched or unmarked and where the part number sits, the+  `unique` line, derived-from, a download through the files API), previous versions folded away. It checks each+  file against the page's recursive file listing (`/api/pages/OWNER/SLUG/files?recursive=1`, git blob hashes), so+  nothing is downloaded, and marks a card "changed since described" when the page serves a different file.+- Whoever rebuilds or swaps a model updates the record in the same push (the Basic Parts marking pass refreshes+  hashes and thumbnails automatically when the page has a `models.json`; new files still need a `set`).+- Large STEPs (about 5 MB and up) are refused by the `/render/` route ("File too large to render", 413). Widgets+  and links fetch them through `/api/pages/OWNER/SLUG/files/PATH`, which serves the same bytes.+ ### Then match the real part: photos fill what the drawings leave out  A datasheet drawing is not the part. After the overlay proof, put the model beside the maker's product photos