← Commit history
Merge PR #668: 0.2.144: adopt adom-fields 0.10.21 (fields-0.10.21-0.2.144 -> main) merge
Showing changes introduced by the merge (against its first parent).
7 files changed
+45−14
Cargo.lock+11−11@@ -4,7 +4,7 @@ version = 4 [[package]] name = "adom-aiflow"-version = "0.2.143"+version = "0.2.144" dependencies = [ "aiflow-analyze", "aiflow-board",@@ -28,7 +28,7 @@ dependencies = [ [[package]] name = "aiflow-analyze"-version = "0.2.143"+version = "0.2.144" dependencies = [ "aiflow-board", "aiflow-sys",@@ -39,7 +39,7 @@ dependencies = [ [[package]] name = "aiflow-board"-version = "0.2.143"+version = "0.2.144" dependencies = [ "aiflow-sys", "roxmltree",@@ -49,7 +49,7 @@ dependencies = [ [[package]] name = "aiflow-bridge"-version = "0.2.143"+version = "0.2.144" dependencies = [ "aiflow-board", "aiflow-sys",@@ -59,7 +59,7 @@ dependencies = [ [[package]] name = "aiflow-copper"-version = "0.2.143"+version = "0.2.144" dependencies = [ "aiflow-board", "aiflow-grid",@@ -70,7 +70,7 @@ dependencies = [ [[package]] name = "aiflow-grid"-version = "0.2.143"+version = "0.2.144" dependencies = [ "aiflow-board", "serde",@@ -79,7 +79,7 @@ dependencies = [ [[package]] name = "aiflow-place"-version = "0.2.143"+version = "0.2.144" dependencies = [ "aiflow-board", "aiflow-sys",@@ -89,7 +89,7 @@ dependencies = [ [[package]] name = "aiflow-pours"-version = "0.2.143"+version = "0.2.144" dependencies = [ "aiflow-board", "aiflow-copper",@@ -100,7 +100,7 @@ dependencies = [ [[package]] name = "aiflow-router"-version = "0.2.143"+version = "0.2.144" dependencies = [ "aiflow-board", "aiflow-grid",@@ -111,7 +111,7 @@ dependencies = [ [[package]] name = "aiflow-run"-version = "0.2.143"+version = "0.2.144" dependencies = [ "aiflow-sys", "serde",@@ -120,7 +120,7 @@ dependencies = [ [[package]] name = "aiflow-sys"-version = "0.2.143"+version = "0.2.144" dependencies = [ "serde_json", ]
Cargo.toml+1−1@@ -15,7 +15,7 @@ members = [ ] [workspace.package]-version = "0.2.143"+version = "0.2.144" edition = "2021" license = "MIT" repository = "https://wiki.adom.inc/adom/adom-aiflow"
crates/adom-aiflow/src/fields_versions.rs+24@@ -17,6 +17,10 @@ //! fix but stamped 0.10.12; a note on such a solve is harmless.) //! - 0.10.15 (adom/adom-fields#38, PR 23 from King Silver): a `hot` SMD part whose pads are all on B.Cu had its watts //! put into F.Cu and its tab read there. A two-sided board read about 30 % low, a single-sided one far too hot.+//! - 0.10.21 (adom/adom-fields#43, Fredrik Angell Moe): spec `planes` counts as a return plane (and return-named nets and a+//! converter's power-stage ground without it), decoupling no longer judges pins typed as signals (an EN pin on a supply+//! net), and the hot-loop capacitor is the smallest one near the switch, not the smallest on the rail. Before it, such+//! decoupling findings, no-reference findings over an isolated return, and a far hot-loop pick were wrong. //! - 0.10.20 (adom/adom-fields#42, King Silver and monrad): a hot part's watts went into a fixed 2.4 mm disk around each pad; //! they now go onto each pad's own copper. An exposed pad reads cooler, a small pin hotter, the headline peak no longer //! sits on bare board beside a pad, and a part whose spec names a one-pin tabNet reads much hotter (a SOIC-8 +26.5 to@@ -75,6 +79,15 @@ pub fn stale_notes(fields: &Value, spec: &Value, board: &Path) -> Vec<String> { } } }+ // 0.10.21: decoupling on signal pins, return planes in spec planes, the hot-loop capacitor near the switch+ if solver < (0, 10, 21) {+ let mut kinds: Vec<String> = fields["issues"].as_array().into_iter().flatten().filter_map(|i| i["kind"].as_str().or(i["type"].as_str()))+ .filter(|k| k.starts_with("decoupling") || k.contains("hot-loop") || *k == "no-reference").map(str::to_string).collect();+ kinds.sort(); kinds.dedup();+ if !kinds.is_empty() {+ out.push(format!("this Fields solve is adom-fields {}, before 0.10.21, whose {} findings could be wrong: decoupling judged signal pins (an EN pin on a supply net), spec planes was not read as a return plane, and the hot loop took the smallest capacitor on the rail rather than near the switch. Update adom-fields (adom-wiki pkg install adom/adom-fields) and analyze again", version_text(solver), kinds.join(", ")));+ }+ } // 0.10.20: hot-part heat on each pad's own copper instead of a 2.4 mm disk if solver < (0, 10, 20) { if let Some(b) = plan_board(board, &text) {@@ -369,6 +382,17 @@ mod tests { } + /// adom-fields 0.10.21: decoupling, hot-loop and no-reference findings from an older solve are named; others are not+ #[test]+ fn decoupling_and_hot_loop_findings_are_told_to_solve_again() {+ let p = tmp("plain21.kicad_pcb", r#"(kicad_pcb (gr_rect (start 0 0) (end 10 10) (layer "Edge.Cuts")))"#);+ let f = json!({"inputIdentity": {"solverVersion": "0.10.20"}, "issues": [{"kind": "decoupling-missing"}, {"kind": "hot-loop"}, {"kind": "current-neck"}]});+ let n = stale_notes(&f, &json!({}), &p);+ assert!(n.iter().any(|x| x.contains("before 0.10.21") && x.contains("decoupling-missing, hot-loop findings")), "{n:?}");+ let other = json!({"inputIdentity": {"solverVersion": "0.10.20"}, "issues": [{"kind": "current-neck"}]});+ assert!(!stale_notes(&other, &json!({}), &p).iter().any(|x| x.contains("0.10.21")));+ }+ /// adom-fields 0.10.20: every board with a hot SMD part solves differently; a through-hole-only hot part does not #[test] fn hot_smd_parts_are_told_to_solve_again() {
docs/release-0.2.144.mdadded+6@@ -0,0 +1,6 @@+# adom-aiflow 0.2.144++Adopts adom-fields 0.10.21 (adom/adom-fields#43, Fredrik Angell Moe).++- **Re-solve note:** `analyze` names a solve made before 0.10.21 that carries decoupling, hot-loop or no-reference findings: decoupling judged pins typed as signals (an EN pin on a supply net), spec `planes` was not read as a return plane, and the hot loop took the smallest capacitor on the rail instead of the one near the switch.+- **Spec `planes`:** the aiflow-power-layout skill says what Fields now reads from it, and to list an isolated converter's primary-side return there too.
package.json+1−1@@ -1,7 +1,7 @@ { "slug": "adom-aiflow", "type": "app",- "version": "0.2.143",+ "version": "0.2.144", "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.143",+ "version": "0.2.144", "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@@ -16,6 +16,7 @@ Write `aiflow/spec.json` from the schematic before `start`, with a note on every - `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).+- `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. - `decoupling` for each local cap and the supply pin it serves (`{"cap": "C2", "pin": "U1.2", "returnPins": ["U1.1"], "maxLengthMm": 3}`): `route` lays that connection before the rail and `gate` reports its copper path against the budget (adom-aiflow SKILL, Spec intent checked by the binary).