← Commit history
Cargo.lock+11−11
@@ -4,7 +4,7 @@ version = 4  [[package]] name = "adom-aiflow"-version = "0.2.153"+version = "0.2.154" dependencies = [  "aiflow-analyze",  "aiflow-board",@@ -28,7 +28,7 @@ dependencies = [  [[package]] name = "aiflow-analyze"-version = "0.2.153"+version = "0.2.154" dependencies = [  "aiflow-board",  "aiflow-sys",@@ -39,7 +39,7 @@ dependencies = [  [[package]] name = "aiflow-board"-version = "0.2.153"+version = "0.2.154" dependencies = [  "aiflow-sys",  "roxmltree",@@ -49,7 +49,7 @@ dependencies = [  [[package]] name = "aiflow-bridge"-version = "0.2.153"+version = "0.2.154" dependencies = [  "aiflow-board",  "aiflow-sys",@@ -59,7 +59,7 @@ dependencies = [  [[package]] name = "aiflow-copper"-version = "0.2.153"+version = "0.2.154" dependencies = [  "aiflow-board",  "aiflow-grid",@@ -70,7 +70,7 @@ dependencies = [  [[package]] name = "aiflow-grid"-version = "0.2.153"+version = "0.2.154" dependencies = [  "aiflow-board",  "serde",@@ -79,7 +79,7 @@ dependencies = [  [[package]] name = "aiflow-place"-version = "0.2.153"+version = "0.2.154" dependencies = [  "aiflow-board",  "aiflow-sys",@@ -89,7 +89,7 @@ dependencies = [  [[package]] name = "aiflow-pours"-version = "0.2.153"+version = "0.2.154" dependencies = [  "aiflow-board",  "aiflow-copper",@@ -100,7 +100,7 @@ dependencies = [  [[package]] name = "aiflow-router"-version = "0.2.153"+version = "0.2.154" dependencies = [  "aiflow-board",  "aiflow-grid",@@ -111,7 +111,7 @@ dependencies = [  [[package]] name = "aiflow-run"-version = "0.2.153"+version = "0.2.154" dependencies = [  "aiflow-sys",  "serde",@@ -120,7 +120,7 @@ dependencies = [  [[package]] name = "aiflow-sys"-version = "0.2.153"+version = "0.2.154" dependencies = [  "serde_json", ]
Cargo.toml+1−1
@@ -15,7 +15,7 @@ members = [ ]  [workspace.package]-version = "0.2.153"+version = "0.2.154" edition = "2021" license = "MIT" repository = "https://wiki.adom.inc/adom/adom-aiflow"
crates/adom-aiflow/src/dfa.rs+2−1
@@ -1296,7 +1296,8 @@ fn build_hot_and_high_current_exemptions(spec: &Value) -> (BTreeMap<String, Opti     if let Some(o) = spec["hot"].as_object() {         for (r, v) in o {             if let Some(tp) = v["tabPad"].as_str().filter(|s| !s.is_empty()) {-                hot_tab_pads.insert((r.clone(), tp.to_string()));+                // adom-fields 0.10.25 reads "U1.21" as pad 21 of U1: the same here+                hot_tab_pads.insert((r.clone(), tp.strip_prefix(&format!("{r}.")).unwrap_or(tp).to_string()));             } else {                 hot_tab_net.insert(r.clone(), v["tabNet"].as_str().map(str::to_string));             }
crates/adom-aiflow/src/main.rs+2
@@ -6945,6 +6945,8 @@ fn main() {                 let f=aiflow_analyze::fields_report::load(&fields_file).unwrap_or_else(|e| err(&e,&[]));                 // the Fields thread, 2026-11-17: a solve by an adom-fields with a fix that changes this board's numbers                 for n in fields_versions::stale_notes(&f, &spec, Path::new(&solved_board)) { note(&n, &[]); }+                // adom-fields 0.10.25: a file edited during the solve is said in the report, not an error; the solve used the copies read at its start+                if let Some(moved) = f["inputIdentity"]["changedOnDisk"].as_array().filter(|a| !a.is_empty()) { note(&format!("the {} changed on disk while Fields solved: this solve is of the copies read at its start", moved.iter().filter_map(|v| v.as_str()).collect::<Vec<_>>().join(" and ")), &["Solve again (`analyze thermal` or `current`) once the edit is saved, so the numbers are of the board and spec as they are now.".into()]); }                 if let Err(e)=std::fs::metadata(&solved_board) { err(&e.to_string(),&[]); }                 let spec_bytes=std::fs::read(r.data["spec"].as_str().unwrap_or("")).unwrap_or_else(|e|err(&e.to_string(),&[]));                 // issue #70: record reviewed part-limited peaks, then screen with the live ones
crates/adom-aiflow/src/thermalvias.rs+27−1
@@ -174,6 +174,16 @@ fn regions_near(pours: &[Value], net: &str, pads: &[(f64, f64)], reach: f64) ->  /// Plan the vias. `poured_both` says whether a net has copper on both outer layers (a via only moves /// heat where the net has copper on the other side).+/// adom-fields 0.10.25 (issue 48): a hot part with no tabNet is lead-cooled, yet `spec.thermalVias` asks for vias at one+/// of its pads: the spec disagrees with itself. Said the way Fields says it, with the same fix (name the tab once).+pub fn thermal_vias_disagree(spec: &Value, b: &Board, reference: &str) -> Option<String> {+    let t = spec["thermalVias"].as_array()?.iter().find(|t| t["pad"].as_str().is_some_and(|k| k.split_once('.').is_some_and(|(r, _)| r == reference)))?;+    let key = t["pad"].as_str()?;+    let name = key.split_once('.').map(|x| x.1).unwrap_or(key);+    let net = t["net"].as_str().map(str::to_string).or_else(|| b.pads.iter().find(|p| p.reference == reference && p.name == name).map(|p| p.net.clone()).filter(|n| !n.is_empty()))?;+    Some(format!("{reference} has no tabNet in spec.hot (lead-cooled), but spec.thermalVias puts vias at {key} on {net}: the spec disagrees with itself. If {key} is its exposed tab, set hot.{reference}.tabNet \"{net}\" and tabPad \"{name}\" (Fields then counts those vias); if not, take {key} out of thermalVias"))+}+ pub fn plan(spec: &Value, b: &Board, sw_nets: &[String]) -> (Vec<Part>, Value) {     plan_with_acknowledgements(spec, b, sw_nets, &[]) }@@ -213,7 +223,8 @@ pub fn plan_with_acknowledgements(spec: &Value, b: &Board, sw_nets: &[String], a         let watts = h["watts"].as_f64().unwrap_or(0.0);         // issue #116: a lead-cooled part has no tab to put heatsink vias beside         if aiflow_analyze::lead_cooling::declared(&reference, &h).unwrap_or(false) {-            parts.push(Part { reference: reference.clone(), net: aiflow_analyze::lead_cooling::LEADS.into(), target: 0, existing: 0, planned: vec![], note: Some(format!("{reference} is lead-cooled (no exposed tab): no heatsink vias; the Fields solve judges it")), copper: vec![] });+            let note = thermal_vias_disagree(spec, b, &reference).unwrap_or_else(|| format!("{reference} is lead-cooled (no exposed tab): no heatsink vias; the Fields solve judges it"));+            parts.push(Part { reference: reference.clone(), net: aiflow_analyze::lead_cooling::LEADS.into(), target: 0, existing: 0, planned: vec![], note: Some(note), copper: vec![] });             continue;         }         let net = h["tabNet"].as_str().unwrap_or("GND").to_string();@@ -797,4 +808,19 @@ mod tests {         for p in parts { println!("PART {} {} target {} existing {} planned {} {:?}", p.reference, p.net, p.target, p.existing, p.planned.len(), p.note); }         println!("ENTRIES {}", plan["nets"].as_array().unwrap().len());     }++    /// adom-fields 0.10.25: a lead-cooled part (no tabNet) that spec.thermalVias still puts vias on is said, with the fix.+    #[test]+    fn a_lead_cooled_part_with_thermal_vias_is_said() {+        let b = aiflow_board::Board::from_text("t.kicad_pcb", r#"(kicad_pcb (version 20240108) (net 0 "") (net 1 "GND") (net 2 "/SW")+  (gr_rect (start 0 0) (end 20 20) (layer "Edge.Cuts"))+  (footprint "Q" (layer "F.Cu") (at 10 10) (property "Reference" "Q1")+    (pad "1" smd rect (at -1 0) (size 1 1) (layers "F.Cu") (net 1 "GND")) (pad "5" smd rect (at 1 0) (size 2 2) (layers "F.Cu") (net 2 "/SW"))))"#.to_string()).unwrap();+        let spec = serde_json::json!({"hot": {"Q1": {"watts": 1.0}}, "thermalVias": [{"pad": "Q1.5", "count": 4}]});+        let m = super::thermal_vias_disagree(&spec, &b, "Q1").unwrap();+        assert!(m.contains("tabNet \"/SW\" and tabPad \"5\""), "{m}");+        assert!(super::thermal_vias_disagree(&serde_json::json!({"hot": {"Q1": {"watts": 1.0}}}), &b, "Q1").is_none());+        let (parts, _) = super::plan(&spec, &b, &[]);+        assert!(parts[0].note.as_deref().unwrap().contains("disagrees with itself"));+    } }
docs/release-0.2.154.mdadded+8
@@ -0,0 +1,8 @@+# adom-aiflow 0.2.154++Adopts adom-fields 0.10.25 (adom/adom-fields issue 48, Mohit Singh).++- **One tab, said once.** A hot part with no `tabNet` is lead-cooled in AI Flow (no via target). When `spec.thermalVias` still asks for vias at one of its pads, `thermal-vias plan` says the spec disagrees with itself, with the same fix Fields gives: set `hot.<ref>.tabNet` and `tabPad` if that pad is the tab, or drop the entry.+- **`tabPad` as `"U1.21"`.** The DFA check reads `"U1.21"` as pad 21 of U1, as Fields does, so the tab pad keeps its exemption.+- **A file edited during a solve.** Fields no longer fails the solve. `analyze` notes `inputIdentity.changedOnDisk` and asks for a fresh solve. The stale-screen check still compares the solved copies' hashes with the files.+- Skill aiflow-power-layout: `tabNet` and `tabPad` together, as a real pad of that part.
package.json+1−1
@@ -1,7 +1,7 @@ {   "slug": "adom-aiflow",   "type": "app",-  "version": "0.2.153",+  "version": "0.2.154",   "title": "AI Flow",   "description": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. One Rust binary with a crate per step (placement helpers, a grid router with Kelvin taps, pours with keepouts, KiCad's DRC gate, live landing through the KiCad Bridge, copper measurement, current and thermal analysis) and a finish line that refuses an unfinished board. Every command answers with hints for the AI; every turn, its thinking time and every rework loop go into run.jsonl, so Claude, Codex and any other engine are compared on the same flow. KiCad, Fusion 360 and Altium Designer today (the same steps and gates through each tool's bridge); Adom's own web apps next.",   "summary": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. The AI thinks its way from placement through routing, pours, current and thermal analysis to a delivered video; the binary does the fast, deterministic parts of every step, hands back hints, and keeps a ledger of every turn, every return to an earlier step, and the clock from the prompt to done.",
page.json+1−1
@@ -1,7 +1,7 @@ {   "slug": "adom-aiflow",   "type": "app",-  "version": "0.2.153",+  "version": "0.2.154",   "title": "AI Flow",   "description": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. One Rust binary with a crate per step (placement helpers, a grid router with Kelvin taps, pours with keepouts, KiCad's DRC gate, live landing through the KiCad Bridge, copper measurement, current and thermal analysis) and a finish line that refuses an unfinished board. Every command answers with hints for the AI; every turn, its thinking time and every rework loop go into run.jsonl, so Claude, Codex and any other engine are compared on the same flow. KiCad, Fusion 360 and Altium Designer today (the same steps and gates through each tool's bridge); Adom's own web apps next.",   "summary": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. The AI thinks its way from placement through routing, pours, current and thermal analysis to a delivered video; the binary does the fast, deterministic parts of every step, hands back hints, and keeps a ledger of every turn, every return to an earlier step, and the clock from the prompt to done.",
skills/aiflow-power-layout/SKILL.md+1−1
@@ -15,7 +15,7 @@ Write `aiflow/spec.json` from the schematic before `start`, with a note on every - `wideNets` for VIN, VOUT, SW, GND (widths in preference order); `midNets` for BOOT. - `kelvin`: the divider's bottom returns to the IC GND pin (`"R3.2": "U1.1"`), the divider's top senses VOUT at the output cap (`"R1.1": "C6.1"`), per the datasheet's layout section. - `loads`: amps and `maxRiseC` per loaded net; VIN at the low end of the input range.-- `hot`: watts per part from calcs.json (aiflow-circuit-design) with the arithmetic in `hotNote`, and `tabNet` only for a part with an exposed pad or tab (its net). A SOT-23, SOIC or TDFN without one gets no tabNet: adom-fields (0.10.20+) then spreads its heat through every pin by pad area, while a one-pin tabNet puts all its watts through that pin and reads far too hot (`analyze thermal` names such a part).+- `hot`: watts per part from calcs.json (aiflow-circuit-design) with the arithmetic in `hotNote`, and `tabNet` only for a part with an exposed pad or tab (its net). A SOT-23, SOIC or TDFN without one gets no tabNet: adom-fields (0.10.20+) then spreads its heat through every pin by pad area, while a one-pin tabNet puts all its watts through that pin and reads far too hot (`analyze thermal` names such a part). A part with an exposed tab takes `tabNet` and `tabPad` together (`"21"` or `"U1.21"`, a real pad of that part: adom-fields 0.10.25 refuses another part's pad). `thermalVias` on a part with no tabNet makes the spec disagree with itself: `thermal-vias plan` and Fields both say so; name the tab instead. - `planes`: each plane net and its layer (`{"GND": "B.Cu"}`). adom-fields (0.10.21+) counts these as return planes for its no-reference and decoupling checks; on a board with an isolated converter, list the primary-side return too (return-named nets such as RTN or `_RET`, and the converter's power-stage ground, count without it). - `pours`: GND on both layers from the outline; VIN and VOUT as `around` pours on F.Cu; SW as an explicit small `polygon`; `notPoured` for BOOT, FB and dividers. - `solidAt` for the IC GND pin and the inductor pads; thermal and stitch vias. A solid joint sits one priority above the pour it is in (or it fills nothing), joints of one net that overlap merge, and a pad whose pour is already `connection: solid` gets none.