← Commit history

0.2.74 source (not yet released, needs signing): jlcpcb_order (one folder: Gerber zip, JLCPCB BOM and CPL, order form, issues), return_path fix plan, bottom-side designators, declined prompts on record; 193 verbs; batteries 192/0 on AD 26.11.1 and Altium Designer Develop

Colby Knox ·83a5027d79 · ·parent 0d76f73
16 files changed +321−23
CHANGELOG.md+8
@@ -1,5 +1,13 @@ # Changelog +## 0.2.74 (2026-10-26)+**A JLCPCB order in one call, return-path fixes, bottom-side designators, declined prompts on record.**+- New verb `altium_jlcpcb_order`: the JLCPCB fab check, the manufacturing outputs, the JLCPCB BOM and CPL and the assembly-tier check in one call, written to one folder: a Gerber zip with only the Gerber layers and the drill file, `bom-jlcpcb.csv`, `cpl-jlcpcb.csv` and `order.json`, with the order-form values and every issue in one list. Measured on the lane board in 21 s.+- `altium_return_path` answers `fix`: a pour patch of the reference net round each gap run, on the neighbouring layer with the most reference copper, as `altium_apply_pours` arguments to read and run (dead-copper removal off, or a patch that only overlaps its pour pours nothing: measured 0 mm2). Patches that would float are named. Measured: 6.3 mm of N1 over a split GND closed by one 16.4 mm2 patch.+- `altium_silk_designators` on the bottom side: Altium mirrors the text and it grows leftwards from its anchor; Altium's own box for the Sentinel's J1 matched the plan, 0.2 mm off the part.+- Declined prompts on record: every Yes/No question the bridge answers No without being able to read it is kept with its picture (`altium_dialog_log` `declined`, the last 20), and `altium_status` reports `declinedPrompts`. The reaper's pictures also carry the category and the button pressed. Measured with a script's own MessageDlg: answered No, its question readable in the picture.+- Verb battery: `jlcpcb_order`, and `return_path` with its fix plan.+ ## 0.2.73 (2026-10-26) **Ready for JLCPCB: its limits built in, assembly tiers, designators and via fences.** - `altium_fab_check {fab:"jlcpcb"}`: JLCPCB's published standard capabilities for the board's layer count and copper weight (source page and date in the reply), with new measurements: copper to the real outline, hole to hole (via and pad), largest drill, silkscreen line width and text height, minimum board size. `costlierOrBelowRecommended` names what passes only on a costlier option. On the Bluetooth Sentinel example: 0.7 mm designators, 0.127 mm silk lines, a pour 0.148 mm from the edge.
README.md+7−6
@@ -15,7 +15,7 @@ normal session. Ask in plain words and it: - makes the outputs: Gerbers, NC drill, pick and place, BOMs grouped by MPN (JLCPCB, Mouser, DigiKey files),   schematic PDF and STEP, checking that the outline and every copper layer reached the Gerbers -192 commands, tested on Altium Designer 26.11 and Altium Designer Develop. It runs in **Hydrogen**, Adom's free+193 commands, tested on Altium Designer 26.11 and Altium Designer Develop. It runs in **Hydrogen**, Adom's free desktop app, through Adom Bridge. You bring your own AI subscription and your own Altium licence.  ::youtube{id="dFecpcIzdSE" title="An AI designs a 12 V to 5 V buck converter in Altium Designer"}@@ -29,7 +29,7 @@ and the verb prefix `altium_`.  ## What it can do -Tested on Altium Designer 26.11.1 and Altium Designer Develop. 192 verbs; each row names the ones+Tested on Altium Designer 26.11.1 and Altium Designer Develop. 193 verbs; each row names the ones behind it (prefix `altium_`).  | Area | What the AI can do | Verbs |@@ -41,13 +41,13 @@ behind it (prefix `altium_`). | Checks | Compile and ERC with the Messages panel read back, DRC with each violation's location, a 14-check design review, schematic-to-board cross-check | `compile`, `run_erc`, `run_drc`, `routing_drc`, `review_board`, `cross_check` | | Schematic to board | Update PCB with the whole change order previewed row by row first, keeping board-only parts, net classes and rules | `update_pcb` | | Board setup | Build a board from a netlist, shape the outline, edit the stack-up (add planes and inner layers, set copper, dielectrics and total thickness), write a fab's design rules, add scoped rules, net classes and differential pairs, length limits, matched-length groups, differential-pair width and gap, via styles, component classes with rooms | `build_board`, `set_outline`, `board_outline`, `layer_stack`, `set_design_rules`, `add_rule`, `net_classes`, `diff_pairs`, `component_classes` |-| Signal and power | The trace width for a target impedance on every copper layer of the real stack-up (50 ohm single-ended, 90 or 100 ohm pairs with their gap), written as rules if asked; whether each power net's narrowest track and its vias carry its current (IPC-2221); signal tracks that run over a gap in the reference copper next to them (return paths); copper balance per layer | `impedance`, `current_capacity`, `return_path`, `copper_balance` |+| Signal and power | The trace width for a target impedance on every copper layer of the real stack-up (50 ohm single-ended, 90 or 100 ohm pairs with their gap), written as rules if asked; whether each power net's narrowest track and its vias carry its current (IPC-2221); signal tracks that run over a gap in the reference copper next to them (return paths), with a pour-patch plan to close each gap; copper balance per layer | `impedance`, `current_capacity`, `return_path`, `copper_balance` | | 3D and enclosure | Each part's height from its 3D bodies, the parts over an enclosure's height limit or under a lid feature, and bodies that collide or sit too close | `height_check` | | Board furniture | Mounting holes (at points or the corners), fiducials with a mask opening and no paste, a stitching-via grid that keeps clear of other nets, pads and parts, a via fence along RF tracks and the board edge | `board_features`, `via_fence` | | Placement | Move and rotate parts or shift them by an offset (read back to 0.001 mm), find free space for a part near another, suggest rotations that shorten connections, copy one channel's layout to the others, swap footprints, read or set the selection | `move_parts`, `find_space`, `check_orientation`, `replicate_layout`, `swap_footprint`, `selection` | | Routing and copper | Route a net with waypoints and vias, run Altium's autorouter, rip up nets, resize routed tracks, pour polygons with keepouts, repour, place vias, clean up the silkscreen, add teardrops, measure routed length per net and the skew of each pair | `route_net`, `autoroute`, `ripup_nets`, `set_track_width`, `apply_pours`, `repour`, `place_vias`, `apply_silkscreen`, `teardrops`, `net_lengths` | | BOM | Bill of materials straight from Altium, grouped by MPN with a variant applied, JLCPCB / Mouser / DigiKey files, ordering gaps flagged; write parameters back to the sheets; assembly variants | `bom`, `sheet_params`, `variants` |-| Manufacturing outputs | Gerbers, NC drill, pick and place, BOM, ODB++ and IPC-2581 in one call, checking that the outline and every copper layer reached the Gerbers; the board checked against a fab's limits before ordering (JLCPCB's built in), and against JLCPCB's Economic and Standard assembly tiers; a step-and-repeat panel with rails, tooling holes and fiducials, separated by V-score lines or mouse-bite tabs drawn the way JLCPCB reads them, with JLCPCB's panel rules checked; any OutJob, and read an OutJob's containers and settings; the schematic as a PDF with assembly and fabrication drawings; STEP; silkscreen cleaned off the pads first with Altium's Silkscreen Preparation, and every designator placed clear of pads and other labels | `export_manufacturing`, `fab_check`, `assembly_check`, `panelize`, `run_outjob`, `outjob_info`, `export_pdf`, `export_step`, `silkscreen_prep`, `silk_designators` |+| Manufacturing outputs | Gerbers, NC drill, pick and place, BOM, ODB++ and IPC-2581 in one call, checking that the outline and every copper layer reached the Gerbers; the board checked against a fab's limits before ordering (JLCPCB's built in), and against JLCPCB's Economic and Standard assembly tiers; a whole JLCPCB order folder (Gerber zip, BOM, CPL, order-form values, every issue) in one call; a step-and-repeat panel with rails, tooling holes and fiducials, separated by V-score lines or mouse-bite tabs drawn the way JLCPCB reads them, with JLCPCB's panel rules checked; any OutJob, and read an OutJob's containers and settings; the schematic as a PDF with assembly and fabrication drawings; STEP; silkscreen cleaned off the pads first with Altium's Silkscreen Preparation, and every designator placed clear of pads and other labels | `export_manufacturing`, `jlcpcb_order`, `fab_check`, `assembly_check`, `panelize`, `run_outjob`, `outjob_info`, `export_pdf`, `export_step`, `silkscreen_prep`, `silk_designators` | | Reading the design | The whole board as data in mm, schematic parts with pins, rules, layers, poured copper, silkscreen, every part parameter in the project; a .SchDoc read straight from the file without Altium | `read_board`, `routing_state`, `schematic_data`, `read_sheet_file`, `part_parameters`, `read_rules`, `pour_state`, `silk_state`, `pcb_report` | | Seeing it | Open any surface with a screenshot, 2D and 3D board views, zoom to parts or nets, camera moves | `show_*`, `zoom_to`, `select_net`, `animate_view` | | Running Altium | Launch in the background, look after the licence seat, close nuisance dialogs, work with several Altiums at once, run any DelphiScript or Altium command, install Altium | `launch`, `close`, `ensure_licensed`, `instances`, `check_dialogs`, `eval`, `run_command`, `install` |@@ -68,7 +68,7 @@ Current, heat and EMC analysis of an Altium board runs through [AI Flow](https:/  Altium Designer is the user's own **host app**. The bridge finds an installed Altium (`%ProgramFiles%\Altium\AD*\X2.EXE`, Designer or Develop), starts it in the background, runs a small-**DelphiScript agent** inside it, and gives the AI 192 `altium_*` verbs.+**DelphiScript agent** inside it, and gives the AI 193 `altium_*` verbs.  - **Page and docs:** https://wiki.adom.inc/adom/altium-bridge - **Bridge SDK:** https://wiki.adom.inc/adom/adom-bridge-sdk@@ -168,7 +168,7 @@ way to read it). A stopped engine is restarted with `altium_agent_recover`.  <!-- verbs:start (tools/readme_verbs.py writes this list) --> -All 192 verbs, by area (prefix `altium_`). `altium_describe` returns the live catalog with every input, output, hint and example.+All 193 verbs, by area (prefix `altium_`). `altium_describe` returns the live catalog with every input, output, hint and example.  ### Running Altium: launch, close, health, dialogs @@ -262,6 +262,7 @@ All 192 verbs, by area (prefix `altium_`). `altium_describe` returns the live ca - `altium_silk_designators`: Place every reference designator the way assembly houses want: one size, upright, beside its own part, clear of every pad (JLCPCB: 0.15 mm), every other part's body and the other designators, inside the board; read back from Altium's own text boxes. - `altium_via_fence`: A via fence for EMC: a row of ground vias on both sides of RF or fast nets' tracks, and/or round the board edge, at a pitch from the frequency (lambda/20) or given; each via clear of other copper and pads, the same net's vias and the edge. - `altium_assembly_check`: Ready for JLCPCB assembly? The board against both JLCPCB PCBA tiers as published (Economic and Standard): board or panel size, thickness and layers, parts on one or both sides, the smallest package and the finest pin pitch, fiducials, and the parts with no LCSC number; answers the cheapest tier every rule allows.+- `altium_jlcpcb_order`: A JLCPCB order in one call: the board checked against JLCPCB's fab limits, the Gerbers and drill zipped the way JLCPCB's order page takes them, the JLCPCB BOM and pick-and-place (CPL), the assembly-tier check, and the order-form values, in one folder with every issue in one list. - `altium_remove_items`: Delete specific free tracks and vias, given exactly as altium_routing_state returned them. - `altium_ripup_nets`: Delete every free track, arc and via on each named net. - `altium_apply_pours`: Add solid polygon pours from outlines and pour them, each with its own connect style (solid joints or thermal spokes), plus pour keepouts (polygon cutouts); answers each pour's real poured copper area.
SKILL.md+1−1
@@ -132,7 +132,7 @@ Altium is a licensed host app. The bridge never installs it silently; it detects | `altium_a365_oauth_begin` / `_oauth_status` / `_oauth_cancel` / `_refresh` / `_logout` | OAuth (PKCE) sign-in with an Altium-issued public client ID; tokens stay in the bridge cache and never appear in a reply | `clientId`, `workspace`, `selectWorkspace`, `timeout` | | `altium_a365_library_overview` / `_library_schema` / `_files_upload` | workspace library summary / library-related GraphQL queries and mutations / upload a file to the Files Service and get a temporary `fileId` (see `altium-a365`) | — / `timeout` / `filePath`, `maxBytes` | | `altium_animate_view` / `altium_foreground` | camera and zoom choreography run in-bridge / raise Altium for a user who asked to watch (replies `visiblyOnTop`) | `preset`, `steps[]`, `lane`, `pauseMs` / `reason` (10+ chars, required) |-| `altium_dialog_log` | what the standing dialog reaper dismissed | `limit` (default 25) |+| `altium_dialog_log` | what the standing dialog reaper dismissed, with `declined`: every Yes/No question it answered No because Altium paints the text where it cannot be read (AD 26's extension-update prompt), each with its picture | `limit` (default 25), `shots` | | `altium_install_receipt` | the last `install_library_bundle` receipt (proof frame included) after a call outlived ab's budget | — | | `altium_demo` | six-beat tour: symbol → footprint → 3D part → schematic → 2D → 3D board | `stage` | | `altium_describe` | the full machine-readable catalog | — |
bridge-rs/src/coppermap.rs+97−5
@@ -197,7 +197,7 @@ pub fn balance(board: &Raster, maps: &BTreeMap<String, Raster>, layers: &[(Strin /// neighbouring layer, with where the first gap starts. `skip` nets are the references themselves. Pure. pub fn return_paths(st: &Value, refs: &BTreeMap<String, Raster>, layers: &[(String, bool, String)], skip: &[String], step: f64) -> Vec<Value> {     let idx: BTreeMap<&str, usize> = layers.iter().enumerate().map(|(i, l)| (l.0.as_str(), i)).collect();-    let mut acc: BTreeMap<(String, String), (f64, f64, Option<(f64, f64)>)> = BTreeMap::new();+    let mut acc: BTreeMap<(String, String), (f64, f64, Option<(f64, f64)>, Vec<(f64, f64)>)> = BTreeMap::new();     for t in st["tracks"].as_array().cloned().unwrap_or_default() {         let (net, layer) = (t["net"].as_str().unwrap_or(""), t["layer"].as_str().unwrap_or(""));         if net.is_empty() || skip.iter().any(|s| s.eq_ignore_ascii_case(net)) { continue; }@@ -206,7 +206,7 @@ pub fn return_paths(st: &Value, refs: &BTreeMap<String, Raster>, layers: &[(Stri         let (ax, ay, bx, by) = (f(&t["start"]["x"]), f(&t["start"]["y"]), f(&t["end"]["x"]), f(&t["end"]["y"]));         let len = ((bx - ax).powi(2) + (by - ay).powi(2)).sqrt();         let n = (len / step).ceil().max(1.0) as usize;-        let e = acc.entry((net.to_string(), layer.to_string())).or_insert((0.0, 0.0, None));+        let e = acc.entry((net.to_string(), layer.to_string())).or_insert((0.0, 0.0, None, Vec::new()));         e.0 += len;         for k in 0..n {             let s = (k as f64 + 0.5) / n as f64;@@ -214,15 +214,79 @@ pub fn return_paths(st: &Value, refs: &BTreeMap<String, Raster>, layers: &[(Stri             if !nb.iter().any(|r| r.at(x, y)) {                 e.1 += len / n as f64;                 if e.2.is_none() { e.2 = Some((r3(x), r3(y))); }+                e.3.push((x, y));             }         }     }-    let mut out: Vec<Value> = acc.into_iter().filter(|(_, v)| v.1 > 0.0).map(|((net, layer), (len, gap, at))| json!({-        "net": net, "layer": layer, "lengthMm": r3(len), "unreferencedMm": r3(gap), "percent": r1(100.0 * gap / len.max(1e-9)), "firstGapAt": at.map(|p| json!([p.0, p.1]))})).collect();+    let mut out: Vec<Value> = acc.into_iter().filter(|(_, v)| v.1 > 0.0).map(|((net, layer), (len, gap, at, pts))| json!({+        "net": net, "layer": layer, "lengthMm": r3(len), "unreferencedMm": r3(gap), "percent": r1(100.0 * gap / len.max(1e-9)), "firstGapAt": at.map(|p| json!([p.0, p.1])),+        "gapRuns": gap_runs(&pts, 1.0).iter().map(|r| json!([r3(r.0), r3(r.1), r3(r.2), r3(r.3)])).collect::<Vec<_>>()})).collect();     out.sort_by(|a, b| b["unreferencedMm"].as_f64().partial_cmp(&a["unreferencedMm"].as_f64()).unwrap());     out } +/// The gap sample points grouped into runs: boxes (x0, y0, x1, y1) of points within `join` mm of each other. Pure.+pub fn gap_runs(pts: &[(f64, f64)], join: f64) -> Vec<(f64, f64, f64, f64)> {+    let mut runs: Vec<(f64, f64, f64, f64)> = Vec::new();+    for &(x, y) in pts {+        match runs.iter_mut().find(|r| x >= r.0 - join && x <= r.2 + join && y >= r.1 - join && y <= r.3 + join) {+            Some(r) => { r.0 = r.0.min(x); r.1 = r.1.min(y); r.2 = r.2.max(x); r.3 = r.3.max(y); }+            None => runs.push((x, y, x, y)),+        }+    }+    // runs that grew into each other merge+    let mut merged = true;+    while merged {+        merged = false;+        'outer: for i in 0..runs.len() {+            for j in i + 1..runs.len() {+                let (a, b) = (runs[i], runs[j]);+                if a.0 <= b.2 + join && b.0 <= a.2 + join && a.1 <= b.3 + join && b.1 <= a.3 + join {+                    runs[i] = (a.0.min(b.0), a.1.min(b.1), a.2.max(b.2), a.3.max(b.3));+                    runs.remove(j);+                    merged = true;+                    break 'outer;+                }+            }+        }+    }+    runs+}++/// A plan that closes each gap: a pour patch `margin` mm round every gap run, on the neighbouring layer that already+/// carries the most reference copper, on that layer's reference net; as altium_apply_pours arguments. Pure.+pub fn fix_plan(rows: &[Value], layers: &[(String, bool, String)], refs: &BTreeMap<String, Raster>, zones: &[Value], skip: &[String], board: (f64, f64, f64, f64), margin: f64) -> Vec<Value> {+    let idx: BTreeMap<&str, usize> = layers.iter().enumerate().map(|(i, l)| (l.0.as_str(), i)).collect();+    let mut pours = Vec::new();+    for row in rows {+        let Some(&i) = row["layer"].as_str().and_then(|l| idx.get(l)) else { continue };+        // a plane needs no patch (it is copper everywhere but its splits); pick the signal neighbour with most copper+        let best = [i.checked_sub(1), Some(i + 1)].iter().flatten().filter_map(|j| layers.get(*j)).filter(|l| !l.1)+            .max_by_key(|l| refs.get(&l.0).map(|r| r.count()).unwrap_or(0));+        let Some(nb) = best else { continue };+        let net = zones.iter().find(|z| z["layer"].as_str() == Some(nb.0.as_str())).and_then(|z| z["net"].as_str()).map(String::from)+            .or_else(|| skip.first().cloned());+        let Some(net) = net else { continue };+        for (k, r) in row["gapRuns"].as_array().cloned().unwrap_or_default().iter().enumerate() {+            let (x0, y0) = ((f(&r[0]) - margin).max(board.0 + 0.3), (f(&r[1]) - margin).max(board.1 + 0.3));+            let (x1, y1) = ((f(&r[2]) + margin).min(board.2 - 0.3), (f(&r[3]) + margin).min(board.3 - 0.3));+            if x1 <= x0 || y1 <= y0 { continue; }+            // does the patch overlap the reference copper already on that layer? (one that does not floats)+            let joins = refs.get(&nb.0).map(|ras| {+                let mut hit = false;+                let mut y = y0;+                while y <= y1 && !hit { let mut x = x0; while x <= x1 && !hit { hit = ras.at(x, y); x += ras.res; } y += ras.res; }+                hit+            }).unwrap_or(false);+            // removeDead off: a patch that only overlaps the pour it extends touches no pad or track of its net, and+            // Altium's dead-copper removal poured it as nothing (0 mm2, measured 2026-10-26)+            pours.push(json!({"net": net, "layer": nb.0, "name": format!("Return {} {}", row["net"].as_str().unwrap_or(""), k + 1), "removeDead": false,+                "points": [[r3(x0), r3(y0)], [r3(x1), r3(y0)], [r3(x1), r3(y1)], [r3(x0), r3(y1)]], "closes": {"net": row["net"], "layer": row["layer"]}, "joinsExistingCopper": joins}));+        }+    }+    pours+}+ /// The live board's state, pours and stack, or the error to answer. fn gather(args: &Value) -> Result<(Value, Vec<Value>, Vec<(String, bool, String)>), Value> {     if let Some(g) = crate::support::need_licensed() { return Err(g); }@@ -274,8 +338,19 @@ pub fn return_path(args: &Value) -> Value {         rows.retain(|r| r["net"].as_str().map(|n| w.contains(&n.to_ascii_lowercase())).unwrap_or(false));     }     let no_ref: Vec<&String> = layers.iter().map(|l| &l.0).filter(|n| refs.get(*n).map(|r| r.count() == 0).unwrap_or(true)).collect();+    // a plan to close the gaps, for the caller to read and run: nothing is changed here+    let bb = crate::fab::outline_bbox(&st).unwrap_or((0.0, 0.0, 0.0, 0.0));+    let margin = args.get("fixMarginMm").and_then(|v| v.as_f64()).unwrap_or(1.0);+    let patches = fix_plan(&rows, &layers, &refs, &zones, &skip, bb, margin);+    let fix = if patches.is_empty() { Value::Null } else {+        let pours: Vec<Value> = patches.iter().map(|p| { let mut q = p.clone(); if let Some(o) = q.as_object_mut() { o.remove("closes"); o.remove("joinsExistingCopper"); } q }).collect();+        let floating: Vec<Value> = patches.iter().filter(|p| p["joinsExistingCopper"] == json!(false)).map(|p| json!({"name": p["name"], "layer": p["layer"]})).collect();+        json!({"verb": "altium_apply_pours", "args": {"pours": pours}, "patches": patches.len(), "closes": patches.iter().map(|p| p["closes"].clone()).collect::<Vec<_>>(),+               "floating": floating,+               "note": "A plan only: nothing changed. Each patch is a pour of the reference net round one gap run, on the neighbouring layer with the most reference copper. Read it (a patch can cut through other routing's space: Altium pours round it, keeping clearance), then run the verb with args, repour, and run altium_return_path again. floating patches overlap no copper of their net yet: tie each to it with a via (altium_place_vias) or it is an island."})+    };     let note = if skip.is_empty() { json!("No net owns a pour or a plane on this board: there is no reference copper, so every signal is reported. Pour GND (altium_apply_pours) or name referenceNets.") } else { Value::Null };-    json!({"success": true, "referenceNets": skip, "note": note, "layersWithNoReferenceCopper": no_ref, "nets": rows, "ok": rows.is_empty(), "resolutionMm": res,+    json!({"success": true, "referenceNets": skip, "note": note, "layersWithNoReferenceCopper": no_ref, "nets": rows, "ok": rows.is_empty(), "resolutionMm": res, "fix": fix,         "_hint": if rows.is_empty() { "Every signal track runs over pour or plane copper on a neighbouring layer." } else { "Each row is a net whose tracks on that layer run over no pour or plane on either neighbouring layer for unreferencedMm (from firstGapAt). Its return current detours around the gap: more loop area, more emission and crosstalk. Close the gap (extend the pour: altium_apply_pours), route the net over solid copper, or add stitching capacitors or vias where it changes reference." }}) } @@ -330,4 +405,21 @@ mod tests {         assert_eq!(l.iter().map(|x| x.0.as_str()).collect::<Vec<_>>(), vec!["F.Cu", "L39", "In1.Cu", "B.Cu"]);         assert!(l[1].1 && l[1].2 == "GND");     }+    #[test]+    fn gap_runs_group_and_the_fix_patches_the_neighbour() {+        let pts: Vec<(f64, f64)> = (0..40).map(|k| (8.05 + k as f64 * 0.1, 5.0)).chain((0..5).map(|k| (15.0 + k as f64 * 0.1, 5.0))).collect();+        let runs = gap_runs(&pts, 1.0);+        assert_eq!(runs.len(), 2);+        let layers = vec![("F.Cu".to_string(), false, String::new()), ("B.Cu".to_string(), false, String::new())];+        let zones = vec![json!({"layer": "B.Cu", "net": "GND", "filled": true, "fills": [{"outline": [[0, 0], [8, 0], [8, 10], [0, 10]], "holes": []}]})];+        let (_, refs) = rasters(&st(), &zones, &layers, 0.1, Some(&["GND".to_string()]));+        let rows = vec![json!({"net": "SIG", "layer": "F.Cu", "gapRuns": [[8.05, 5.0, 11.95, 5.0]]})];+        let p = fix_plan(&rows, &layers, &refs, &zones, &["GND".to_string()], (0.0, 0.0, 20.0, 10.0), 1.0);+        assert_eq!(p.len(), 1);+        assert_eq!(p[0]["layer"], "B.Cu");+        assert_eq!(p[0]["net"], "GND");+        assert_eq!(p[0]["points"][0], json!([7.05, 4.0]));+        assert_eq!(p[0]["joinsExistingCopper"], json!(true));+        assert_eq!(p[0]["removeDead"], json!(false));+    } }
bridge-rs/src/dialogs.rs+16−1
@@ -316,6 +316,14 @@ static LAST_SCRIPT_ERROR: Mutex<Option<Value>> = Mutex::new(None); /// Pictures of the last 8 boxes the reaper pressed (newest last): `altium_dialog_log {shots:true}`. static REAPED_SHOTS: Mutex<Vec<Value>> = Mutex::new(Vec::new()); +/// Every Yes/No question the reaper declined without being able to read it (newest last, the last 20), with its+/// picture: answering No for the user must never be silent.+static DECLINED: Mutex<Vec<Value>> = Mutex::new(Vec::new());++pub fn declined() -> Vec<Value> {+    DECLINED.lock().map(|g| g.clone()).unwrap_or_default()+}+ pub fn reaped_shots() -> Vec<Value> {     REAPED_SHOTS.lock().map(|g| g.clone()).unwrap_or_default() }@@ -402,8 +410,15 @@ pub fn reap_once() -> usize {                 err_shot = json!(img);             }         }+        if cat == "unreadable_confirm" {+            if let Ok(mut g) = DECLINED.lock() {+                g.push(json!({"atMs": now_ms(), "title": title_str, "pressed": act, "shot": err_shot.clone()}));+                let len = g.len();+                if len > 20 { g.drain(..len - 20); }+            }+        }         if let Ok(mut g) = REAPED_SHOTS.lock() {-            g.push(json!({"atMs": now_ms(), "title": title_str, "shot": err_shot.clone()}));+            g.push(json!({"atMs": now_ms(), "title": title_str, "category": cat, "pressed": act, "shot": err_shot.clone()}));             let len = g.len();             if len > 8 { g.drain(..len - 8); }         }
bridge-rs/src/main.rs+2−1
@@ -23,6 +23,7 @@ mod current; mod impedance; mod inspect; mod lengths;+mod order; mod panel; mod instance; mod library;@@ -51,7 +52,7 @@ use tiny_http::{Header, Method, Response, Server}; /// Attached to every failed reply (see the /command handler). const REPORT_ISSUES: &str = "If this looks like an altium-bridge BUG (not a refusal you expected), report it: check for a duplicate with `adom-wiki issue list adom/altium-bridge`, then `adom-wiki issue create adom/altium-bridge --title \"<verb>: <one-line symptom>\" --category bug-report --body \"<what you ran, what you expected, what happened, the VERBATIM response JSON (and errorShot if present), bridgeVersion, the Altium version from altium_status, the OS>\"`. A relay, routing, toast or lifecycle problem belongs on adom/adom-bridge instead. Reports from real machines are how this bridge gets correct: three different Altium builds behaved three different ways in one weekend."; -pub const BRIDGE_VERSION: &str = "0.2.73";+pub const BRIDGE_VERSION: &str = "0.2.74";  fn json_response(status: u16, body: &serde_json::Value) -> Response<std::io::Cursor<Vec<u8>>> {     let data = serde_json::to_vec(body).unwrap_or_else(|_| b"{}".to_vec());
bridge-rs/src/misc.rs+9−1
@@ -51,6 +51,11 @@ pub fn status(args: &Value) -> Value {     r["windows"] = json!(instance::altium_windows());     r["dialogs"] = json!(dialogs::scan());     r["reapedDialogs"] = json!(dialogs::reaped_log(5));+    let declined = dialogs::declined();+    if !declined.is_empty() {+        r["declinedPrompts"] = json!({"count": declined.len(), "last": declined.last().map(|d| json!({"atMs": d["atMs"], "title": d["title"]})),+            "_hint": "Yes/No questions the bridge answered No without being able to read them: altium_dialog_log shows each with its picture."});+    }     // The last bundle install, light: a client whose install outlived ab's budget polls this.     r["lastInstall"] = crate::library::last_install_summary();     r@@ -224,7 +229,10 @@ pub fn dialog_log(args: &Value) -> Value {         let all = dialogs::reaped_shots();         json!(all[all.len().saturating_sub(limit)..].to_vec())     } else { Value::Null };-    json!({"success": true, "reaped": dialogs::reaped_log(limit), "running": true, "shots": shots,+    // the questions answered No without being read: their pictures always, they were decisions+    let declined = dialogs::declined();+    json!({"success": true, "reaped": dialogs::reaped_log(limit), "running": true, "shots": shots, "declined": declined,+        "_declinedHint": "declined lists every Yes/No question the bridge answered No because Altium paints its text where it cannot be read (AD 26's 'new versions of extensions available' prompt at startup); shot is its picture. If one should have been Yes, do it by hand (extensions: Help > Extensions and Updates).",         "_shotsHint": "shots:true returns PNGs (base64) of the last 8 boxes the reaper pressed. Altium paints its message text, so the picture is the only copy of what a box SAID: read it whenever a verb is refused for no visible reason.",         "_hint": "Anything NOT listed here that reached the user is either a save prompt (never auto-answered, by design) or a dialog missing from the catalog — report it so it can be added with a safe action."}) }
bridge-rs/src/order.rsadded+130
@@ -0,0 +1,130 @@+//! A JLCPCB order in one call: the fab check against JLCPCB's limits, the manufacturing outputs, the JLCPCB BOM and+//! pick-and-place, the assembly-tier check, and one folder to upload from (the Gerbers and drill zipped the way the+//! order page takes them, the BOM and CPL beside it) with every issue in one list.+use serde_json::{json, Value};+use std::io::Write;+use std::path::{Path, PathBuf};++fn f(v: &Value) -> f64 { v.as_f64().unwrap_or(0.0) }++/// The values JLCPCB's order form asks for, from the fab check's measurements. Pure.+pub fn order_form(fab: &Value) -> Value {+    let m = &fab["measured"];+    let hole = [&m["viaDrill"]["mm"], &m["padHole"]["mm"]].iter().filter_map(|v| v.as_f64()).fold(None::<f64>, |a, b| Some(a.map_or(b, |x| x.min(b))));+    json!({"layers": m["copperLayers"], "dimensionsMm": m["boardSize"]["mm"], "outerCopperOz": fab["fab"]["copperOz"].as_f64().map(|o| (o * 2.0).round() / 2.0),+           "minTrackSpaceMm": [m["track"]["mm"], m["clearanceRule"]["mm"]], "minHoleMm": hole,+           "note": "Board thickness, surface finish, mask and silk colours are the order form's choices; thickness must match the stack-up (altium_layer_stack)."})+}++/// Every issue from the checks as one list of {from, what}. Pure.+pub fn issues(fab: &Value, asm: &Value, export: &Value) -> Vec<Value> {+    let mut out = Vec::new();+    for o in fab["outsideLimits"].as_array().cloned().unwrap_or_default() {+        out.push(json!({"from": "fab", "what": format!("{} {} mm, JLCPCB needs {}", o["limit"].as_str().unwrap_or(""), o["boardMm"], o["limitMm"]), "at": o["at"]}));+    }+    for c in fab["costlierOrBelowRecommended"].as_array().cloned().unwrap_or_default() {+        out.push(json!({"from": "fab (costs more)", "what": c["note"]}));+    }+    if asm["service"].is_null() {+        for t in ["economic", "standard"] {+            for r in asm[t]["rules"].as_array().cloned().unwrap_or_default().iter().filter(|r| r["ok"] == json!(false)) {+                out.push(json!({"from": format!("assembly ({t})"), "what": format!("{}: {}", r["rule"].as_str().unwrap_or(""), r["detail"].as_str().unwrap_or(""))}));+            }+        }+    }+    if export["fabChecks"]["outline"]["present"] == json!(false) { out.push(json!({"from": "gerbers", "what": "no board outline in the Gerbers"})); }+    if export["fabChecks"]["copperLayers"]["ok"] == json!(false) { out.push(json!({"from": "gerbers", "what": "fewer copper Gerbers than the board has layers"})); }+    out+}++/// A Gerber layer or the drill file: what JLCPCB's order page reads. Altium's reports (.REP, .RUL, .EXTREP), aperture+/// files and drill reports (.DRR, .LDP) stay out of the zip. Pure.+pub fn upload_file(rel: &str) -> bool {+    let l = rel.replace('\\', "/").to_ascii_lowercase();+    let ext = l.rsplit('.').next().unwrap_or("");+    if l.starts_with("nc drill/") { return ext == "txt"; }+    l.starts_with("gerber/") && ext.starts_with('g') && !matches!(ext, "gbr_lib")+}++/// Zip the files under `root` named in `rel` (flat, by file name) into `zip_path`.+fn zip_flat(root: &Path, rel: &[String], zip_path: &Path) -> Result<usize, String> {+    let file = std::fs::File::create(zip_path).map_err(|e| format!("{}: {e}", zip_path.display()))?;+    let mut z = zip::ZipWriter::new(file);+    let opts = zip::write::FileOptions::default().compression_method(zip::CompressionMethod::Deflated);+    let mut n = 0;+    for r in rel {+        let p = root.join(r);+        let Ok(bytes) = std::fs::read(&p) else { continue };+        let name = p.file_name().map(|s| s.to_string_lossy().to_string()).unwrap_or_default();+        z.start_file(name, opts).map_err(|e| e.to_string())?;+        z.write_all(&bytes).map_err(|e| e.to_string())?;+        n += 1;+    }+    z.finish().map_err(|e| e.to_string())?;+    Ok(n)+}++/// altium_jlcpcb_order {projectPath, pcbPath, outputDir?, variant?}+pub fn jlcpcb_order(args: &Value) -> Value {+    use crate::support::s;+    if let Some(g) = crate::support::need_licensed() { return g; }+    let (Some(prj), Some(pcb)) = (s(args, "projectPath"), s(args, "pcbPath")) else {+        return json!({"success": false, "errorCode": "bad_args", "error": "projectPath (.PrjPcb) and pcbPath (.PcbDoc) are required"});+    };+    let stem = Path::new(&pcb).file_stem().map(|s| s.to_string_lossy().to_string()).unwrap_or_else(|| "board".into());+    let pack: PathBuf = s(args, "outputDir").map(PathBuf::from).unwrap_or_else(|| Path::new(&prj).parent().unwrap_or(Path::new(".")).join(format!("JLCPCB order {stem}")));+    let _ = std::fs::remove_dir_all(&pack);+    if let Err(e) = std::fs::create_dir_all(&pack) { return json!({"success": false, "errorCode": "write_failed", "error": format!("{}: {e}", pack.display())}); }+    let fab = crate::fab::fab_check(&json!({"filePath": pcb, "fab": "jlcpcb"}));+    if fab.get("success").and_then(|b| b.as_bool()) != Some(true) { return fab; }+    let export = crate::manufacturing::export_manufacturing(&json!({"projectPath": prj, "pcbPath": pcb, "timeout": 400}));+    if export.get("success").and_then(|b| b.as_bool()) != Some(true) { return json!({"success": false, "errorCode": "export_failed", "error": "the manufacturing outputs failed", "export": export}); }+    let out_dir = PathBuf::from(export["outputDir"].as_str().unwrap_or(""));+    let files: Vec<String> = export["files"].as_array().cloned().unwrap_or_default().iter().filter_map(|v| v.as_str().map(String::from)).collect();+    let fabfiles: Vec<String> = files.iter().filter(|r| upload_file(r)).cloned().collect();+    let zip_path = pack.join(format!("{stem}-gerbers.zip"));+    let zipped = match zip_flat(&out_dir, &fabfiles, &zip_path) { Ok(n) => n, Err(e) => return json!({"success": false, "errorCode": "zip_failed", "error": e}) };+    let mut bom_args = json!({"projectPath": prj, "outputDir": pack.to_string_lossy(), "write": true});+    if let Some(v) = s(args, "variant") { bom_args["variant"] = json!(v); }+    let bom = crate::bom::bom(&bom_args);+    let asm = crate::assembly::assembly_check(&json!({"filePath": pcb, "projectPath": prj}));+    let form = order_form(&fab);+    let list = issues(&fab, &asm, &export);+    let summary = json!({"board": pcb, "project": prj, "orderForm": form, "fabFits": fab["fits"], "assemblyService": asm["service"], "issues": list,+                         "files": {"gerbers": zip_path.to_string_lossy(), "bom": pack.join("bom-jlcpcb.csv").to_string_lossy(), "cpl": pack.join("cpl-jlcpcb.csv").to_string_lossy()}});+    let _ = std::fs::write(pack.join("order.json"), serde_json::to_string_pretty(&summary).unwrap_or_default());+    let ready = fab["fits"] == json!(true) && !asm["service"].is_null() && list.is_empty();+    json!({"success": true, "ready": ready, "folder": pack.to_string_lossy(), "gerberZip": {"path": zip_path.to_string_lossy(), "files": zipped},+        "bomFiles": bom.get("files").cloned().unwrap_or(Value::Null), "orderForm": form, "fabFits": fab["fits"], "assemblyService": asm["service"],+        "issues": list, "checks": {"fab": {"outsideLimits": fab["outsideLimits"], "source": fab["fab"]["source"]}, "assembly": {"economic": asm["economic"]["ok"], "standard": asm["standard"]["ok"]}},+        "_hint": if ready { "Upload the Gerber zip on JLCPCB's order page, set the order form from orderForm, then add assembly with bom-jlcpcb.csv and cpl-jlcpcb.csv and check every part's rotation in their preview." }+                 else { "issues lists what stands between this board and a JLCPCB order (fab limits, the assembly tier, the Gerbers); the folder is written anyway. Fix them and run it again." }})+}++#[cfg(test)]+mod tests {+    use super::*;++    #[test]+    fn issues_gather_every_check() {+        let fab = json!({"outsideLimits": [{"limit": "minTrack", "boardMm": 0.08, "limitMm": 0.1, "at": [1, 2]}], "costlierOrBelowRecommended": [{"note": "via holes under 0.3 mm"}],+                         "measured": {"copperLayers": 2, "boardSize": {"mm": [40.0, 20.0]}, "track": {"mm": 0.2}, "clearanceRule": {"mm": 0.15}, "viaDrill": {"mm": 0.3}, "padHole": {"mm": 0.8}}, "fab": {"copperOz": 1.0}});+        let asm = json!({"service": null, "economic": {"rules": [{"rule": "parts on one side only", "ok": false, "detail": "1 on the bottom"}]}, "standard": {"rules": [{"rule": "fiducials", "ok": false, "detail": "0"}]}});+        let ex = json!({"fabChecks": {"outline": {"present": true}, "copperLayers": {"ok": true}}});+        let l = issues(&fab, &asm, &ex);+        assert_eq!(l.len(), 4);+        assert!(l[0]["what"].as_str().unwrap().starts_with("minTrack 0.08"));+        let form = order_form(&fab);+        assert_eq!(form["minHoleMm"], 0.3);+        assert_eq!(form["dimensionsMm"], json!([40.0, 20.0]));+        let _ = f(&json!(1));+    }+    #[test]+    fn only_gerbers_and_the_drill_file_go_in_the_zip() {+        for (f, want) in [("Gerber\\lane.GTL", true), ("Gerber\\lane.GM1", true), ("Gerber\\lane.GKO", true), ("NC Drill\\lane.TXT", true),+                          ("Gerber\\lane.REP", false), ("Gerber\\lane.RUL", false), ("Gerber\\lane.EXTREP", false), ("Gerber\\lane.apr", false),+                          ("Gerber\\lane-macro.APR_LIB", false), ("NC Drill\\lane.DRR", false), ("NC Drill\\lane.LDP", false), ("Pick Place\\x.csv", false)] {+            assert_eq!(upload_file(f), want, "{f}");+        }+    }+}
bridge-rs/src/verbs.rs+9−1
@@ -22,7 +22,7 @@ pub const KNOWN: &[&str] = &[     "list_nets", "net_connections", "layers", "copper_layers", "read_rules",     "set_layer_visibility", "footprint_primitives", "schematic_data", "layer_stack", "net_classes", "diff_pairs", "board_outline", "set_track_width", "find_space", "selection", "check_orientation", "replicate_layout", "outjob_info", "find_symbol", "part_parameters",     // the live-board lane AI Flow drives-    "routing_state", "route_net", "move_parts", "place_vias", "board_features", "sch_sheet_symbol", "netlist", "silkscreen_prep", "net_lengths", "teardrops", "component_classes", "read_sheet_file", "fab_check", "panelize", "impedance", "current_capacity", "height_check", "copper_balance", "return_path", "silk_designators", "via_fence", "assembly_check", "remove_items", "ripup_nets", "apply_pours", "pour_state", "remove_pours", "repour", "routing_drc", "build_board", "set_outline", "set_design_rules", "zoom_to", "add_rule", "build_schematic", "export_manufacturing", "select_net", "silk_state", "apply_silkscreen",+    "routing_state", "route_net", "move_parts", "place_vias", "board_features", "sch_sheet_symbol", "netlist", "silkscreen_prep", "net_lengths", "teardrops", "component_classes", "read_sheet_file", "fab_check", "panelize", "impedance", "current_capacity", "height_check", "copper_balance", "return_path", "silk_designators", "via_fence", "assembly_check", "jlcpcb_order", "remove_items", "ripup_nets", "apply_pours", "pour_state", "remove_pours", "repour", "routing_drc", "build_board", "set_outline", "set_design_rules", "zoom_to", "add_rule", "build_schematic", "export_manufacturing", "select_net", "silk_state", "apply_silkscreen",     // surfaces     "show_project", "show_schematic", "show_2d_board", "show_3d_board", "show_library",     "show_symbol", "show_footprint", "show_3d_chip", "list_library", "demo",@@ -706,6 +706,13 @@ fn describe() -> Value {             &["workspace_search", "sch_place_part", "annotate", "sch_connect", "update_pcb"],             &["Takes 15-70 s. Uses real clicks (double-click the result, click the sheet): Altium comes to the front.", "The part lands near the view's lower-left corner first, then moves to x,y: wires do not follow, so connect it after."],             json!({"sheet": "C:/proj/Main.SchDoc", "query": "100nF 0402 50V", "x": 3000, "y": 2000})),+        verb_doc("jlcpcb_order", "A JLCPCB order in one call: the board checked against JLCPCB's fab limits, the Gerbers and drill zipped the way JLCPCB's order page takes them, the JLCPCB BOM and pick-and-place (CPL), the assembly-tier check, and the order-form values, in one folder with every issue in one list.",+            json!({"projectPath": "the .PrjPcb", "pcbPath": "its .PcbDoc", "outputDir": "the order folder (default 'JLCPCB order <board>' beside the project; emptied first)", "variant": "an assembly variant for the BOM (optional)"}),+            json!({"ready": "bool - fab fits, an assembly tier passes, no issues", "folder": "path", "gerberZip": "{path, files}", "bomFiles": "[..] incl. bom-jlcpcb.csv, cpl-jlcpcb.csv", "orderForm": "{layers, dimensionsMm, outerCopperOz, minTrackSpaceMm, minHoleMm}", "assemblyService": "economic | standard | null", "issues": "[{from, what, at?}]"}), 900,+            "Fix what issues lists and run it again; when ready, upload the zip, then the BOM and CPL for assembly and check rotations in JLCPCB's preview.",+            &["fab_check", "assembly_check", "export_manufacturing", "bom", "panelize"],+            &["Runs Silkscreen Preparation on the board (through export_manufacturing) and writes the order folder fresh each time.", "Takes a minute or two: the manufacturing export is most of it."],+            json!({"projectPath": "C:/proj/Board.PrjPcb", "pcbPath": "C:/proj/Board.PcbDoc"})),         verb_doc("assembly_check", "Ready for JLCPCB assembly? The board against both JLCPCB PCBA tiers as published (Economic and Standard): board or panel size, thickness and layers, parts on one or both sides, the smallest package and the finest pin pitch, fiducials, and the parts with no LCSC number; answers the cheapest tier every rule allows.",             json!({"filePath": "the .PcbDoc (opened first; else the current board)", "projectPath": "the .PrjPcb - checks every purchased BOM line has an LCSC number (altium_bom)", "panelMm": "[w, h] when it ships in a panel (altium_panelize's panelMm)"}),             json!({"service": "economic | standard | null", "economic": "{ok, rules:[{rule, ok, detail}]}", "standard": "{ok, rules}", "board": "{parts, bottomSideParts, finestPitch, smallestChip, tinyFootprints, fiducials, throughHoleParts}", "linesWithoutLcsc": "[..]"}), 300,@@ -1763,6 +1770,7 @@ pub fn dispatch(command: &str, args: &Value, _forwarded: &[(String, String)]) ->         "silk_designators" => crate::silkplace::silk_designators(args),         "via_fence" => crate::features::via_fence(args),         "assembly_check" => crate::assembly::assembly_check(args),+        "jlcpcb_order" => crate::order::jlcpcb_order(args),         "footprint_from_land_pattern" => crate::footprint::from_land_pattern(args),         "find_symbol" => crate::inspect::find_symbol(args),         "part_parameters" => crate::inspect::part_parameters(args),
dev-skills/altium-bridge-test/run_verb_tests.py+5−1
@@ -333,7 +333,7 @@ def matrix(w):     M["copper_balance"] = dict(phase=3.5, timeout=260, **ok(filePath=LB),                                check=lambda d: len(d.get("layers") or []) == 2 and abs((d.get("boardMm2") or 0) - 799.1) < 3 and len(d.get("pairs") or []) == 1)     M["return_path"] = dict(phase=3.5, timeout=260, **ok(filePath=LB),-                            check=lambda d: isinstance(d.get("nets"), list) and isinstance(d.get("layersWithNoReferenceCopper"), list))+                            check=lambda d: isinstance(d.get("nets"), list) and isinstance(d.get("layersWithNoReferenceCopper"), list) and "fix" in d)     # 0.2.73: JLCPCB's limits built in; designators placed clear of pads, read back from Altium's own text boxes     M["silk_designators"] = dict(phase=3.5, timeout=650, **ok(filePath=LB, minSize=0.8),                                  check=lambda d: d.get("onPadsAfter") == [] and d.get("labelOverlapsAfter") == [] and (d.get("failed") or 0) == 0)@@ -342,6 +342,10 @@ def matrix(w):     M["assembly_check"] = dict(phase=3.5, timeout=450, **ok(filePath=LB, projectPath=LP),                                check=lambda d: d.get("service") in (None, "economic", "standard") and len((d.get("economic") or {}).get("rules") or []) >= 6                                                and len((d.get("standard") or {}).get("rules") or []) >= 5)+    # 0.2.74: the whole JLCPCB order folder (zip, BOM, CPL, order form, every issue in one list)+    M["jlcpcb_order"] = dict(phase=3.5, timeout=950, **ok(projectPath=LP, pcbPath=LB),+                             check=lambda d: ((d.get("gerberZip") or {}).get("files") or 0) >= 8 and any("cpl-jlcpcb" in str(f) for f in d.get("bomFiles") or [])+                                             and isinstance(d.get("issues"), list) and (d.get("orderForm") or {}).get("layers") == 2)     # 0.2.60: a variant written into the project file and read back from Altium     M["variants"] = dict(phase=3.5, timeout=400, **ok(projectPath=LP, name="BatteryLite", notFitted=["U2"], timeout=380),                          check=lambda d: any(v.get("name") == "BatteryLite" for v in (d.get("altium") or {}).get("variants") or []))
package.json+6−2
@@ -1,6 +1,6 @@ {   "slug": "altium-bridge",-  "version": "0.2.73",+  "version": "0.2.74",   "type": "app",   "description": "Let an AI (Claude, ChatGPT, Codex or any agent) run Altium Designer for you: create symbols and footprints, place parts (also from Altium 365), wire and annotate schematics, Update PCB, set the stack-up and rules, route, pour copper, add mounting holes and stitching vias, run ERC and DRC, and make Gerbers, BOMs and STEP. Free in Hydrogen; bring your own AI and Altium licence.",   "tags": [@@ -189,7 +189,11 @@     "altium place reference designators",     "designators overlapping pads altium",     "altium via fence",-    "via stitching along rf trace"+    "via stitching along rf trace",+    "altium jlcpcb order files",+    "export altium board for jlcpcb order",+    "altium gerber zip for jlcpcb",+    "fix return path gap altium"   ],   "discovery_pitch": "An AI that runs Altium Designer in the user's own session: libraries, schematics, Update PCB, stack-up, routing, DRC, Gerbers and BOMs.",   "sample_prompts": [
page.json+6−2
@@ -4,7 +4,7 @@   "type": "app",   "title": "Altium Bridge: AI for Altium Designer",   "brief": "Let an AI (Claude, ChatGPT, Codex or any agent) run Altium Designer for you: create symbols and footprints, place parts (also from Altium 365), wire and annotate schematics, Update PCB, set the stack-up and rules, route, pour copper, add mounting holes and stitching vias, run ERC and DRC, and make Gerbers, BOMs and STEP. Free in Hydrogen; bring your own AI and Altium licence.",-  "version": "0.2.73",+  "version": "0.2.74",   "hero": {     "type": "image",     "path": "screenshots/hero.png"@@ -181,7 +181,11 @@     "altium place reference designators",     "designators overlapping pads altium",     "altium via fence",-    "via stitching along rf trace"+    "via stitching along rf trace",+    "altium jlcpcb order files",+    "export altium board for jlcpcb order",+    "altium gerber zip for jlcpcb",+    "fix return path gap altium"   ],   "discovery_pitch": "An AI that runs Altium Designer in the user's own session: libraries, schematics, Update PCB, stack-up, routing, DRC, Gerbers and BOMs.",   "metadata": {},
skills/altium-boards/SKILL.md+7
@@ -339,6 +339,11 @@ altium_return_path '{"nets":["USB_DP","USB_DN","CLK"]}'  # signal track over no   twist in reflow. `return_path` reports, per signal net and layer, the track length over no reference copper on either   neighbouring layer (pours, planes, the reference nets' copper), with where the first gap starts. On the Sentinel   example it found the antenna trace ANT_RF (no ground under it by design) and parts of VBAT over gaps.+- `return_path` also answers `fix` (0.2.74): a plan, not a change. Each gap run gets a pour patch of the reference net,+  `fixMarginMm` (1 mm) round it, on the neighbouring layer with the most reference copper, written as `altium_apply_pours`+  arguments (`fix.verb`, `fix.args`) with dead-copper removal off so a patch that only overlaps the pour it extends stays.+  `fix.floating` names patches that touch no copper of their net yet: tie them with a via. Measured: a lane board with GND+  poured on half of B.Cu had 6.3 mm of N1 unreferenced; the patch (16.4 mm2) closed it and return_path came back clean.  ## Designators placed for assembly, and via fences (0.2.73) @@ -354,6 +359,8 @@ altium_via_fence '{"nets":["ANT_RF"],"edge":true,"viaNet":"GND","freqGHz":2.4}'   are listed in `unplaced`, and the rest are planned round them. `onPadsAfter` and `labelOverlapsAfter` re-check with   Altium's own text boxes (a box is the text plus half its stroke all round: a 1.0 mm label measures 1.285 mm).   Measured on the Bluetooth Sentinel example: 41 of 60 moved, none on a pad or another label (7 sat on pads before).+  Bottom-side labels are mirrored by Altium and grow leftwards from their anchor; the plan accounts for it (the Sentinel's+  J1 under the board landed 0.2 mm off its body, Altium's own box matching the plan). Parts off the board are reported. - `via_fence` lines ground vias along both sides of the named nets' tracks (offset from the widest track) and, with   `edge`, round the board edge, at lambda/20 of `freqGHz` in FR-4 (3.4 mm at 2.4 GHz) or `pitchMm`. The via is the board's   own Routing Via rule's preferred size, and every via keeps `clearance` from other copper and pads, the board edge and
skills/altium-outputs/SKILL.md+14
@@ -68,6 +68,20 @@ Altium need not be running. Run one container with `altium_run_outjob {outjobPat - OutJob→PDF was blocked in the predecessor bridge; on this one run it through   `altium_run_outjob` and verify the files[] like any medium. +## A JLCPCB order in one call (0.2.74)++```bash+altium_jlcpcb_order '{"projectPath":"C:\\work\\Board.PrjPcb","pcbPath":"C:\\work\\Board.PcbDoc"}'+```++Runs the JLCPCB fab check, the manufacturing outputs, the JLCPCB BOM and CPL, and the assembly-tier check, and writes+one folder ('JLCPCB order <board>' beside the project, emptied first): `<board>-gerbers.zip` with only the Gerber layers+and the drill file (Altium's reports, aperture files and drill reports left out), `bom-jlcpcb.csv`, `cpl-jlcpcb.csv`, and+`order.json`. The reply's `orderForm` holds what JLCPCB's order page asks (layers, size, outer copper weight, smallest track,+space and hole), `issues` every problem from every check in one list, and `ready` is true only when the fab check fits, an+assembly tier passes and nothing is listed. Measured on the lane board: 21 s, 22 files from the export, the zip and the+JLCPCB BOM and CPL written, five issues (thickness, size, fiducials, two parts without LCSC numbers).+ ## Ready for JLCPCB: fab limits and assembly (0.2.73)  ```bash
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-0.2.73+0.2.74
src/bridge.json+3−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "altium",   "displayName": "Altium Designer",-  "version": "0.2.73",+  "version": "0.2.74",   "description": "Drive Altium Designer from Adom: a resident DelphiScript agent (eval + the 1,100-command process launcher), the X2 -R command line, UIA over the VCL shell, dialogs by PID, screenshots of every Altium window, and Altium 365.",   "homepage": "https://wiki.adom.inc/adom/altium-bridge",   "docs": "https://wiki.adom.inc/adom/altium-bridge",@@ -105,6 +105,7 @@     "altium_silk_designators",     "altium_via_fence",     "altium_assembly_check",+    "altium_jlcpcb_order",     "altium_find_space",     "altium_find_symbol",     "altium_footprint_primitives",@@ -231,6 +232,7 @@       "silk_designators": 600,       "via_fence": 240,       "assembly_check": 400,+      "jlcpcb_order": 900,       "agent_start": 120,       "run_outjob": 600,       "silk_state": 180,