Repository navigation
ecadlib 0.3.0
Added
-
KiCad: the ecadlib window in the PCB editor (
ecadlib/assets/kicad_action_plugin.py,ecadlib/kicad_menu.py): an ecadlib button in the top toolbar and Tools > External Plugins entries open a dark window like the Altium dialog with Add part from MPN (live lookup, then the footprint placed), Check project BOM (counts per kind, Later / Fill the library now, the report on request) and Open review queue; it does not block KiCad.ecadlib kicad-menu run-jobdoes the work with the Altium menu's actions and a KiCad library as the target;ecadlib kicad-menu check-bom "%I"hooks into the schematic editor's Generate BOM. The plugin package (kicad-pcm --plugin, setup page's Add to KiCad) gains the toolbar icon. Fixed: the plugin ran ecadlib in the project folder, wherepython -m ecadlibimported the project'secadlib/library folder. Tried in KiCad 7.0.11. -
Altium menu: the ecadlib dialog (
ecadlib/altium_forms.py,ecadlib_dialog.pas+.dfm): Check project BOM, Add part from MPN and Fill the library run in one dark dialog like Altium's own, with the live lookup, a progress line, a count with one row per kind and Later / Fill the library now, then reinstall the library; no browser unless a part needs a person (review queue) or you ask for the full report.run-jobwritesprogress.iniand the result'sbig/row1..lines and has anopenaction for reports in the workspace.dialogs=0keeps the plain message boxes. Run in Altium Designer 26.10 on a real PC. -
Symbol house rule for every IC (
symbol_layout,[symbols] power_side): inputs left, outputs right, power on top, ground on the bottom ("top", the default), or the top and bottom edges empty with power at the top of the left side and ground at its bottom ("left"). Applies from 1 pin (layout_pinsdefault was 40), to EasyEDA IC symbols, and to KiCad library symbols whose pin text would overlap in Altium. New groupsother_in/other_outfrom names (IN+, TRIG, THRES, FB / OUT, Q, DISCH, PGOOD, SW) and pin types,otherfor pins with no direction (moved between sides to keep the body square);power_out(VOUT, VCAP) now goes right.symbol_layout.text_problemsfinds pin names or numbers that overlap or run out of the body;checkandecadlib symbolreport them. Found on the NE555DR from EasyEDA in Altium, whose VCC / RST / GND names ran into the side pin names. -
fp_tidy.py: converted EasyEDA footprints are tidied to the rule book: the reference on silk above the part and${REFERENCE}on fab, rounded-rectangle SMD pads (copper size and place unchanged), silk under the body removed, a pin-1 dot beside pad 1 when silk shows none, the fab pin-1 corner chamfered, the value moved below the part, silk specks and doubled segments removed, silk widths set to 0.12 mm and an outline that crowds a pad row pulled in to 0.2 mm clearance. Each change is noted on the part. The EasyEDA converter now keeps silk arcs (pin-1 notches) and draws the body region (layer 99) as the fab outline. -
Symbols: a dual or quad part's pins go one channel at a time (1IN-, 1IN+, 2IN-, 2IN+).
-
Librarian: a converted footprint is named after its .kicad_mod file (EasyEDA's package name made the rule book report "footprint name is not its file name"), and an LCSC number ecadlib found itself fills Supplier 1 / Supplier Part Number 1 and the LCSC link, as one from the BOM does.
-
ecadlib eagle-export(eagle_export.py) andecadlib easyeda-export(easyeda_pro_export.py): the library as an Autodesk Fusion Electronics / EAGLE.lbrand an EasyEDA Pro.elibz(symbols, footprints, devices with their fields; STEP models beside them), built fromkicad-export. Every footprint is read back and compared pad by pad with its KiCad original, mask and paste also as layer areas, symbols pin by pin, and through KiCad's own importers where pcbnew is found. Release-check rules[release] eagle/easyeda(hold/warn/off, defaultwarn), web UI buttons,POST /api/export/tool, Workspace and MCPtool_export. Surveyed on 1,927 KiCad library footprints;tests/test_tool_exports.py. Each export writesINSTALL.md(import steps, STEP model per footprint, differences) and one hand-off zip; the web UI and MCP return it; Fusion parts carry Fusion's standard attributes (PACKAGE, CATEGORY_L1/L2, VENDOR/VPN) and passives a user value;ecadlib testpackexports both with a checklist section for each tool. Pin name / number visibility is carried and compared (resistor and capacitor pins were read as hidden). -
Your library across tools (
ecadlib/hub.py): a Your library page in the web UI (shortcutl),ecadlib hub, Workspacehub/hub_part/hub_fix/hub_build_bom,GET /api/hub,GET /api/hub/part,POST /api/hub/fix(librarian), MCPlibrary_hub/library_hub_part. Every part once, from your libraries (--liband[hub] libraries: .SchLib, .PcbLib, .DbLib, .kicad_sym, .pretty, .kicad_dbl, Altium 365 lists) and ecadlib's plans, with a cell per tool (Altium, Altium 365, KiCad, Fusion, EasyEDA): missing, same, different or behind, compared on pads, pins and value. Last changed and by whom per part and per copy (git commit, Altium 365 revision, file date plus the web-app action), history of added / changed / removed copies in<workspace>/hub/history.jsonl, a part page with footprint pictures, pinout sketch, sources, release check, sign-off, where-used ([hub] projects), lifecycle and history, and fix buttons (make the KiCad version, Altium 365 dry run, build a library-only part with ecadlib).hub.register_tool()lets other tools' readers fill their columns. New[hub]rules section. The page opens on a tile per tool (parts, libraries, last change and by whom, what it lacks) that shows your library as it is in that tool, next to Compare all. Parts copy between Altium and KiCad (POST /api/hub/copy, librarian;ecadlib hub --copy-to; MCPlibrary_hub_copy) into<workspace>/hub/library, and into a KiCad or Altium project from[hub] projects(its lib tables or .PrjPcb), with a Project filter using KiCad and Altium where-used. -
Web UI, more fluid and human-friendly: first-visit welcome with Try it with a sample BOM (
POST /api/demo) and the setup check; drop a BOM anywhere; live per-part progress lines and a Stop button for long jobs (POST /api/job/cancel); parts as cards with a footprint picture and chips (status, cross-check, KiCad / Altium, cost and model); a side panel per part with the held reason and next step in plain words (ecadlib/messages.py), both values of a disagreement and the datasheet page; Undo for approve / reject / release anyway; search, filters, keyboard shortcuts (?); skip link, labels, contrast checked in both themes, reduced motion.ecadlib/partview.py, Workspacelibrary_parts/demo_bom,GET /api/parts, MCPlibrary_parts. -
The terminal, human-friendly (
ecadlib/term.py): one status vocabulary (✓ ready, ! held, ○ waiting for sign-off), colour and symbols only on a terminal (never withNO_COLOR,--jsonor in CI), tables that fit the width, a summary block with what was written and the next commands, a live progress line forlibrarian, "waiting on X (12 s)" for slow network sources and model calls, and-q/-von every command; used bydemo,init,doctor,librarian,triage,release-check,status,kicad-export,dblib-sync,altium-pkg,parity,eval gate,migrate,rebuild,agent status,queue list. Newecadlib review: held parts one at a time with the reason in plain words; pick a candidate, release anyway or open the datasheet (never asks with--yesor when piped).--jsonoutput is unchanged;ecadlib agent statusprints a summary and takes--jsonfor the old JSON. -
One voice for everything people read (
docs/ui-voice.md,ecadlib/messages.py): every held reason (release check, footprint check, KiCad/Altium match, cross-check, datasheet reader, standard parts, sign-off, library agent) has a code, a plain sentence and a next step (messages.held(code, **values),messages.explain(raw_reason)); plans and--jsonkeep their machine strings. Reports rewritten outcome first, grouped by what to do:review.mdplus a newreview.html(web UI look, light/dark),release_check.md, datasheet*.review.md, parity, evalreport.md, test packCHECKLIST.md, agent PR body and notifications,ecadlib doctor, Altium menu and KiCad plugin dialogs, init questions, MCP errors. Workspacelibrarian_runrows gainword/says,held_partsgainsreasons; kicad-exportskippedentries gainsays. Tests:tests/test_messages.py(a new reason without a sentence fails),tests/test_ui_voice.py(snapshots, no internal names or absolute paths). -
ecadlib style(house_style.py): teach ecadlib your house style.learn --from DIRlearns description patterns, value formats, common parameters, active-low pin notation and example parts on top of whatinitinfers, and writeshouse_style.json.direct "TEXT"adds written direction.learn --aihas any configured model ([style], else[ai]) write a guide and turn the direction into validatedecadlib.tomlsettings (--write-rules). The librarian adapts new parts by code when a profile exists ([style] apply = "auto"|"off").check/apply [--ai]work on a plan; a model's rewording is rejected when it adds a number, and identity fields are never shown. Help scales with the model's tier.export-datasetwrites chat-format JSONL for fine-tuning your own model. UI card, Workspace methods, MCP toolslearn_house_style,house_style,check_house_style,apply_house_style. Guide:docs/house-style.md. -
Footprint rule book (
docs/footprint-rulebook.md,ecadlib/footprint_rules.py): what a footprint must contain and look like, drawn from KLC F1-F9, KiCad's official library, IPC-7351 naming, Altium's IPC wizard layer conventions and Bogatin's public guidance. New rulesname(KLC and IPC-7351 names checked against pin count, EP / MP count, pitch, body, chip codes, BGA grid and pad),meta,attr,origin,layers,padshape,tht,vias,text,model,margin,polarity,graphics,connect,pinmap(reversed diode / LED / polarized capacitor) andsilktext(silkscreen text 0.5-2.0 mm, not over pads, the designator not over the body; also on the.Designatorthe Altium export writes and on the PcbLib read back, after the first real Altium run showed.Designatorover an EasyEDA part), pluscheck_pcblibfor the Altium side.ecadlib checkruns the whole book (--summaryfor a library,--geometry-onlyfor the old checks); the release check holds ecadlib's own and converted parts forname,layers,attr,tht,viasandsilktexterrors and every part forpinmap. Calibrated on 4,976 official KiCad footprints (errors on 0.5 %, all read); 24 of them are golden test fixtures. -
ecadlib eval gate(ecadlib/eval/gate.py): CI accuracy gate (own jobaccuracy-gate): the 331-case eval set offline with standard parts and a committed synthetic replay pack (eval/replay/kicad-v1.json.gz), checked againsteval/baselines/kicad-v1.json(327/331); fails when a family drops more than 1 % or a passing case breaks; about 20 s.ecadlib eval golden(ecadlib/eval/golden.py): normalised fingerprints of the KiCad and Altium files for the testpack, the demo and 96 package specs (eval/golden/*.txt, no uuids, GUIDs or dates), checked bytests/test_evalgate.py;--updateregenerates them for one reviewed commit. -
Updates never break a library: every file ecadlib writes and reads back has a schema version and a migration registry (
ecadlib/migrate.py); older files are migrated (on disk only after a backup in.ecadlib_backup/), files from a newer ecadlib are refused with one "made by ecadlib X.Y; upgrade ecadlib" line.ecadlib migrate [--check] [--dry-run], a doctor line, Workspacefile_formats, MCPfile_formats.librarian_state.jsonis now v2 (footprint name + geometry hash). Proved with sample workspaces made by v0.2.0, v0.3.0 and two later commits (tests/fixtures/upgrade/). The librarian writeslibrary.lock.json(per part: fetched inputs with hashes, datasheet PDF / model / prompt version, ecadlib version, rules hash, output hashes);ecadlib rebuild --checkrebuilds offline and reports drift (Workspacerebuild_check, MCPrebuild_check). -
Datasheet cross-checks (
crosscheck.py): every footprint read from a datasheet is checked against the standard package table or an independent second read of only the critical numbers (reversed pages, cached, costed incost.jsonl). A disagreement holds the part with both values in the review. Rules[datasheet] cross_check = "auto"|"always"|"off"(defaultauto) andcross_check_model.[ai] temperature = "auto"sends temperature 0 and a seed only to models that accept it, so default Claude requests are unchanged. Eval--repeat/consistencymetric. Workspace + MCPcross_checks. Offline tests only. -
ecadlib altium-menu(altium_menu.py): an "ecadlib" menu inside Altium Designer, a DelphiScript script project with Add part from MPN, Check this project BOM and Open review queue; each entry runsecadlib altium-menu run-jobhidden through a request.ini / result.ini exchange, reinstalls the DbLib (or points at Altium 365), and an optional.DXPPrfadds the menu. Workspacealtium_menuand MCP tool of the same name. The .pas is checked offline against a cited API allow-list; never run inside Altium. -
ecadlib parity(parity.py): reads back the KiCad and the Altium library of every part and compares pads, drills, paste / mask, exposed pad, courtyard, 3D model, pins, pin-to-pad mapping, key fields and the.kicad_dblvs DbLib rows, with explicit tolerances; the release check (librarian, agent) holds a mismatched part with a per-field diff ([release] parity = "hold" | "warn" | "off");parity surveycovers every generator and standard-table footprint; run bytestpackanddemo; Workspaceparityand MCP tool. -
ecadlib kicad-pcm(kicad_pcm.py): the library as a KiCad Plugin and Content Manager package (zip for "Install from File...", optionalrepository.json/packages.jsonwith--base-url), metadata checked against KiCad's PCM schema; symbols point atPCM_<lib>, 3D models at${KICADn_3RD_PARTY};--kicad 7writes KiCad 7 files;--pluginpackages a pcbnew action plugin "ecadlib: add part".ecadlib altium-pkg(altium_pkg.py): Altium hand-off folder with a.LibPkg(compile to IntLib), a DelphiScript install project and a relative DbLib. Workspacetool_packagesand MCP tool of the same name. Installed and checked in real KiCad 7.0.11; not run in Altium. -
First run (
ecadlib/firstrun.py,ecadlib/clihelp.py):ecadlib demobuilds a small library from a bundled BOM offline with no keys (1 s here);ecadlib initasks for the tool, library folders, workspace and sources (--yes/--tool/--lib/--workspace/--sources), writes them to[setup], then runs the doctor and prints the next commands;[setup] libs / workspaceare the default--lib/--workspace. Every command and subcommand has a description and examples in-h;librarianandkicad-exporttake--json; the librarian prints progress and anote:/fix:line when a source was unreachable or the datasheet reader has no key; a missing--libfolder, an unwritable-o, a BOM without recognised columns or without rows give one line and a fix. -
Bring your own model (
ecadlib/llm/, README section 33):[ai]provideranthropic(default, requests unchanged) oropenai-compatible(OpenAI, OpenRouter, Gemini, Ollama, LM Studio, vLLM, llama.cpp presets; keys from env vars only), capability profiles (table + endpoint detection +[ai.profiles]), guide rails in layers (support for every model incl. one feedback retry with the checks' exact errors; capability and tier-scaled guidance: JSON repair, examples, split steps, hold on doubt), mixed ladders (name:model),ecadlib ai show|rails, doctorai modelline,eval run --provider/--base-url/--assist. Fixed:ecadlib eval comparecrashed printing its text. -
ecadlib testpack --out DIR: a 6-part Altium + KiCad test pack (0603 R, SOT-23, SOIC-8, VQFN-16 with exposed pad, USB-C, THT header) built offline through the librarian and every exporter, with aCHECKLIST.mdof what to open in Altium Designer, Altium 365 and KiCad and what each part must look like (its geometry claims are checked bytests/test_testpack.py). -
tests/test_e2e.py: the golden path through the real CLI in subprocesses from an empty folder (init, Altium project BOM, librarian on a KiCad schematic / Altium BOM / .xlsx with recorded KiCad, EasyEDA and Claude answers, release check, KiCad / Altium / Altium 365 exports), each output loaded by its tool (KiCad 7 kicad-cli + pcbnew DRC through the written library tables; pyaltiumlib and ecadlib's reader; a fake Nexar for the release),ecadlib agent runagainst a bare git remote with PR / queue / approve / push,ecadlib mcpover stdio, a second and third run (no file changes) and a killed librarian (recovers). The datasheet reader honoursANTHROPIC_BASE_URL(gateways, proxies, local test servers). -
Cheaper datasheet reads (
ecadlib/ds_route.py): every PDF is cut to the pages for this part's package (drawing, land pattern, pin table, ordering row;[datasheet] page_budget = 6) and widened when the answer is incomplete;[datasheet] route = "ladder"starts each part on Haiku 5.5 / Sonnet 5.5 / Opus 5.5 by package family, pins and pages and escalates when datasheet's checks fail (default stays one model, Opus 5.5); failed cheap answers are cached as failed steps, never as the answer; tokens and USD per answer in<out>/datasheet/cost.jsonl, the librarian review,ecadlib statusand the per-model estimate;ecadlib datasheet pagesshows what a read would send. -
ecadlib eval: an accuracy test set and scorer.ecadlib/eval/sets/kicad-v1.jsonholds 331 real parts in 11 families (chip passives, SOT, SOIC, TSSOP/MSOP, QFN/DFN, QFP, BGA/CSP, diodes, power SMD, THT, connectors) with MPN, manufacturer, package, datasheet link, the KiCad footprint it should match and the symbol's pins, each recording where it came from (ecadlib eval build-setrebuilds it from KiCad library checkouts).eval runsends the set through the librarian with any sources and scores each part (pad count, pin 1, pitch, pads, courtyard, symbol pins and names): pass rate overall / per family / per source, tokens and USD per part, wall time;--record/--replaysave and re-score Claude's answers without paying;eval compare A Bshows the flips.footprint-bench'snumbers()no longer fails on an SMD pad with only a drill offset. -
Standard parts without Claude (
ecadlib stdparts, librarian sourcestandard, now in the default[sources] orderbetween easyeda and datasheet): chip passives (size from the footprint, value/description or MPN: Yageo, Murata, Samsung, KEMET, TDK, Panasonic, Vishay, Stackpole, Bourns, KOA, Uni-Royal) and 615 named standard packages (SOT/SOD/SMA-SMC/MELF/DPAK/TO-220/TO-92, SOIC/TSSOP/MSOP/SSOP/QFN/DFN/QFP with the size in the name) are built offline, each checked against KiCad's official footprint (stdparts bench); R/C/L/LED/diode symbols, and BJT/MOSFET/LDO pinouts for listed MPN families (review note). Ambiguous names resolve to nothing; it never runs ahead of the KiCad library and never replaces a half already found.footprint_genhonours a spec'sipc_family(KiCad's force_small_pitch). -
Library agent watch step (
ecadlib agent-watch [--dry-run], MCPagent_watch_scan,[agent.watch]rules): new, changed and removed parts in watched BOM files, folders (including web UI uploads), Altium projects and Altium 365 projects (Nexar queries schema-checked, not yet run live), with state inagent/watch_state.json. -
Library agent (
ecadlib agent run|serve|status|approve|reject|push): watches projects, builds and proves new parts through the librarian, opens one GitHub PR per review batch with before/after pictures (or writes the batch toagent/batches/without a token or git), pushes approved parts to Altium 365, turns upkeep findings into queue items;[agent]rules (off by default) and an optionalagentDocker Compose profile. -
Library agent review queue (
ecadlib/agent_queue.py,ecadlib queue): a durable, locked work-item store under<workspace>/agent/queue/with a state machine, history, batches and per-part dedupe. A Review queue page in the web UI shows the change, the build, the proof findings and before/after pictures, with Approve (approver role), Reject and Rebuild (librarian role); approvals are also recorded throughapprovals.py. MCP tools:agent_queue_list,agent_queue_get,agent_queue_decide. -
Visual proof (
ecadlib visual-check,Workspace.visual_check, MCPvisual_check,[agent.proof]rules): top-view footprint and symbol PNGs (pin 1, pitch, dimensions, grid, BGA maps) next to the datasheet pages, one Claude call with a JSON-schema verdict checked strictly (pass / doubt / fail / skipped without a key), cached by content hash, with a cost cap. -
Command-line quality of life:
ecadlib doctor [--json](Python, packages, tools, API key names,ecadlib.tomlerrors with file:line, workspace, library folders; exit 1 on any FAIL; MCPdoctor),ecadlib status [--json](read-only workspace summary;Workspace.status, MCPworkspace_status),ecadlib completion bash|zsh|fish(generated from the argparse tree), one-line errors with a hint instead of tracebacks (--debug/ECADLIB_DEBUG=1for the traceback),ECADLIB_LIB/ECADLIB_WORKSPACE/ECADLIB_CONFIGas defaults for--lib/--workspace/ the rules file, and--jsonontriage,release-checkandapprove ... status. -
Connections to other tools (
ecadlib/notify.py,ecadlib/forge.py,ecadlib/plugins.py):[notify]webhooks (Slack, Microsoft Teams workflow, generic JSON) for agent batches ready, held parts, upkeep changes and EOL/NRND, with URLs and tokens only from named environment variables, retries with backoff and no effect on the run when a post fails (ecadlib notify show|test); GitLab merge requests (REST v4, self-hosted base URL) for the agent's review batches andecadlib upkeep --gitlab issue|pr, picked by the origin remote or[agent] git_host; part-source and exporter plugins through theecadlib.providers/ecadlib.exportersentry points,[providers] order,ecadlib plugins list|export, MCPlist_plugins/plugin_export, and an example plugin inexamples/ecadlib_example_plugin/. -
Integration inputs and outputs (
bom_inputs.py,kicad_dblib.py,parts_export.py): BOMs straight from KiCad schematics (hierarchical sheets, DNP, exclude-from-BOM, multi-unit) and KiCad XML / S-expression netlists, checked against KiCad 7.0.11's own netlist export;.xlsxread without openpyxl;[bom] columnstakes a list of house names and helps find the header row;ecadlib kicad-dblibwrites a KiCad 7+ database library (.kicad_dblover ODBC to SQLite, one table per category, aDatabaserow insym-lib-table);ecadlib export-parts --format csv|json|xlsxwrites the parts table with stable columns for PLM / ERP imports. Workspace methods and MCP toolsexport_partsandkicad_dblib. -
Web UI: a Past triages list that any signed-in user (viewer and up), and local mode, can open read-only (
GET /api/triage/history,/api/triage/result, MCPtriage_history). Each upload is now stored in its own folder,uploads/<time>-<random>/<name>, so BOMs with the same file name no longer overwrite each other, or each other's reports. -
Resolve held parts: work through the release check's held items and record how each was fixed.
-
KiCad export: write the library's symbols, footprints and 3D models as KiCad libraries.
-
Altium DbLib/SVNDbLib sync: keep a database library in step with the living library.
-
STEP generation: build simple 3D bodies for generated footprints.
-
Sourcing and alternates: look up stock and suggest drop-in alternates per BOM line.
-
Approvals and dedupe: sign off parts before release and merge duplicate library entries.
-
Weekly upkeep (
ecadlib upkeep): lifecycle, KiCad upstream, price/stock and Altium 365 drift in one run,
only new changes reported, one rolling GitHub issue or a PR with applied KiCad reconversions;examples/upkeep.yml. -
Live datasheet reader (
ecadlib datasheet batch|estimate PLAN|BOM,librarian --datasheet-batch, MCPdatasheet_batch/datasheet_estimate): a whole BOM's missing symbols and footprints from datasheets in one Message Batch, with datasheet download and PDF checks, page selection, retries and backoff, a request log without the key, a cost estimate and cap, a result cache, and a self-check. All results are held asverify. -
Run the team server for a team in one command:
python3 -m ecadlib team setup(orscripts/team-setup.sh) writes.env(no secrets), builds the image, creates the first admin in the data volume without writing the password anywhere, and starts ecadlib behind Caddy (Let's Encrypt for a public name, Caddy's internal CA for an IP/LAN name) or with your own certificate (docker-compose.own-cert.yml);Dockerfile(non-root,/datavolume, health check),docker-compose.ymlwith--trusted-proxypinned to Caddy's fixed address, and adockerworkflow that runs the stack on PRs and publishes to ghcr.io only onv*tags. -
Team server (
ecadlib ui --team,ecadlib team add-user|set-role|reset-password|remove|list): sign-in with scrypt-hashed passwords, viewer/librarian/approver/admin roles enforced per route, CSRF tokens, lockout, built-in TLS (--cert/--key) or--allow-httpbehind a proxy, optional trusted SSO proxy header, approvals signed as the signed-in user, per-user jobs,team_audit.jsonl, and a users page. Local mode is unchanged. -
Harder footprints: BGA/LGA/CSP grids (JEDEC row letters, depopulated balls or a ball map, IPC-7351B land from the ball size, NSMD/SMD), pin headers, connectors and odd shapes from a datasheet
pad_table(mm/mil/in, y up/down, bottom views, datum origins; polygon pads, slots, NPTH, mounting/shield pads, split paste, thermal vias, keep-outs, union courtyard) with consistency checks; BGA and connector rules inecadlib check; BGA/connector STEP models;ecadlib footprint-benchcompares 20 parts pad by pad with KiCad's library. -
Simulation models (
ecadlib sim-models): built-in R/C/L SPICE models, vendor SPICE/IBIS models found and parsed, pin maps checked, attached as Altium SIM/SI links and KiCadSim.*fields. -
Tidy big-chip symbols (
ecadlib symbol,ecadlib/symbol_layout.py): pins grouped by function (power top, ground bottom, control/debug left, ports right), ports in order, same-name power pins stacked, optional multi-part split, SVG preview; used for datasheet and EasyEDA symbols of 40+ pins,[symbols]rules section.
Changed
- Web UI redesign in the Hairline style (github.com/lucasmarkes/hairline): one ground colour, 1px lines, mono labels, status shown as a toned dot on a hairline pill, and motion that eases out (cards and rows rise in, a sliding underline in the step bar, a sweeping progress line), all held still under
prefers-reduced-motion. Animated line figures from Hairline: a chip seating on its footprint in the BOM drop zone (scripts/hairline/seat.js, our own), a conveyor while a BOM check or the librarian runs, and empty sieves and drawers for empty lists. The bundle isecadlib/ui/static/hairline.js(25 KB, served at/hairline.js), rebuilt byscripts/build_ui_figures.sh. - Footprint preview looks like Altium's PCB editor: black board on a 0.5 / 2.5 mm grid, Top Layer pads in red with their numbers, through-hole pads in Multi-Layer silver, assembly outline in magenta, courtyard in green, the origin as a cross, and Altium-style layer tabs under it.
Fixed
-
A part no source describes is no longer held for an empty Description: the librarian writes a plain one from the plan ("IC, SOIC-8, Texas Instruments LM358DR"), records it as written by ecadlib, and the release check warns instead (LM358DR from Add part from MPN was held only for this when the KiCad index was rate-limited).
-
Model rail plans were cached by the rules table's id(): a new table could get a freed one's plan (an extra feedback turn with
feedback_retry = false; test_ds_route flaked on Windows CI). Cached by content now. -
The menu build checks that no DelphiScript routine is called above where it is written (Altium stopped on "Undeclared identifier: ClipboardMpn").
-
Altium dialog: it moves by dragging its header (it has no Windows title bar).
-
Altium dialog: Ctrl+V / Shift+Insert / Ctrl+C / Ctrl+X / Ctrl+A work in the MPN and manufacturer boxes (Altium took them as its own shortcuts), a Paste link sits by the MPN box, a part number on the clipboard is filled in when Add part opens, row values are cut to what the right-hand column shows, and the Next note keeps the dialog's width.
-
Altium projects (
altium_project.py, the menu's Check this project BOM / Fill):[DeviceSheetN]sheets are read (next to the project, as written, or in Altium's device-sheet and data folders /$ECADLIB_DEVICE_SHEETS) and one that cannot be found is a warning, not a silent skip (Altium's Bluetooth Sentinel example lost 10 sheets, 45 components); multi-channel sheets (REPEAT(CH,1,4), or one file under several sheet symbols; the name is RECORD=32, the old check read 33) are listed once per channel with Altium's channel designators (ChannelDesignatorFormatString, default$Component_$RoomName); a component without an MPN parameter whose Comment reads as a part number uses the Comment (Content Vault parts), with a warning and a triage note. -
Found in Altium AD26 with NE555DR (EasyEDA C7593): EasyEDA footprints put REF** on silk above the courtyard and the value on fab below it (1 mm, 0.15 mm stroke; before both sat at the centre, so Altium drew ".Designator" across the pads), a
${REFERENCE}goes on fab in the body (0.5-1.0 mm), and a pin-1 dot inside the body is moved beside pad 1, 0.2 mm clear of the pads; the result passesfootprint_rulestext / silktext.texts_from_kicadkeeps a Fab-layer reference on Mechanical 13 (only a silk reference becomes Top Overlay). -
Altium vault item ids (
CMP-1035-02800-1, the LibRef / Comment / Part Number of Content Vault and Altium 365 parts) are never used as an MPN: not from parameters, the Comment, ActiveBOM or the triage's LibRef fallback (altium_project.is_vault_id). -
JLCPCB answering 403 (or 429) is reported as "JLCPCB refused the request (403)"; nothing more is sent to JLCPCB in that run (no retries) and the other sources are still tried.
-
Repeat channels whose sheet symbols share one name (Bluetooth Sentinel: six "Red_LED") get numbered rooms (Red_LED1 ... Red_LED6), so designators are unique.
-
A held part that another ecadlib version or build (
librarian.BUILD_REV, stamped in the state) or other rules built is built again on the next run; it was skipped, so the release check judged the old version's models and fields ("silk 0.000 mm", "Description empty" after upgrading). Ready parts are still kept untouched (--refreshrebuilds them). -
Standard chip resistors / capacitors (0201 ... 2512) and SOT-23 / SOD-123 / SOD-323 / SOT-323 get a package default 3D height when nothing better is known; the release check warns "HEIGHT from package default ..., verify" instead of holding the part.
-
ecadlib doctor --altium-menu X.inichecks the ini'sworkspace=(relative to the ini's folder) unless--workspaceis given. -
Report CSVs (triage, review, release check, project BOM, where-used, sourcing, lifecycle, dedupe, upstream) are written as UTF-8 with a BOM so Excel shows ± and µ; ecadlib's own readers (pandas,
read_bom) already accept it. -
ecadlib altium-menu(found on a Windows PC with Altium AD26, ecadlib in a venv, no API key):buildwritescommand="<sys.executable>" -m ecadlibon Windows when no--commandis given and fills an emptycommand=of an existingecadlib_menu.ini(before, the runner looked only on PATH /py -3/pythonand a venv install failed with "ecadlib was not found"); the script's andaltium-pkg'sIsInstalled/UninstallAllloop overInstalledLibraryCount, the countInstalledLibraryPathindexes (wasAvailableLibraryCount).ecadlib doctorchecks the menu'scommand=(--altium-menu, or anecadlib_menu.iniin the current folder /out/altium_menu). -
EasyEDA footprints: silk lines are cut back to 0.2 mm from the pads and a silk circle within 0.1 mm of a pad is left out (EasyEDA outlines can run up to or over the copper; converted chip passives were held for "silkscreen is 0.000 mm from pad 1"). The part search's own description (JLCPCB
describe, EasyEDAdescription, else its category + package) fills an empty Description. -
KiCad library index: tree pages are fetched with a 20 s timeout; a build that stops (timeout, HTTP 429) is not retried for 15 min (1 h after a 429), so runs in between go straight to the other sources, and resumes from the cached pages afterwards (
--refresh-indexretries at once). -
dblib-sync/altium-pkg: the Excel connection'sData Sourcestays machine-independent on every OS (--win-dir, else theC:\ecadlib\libraryplaceholder), never the library folder's absolute path; Altium opens the workbook throughDatabasePathRelative=1, so the folder can be moved. A connection edited in Altium is kept. -
footprint_check: an F.Cu lead and a B.Cu heat spreader under thermal vias no longer count as overlapping copper. -
Cross-check: a pad-table (custom) read counts a numbered exposed pad as a pin (package_schema), the standard table does not; such reads of EP packages (WSON, LFCSP, TQFN, MSOP-EP) were held as "pin count 13 vs 12". The eval gate's replay pack now also answers the second read.
-
sexpr.courtyard_bboxignoredfp_arc/fp_circlecourtyards: round cans (TO-18, TO-46) got a 2 x 2 mm box off to one side, also in the eval set's references (3 rebuilt;tht-LM134H,tht-SFH216now pass the gate).footprint_adv: pad namesH…/S…were mounting / shield pads (outside a detected JEDEC grid), so audio-jack sleeve contacts, rotary-encoder switch pins S1/S2 and H/S ball rows lost their pins; onlyMP,SH(KiCad's names) andMH/MTG/MOUNT/MECH/NPTHare non-pins now. -
KiCad library import (librarian) and
kicad-export, found byparity surveyover KiCad's own footprint library: a through-hole pad's drill offset is kept (Altium hole-offset field; before, the copper sat on the hole), an SMD pad's shape offset moves its copper, copper-less mask / paste apertures keep their round or custom shape and both their layers (before: a square on paste only), andkicad-exportfolds a custom pad's regions that touch the anchor, and the mask / paste of stroked outlines, back into the pad without swallowing separate paste polygons. -
kicad-export: footprints without a KiCad 3D model (all generated and standard ones) now get the Altium footprint's model (its embedded STEP, or its extruded body as a STEP) in<lib>.3dshapes/; before, the KiCad library had no 3D model where Altium had one. -
ecadlib dblib: the Excel.DbLibnames its workbook relative to itself (DatabasePathRelative=1), so the folder can move. -
Web UI: a step bar (1. Check a BOM, 2. Fill the library, 3. Send to Altium, Review queue, Footprints, Status, Settings), a "what happened, what next" line after every action, a Status card (
GET /api/status) and an in-page setup check (GET /api/doctor, admin in team mode), the librarian's progress in its own card, a note telling team viewers which role they need, andtests/test_ui_browser.py(Chromium via Playwright at desktop and phone width; skips without it). -
Web UI: a BOM that can't be read now gives one plain line (no
ValueError, no server path, and the error is scrolled into view); "Check again" is disabled with a reason when there is no BOM; the queue's filter chips work from the keyboard; white-on-light-blue buttons in dark mode; no/favicon.ico404; the triage result opens next to the BOM instead of below the review queue; a queue approval the plan refuses no longer says "approvals.py refused". -
Found by the new end-to-end tests (
tests/test_e2e.py): a KiCad library part whose 3D model could not be downloaded (offline, blocked host) lost its official footprint (the librarian fell back to another source); the model is now just made here.kicad-exportreplaced the wholefp-lib-table/sym-lib-table(a second library, a project's own rows or the database row were dropped); it now adds or replaces only its own row, in place.ecadlib initcrashed printing a numeric proposal (symbols.pin_length). Re-running the librarian rewrote an unchanged.PcbLibwith a new date andrelease-check --allowleftplan.jsonin a key order the next run changed: a second run now changes no library file..PcbLib/.SchLibare written atomically. -
Librarian: two BOM lines with the same footprint name no longer share one footprint file unless the pads are the same (
ecadlib/fp_share.py); a different land pattern gets its own name (the real package name, else<name>_<part>), carried intofootprint.ref, the.PcbLib, the symbol's footprint link,resolve, the KiCad export and the agent. Parts an older run shared by name only are re-resolved; files parts already have keep their names. Eval over thekicadsource: 20 wrong shared footprints -> 0.eval rungives chip passives and diodes R/C/L/D designators (chips were unresolved by every source).stdparts: pin-removed variants (SOIC-8-N7,SOIC-14-16) are no longer resolved as the full package. -
standardsource never guesses: an IC family name without a body size (SOIC-8,SO-14,TSSOP-14,LQFP-100;MSOP-8excepted, JEDEC has one), a QFN/DFN or-1EPname without the exposed-pad size, andTO-252-2/TO-263-2/ DPAK / D2PAK without a library prefix (KiCad also has_TabPin1) now return nothing, so the next source (datasheet) answers; TVS diodes get the footprint only (uni- or bidirectional pin names are not certain from the MPN). Eval,standardalone: 115 answers with 14 wrong -> 74 answers, 0 wrong. -
Datasheet route / stdparts / eval review (rvK):
[datasheet] max_attemptsno longer ends a ladder on a cheaper model (the last try allowed goes to the top model); a synchronous refusal / max_tokens answer is costed from its usage block (was a 6,000-token estimate); a missing API key no longer logs phantom costs and caches every step as failed (the next run used to start on the top model); a stale failed step at the end of a route no longer pays in a loop; the eval reports every paid answer of a part's route (and replays it), prices Haiku 5.5's >100K-token tier, and fails two pin names swapped between pins; stdparts gives nothing for tantalum / polymer / electrolytic capacitors (was a chip-capacitor land and an unpolarized symbol). -
Library agent batch PRs: when a part's new build has fewer files than its last one (a part removed from its BOM before a requested rebuild: nothing built, no AFTER pictures), its old pictures now leave the batch branch, and its other old files stay recorded in
batch.json; before, they were forgotten and stayed in the open PR even after the part was rejected (rare soak-test failure). -
Inputs / exports / Altium review (rvJ): unannotated
R?symbols in a.kicad_schare counted one by one (two were one part);kicad-dblibmerges tables and columns that differ only in case (SQLite crashed) and, on Windows, rewrites a database KiCad has open in one transaction;export-parts --format xlsxdrops control characters openpyxl refused; the KiCad database library and parts export read and write UTF-8 on every locale; SchLib text gets Altium's%UTF8%twin for every non-ASCII value (±,°,µtoo, as Altium writes it); on Windows the plan lock waits past msvcrt's 10-second limit and atomic writes retry while another process holds the file open. -
Hooks review: GitLab API calls and webhook posts no longer follow HTTP redirects (urllib resent
PRIVATE-TOKEN/Authorizationto whatever host a 30x named); a GitLab origin on a self-hosted host with[agent] gitlab_apileft at gitlab.com is refused instead of sending that host's token to gitlab.com; a provider plugin whose constructor orconfigured()raises, or one in[providers] orderthat fails to load, no longer stops triage;[notify]skips the remaining posts once its time budget is used up. -
Plan rewrites wait for the library agent:
release-check,resolve chooseanddedupe --mergeon an agent plan wait foragent/plan.lock, and the web UI / MCP release check, choose and merge refuse while the agent rebuilds (locked methods call unlocked internals, so choose and merge re-check without deadlocking), so an--allowis no longer dropped by the agent's save.dedupe --mergekeeps the firstplan.json.pre-dedupeand timestamps later backups.approve statusnames a policy from[release.approvals].count_refsreadsR1 - R4and countsU1A, U1Bonce. -
Core pipeline review: text files are UTF-8 on every platform (a
10kΩBOM value crashed the triage report on Windows, and aµwritten as cp1252 could not be read back); plan and state files are written atomically, so a crash no longer leaves a truncatedplan.json;resolve choosere-checks every part that shares the model file it overwrites (they stayedready); prices like0,125 €are 0.125, not 125; RKM names1F5/1m5instead of15/1M5;dedupe --bomremaps the BOM sheet, not a cover sheet; lifecycle reads a DbLib in a folder named with#; concurrent HTTP cache writers no longer share one temp file, and a damaged cache entry is a miss. -
Checked against real KiCad 7.0.11 (
tests/test_kicad_real.py, skips without KiCad; optional CI jobkicad):kicad_importfailed on footprint text(at x y unlocked)(48 of 2291 KiCad 7 library footprints sampled) and on zero-length arcs; KiCad 7 symbols lost theirki_description; an EasyEDA pin with a slanted path made KiCad reject the whole symbol library; an SMD-defined BGA land could leave 0.02 mm copper gaps without an error; density C put REF** on the silk outline;footprint-benchcrashed on a drill offset.test_kicad_export's kicad-cli check now knows KiCad 7 cannot open the KiCad 8 export. -
Spreadsheet formula injection: every report and export CSV (triage, sourcing, release check, librarian review, dedupe and its BOM copy, where-used, project BOM, lifecycle, upstream, the agent's library BOM) writes cells starting with
= + - @, tab or CR with a leading apostrophe (ecadlib/sheetsafe.py); plain numbers such as-5stay, the DbLib keeps Altium's=Valueliteral, and BOMs read back unchanged. Excel number cells read as typed (1e-07F becomes100n,1.0becomes1), so part names never show exponents. UTF-16 BOMs without a byte-order mark are detected and read. -
Team server security review: the sign-in lockout could be beaten with parallel requests (now counted before the password check), Change password checked the current password with no lockout, a removed user's sessions came back when the name was added again,
TEAM_USERS.JSON(case-insensitive disks) or a hard link served the password hashes, team files could be triaged as a BOM, sign-in accepted 20 MB JSON bodies, the Docker stack believed aproxy_user_headerfromteam.jsonthat Caddy passed on from any client, and the audit line was written after the response (a flaky test). -
Datasheet batches: a create whose answer was lost (timeout, 5xx) leaves a marker; the next run lists recent batches and adopts the matching one instead of paying twice, and refuses to resubmit an unconfirmed one without
--yes.output_config.effortis only sent to models that accept it (stepping down to a supported level), 200K-context models get the 100-page PDF limit, worst-case estimates include a fallback re-run, responses are shape-checked by hand when jsonschema is missing, and a part's spec and symbol JSON never overwrite each other. -
Datasheet reader and visual proof (review):
[datasheet] max_cost_usdnow holds on every path (the librarian's synchronous calls, the single-part CLI with new--rules/--yes, cumulatively across parts) and refuses a model with no known price; collecting an already-submitted batch is never blocked by the cap. A visual proof no longer says "pass" when the model marked every check not_applicable (pad_count / pin_count / pin_numbers must match). Staggered pin headers report their real pitch and alternating numbering. Password-protected or damaged PDFs give a clear error instead of a crash when cut to pages, and a page the model cites outside the pages sent is flagged instead of shown as an original page number. -
Team server hardening: one deadline per request (a client trickling bytes held a thread forever), a cap on connections per address, listen backlog 128 (60 simultaneous sign-ins got connection resets),
team_audit.jsonlrotation with tail-only reading, and per-address rate limiting of unauthenticated refusals in the audit log. -
Library agent follow-up (rvC): rejected/failed parts' files leave the batch branch and the PR says so; decided batches with a pushed part get one "ready to merge" comment and stay open, those with nothing pushed are closed;
[agent] manufacturer_aliasesextends the built-in maker alias table; every approval path respectsagent/plan.lock; manufacturer names are normalised in part keys (ST/STMicroelectronics/blank = one part) with a one-time migration of queue and watch state;agent run --dry-runwrites nothing. -
Library agent, long-run safety (review rvC;
tests/test_agent_soak.py): a pass killed between the scan and the queue no longer loses those changes; items left inbuilding/provingby a dead pass (or after a clock step back) are resumed instead of stuck forever; an approve made while the librarian ran is no longer overwritten inplan.json; an approve is refused when the part was rebuilt after the reviewer opened it; approved removals/upkeep findings and parts whose files changed since approval are no longer pushed to Altium 365; a change after approval is no longer lost once the part is pushed; one bad change, a concurrent reject or a rules typo no longer stops the run orserve; PR bodies escape part data (HTML, links, @mentions, "fixes #N"); the batch branch starts from the remote base (local unpushed commits were pushed); retried parts get a new batch and closed PRs are replaced; a half-written BOM no longer reports every part removed; weekly upkeep restarts after a clock that ran ahead; upserting a huge BOM is no longer quadratic. -
Real-world BOMs and robustness (tests
test_realworld_boms.py,test_fuzz.py,test_cli_smoke.py):olefileis now a core dependency (on a plainpip installthe release check held every part andkicad-exportwrote nothing); European decimals (4,7k,2,2µF) parse as 4.7 k / 2.2 µF, not 4 Ω / 2 F; aTotalfooter row is no longer a part; DigiKey's ownPart Numberis not taken as the MPN; a workbook's BOM sheet is found behind a cover sheet; a CSV named.xlsxreads, a corrupt workbook is a clear error; quoted cells spanning lines andR1–R4(en dash) ranges read right; UTF-16 BOMs upload in the web UI / MCP;sourcing,upkeepand the lifecycle reader honour the rules'[bom] columns;parts.xlsxkeeps=Valueas text, not an Excel formula; unreadable BOMs, badecadlib.tomland malformed KiCad / Altium files give a message, not a traceback; package-spec validation is ~40x faster. -
Footprints and symbols (review): same-looking supply pins (VDD1 / VDD2 of an isolator, VDD18 / VDD33) are no longer stacked onto one spot, which joined them in Altium; hidden power pins keep their Altium HiddenNetName in the KiCad export; single-row SMD pin headers get KiCad's single-row land (they used the dual-row one) and the 2.00 mm dual-row land is KiCad's; drill-only through-hole pads honour the pad rotation; BGA row H is no longer taken for mounting holes (footprint_check, release_check); a BGA with A1 depopulated passes, a misnamed ball is reported instead of switching the BGA rules off; SMD-defined lands keep their paste margin in the PcbLib, and PcbLib -> KiCad keeps mask margins and tented pads; STEP models of SMD headers no longer push pins through the board, and rotated connector pads turn in the model. The KiCad benchmark grows from 20 to 57 footprints (2942 pads). PcbLib -> KiCad writes polygon pads as KiCad custom pads;
symbol_layout.checkreports pins lying on or crossing another pin's line;thermal_vias.unitaccepts mil / in / the table's unit; a 0.17 mm ball gets IPC-7351B's 0.15 mm land (was 0.14). -
Library agent integration (end-to-end test
tests/test_agent_e2e.pywith the real watch, queue, visual check and agent): the proof now gets the queue item's built footprint, symbol and datasheet (it always said "nothing to check").ecadlib agent approve|rejectno longer crashes. A rebuild keeps who asked for it, so that person cannot approve it. A BOM line without an MPN no longer stops the run. A part changed in its source while in review is rebuilt and its PR updated. The queue's batch record gets the PR link.visual-check PART --workspacereads librarian plans again. The batch PR links http(s) datasheets and does not name a model when no proof ran. -
Altium interop, checked against 553 Altium-saved Celestial Library files and pyaltiumlib (nothing opened in Altium): the PcbLib reader saw records on Mechanical 17-32 as Mechanical 16, so
rules inferproposed Mechanical16 as the courtyard layer (and87as the 3D body layer);%UTF8%text in Altium SchLibs (CJK,μ) was read as?; the SchLib writer turned text cp1252 can't hold (10kΩ,≤) into?and now writes Altium's%UTF8%twin; a filled fab polygon with the rules' assembly layer on any mechanical layer but 13/15 crashed the PcbLib writer (KeyError); one Altium 365 footprint name cp1252 can't hold stoppeda365 pullbefore it wrote anything. -
Footprint approval now writes the Altium
.PcbLibfor through-hole parts (pin headers, connectors, custom), with drills, slots, NPTH holes and polygon pads as anchor pad + copper/mask/paste regions instead of a bounding rectangle; BGA NSMD pads get their mask expansion. SMD output is unchanged. The footprint preview fits its view to the actual pads, holes and courtyard, so through-hole connectors are no longer drawn off-centre.