← Commit history
Publish 1.0.1
8 files changed
+592−159
README.md+545−115@@ -1,175 +1,605 @@-# ds2sf+# adom-ds2sf -**Datasheet → symbol + footprint + provenance JSON.**+**Datasheet â symbol + footprint + provenance. Read a chip's PDF, extract its pins and pads, and emit structured JSON the rest of the Adom EDA tools build on.** -A small Rust CLI that runs downstream of `chip-fetcher`: it reads a chip's datasheet PDF and produces the JSON inputs needed by Adom's `sym_create` MCP plus a footprint metadata file plus a field-level provenance audit trail. Built for both human use and **agent-to-agent calling** by an upstream automation (`chip-fetcher`, batch pipelines).+adom-ds2sf ("datasheet to symbol & footprint") reads a manufacturer datasheet PDF and extracts the part's electrical interface â pin names, numbers, types, and logical groups (POWER, GROUND, GPIO split by port, DEBUGâ¦) â plus the land pattern when the datasheet provides one, into `<MPN>-symbol.extracted.json` and `<MPN>-footprint.extracted.json` with **per-field provenance**: every pin and every dimension records the datasheet page it came from. It's the source that lets **adom-symbol** auto-generate a clean, balanced, grouped symbol straight from the datasheet â independent of any vendor's CAD draw. -Mirrors the `step2glb` naming convention.+## What it does +- **`extract`** â datasheet PDF â symbol + footprint + provenance JSON.+- **`inspect`** â summarize an existing extraction in a chip directory.+- **`svg`** â regenerate the authoritative footprint SVG from cached JSON (no re-extraction). -## What it produces+Note: a datasheet without a land-pattern table yields a symbol but no footprint pads â adom-ds2sf reports exactly what it could and couldn't extract, with provenance on every datapoint. -For a chip directory like `~/project/chip-fetcher/library/<MPN>/`, ds2sf writes four JSONs:+# Seven worked examples -```-<MPN>-symbol.extracted.json # sym_create-shaped (drop-in MCP input)-<MPN>-footprint.extracted.json # padCount, bodyDimensions, leadDimensions,- # padDescriptions, symbolPinMap, kicad_baseline-<MPN>-extraction.provenance.json # per-pin {page, table_caption}- # per-dimension {field, value, page, figure_label}-<MPN>-extraction.result.json # agent-to-agent contract: status + exit_code + hints+Each example below was produced by `adom-ds2sf extract` on the manufacturer's own datasheet. For every part you can see the **generated symbol + footprint**, the **full extracted pin list**, the **provenance JSON** (with the datasheet page each datapoint came from), and **the actual datasheet pages** adom-ds2sf read â plus a link to the original PDF. Seven different part types, seven different packages.++## 1. DMG2305UX-7 â P-channel MOSFET++*Diodes Incorporated · SOT-23 · [original datasheet PDF](https://www.diodes.com/assets/Datasheets/DMG2305UX.pdf)*++P-channel enhancement-mode MOSFET in SOT-23. -20V Vds, -4.2A continuous Id at Ta=25°C (Vgs=-4.5V), Rds(on) typ 40 mΩ at Vgs=-4.5V / 52 mΩ at Vgs=-2.5V. Low-Vgs(th) load-switch / power-management device.++**Symbol + footprint, generated by adom-ds2sf:**++++**Extracted pin list (3 pins):**++| # | Name | Type | Group |+|---|------|------|-------|+| 1 | G | `input` | CONTROL |+| 2 | S | `passive` | POWER |+| 3 | D | `passive` | POWER |++**Provenance** â every field traces back to a datasheet page:++```json+{+ "mpn": "DMG2305UX-7",+ "datasheet": {+ "url": "https://www.diodes.com/assets/Datasheets/DMG2305UX.pdf",+ "page_count": 6,+ "sha256": "7421a75157a2e700â¦"+ },+ "symbol.pin_provenance": [+ {+ "confidence": "high",+ "page": 1,+ "pin_name": "G",+ "pin_number": "1",+ "table_caption": "Top View / Internal Schematic (page 1)"+ },+ {+ "confidence": "high",+ "page": 1,+ "pin_name": "S",+ "pin_number": "2",+ "table_caption": "Top View / Internal Schematic (page 1)"+ }+ ],+ "footprint.dimension_provenance": [+ {+ "field": "bodyDimensions.x",+ "figure_label": "Package Outline Dimensions â SOT23 (Standard)",+ "page": 5,+ "value": 2.9+ },+ {+ "field": "bodyDimensions.y",+ "figure_label": "Package Outline Dimensions â SOT23 (Standard)",+ "page": 5,+ "value": 1.3+ }+ ]+} ``` -The provenance JSON is the audit trail. Pick any pin or any dimension, follow the `page` field, open the PDF on that page, and confirm the value is visibly there. Same loop for footprint dimensions via `figure_label`.+**The datasheet pages adom-ds2sf read** â the pin table (p.1) and the package drawing (p.5):++++ +[â Open the original DMG2305UX-7 datasheet](https://www.diodes.com/assets/Datasheets/DMG2305UX.pdf) -## How it works+## 2. LM358D â Dual op-amp -Two focused `claude -p` calls per datasheet:+*Texas Instruments · SOIC-8 · [original datasheet PDF](https://www.ti.com/lit/ds/symlink/lm358.pdf)* -1. **Symbol pass** — pinout tables, pin types, Adom logical groups (POWER / I2C / GPIO / etc.), per-pin page provenance.-2. **Footprint pass** — package outline, recommended land pattern, body + lead dimensions, per-dimension page provenance.+Industry-standard dual general-purpose operational amplifier. Operates from a single 3V to 32V supply (or split ±1.5V to ±16V), with an input common-mode range that includes ground and a typical 1.2 MHz gain-bandwidth product. SOIC-8 (D)⦠-Each pass has its own JSON schema and its own validator. Failures retry once with the validation error fed back to the model. Symbol-pass receives the canonical pin-name → pin-number map for the footprint pass so the two outputs cannot disagree with themselves.+**Symbol + footprint, generated by adom-ds2sf:** -After Claude finishes, ds2sf normalizes the package name against the **service-kicad standard library** (`Package_SO`, `Package_QFP`, `Package_DFN_QFN`, `Package_LQFP`, `Package_TO_SOT_SMD`, `Package_DIP`, …). When the package matches, downstream tools just pull the `.kicad_mod` from there. When it doesn't (custom OLGA packages, modules, optical sensors), `bodyDimensions` + `leadDimensions` carry the datasheet-extracted values and `kicad_baseline` is `null`.+ +**Extracted pin list (8 pins):** -## Sample output+| # | Name | Type | Group |+|---|------|------|-------|+| 1 | OUT1 | `output` | OTHER |+| 2 | IN1- | `input` | OTHER |+| 3 | IN1+ | `input` | OTHER |+| 4 | V- | `power_in` | POWER |+| 5 | IN2+ | `input` | OTHER |+| 6 | IN2- | `input` | OTHER |+| 7 | OUT2 | `output` | OTHER |+| 8 | V+ | `power_in` | POWER | -### Top of `<MPN>-symbol.extracted.json` (ADS1115IDGSR)+**Provenance** â every field traces back to a datasheet page: ```json {- "symbolName": "ADS1115",- "manufacturer": "Texas Instruments",- "package": "VSSOP-10",- "description": "Ultra-small 16-bit sigma-delta ADC with PGA, internal reference, …",- "category": "ic",- "referencePrefix": "U",- "datasheetUrl": "https://www.ti.com/lit/ds/symlink/ads1115.pdf",- "pins": [- { "number": "8", "name": "VDD", "type": "power_in", "group": "POWER", "description": "…" },- { "number": "3", "name": "GND", "type": "passive", "group": "GROUND", "description": "…" },- { "number": "9", "name": "SDA", "type": "bidirectional","group": "I2C", "description": "…" },- { "number": "4", "name": "AIN0","type": "input", "group": "ADC", "description": "…" }+ "mpn": "LM358D",+ "datasheet": {+ "url": "https://www.ti.com/lit/ds/symlink/lm358.pdf",+ "page_count": 68,+ "sha256": "9c879c3a3e9291c5â¦"+ },+ "symbol.pin_provenance": [+ {+ "confidence": "high",+ "page": 3,+ "pin_name": "OUT1",+ "pin_number": "1",+ "table_caption": "Table 4-1. Pin Functions"+ },+ {+ "confidence": "high",+ "page": 3,+ "pin_name": "IN1-",+ "pin_number": "2",+ "table_caption": "Table 4-1. Pin Functions"+ } ],- "groups": [ { "name": "POWER", "description": "…" }, … ]+ "footprint.dimension_provenance": [+ {+ "field": "bodyDimensions.x",+ "figure_label": "D0008A Package Outline â SOIC - 1.75 mm max height",+ "page": 59,+ "value": 4.91+ },+ {+ "field": "bodyDimensions.y",+ "figure_label": "D0008A Package Outline â SOIC - 1.75 mm max height",+ "page": 59,+ "value": 3.9+ }+ ] } ``` -### Top of `<MPN>-extraction.provenance.json`+**The datasheet pages adom-ds2sf read** â the pin table (p.3) and the package drawing (p.60):++++++[â Open the original LM358D datasheet](https://www.ti.com/lit/ds/symlink/lm358.pdf)++## 3. TPS62840YBGR â Buck converter++*Texas Instruments · WCSP-6 (YBG, DSBGA) · [original datasheet PDF](https://www.ti.com/lit/ds/symlink/tps62840.pdf)*++1.8-V to 6.5-V input, 750-mA step-down (buck) converter with ultra-low 60-nA operating quiescent current and 100% duty-cycle mode (120-nA Iq). DCS-Control architecture with 1.8-MHz nominal switching, 16 selectable output voltages via VSETâ¦++**Symbol + footprint, generated by adom-ds2sf:**++++**Extracted pin list (6 pins):**++| # | Name | Type | Group |+|---|------|------|-------|+| A1 | GND | `power_in` | GROUND |+| A2 | VOS | `input` | POWER |+| B1 | VIN | `power_in` | POWER |+| B2 | SW | `power_out` | POWER |+| C1 | EN | `input` | CONTROL |+| C2 | VSET | `input` | CONTROL |++**Provenance** â every field traces back to a datasheet page: ```json {+ "mpn": "TPS62840YBGR", "datasheet": {- "path": "/…/ADS1115IDGSR.pdf",- "url": "https://www.ti.com/lit/ds/symlink/ads1115.pdf",- "sha256": "65231e81…",- "source_tier": "mfr",- "source_host": "ti.com/lit",- "page_count": 57- },- "symbol": {- "pin_provenance": [- { "pin_number": "1", "pin_name": "ADDR",- "page": 3, "table_caption": "Table 4-1. Pin Functions: RUG, DYN, and DGS Packages",- "confidence": "high" }- ]+ "url": "https://www.ti.com/lit/ds/symlink/tps62840.pdf",+ "page_count": 45,+ "sha256": "b715ae80beb8f08bâ¦" },- "footprint": {- "dimension_provenance": [- { "field": "bodyDimensions.x", "value": 3.1,- "page": 52, "figure_label": "DGS0010A VSSOP - 1.1 mm max height Package Outline",- "confidence": "high" }- ]- }+ "symbol.pin_provenance": [+ {+ "confidence": "high",+ "page": 5,+ "pin_name": "GND",+ "pin_number": "A1",+ "table_caption": "Pin Functions"+ },+ {+ "confidence": "high",+ "page": 5,+ "pin_name": "VOS",+ "pin_number": "A2",+ "table_caption": "Pin Functions"+ }+ ],+ "footprint.dimension_provenance": [+ {+ "field": "bodyDimensions.x",+ "figure_label": "YBG0006 Package Outline â DSBGA - 0.5 mm max height (D: 1.498/1.438 mm, E: 0.998/0.938 mm)",+ "page": 39,+ "value": 0.968+ },+ {+ "field": "bodyDimensions.y",+ "figure_label": "YBG0006 Package Outline â DSBGA - 0.5 mm max height (D: 1.498/1.438 mm, E: 0.998/0.938 mm)",+ "page": 39,+ "value": 1.468+ }+ ] } ``` +**The datasheet pages adom-ds2sf read** â the pin table (p.5) and the package drawing (p.40):++ -## Agent-to-agent contract+ -Every invocation writes `<MPN>-extraction.result.json` and exits with one of three codes:+[â Open the original TPS62840YBGR datasheet](https://www.ti.com/lit/ds/symlink/tps62840.pdf) -| Exit | `status` | Caller action |-|---|---|---|-| 0 | `ok` | Accept the outputs. `review_required[]` may have informational entries. |-| 2 | `needs_better_pdf` | Try one of `hints[].candidates` and re-call with `--pdf <new>`. |-| 3 | `unrecoverable` | Surface to a human; inspect `.ds2sf-cache/` for the raw Claude responses. |+## 4. INA226AIDGSR â Current / power monitor -`hints[]` is a tagged-union list:+*Texas Instruments · VSSOP-10 · [original datasheet PDF](https://www.ti.com/lit/ds/symlink/ina226.pdf)* -- `try_alternate_pdf` — `{reason, candidates: PathBuf[]}`. ds2sf already ranked the chip-dir's other PDFs; pick the first one not yet tried.-- `update_upstream_metadata` — `{file, key, current, extracted}`. e.g. `info.json`'s `package` disagrees with the datasheet; patch it and re-run.-- `use_datasheet_extracted_footprint` — `{package}`. Custom package; downstream footprint authoring should use the captured dimensions.-- `human_review` — `{reason, notes}`. Engineering nuance the schematic designer should see.+36V, 16-bit ultra-precise I²C/SMBus current, voltage, and power monitor with alert. Senses bus voltages from 0V to 36V (high- or low-side), with ±81.92 mV shunt range, 0.1% gain error, 10 µV offset, and configurable averaging. Operates⦠-This means an upstream agent like `chip-fetcher` can call ds2sf, walk `hints[].candidates` until it gets `status: ok`, and accept the extraction without human input.+**Symbol + footprint, generated by adom-ds2sf:** -```rust-let mut tried = HashSet::new();-let mut r = run_ds2sf(chip_dir, None);-tried.insert(r.datasheet_used.clone());-while r.status == "needs_better_pdf" {- let next = r.hints.iter()- .filter_map(|h| if let Hint::TryAlternatePdf{candidates, ..} = h { Some(candidates) } else { None })- .flatten().find(|c| !tried.contains(*c));- let Some(next) = next else { break };- tried.insert(next.clone());- r = run_ds2sf(chip_dir, Some(next));+++**Extracted pin list (10 pins):**++| # | Name | Type | Group |+|---|------|------|-------|+| 1 | A1 | `input` | CONTROL |+| 2 | A0 | `input` | CONTROL |+| 3 | Alert | `output` | ALERT |+| 4 | SDA | `bidirectional` | I2C |+| 5 | SCL | `input` | I2C |+| 6 | VS | `power_in` | POWER |+| 7 | GND | `power_in` | GROUND |+| 8 | VBUS | `input` | ADC |+| 9 | IN- | `input` | ADC |+| 10 | IN+ | `input` | ADC |++**Provenance** â every field traces back to a datasheet page:++```json+{+ "mpn": "INA226AIDGSR",+ "datasheet": {+ "url": "https://www.ti.com/lit/ds/symlink/ina226.pdf",+ "page_count": 40,+ "sha256": "8652754621863692â¦"+ },+ "symbol.pin_provenance": [+ {+ "confidence": "high",+ "page": 3,+ "pin_name": "A1",+ "pin_number": "1",+ "table_caption": "Table 4-1. Pin Functions"+ },+ {+ "confidence": "high",+ "page": 3,+ "pin_name": "A0",+ "pin_number": "2",+ "table_caption": "Table 4-1. Pin Functions"+ }+ ],+ "footprint.dimension_provenance": [+ {+ "field": "bodyDimensions.x",+ "figure_label": "DGS0010A Package Outline â VSSOP - 1.1 mm max height (JEDEC MO-187 BA)",+ "page": 37,+ "value": 3.0+ },+ {+ "field": "bodyDimensions.y",+ "figure_label": "DGS0010A Package Outline â VSSOP - 1.1 mm max height (JEDEC MO-187 BA)",+ "page": 37,+ "value": 3.0+ }+ ] } ``` -Full reason / action enums and the calling recipe are in [SKILL.md](SKILL.md).+**The datasheet pages adom-ds2sf read** â the pin table (p.3) and the package drawing (p.38): + -## CLI+ -```-ds2sf extract <CHIP-DIR> # read PDF, emit symbol + footprint + provenance + result JSONs-ds2sf normalize <PACKAGE> # resolve a package string against service-kicad stdlib (debug)-ds2sf inspect <CHIP-DIR> # print summary of an existing extraction-ds2sf health # probe `claude` CLI + service-kicad reachability-ds2sf install # drop SKILL.md to ~/.claude/skills/ds2sf/+[â Open the original INA226AIDGSR datasheet](https://www.ti.com/lit/ds/symlink/ina226.pdf)++## 5. MSP430G2553IPW20 â 16-bit MCU++*Texas Instruments · TSSOP-20 · [original datasheet PDF](https://www.ti.com/lit/ds/symlink/msp430g2553.pdf)*++Ultra-low-power 16-bit RISC microcontroller with 16 KB flash, 512 B SRAM, 10-bit ADC, and integrated UART/SPI/I²C interfaces. Operates at 1.8â3.6 V with active mode consumption of 230 µA/MHz and RTC mode of 0.1 µA.++**Symbol + footprint, generated by adom-ds2sf:**++++**Extracted pin list (20 pins):**++| # | Name | Type | Group |+|---|------|------|-------|+| 1 | DVCC | `power_in` | POWER |+| 2 | P1.0/TA0CLK/ACLK/A0/CA0 | `bidirectional` | GPIO |+| 3 | P1.1/TA0.0/UCA0RXD/UCA0SOMI/A1/CA1 | `bidirectional` | GPIO |+| 4 | P1.2/TA0.1/UCA0TXD/UCA0SIMO/A2/CA2 | `bidirectional` | GPIO |+| 5 | P1.3/ADC10CLK/A3/VREF-/VREF+/CA3/CAOUT | `bidirectional` | GPIO |+| 6 | P1.4/SMCLK/UCB0STE/UCA0CLK/A4/VREF+/CA4/TCK | `bidirectional` | GPIO |+| 7 | P1.5/TA0.0/UCB0CLK/UCAOSSTE/A5/CA5/TMS | `bidirectional` | GPIO |+| 8 | P2.0/TA1.0 | `bidirectional` | GPIO |+| 9 | P2.1/TA1.1 | `bidirectional` | GPIO |+| 10 | P2.2/TA1.1 | `bidirectional` | GPIO |+| 11 | P2.3/TA1.0 | `bidirectional` | GPIO |+| 12 | P2.4/TA1.2 | `bidirectional` | GPIO |+| 13 | P2.5/TA1.2 | `bidirectional` | GPIO |+| 14 | NC | `unconnected` | NC |+| 15 | P1.6/TA0.1/A6/CA6/UCB0SOMI/UCB0SCL/TDI/TCLK | `bidirectional` | GPIO |+| 16 | P1.7/A7/CA7/CAOUT/UCB0SIMO/UCB0SDA/TDO/TDI | `bidirectional` | GPIO |+| 17 | TEST/SBWTCK | `input` | DEBUG |+| 18 | XOUT/P2.7 | `bidirectional` | TIMING |+| 19 | XIN/P2.6/TA0.1 | `bidirectional` | TIMING |+| 20 | DVSS | `power_in` | GROUND |++**Provenance** â every field traces back to a datasheet page:++```json+{+ "mpn": "MSP430G2553IPW20",+ "datasheet": {+ "url": "https://www.ti.com/lit/ds/symlink/msp430g2553.pdf",+ "page_count": 85,+ "sha256": "c94b53fef9ba6065â¦"+ },+ "symbol.pin_provenance": [+ {+ "confidence": "high",+ "page": 3,+ "pin_name": "DVCC",+ "pin_number": "1",+ "table_caption": "Device Pinout, MSP430G2x13 and MSP430G2x53, 20-Pin Devices, TSSOP and PDIP"+ },+ {+ "confidence": "high",+ "notes": "Muxed pin with multiple peripheral functions; configure via software.",+ "page": 6,+ "pin_name": "P1.0/TA0CLK/ACLK/A0/CA0",+ "pin_number": "2",+ "table_caption": "Table 2. Terminal Functions"+ }+ ],+ "footprint.dimension_provenance": [+ {+ "field": "bodyDimensions.x",+ "figure_label": "PW0020A Package Outline",+ "page": 76,+ "value": 6.6+ },+ {+ "field": "bodyDimensions.y",+ "figure_label": "PW0020A Package Outline",+ "page": 76,+ "value": 4.5+ }+ ]+} ``` -`extract` flags: `--pdf`, `--mpn`, `--manufacturer`, `--datasheet-url`, `--source-tier`, `--out-dir`, `--model` (default `claude-opus-4-7`), `--force`, `--symbol-only`, `--footprint-only`, `--json-only`.+**The datasheet pages adom-ds2sf read** â the pin table (p.6) and the package drawing (p.77): + -## Validated chips (initial release)+ -| MPN | Package | Stdlib | Pins | Note |-|---|---|---|---|---|-| ADS1115IDGSR | VSSOP-10 | ✅ `Package_SO:MSOP-10_3x3mm_P0.5mm` | 10 | clean |-| DRV8316RRGFR | VQFN-40 (7×5) | ❌ custom | 40 | caught chip-fetcher's info.json lying about package size |-| VL53L8CX | OLGA-16 | ❌ custom | 17 | all 5 muxed pins flagged, thermal pad called out |-| ESP32-S3-WROOM-1-N4 | SMD module | ❌ custom | 41 | castellated pads, boot-strapping pins, PSRAM variant conflicts |+[â Open the original MSP430G2553IPW20 datasheet](https://www.ti.com/lit/ds/symlink/msp430g2553.pdf) -Failure-path also verified: feeding the SoC datasheet to a module product correctly returned `status: needs_better_pdf` with five ranked candidate PDFs in `hints[]`.+## 6. BMI270 â 6-axis IMU +*Bosch · LGA-14 · [original datasheet PDF](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi270-ds000.pdf)* -## Build+Ultra-low-power 16-bit 6-axis IMU (accelerometer + gyroscope) with integrated motion-triggered interrupts, gesture recognition, and advanced power management. Dual-protocol interface supporting I²C and SPI with optional auxiliary sensor⦠-```bash-cargo build --release-sudo cp target/release/ds2sf /usr/local/bin/-ds2sf install+**Symbol + footprint, generated by adom-ds2sf:**++++**Extracted pin list (14 pins):**++| # | Name | Type | Group |+|---|------|------|-------|+| 1 | SDO | `output` | I2C |+| 2 | ASDx | `bidirectional` | OTHER |+| 3 | ASCx | `input` | OTHER |+| 4 | INT1 | `output` | ALERT |+| 5 | VDDIO | `power_in` | POWER |+| 6 | GNDIO | `passive` | GROUND |+| 7 | GND | `passive` | GROUND |+| 8 | VDD | `power_in` | POWER |+| 9 | INT2 | `output` | ALERT |+| 10 | OCSB | `input` | OTHER |+| 11 | OSDO | `output` | OTHER |+| 12 | CSB | `input` | SPI |+| 13 | SCx | `input` | I2C |+| 14 | SDx | `bidirectional` | I2C |++**Provenance** â every field traces back to a datasheet page:++```json+{+ "mpn": "BMI270",+ "datasheet": {+ "url": "https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi270-ds000.pdf",+ "page_count": 150,+ "sha256": "51818aed4619bcccâ¦"+ },+ "symbol.pin_provenance": [+ {+ "confidence": "high",+ "notes": "SPI MISO (4-wire), I2C address bit-0 select; open-drain output",+ "page": 135,+ "pin_name": "SDO",+ "pin_number": "1",+ "table_caption": "Table 22: Pin-out and pin connections"+ },+ {+ "confidence": "high",+ "notes": "Secondary interface; muxed for Aux I2C SDA, OIS SDI, or DNC",+ "page": 135,+ "pin_name": "ASDx",+ "pin_number": "2",+ "table_caption": "Table 22: Pin-out and pin connections"+ }+ ],+ "footprint.dimension_provenance": [+ {+ "field": "bodyDimensions.x",+ "figure_label": "Section 8.1, Package outline dimensions",+ "page": 143,+ "value": 3.0+ },+ {+ "field": "bodyDimensions.y",+ "figure_label": "Section 8.1, Package outline dimensions",+ "page": 143,+ "value": 2.5+ }+ ]+}+```++**The datasheet pages adom-ds2sf read** â the pin table (p.135) and the package drawing (p.145):++++++[â Open the original BMI270 datasheet](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi270-ds000.pdf)++## 7. ESP32-S3-WROOM-1-N4 â Wi-Fi + BLE module++*Espressif Systems · SMD-41 (18 x 25.5 x 3.1 mm castellated module, PCB antenna) · [original datasheet PDF](https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf)*++ESP32-S3-WROOM-1-N4 is a Wi-Fi (802.11 b/g/n) and Bluetooth LE 5 module built around the ESP32-S3 SoC (dual-core Xtensa LX7 @ 240 MHz, vector instructions for ML). The -N4 variant integrates 4 MB SPI flash and no PSRAM. Module exposes upâ¦++**Symbol + footprint, generated by adom-ds2sf:**++++**Extracted pin list (41 pins):**++| # | Name | Type | Group |+|---|------|------|-------|+| 1 | GND | `power_in` | GROUND |+| 2 | 3V3 | `power_in` | POWER |+| 3 | EN | `input` | CONTROL |+| 4 | IO4 | `bidirectional` | GPIO |+| 5 | IO5 | `bidirectional` | GPIO |+| 6 | IO6 | `bidirectional` | GPIO |+| 7 | IO7 | `bidirectional` | GPIO |+| 8 | IO15 | `bidirectional` | GPIO |+| 9 | IO16 | `bidirectional` | GPIO |+| 10 | IO17 | `bidirectional` | GPIO |+| 11 | IO18 | `bidirectional` | GPIO |+| 12 | IO8 | `bidirectional` | GPIO |+| 13 | IO19 | `bidirectional` | USB |+| 14 | IO20 | `bidirectional` | USB |+| 15 | IO3 | `bidirectional` | GPIO |+| 16 | IO46 | `bidirectional` | GPIO |+| 17 | IO9 | `bidirectional` | GPIO |+| 18 | IO10 | `bidirectional` | GPIO |+| 19 | IO11 | `bidirectional` | GPIO |+| 20 | IO12 | `bidirectional` | GPIO |+| 21 | IO13 | `bidirectional` | GPIO |+| 22 | IO14 | `bidirectional` | GPIO |+| 23 | IO21 | `bidirectional` | GPIO |+| 24 | IO47 | `bidirectional` | GPIO |+| 25 | IO48 | `bidirectional` | GPIO |+| 26 | IO45 | `bidirectional` | GPIO |+| 27 | IO0 | `bidirectional` | GPIO |+| 28 | IO35 | `bidirectional` | GPIO |+| 29 | IO36 | `bidirectional` | GPIO |+| 30 | IO37 | `bidirectional` | GPIO |+| 31 | IO38 | `bidirectional` | GPIO |+| 32 | IO39 | `bidirectional` | DEBUG |+| 33 | IO40 | `bidirectional` | DEBUG |+| 34 | IO41 | `bidirectional` | DEBUG |+| 35 | IO42 | `bidirectional` | DEBUG |+| 36 | RXD0 | `bidirectional` | UART |+| 37 | TXD0 | `bidirectional` | UART |+| 38 | IO2 | `bidirectional` | GPIO |+| 39 | IO1 | `bidirectional` | GPIO |+| 40 | GND | `power_in` | GROUND |+| 41 | EPAD | `power_in` | GROUND |++**Provenance** â every field traces back to a datasheet page:++```json+{+ "mpn": "ESP32-S3-WROOM-1-N4",+ "datasheet": {+ "url": "https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf",+ "page_count": 87,+ "sha256": "2d5a7cb7fd559d8dâ¦"+ },+ "symbol.pin_provenance": [+ {+ "confidence": "high",+ "page": 11,+ "pin_name": "GND",+ "pin_number": "1",+ "table_caption": "Table 3-1. Pin Definitions"+ },+ {+ "confidence": "high",+ "page": 11,+ "pin_name": "3V3",+ "pin_number": "2",+ "table_caption": "Table 3-1. Pin Definitions"+ }+ ],+ "footprint.dimension_provenance": [+ {+ "field": "bodyDimensions.x",+ "figure_label": "Figure 10-1. ESP32-S3-WROOM-1 Physical Dimensions",+ "page": 42,+ "value": 18.0+ },+ {+ "field": "bodyDimensions.y",+ "figure_label": "Figure 10-1. ESP32-S3-WROOM-1 Physical Dimensions",+ "page": 42,+ "value": 25.5+ }+ ]+} ``` -Or just `./build.sh`.+**The datasheet pages adom-ds2sf read** â the pin table (p.11) and the package drawing (p.45):++++++[â Open the original ESP32-S3-WROOM-1-N4 datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf)++# Open source â check it out, vibe-code it, send it back +adom-ds2sf is MIT and **fully open**. The complete Rust source is in this page's **Files** tab. -## Cost & latency (Haiku 4.5 baseline)+1. **Build it.** `cargo build --release` drops a standalone binary.+2. **Point your install at your checkout.** `adompkg link john/adom-ds2sf ./adom-ds2sf`.+3. **Vibe-code a change.** Open it in Claude Code â a new provenance field, a different grouping heuristic, another datasheet quirk to handle.+4. **Send it back.** Open a **pull request** on this page, or start a discussion thread. -- ~$0.20–0.30 per chip end-to-end-- ~2–3 min wall time per chip-- Anthropic prompt cache keeps the PDF warm across the symbol→footprint calls+## Part of the Adom EDA family++adom-ds2sf is the extractor; its results are *viewed and used* through **adom-symbol** / **adom-footprint** (it has no viewer of its own). It feeds **adom-chip-fetcher**'s source carat as the "adom-ds2sf · datasheet" source.++## Run it++```bash+adom-ds2sf extract <chip-dir> # datasheet PDF â symbol + footprint + provenance JSON+adom-ds2sf inspect <chip-dir> # summarize an extraction+```+MIT, contributions welcome.
SKILL.md+36−36@@ -1,37 +1,37 @@ ----name: ds2sf-description: Datasheet → symbol + footprint + provenance JSON. Reads a chip's datasheet PDF and emits sym_create-shaped symbol JSON, footprint metadata, a field-level provenance audit trail, and an agent-to-agent result.json with stable exit codes for programmatic re-search-and-retry. Trigger words — ds2sf, datasheet to symbol, datasheet to footprint, extract symbol from datasheet, extract footprint from datasheet, datasheet pinout extract, sym extracted json, fp extracted json, datasheet sym fp, chip pin grouping, pin provenance, footprint provenance, sym_create input from datasheet, ds2sf result.json, datasheet extractor agent contract.+name: adom-ds2sf+description: Datasheet â symbol + footprint + provenance JSON. Reads a chip's datasheet PDF and emits sym_create-shaped symbol JSON, footprint metadata, a field-level provenance audit trail, and an agent-to-agent result.json with stable exit codes for programmatic re-search-and-retry. Trigger words â adom-ds2sf, datasheet to symbol, datasheet to footprint, extract symbol from datasheet, extract footprint from datasheet, datasheet pinout extract, sym extracted json, fp extracted json, datasheet sym fp, chip pin grouping, pin provenance, footprint provenance, sym_create input from datasheet, adom-ds2sf result.json, datasheet extractor agent contract. --- -# ds2sf — datasheet → symbol + footprint + provenance+# adom-ds2sf â datasheet â symbol + footprint + provenance -Pipeline: read a chip-fetcher chip directory, send the datasheet PDF to Claude in two focused passes (symbol → footprint), normalize the package against the service-kicad standard library, and emit four JSON files alongside the existing chip-fetcher artifacts.+Pipeline: read a adom-chip-fetcher chip directory, send the datasheet PDF to Claude in two focused passes (symbol â footprint), normalize the package against the service-kicad standard library, and emit four JSON files alongside the existing adom-chip-fetcher artifacts. -## ⚠ Always Opus, never Haiku+## â Always Opus, never Haiku Production runs MUST use the default `--model claude-opus-4-7`. EEs rely on this output to wire schematics; Haiku's chip-data misreads are not acceptable in that pipeline. Concur (the cross-source consensus check) does catch most Haiku errors via 4-source consensus, but the right answer is to not produce them in the first place. Override the model only for development experiments where a follow-up Opus pass is acceptable. ## When to use -- After `chip-fetcher` lands a chip into `~/project/chip-fetcher/library/<MPN>/`.-- When you want an Adom-grouped symbol (POWER / I2C / GPIO / etc.) — the UL bundle's `.kicad_sym` is flat and ungrouped.+- After `adom-chip-fetcher` lands a chip into `~/project/adom-chip-fetcher/library/<MPN>/`.+- When you want an Adom-grouped symbol (POWER / I2C / GPIO / etc.) â the UL bundle's `.kicad_sym` is flat and ungrouped. - When you need a downstream-ready `sym_create` input JSON. - When you need page-level provenance to deeplink the Adom user back to the datasheet PDF page each fact came from. ## Module products: pass `--pdf` explicitly -For **module products** (ESP32-WROOM, NORA, ATWINC, SARA-R5, etc.), chip-fetcher's auto-named `<MPN>.pdf` may be the internal SoC datasheet — which has the SoC's pinout, not the module's external castellated-pad pinout. The extractor will refuse to hallucinate (writes a result.json with `status: "needs_better_pdf"` and a list of candidate PDFs already on disk).+For **module products** (ESP32-WROOM, NORA, ATWINC, SARA-R5, etc.), adom-chip-fetcher's auto-named `<MPN>.pdf` may be the internal SoC datasheet â which has the SoC's pinout, not the module's external castellated-pad pinout. The extractor will refuse to hallucinate (writes a result.json with `status: "needs_better_pdf"` and a list of candidate PDFs already on disk). Look for the module-specific PDF in the chip-dir (`<MPN>-original.pdf`, `<MPN>-datasheethardware-guideline.pdf`, etc.) and pass it via `--pdf`: ```bash-ds2sf extract /home/adom/project/chip-fetcher/library/ESP32-S3-WROOM-1-N4 \- --pdf /home/adom/project/chip-fetcher/library/ESP32-S3-WROOM-1-N4/ESP32-S3-WROOM-1-N4-original.pdf+adom-ds2sf extract /home/adom/project/adom-chip-fetcher/library/ESP32-S3-WROOM-1-N4 \+ --pdf /home/adom/project/adom-chip-fetcher/library/ESP32-S3-WROOM-1-N4/ESP32-S3-WROOM-1-N4-original.pdf ``` ## Commands -### `ds2sf extract <CHIP-DIR>`+### `adom-ds2sf extract <CHIP-DIR>` Run the full pipeline against a chip directory. @@ -43,7 +43,7 @@ Run the full pipeline against a chip directory. | `--datasheet-url <url>` | Override the datasheet URL. | | `--source-tier <mfr\|snapmagic\|mouser\|digikey\|arrow\|cse\|lcsc\|unknown>` | Override the upstream provenance tier. | | `--out-dir <path>` | Output directory (default: chip-dir). |-| `--model <id>` | Claude model (default `claude-opus-4-7`). **Always use Opus for production EE work.** Haiku produces frequent misreads on chip data — pin-order swaps (DMG2305 GDS↔GSD), pad undercounts (ICE40UP5K saw 24 of 48), package-variant confusion (WSL2010 → WSL2512), and JTAG-letter typos (MTDO → MTD0). Concur catches these via cross-source consensus, but the right answer is to never let them happen: use Opus. Only override to a cheaper model for development testing where a follow-up Opus run is acceptable. |+| `--model <id>` | Claude model (default `claude-opus-4-7`). **Always use Opus for production EE work.** Haiku produces frequent misreads on chip data â pin-order swaps (DMG2305 GDSâGSD), pad undercounts (ICE40UP5K saw 24 of 48), package-variant confusion (WSL2010 â WSL2512), and JTAG-letter typos (MTDO â MTD0). Concur catches these via cross-source consensus, but the right answer is to never let them happen: use Opus. Only override to a cheaper model for development testing where a follow-up Opus run is acceptable. | | `--force` | Bypass cache, re-run Claude. | | `--symbol-only` | Skip footprint pass. | | `--footprint-only` | Re-run only footprint pass against cached symbol. |@@ -51,29 +51,29 @@ Run the full pipeline against a chip directory. **Example:** ```bash-ds2sf extract /home/adom/project/chip-fetcher/library/ADS1115IDGSR+adom-ds2sf extract /home/adom/project/adom-chip-fetcher/library/ADS1115IDGSR ``` -### `ds2sf normalize <PACKAGE>`+### `adom-ds2sf normalize <PACKAGE>` Resolve a package string against service-kicad's standard library (debug aid). ```bash-ds2sf normalize "VSSOP-10"-# OK: VSSOP-10 → Package_SO:MSOP-10_3x3mm_P0.5mm (service-kicad stdlib)+adom-ds2sf normalize "VSSOP-10"+# OK: VSSOP-10 â Package_SO:MSOP-10_3x3mm_P0.5mm (service-kicad stdlib) ``` -### `ds2sf inspect <CHIP-DIR>`+### `adom-ds2sf inspect <CHIP-DIR>` Print a summary of an existing extraction without re-running anything. -### `ds2sf health`+### `adom-ds2sf health` Probe `claude` CLI + service-kicad reachability. -### `ds2sf install`+### `adom-ds2sf install` -Drop this `SKILL.md` into `~/.claude/skills/ds2sf/`.+Drop this `SKILL.md` into `~/.claude/skills/adom-ds2sf/`. ## Outputs @@ -86,19 +86,19 @@ Drop this `SKILL.md` into `~/.claude/skills/ds2sf/`. .ds2sf-cache/ # raw Claude responses for re-emit / debug ``` -The provenance JSON is the audit trail. Open the file, pick a pin, follow `pin_provenance[i].page` → open that page in the datasheet PDF → confirm the pin name + description are visibly there. Same for footprint dimensions via `dimension_provenance[i].page` + `figure_label`.+The provenance JSON is the audit trail. Open the file, pick a pin, follow `pin_provenance[i].page` â open that page in the datasheet PDF â confirm the pin name + description are visibly there. Same for footprint dimensions via `dimension_provenance[i].page` + `figure_label`. --- ## Agent-to-agent contract -ds2sf is built so an upstream agent (chip-fetcher, automation) can call it programmatically, read the result, and decide what to do next without human input.+adom-ds2sf is built so an upstream agent (adom-chip-fetcher, automation) can call it programmatically, read the result, and decide what to do next without human input. ### Exit codes | Exit | `status` | Meaning | Caller action | |---|---|---|---|-| 0 | `ok` | Extraction completed. `review_required[]` may still have entries — they're informational, not blocking. | Accept the outputs. |+| 0 | `ok` | Extraction completed. `review_required[]` may still have entries â they're informational, not blocking. | Accept the outputs. | | 2 | `needs_better_pdf` | Extractor refused because the supplied PDF doesn't have the right data (typically: SoC datasheet was passed for a module, or wrong package variant). | Try one of `hints[].candidates` and re-call with `--pdf <new>`. | | 3 | `unrecoverable` | Hard failure (Claude returned malformed output twice; pre-flight failure; emit error). | Surface to a human; inspect `.ds2sf-cache/`. | @@ -114,9 +114,9 @@ Always written. Stable schema (`schema_version: "1"`): "mpn": "ADS1115IDGSR", "manufacturer": "TI", "datasheet_used": "/home/.../ADS1115IDGSR.pdf",- "datasheet_sha256": "65231e81…",- "summary": "ADS1115IDGSR — 10 pins, package VSSOP-10 …",- "review_required": [ … merged from symbol + footprint passes … ],+ "datasheet_sha256": "65231e81â¦",+ "summary": "ADS1115IDGSR â 10 pins, package VSSOP-10 â¦",+ "review_required": [ ⦠merged from symbol + footprint passes ⦠], "hints": [ { "action": "try_alternate_pdf", "reason": "module_external_pinout_missing",@@ -124,13 +124,13 @@ Always written. Stable schema (`schema_version: "1"`): { "action": "update_upstream_metadata", "file": "/path/to/info.json", "key": "package",- "current": "VQFN-32 (5×5×0.9 mm)",- "extracted": "VQFN-40 (7×5×0.9 mm)" },+ "current": "VQFN-32 (5Ã5Ã0.9 mm)",+ "extracted": "VQFN-40 (7Ã5Ã0.9 mm)" }, { "action": "use_datasheet_extracted_footprint", "package": "Optical LGA-16" }, { "action": "human_review", "reason": "muxed_pin_protocol_select",- "notes": "…" }+ "notes": "â¦" } ], "outputs": { "symbol_json": "/path/to/X-symbol.extracted.json | null",@@ -146,9 +146,9 @@ Always written. Stable schema (`schema_version: "1"`): | Reason | When | Caller action | |---|---|---|-| `module_external_pinout_missing` | Empty pins[] returned because the supplied PDF was a SoC datasheet for a module product. | `hints[].try_alternate_pdf` → re-call with one of the candidate PDFs. |-| `package_mismatch_in_hint` | info.json's `package` disagrees with the datasheet's actual package. | `hints[].update_upstream_metadata` → patch info.json's `package` to match `extracted`, then accept. |-| `non_standard_package_no_kicad_baseline` | The package isn't in service-kicad's stdlib (custom OLGA, modules, optical). | `hints[].use_datasheet_extracted_footprint` → use `<MPN>-footprint.extracted.json`'s `bodyDimensions` + `leadDimensions` directly. |+| `module_external_pinout_missing` | Empty pins[] returned because the supplied PDF was a SoC datasheet for a module product. | `hints[].try_alternate_pdf` â re-call with one of the candidate PDFs. |+| `package_mismatch_in_hint` | info.json's `package` disagrees with the datasheet's actual package. | `hints[].update_upstream_metadata` â patch info.json's `package` to match `extracted`, then accept. |+| `non_standard_package_no_kicad_baseline` | The package isn't in service-kicad's stdlib (custom OLGA, modules, optical). | `hints[].use_datasheet_extracted_footprint` â use `<MPN>-footprint.extracted.json`'s `bodyDimensions` + `leadDimensions` directly. | | `muxed_pin_protocol_select` | Some pins (e.g. SDA/MOSI) are protocol-multiplexed. | Informational. Pin descriptions in provenance explain how. | | `pad_dimensions_from_example_layout` | Footprint dims came from an "Example Board Layout" rather than a formal recommended land pattern. | Informational; recommend cross-check vs IPC-7351. | | `boot_strapping_pins`, `vdd_spi_voltage_dependency`, `psram_variant_conflict`, `non_uniform_pad_pitch`, `power_supply_configuration`, `thermal_management`, `i2c_address_multidevice` | Engineering nuances Claude flagged for human review. | Surface to schematic designer. |@@ -157,10 +157,10 @@ Always written. Stable schema (`schema_version: "1"`): ### Agent calling recipe ```rust-// (Pseudo-Rust for chip-fetcher's caller side.)+// (Pseudo-Rust for adom-chip-fetcher's caller side.) fn run_ds2sf(chip_dir: &Path, pdf_override: Option<&Path>) -> ResultDoc {- let mut cmd = Command::new("ds2sf");+ let mut cmd = Command::new("adom-ds2sf"); cmd.arg("extract").arg(chip_dir).arg("--force").arg("--json-only"); if let Some(p) = pdf_override { cmd.arg("--pdf").arg(p); } let _ = cmd.status(); // exit code mirrored in result.json@@ -179,7 +179,7 @@ while r.status == "needs_better_pdf" { .flatten() .find(|c| !tried.contains(*c)); let Some(next) = next else {- // Out of candidates — escalate to human.+ // Out of candidates â escalate to human. log_for_review(&r); break; }; tried.insert(next.clone());@@ -203,4 +203,4 @@ match r.status.as_str() { ### Caching behavior under cache-hit -If `<MPN>-extraction.provenance.json` already exists and `--force` is not passed, ds2sf skips the Claude calls entirely and exits with the cached result.json's exit code. Re-running is idempotent.+If `<MPN>-extraction.provenance.json` already exists and `--force` is not passed, adom-ds2sf skips the Claude calls entirely and exits with the cached result.json's exit code. Re-running is idempotent.
adom-ds2sf.png⋯ 1 unchanged line ⋯
docs/hero.png⋯ 1 unchanged line ⋯
install.sh+1−1@@ -1,4 +1,4 @@ #!/bin/bash set -euo pipefail DIR="$(cd "$(dirname "$0")" && pwd)"; BIN="${HOME}/.local/bin"; mkdir -p "$BIN"-install -m 0755 "$DIR/bin/adom-ds2sf" "$BIN/adom-ds2sf"; echo "Installed adom-ds2sf -> $BIN/adom-ds2sf"+install -m 0755 "$DIR/bin/adom-ds2sf" "$BIN/adom-ds2sf"; echo "Installed adom-ds2sf"
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "adom-ds2sf",- "version": "1.0.0",+ "version": "1.0.1", "type": "app", "description": "Datasheet to symbol + footprint + provenance JSON \u2014 pins and pads, extracted from the PDF.", "dependencies": {},
page.json+8−4@@ -1,8 +1,8 @@ { "slug": "adom-ds2sf",- "version": "1.0.0",+ "version": "1.0.1", "type": "app",- "description": "Datasheet to symbol + footprint + provenance JSON \u2014 pins and pads, extracted from the PDF.",+ "description": "Datasheet to symbol + footprint + provenance JSON — pins and pads, extracted from the PDF.", "dependencies": {}, "tags": [ "eda",@@ -22,9 +22,13 @@ "path": "adom-ds2sf.png" }, "visibility": "public",- "title": "Adom ds2sf \u2014 Datasheet \u2192 Symbol & Footprint",+ "title": "Adom ds2sf — Datasheet → Symbol & Footprint", "author": { "name": "John Lauer", "email": "[email protected]"- }+ },+ "install": {+ "binary_name": "adom-ds2sf"+ },+ "org": "adom" }
uninstall.sh+1−2@@ -1,3 +1,2 @@ #!/bin/bash-set -euo pipefail-rm -f "${HOME}/.local/bin/ds2sf"; echo "Uninstalled ds2sf"+rm -f "${HOME}/.local/bin/adom-ds2sf"; echo "Removed adom-ds2sf"