← Commit history

Initial commit: app/adom-aiflow-jlcpcb

John Lauer ·b0835d89b4 ·2d ago
2 files changed +107
README.mdadded+42
@@ -0,0 +1,42 @@+# AI Flow: JLCPCB++`adom-aiflow-jlcpcb` takes a finished board to assembled boards from JLCPCB. It is a stage of AI Flow: the board+flow (adom-aiflow) ends at a routed, DRC-clean board, and this app starts there. One Rust binary that tells the AI+what to do next and does the deterministic work itself.++| Step | What happens |+|---|---|+| intake | `init` from the board release (or the board and BOM), sha256 recorded |+| sourcing | every placed part orderable at JLCPCB; substitutes proven from both datasheets with `swap` |+| rules | KiCad DRC with JLCPCB's design rules from [adom/pcb-design-rules](https://wiki.adom.inc/adom/pcb-design-rules), picked by layer count, on a copy of the board |+| export | gerber zip with paste and drill, JLCPCB BOM and CPL from the desktop's native kicad-cli, then the rotation check |+| preview | JLCPCB's placement preview, a screenshot of every corrected or unverified part |+| quote, approval, order | the total, the human's recorded OK, the order number; nothing is paid without the OK |+| delivered | boards received and tried |+| share | rotation corrections published as `jlcpcb-rotation.json` on the parts' wiki pages |+| report | what was ordered and the evidence, for the next stage |++## The rotation check++JLCPCB places each part from the footprint in its own (EasyEDA) library for the LCSC number, at the CPL's rotation.+That footprint's zero rotation often differs from KiCad's. For every placed part the check reads JLCPCB's footprint,+finds the rotation of 0, 90, 180 or 270 degrees and the offset that land its pads on the board's pads pad for pad,+and writes the corrected rotation (and centroid) into the CPL. A part that fits no rotation fails the export. On+the 12 V to 5 V buck molecule it found the TPS54202 (TSOT-23-6) at -90 degrees with a 0.012 mm residual, the same+correction JLCPCB's preview called for.++Each correction can be shared on the part's component page as `jlcpcb-rotation.json` (schema+`adom/jlcpcb-rotation@1`), one entry per LCSC number and KiCad footprint, with the evidence counted: pad fits,+JLCPCB preview screenshots, boards delivered, distinct users.++## Build++Open source, MIT. Rust, Linux.++```bash+./build.sh        # tests, release build, bin/adom-aiflow-jlcpcb+./install.sh      # binary to ~/.local/bin, skill to ~/.claude/skills+```++Desktop steps go through Adom Bridge (`adom-bridge`) to a Windows desktop with KiCad 10 and pup. Built from the+flow-app template in adom/adom-aiflow (`template/flow-app`).
page.jsonadded+65
@@ -0,0 +1,65 @@+{+  "slug": "adom-aiflow-jlcpcb",+  "type": "app",+  "version": "0.1.0",+  "title": "AI Flow: JLCPCB",+  "description": "The JLCPCB ordering stage of AI Flow: from a finished board to assembled boards from JLCPCB. Part substitutes proven from both datasheets, the gerber zip, BOM and CPL from the desktop's own KiCad, every part's rotation checked against JLCPCB's own footprint and corrected, placement-preview evidence, the quote, the human's recorded OK before payment, and rotation corrections shared on component pages. Open source (MIT): build it with ./build.sh.",+  "category": "Developer Tools",+  "license": "MIT",+  "bin": {+    "adom-aiflow-jlcpcb": "bin/adom-aiflow-jlcpcb"+  },+  "tags": [+    "jlcpcb",+    "pcb assembly",+    "cpl",+    "rotation",+    "bom",+    "gerbers",+    "lcsc",+    "kicad",+    "ai flow"+  ],+  "dependencies": {},+  "scripts": {+    "install": "./install.sh",+    "uninstall": "./uninstall.sh"+  },+  "bundled": true,+  "hero": {+    "type": "image",+    "path": "docs/hero.png"+  },+  "brief": "Order a finished board from JLCPCB with every part's pin 1 checked against JLCPCB's own footprint.",+  "discovery_pitch": "Use when a finished KiCad board goes to JLCPCB for assembly: it makes the gerbers, BOM and CPL, fixes part rotations before JLCPCB places them wrong, and keeps the order honest from quote to delivered boards.",+  "discovery_triggers": [+    "order my board from jlcpcb",+    "jlcpcb assembly",+    "jlc cpl rotation",+    "parts rotated wrong at jlcpcb",+    "export gerbers bom cpl",+    "jlcpcb basic parts",+    "swap to an lcsc part",+    "adom-aiflow-jlcpcb"+  ],+  "sample_prompts": [+    {+      "label": "Order this board",+      "prompt": "Order this board from JLCPCB with assembly, 5 boards"+    },+    {+      "label": "Check rotations",+      "prompt": "Check every part's rotation against JLCPCB before I upload the CPL"+    },+    {+      "label": "Cut the fees",+      "prompt": "Swap the extended parts on my BOM for JLCPCB basic parts where it is safe"+    }+  ],+  "visibility": "public",+  "org": "adom",+  "author": {+    "name": "John Lauer",+    "email": "[email protected]"+  }+}\ No newline at end of file