app
Adom Chipsmith
Public Made by Adomby adom
STEP-native chip validator — 5-source cross-validation, OCCT-generated copyright-free 3D models with embedded signal annotations, datasheet-to-STEP pipeline.
← Commit history
Add adompkg installer files
4 files changed
+220
SKILL.mdadded+190@@ -0,0 +1,190 @@+---+name: adom-chipsmith+description: >+ STEP-native chip detection + footprint validation + sign-off — the higher-level+ validator on top of adom-step. Loads a .step + footprint + datasheet PDF ++ chipsmith-spec manifest, reads B-rep + assembly hierarchy directly (NOT GLB+ triangle meshes), detects every electrical-contact feature (legs / pads / balls+ / tabs / EP / through-hole pins / reinforcement tabs) via Mode 0 (named scene-+ graph walk) with Mode 1 (surface-type clustering) fallback, validates+ measurements against declared body_dims_mm with mm-vs-m-vs-inch auto-rescale,+ detects pin-1 chip-side AND footprint-side, layers a 1.6mm faux PCB plate,+ auto-generates 0.3mm heatsink-via grid under any EP, lays out 300µm solder-jet+ domes per the solder-jetting skill, optionally lets the user place a synthetic+ pin-1 indicator, and on sign-off bakes a `<mpn>.chipsmith.step` (canonical) ++ sidecar JSON. Every overlay layer is a first-class Outline citizen with+ eye-toggle / click-to-isolate / right-click menu. Trigger words — chipsmith,+ chip detection, validate chip step, sign off chip, footprint validation,+ pin-1 indicator, place pin1, heatsink vias, faux pcb, solder jet domes,+ manual orient step, mm vs inch step, detect pins step, chip pad detection,+ chip step bake, role tag chip, multi-source footprint cross-validation.+---++# adom-chipsmith — STEP-native chip validator++Higher-level validator on top of `adom-step`. Loads a+chip's STEP file alongside its footprint + datasheet + manifest, runs detection+on the STEP **B-rep** (not the GLB triangle mesh), validates measurements,+detects pin-1, layers a 1.6mm faux PCB + heatsink vias + solder-jet domes, and+on user sign-off bakes a `<mpn>.chipsmith.step` + sidecar JSON.++Architecture: Tier-3 importer per [`3d-viewer-design`](../3d-viewer-design/SKILL.md)+§2 — chipsmith inherits adom-step + the canonical Babylon viewer via git+submodule chain. Upstream fixes flow → adom-step → chipsmith automatically.++## Quick start++```bash+# Open a chip from a chip-fetcher library+adom-chipsmith view-library /home/adom/project/chip-fetcher/library/VL53L8CX++# Open an arbitrary STEP + footprint + datasheet+adom-chipsmith view path/to/chip.step --footprint path/to/chip.kicad_mod --spec path/to/spec.json++# Print the chip's scene-graph+adom-chipsmith list-components++# Headless detection — JSON report+adom-chipsmith detect --json+```++## Verification surface — pup, not Hydrogen webview++Visual verification of chipsmith always happens in a **pup window** (Chrome via `adom-desktop browser_*`), not a Hydrogen webview tab. The chipsmith UI is multi-pane (outline left, canvas center, 7-tab sidebar right, floating sign-off HUD top-right) and gets cramped in a half-Hydrogen pane next to VS Code; pup gives it a dedicated window. (chipfit / aci use Hydrogen — chipsmith does not.)++```bash+# Always check existing pup sessions BEFORE opening — see pup skill,+# "Cross-sessionId duplicates" section. After a conversation compaction+# a prior session's chipsmith window may still be alive under a stale+# sessionId, so spawning a new one creates a duplicate.+adom-desktop browser_status '{}'++# When opening for the first time+adom-desktop browser_open_window '{"sessionId":"chipsmith","profile":"chipsmith","url":"https://chipsmith-<slug>.adom.cloud/"}'+adom-desktop browser_focus_window '{"sessionId":"chipsmith"}'+```++Public proxy registration: chipsmith binds `0.0.0.0:8872` (so cloudflared can reach it through the container bridge), then `adom-cli carbon containers port-add --port 8872 --prefix chipsmith <slug>` exposes it as `chipsmith-<slug>.adom.cloud`. Loopback-only binds will get HTTP 502 from the public URL even though local curl returns 200.++## What the 8 tabs do++| Tab | What it shows | Status pill semantics |+|---|---|---|+| **Source** | Manifest (MPN / mfr / package), declared spec (pin_count / structural_type / body_dims_mm), file paths with reveal-in-VSCode buttons, datasheet via [adom-pdf-viewer](../adom-pdf-viewer/SKILL.md). Inline editor for spec fields — saves into info.json. | ● when all 3 spec fields present, ◐ partial, ○ none |+| **Measurements** | Auto-rescale negotiation across 6 candidates (×1, ÷25.4, ÷1000, ×25.4, ×1000, ÷10) — picks the scale within ±5% of declared body_dims_mm. mm + mils dual readout. | ● if ×1, ◐ if non-1 rescale, ✗ if no scale fits |+| **Detection** | Mode 0 walks the named scene graph; Mode 1 falls back to surface-type clustering on `/api/step-meta` when Mode 0 finds <70%. Click-to-isolate per feature. **Pin-reveal strobe** flashes each detected feature with a numbered HTML badge floating at the screen-projected XY. | Coverage-based: ●/◐/✗ |+| **Footprint** | Per-source breakdown across KiCad / Fusion / Altium / datasheet-derived. Cross-source agreement matrix (pad-by-pad position + size deltas). 3D toggle per source — translucent pads at z=0 in the scene. | ●/◐ based on sources present |+| **Pin-1** | Chip-side via Mode 0 detection; footprint-side via silkscreen marker scan. Place-synthetic-indicator UI (NW/NE/SW/SE buttons) when chip-side missing. | ●/◐/✗ based on agreement |+| **Sign-off** | Gate evaluator. 4 hard + 3 soft gates. CTA POSTs to `/api/signoff` → writes `<mpn>.chipsmith.json` + bakes `<mpn>.chipsmith.step`. | ● when all hard gates pass |+| **Heatsink** | EP detection + auto-generated 0.3mm via grid (1.2mm pitch, 0.4mm margin). 3D toggle renders Cu-tone plated bores + annular pads. | ● if EP found, ─ N/A otherwise |+| **Solder-jet** | 300µm dome layout per [`solder-jetting`](../solder-jetting/SKILL.md) — intra-pad ≥100µm, inter-pad ≥300µm with no-bridging pruning. 3D toggle renders half-spheres on each pad. | ● when domes generated |++## Right-pane HUD shape++The 8-tab pane is a **floating draggable HUD**, not a docked column. Drag the+tab strip to reposition; position persists in `localStorage`. `P` toggles+collapse, `1`-`8` jump to tabs. Default landing at `top:170, right:10` so the+HUD never covers the ViewCube top-right.++## Outline integration (load-bearing rule)++Every 3D overlay chipsmith adds — footprint pads (per source), 1.6mm faux PCB+plate, heatsink vias, solder-jet domes, user-placed pin-1 indicator — appears+as a **first-class entry in the left-side Outline**, with eye-toggle, click-+to-isolate, right-click menu, search visibility. Per [`3d-viewer-design`](../3d-viewer-design/SKILL.md) §14.++## CLI surface++| Command | Purpose |+|---|---|+| `view <step> [--footprint <kicad_mod>] [--spec <json>] [--datasheet <pdf>] [--no-open]` | Open one chip |+| `view-library <chip-fetcher-dir>` | Open a chip from a chip-fetcher library |+| `start --port N` / `stop --port N` / `status` / `health` | Server lifecycle |+| `list-components` | Scene-graph component tree |+| `isolate <name>` / `show <name>` / `hide <name>` / `show-all` / `frame <name>` | Visibility + camera |+| `screenshot --out <png>` | PNG of current canvas |+| `eval <js>` | Run a JS expression inside the webview, print the result |+| `console -f` | Tail JS console output from the webview |+| `reveal <path>` | Reveal a file in VS Code Explorer (delegates to adom-vscode) |+| `detect --json` | Headless detection report on a chip-fetcher dir |++## JS API (window.adomChipsmith)++The full UI is JS-shadowed for AI demo scripts + tests. From the CLI:+`adom-chipsmith eval "window.adomChipsmith.<verb>(...)"`++```+state() // full state snapshot+setActiveTab(id) // 'source' | 'measurements' | ... | 'solderjet'+runDetection() // re-fetch + re-run Mode 0 → Mode 1 fallback+runMeasurements() // re-run rescale negotiation+recomputeStatuses() // refresh every status pill from current state++placePin1(corner) // 'NW' | 'NE' | 'SW' | 'SE' — synthetic indicator+removePin1User()++setFootprintOverlay(src, on) // 'kicad' | 'fusion' | 'altium' | 'datasheet'+setFauxPcbVisible(on)+setHeatsinkVisible(on)+setSolderJetVisible(on)++replayReveal() // re-runs the strobe + numbered badges+hoverAt({x,y}) // returns same payload as the visible HUD+setHoverEnabled(on)++signoff.gates()+signoff.canSignOff()+signoff.signOff() // POST /api/signoff → writes JSON + bakes STEP+```++## Spec schema (info.json fields chipsmith reads)++```json+{+ "mpn": "VL53L8CX",+ "manufacturer": "STMicroelectronics",+ "package": "OLGA-16 (6.4×3×1.75 mm, optical)",+ "package_family": "LGA-16",+ "pin_count": 16,+ "structural_type": "lead_with_ep",+ "body_dims_mm": [4.4, 5.4, 1.5],+ "expected_pitch_mm": 0.5,+ "datasheet_pdf": "VL53L8CX.pdf"+}+```++`pin_count`, `structural_type`, and `body_dims_mm` are required for sign-off.+The Tab 1 inline editor saves these into info.json so they persist across+reloads. `package` field's "WxHxD mm" is parsed as a fallback for body_dims.++## Sign-off artifacts++| File | Content |+|---|---|+| `<mpn>.chipsmith.json` | Full state — applied scale, detected breakdown, heatsink grid, solder-jet layout, pin-1 user-placed corner, sign-off timestamp |+| `<mpn>.chipsmith.step` | Canonical role-tagged STEP via service-step2glb's `/bake` endpoint. Future Adom tools should prefer this over the original input. |++## Adjacent skills (read before touching)++- `adom-step` — base viewer chipsmith inherits from+- [`3d-viewer-design`](../3d-viewer-design/SKILL.md) — esp. §14 (overlays first-class) and §2 (Tier-3 inheritance)+- [`human-ui-patterns`](../human-ui-patterns/SKILL.md) — esp. `playbooks/icons-and-displays.md` §4b (no emoji icons)+- `adom-pdf-viewer` — datasheet rendering+- [`solder-jetting`](../solder-jetting/SKILL.md) — 300µm dome rules+- [`electrical-engineering`](../electrical-engineering/SKILL.md) — package families, pin-1 conventions, mm + mils+- `adom-vscode` — reveal in Explorer + open-in-editor++## v1.0 ships:+8 tabs all functional, 5 overlay layers (per-source footprints / faux PCB /+heatsink vias / solder-jet / user-placed pin-1) all first-class Outline+citizens, Mode 0 + Mode 1 detection, sign-off bake to .chipsmith.step + JSON+sidecar, full AI-drivable JS surface.++## Open ends:++- Mode 2 face-merge fallback (when Mode 0 + Mode 1 both fail)+- Multi-source footprint overlays simultaneously rendered with per-pair Δ chips+- Datasheet pinout-page deep-link from Detection results+- Y-up auto-retry on detection failure (today: chosen_up_axis from info.json)+- Outline 4-section breaks (Chip / Footprint / PCB / Pre-fab)+- gallia/skills/adom-chipsmith-build/ release playbook
install.shadded+15@@ -0,0 +1,15 @@+#!/bin/bash+set -e+PKG_DIR="$(cd "$(dirname "$0")" && pwd)"+SKILLS_DIR="$HOME/.claude/skills"+mkdir -p "$SKILLS_DIR/adom-chipsmith"+if [ -f "$PKG_DIR/SKILL.md" ]; then+ cp "$PKG_DIR/SKILL.md" "$SKILLS_DIR/adom-chipsmith/SKILL.md"+fi+for skill_dir in "$PKG_DIR/skills"/*/; do+ [ -d "$skill_dir" ] || continue+ skill_name=$(basename "$skill_dir")+ mkdir -p "$SKILLS_DIR/$skill_name"+ cp -r "$skill_dir"* "$SKILLS_DIR/$skill_name/"+done+echo "Installed adom-chipsmith"
package.jsonadded+11@@ -0,0 +1,11 @@+{+ "slug": "adom-chipsmith",+ "version": "1.0.0",+ "type": "app",+ "description": "STEP-native chip validator — 5-source cross-validation, OCCT-generated copyright-free 3D models with embedded signal annotations, datasheet-to-STEP pipeline.",+ "dependencies": {},+ "scripts": {+ "install": "./install.sh",+ "uninstall": "./uninstall.sh"+ }+}
uninstall.shadded+4@@ -0,0 +1,4 @@+#!/bin/bash+set -e+rm -rf "$HOME/.claude/skills/adom-chipsmith"+echo "Uninstalled adom-chipsmith"