← Commit history

Publish 0.2.1

John Lauer ·1433cd4e9f · ·parent c519f52
7 files changed +102−5
README.md+4
@@ -2,6 +2,10 @@  Circuit simulation for AI agents in the Adom ecosystem. This skill pack tells an agent which SPICE engine to use, where to run it, how to drive it headless, and what each tool's licence allows. It comes from a hands-on comparison of ngspice, LTspice and PSpice for TI on a real board: a TPS54202 12 V to 5 V, 1 A buck converter. +<video controls preload="metadata" width="1080" poster="docs/spice-comparison-poster.png" src="docs/spice-comparison.mp4"></video>++A 4 minute tour: the real board in 3D, the same test in ngspice, LTspice and PSpice for TI, all four runs on one set of axes, the Adom SPICE dashboard, and an AI thread in Adom Hydrogen running the whole comparison from one prompt. [Download the video](docs/spice-comparison.mp4).+ ## The short version  - **Default to ngspice in the Ubuntu container.** It is free (BSD), small, runs headless and in parallel, and works the same in WSL2, in Lima on a Mac, and in the cloud. It is the only mainstream option that may back a hosted simulation dashboard.
app/bin/adom-spice

  
app/install.sh+10−1
@@ -8,7 +8,16 @@ cp -r "$HERE/adom_spice" "$HERE/web" "$HERE/bin" "$HERE/examples" "$DEST/" chmod +x "$DEST/bin/adom-spice" ln -sfn "$DEST/bin/adom-spice" "$HOME/.local/bin/adom-spice" cp "$HERE/../skills/adom-spice/SKILL.md" "$HOME/.claude/skills/adom-spice/SKILL.md" 2>/dev/null || true-if [ ! -x "$VENV/bin/python" ]; then python3 -m venv "$VENV"; fi+# a venv made without python3-venv has no pip: detect that and rebuild it+if [ ! -x "$VENV/bin/pip" ]; then+  rm -rf "$VENV"+  if ! python3 -m venv "$VENV" 2>/dev/null || [ ! -x "$VENV/bin/pip" ]; then+    rm -rf "$VENV"+    PYV=$(python3 -c 'import sys;print(f"{sys.version_info.major}.{sys.version_info.minor}")')+    if command -v sudo >/dev/null 2>&1; then sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -q "python$PYV-venv" >/dev/null 2>&1 || true; fi+    python3 -m venv "$VENV" || { echo "ERROR: python3 -m venv failed; install python3-venv (apt-get install python$PYV-venv) and re-run"; exit 1; }+  fi+fi "$VENV/bin/pip" install -q numpy spicelib >/dev/null if ! command -v ngspice >/dev/null 2>&1; then   if command -v sudo >/dev/null 2>&1; then sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -q ngspice >/dev/null || echo "WARN: install ngspice (apt-get install ngspice) to run the ngspice engine"; fi
install.sh

  
package.json+1−1
@@ -2,7 +2,7 @@   "slug": "adom-spice-skillpack",   "title": "SPICE Simulation Skills",   "type": "skill",-  "version": "0.2.0",+  "version": "0.2.1",   "description": "Pick, run and compare SPICE simulators from an AI thread: ngspice in the Ubuntu container, LTspice and PSpice for TI on a Windows host through Adom Bridge, plus the adom-spice dashboard that overlays all three and flags where they disagree.",   "tags": [     "skill",
page.json+87−3
@@ -2,7 +2,91 @@   "title": "SPICE Simulation Skills",   "brief": "Pick, run and license the right SPICE simulator from an AI thread: ngspice in the container by default, LTspice and PSpice for TI on a Windows host for vendor models.",   "type": "skill",-  "tags": ["skill", "skillpack", "spice", "simulation", "ngspice", "ltspice", "pspice", "electronics"],+  "tags": [+    "skill",+    "skillpack",+    "spice",+    "simulation",+    "ngspice",+    "ltspice",+    "pspice",+    "electronics"+  ],   "visibility": "public",-  "hero": { "type": "image", "path": "docs/hero.png" }-}+  "hero": {+    "type": "image",+    "path": "docs/hero.png"+  },+  "slug": "adom-spice-skillpack",+  "version": "0.2.1",+  "description": "Pick, run and compare SPICE simulators from an AI thread: ngspice in the Ubuntu container, LTspice and PSpice for TI on a Windows host through Adom Bridge, plus the adom-spice dashboard that overlays all three and flags where they disagree.",+  "dependencies": {},+  "discovery_triggers": [+    "simulate this circuit",+    "run a spice simulation",+    "which spice simulator should I use",+    "ngspice or ltspice",+    "run the TI pspice model",+    "can we host ltspice in a dashboard",+    "spice licensing",+    "compare ngspice ltspice and pspice",+    "do my simulators agree",+    "spice dashboard"+  ],+  "discovery_pitch": "Reach for this whenever a circuit needs simulating or a SPICE tool or vendor model has to be chosen, installed or licensed.",+  "sample_prompts": [+    {+      "label": "Simulate a buck",+      "prompt": "Simulate my 12 V to 5 V buck converter and check the load-step response"+    },+    {+      "label": "Vendor model",+      "prompt": "TI only gives a PSpice model for this regulator, how do we simulate it?"+    },+    {+      "label": "Pick a tool",+      "prompt": "Should we use ngspice, LTspice or PSpice for our simulation dashboard?"+    }+  ],+  "files": [+    "SKILL.md",+    "README.md",+    "package.json",+    "install.sh",+    "uninstall.sh",+    "skills/spice-choose/SKILL.md",+    "skills/spice-ngspice/SKILL.md",+    "skills/spice-ltspice/SKILL.md",+    "skills/spice-pspice-ti/SKILL.md",+    "skills/spice-vendor-models/SKILL.md",+    "skills/spice-portable-netlists/SKILL.md",+    "skills/spice-licensing/SKILL.md",+    "examples/buck_portable.cir",+    "examples/buck_portable_pspice.cir",+    "examples/sallen_key_ac.cir",+    "examples/csdf.py",+    "skills/adom-spice/SKILL.md",+    "app/adom_spice/analysis.py",+    "app/adom_spice/engines.py",+    "app/adom_spice/server.py",+    "app/bin/adom-spice",+    "app/examples/tps54202-buck/board_ltspice.cir",+    "app/examples/tps54202-buck/board_ngspice.cir",+    "app/examples/tps54202-buck/board_pspice.cir",+    "app/examples/tps54202-buck/study.json",+    "app/install.sh",+    "app/uninstall.sh",+    "app/web/app.js",+    "app/web/index.html",+    "app/web/style.css"+  ],+  "scripts": {+    "install": "./install.sh",+    "uninstall": "./uninstall.sh"+  },+  "org": "adom",+  "author": {+    "name": "John Lauer",+    "email": "[email protected]"+  }+}\ No newline at end of file
uninstall.sh