← Commit history

Merge PR #628: 0.2.124: fill Fields' assumed inputs from datasheets (release-0.2.124 -> main) merge

Colby Knox ·e9794ef697 · ·parents 18a82e7, 329937d

Showing changes introduced by the merge (against its first parent).

9 files changed +161−24
Cargo.lock+10−10
@@ -4,7 +4,7 @@ version = 4  [[package]] name = "adom-aiflow"-version = "0.2.123"+version = "0.2.124" dependencies = [  "aiflow-analyze",  "aiflow-board",@@ -27,7 +27,7 @@ dependencies = [  [[package]] name = "aiflow-analyze"-version = "0.2.123"+version = "0.2.124" dependencies = [  "aiflow-board",  "serde",@@ -37,7 +37,7 @@ dependencies = [  [[package]] name = "aiflow-board"-version = "0.2.123"+version = "0.2.124" dependencies = [  "roxmltree",  "serde",@@ -46,7 +46,7 @@ dependencies = [  [[package]] name = "aiflow-bridge"-version = "0.2.123"+version = "0.2.124" dependencies = [  "aiflow-board",  "serde",@@ -55,7 +55,7 @@ dependencies = [  [[package]] name = "aiflow-copper"-version = "0.2.123"+version = "0.2.124" dependencies = [  "aiflow-board",  "aiflow-grid",@@ -65,7 +65,7 @@ dependencies = [  [[package]] name = "aiflow-grid"-version = "0.2.123"+version = "0.2.124" dependencies = [  "aiflow-board",  "serde",@@ -74,7 +74,7 @@ dependencies = [  [[package]] name = "aiflow-place"-version = "0.2.123"+version = "0.2.124" dependencies = [  "aiflow-board",  "serde",@@ -83,7 +83,7 @@ dependencies = [  [[package]] name = "aiflow-pours"-version = "0.2.123"+version = "0.2.124" dependencies = [  "aiflow-board",  "aiflow-copper",@@ -93,7 +93,7 @@ dependencies = [  [[package]] name = "aiflow-router"-version = "0.2.123"+version = "0.2.124" dependencies = [  "aiflow-board",  "aiflow-grid",@@ -104,7 +104,7 @@ dependencies = [  [[package]] name = "aiflow-run"-version = "0.2.123"+version = "0.2.124" dependencies = [  "serde",  "serde_json",
Cargo.toml+1−1
@@ -14,7 +14,7 @@ members = [ ]  [workspace.package]-version = "0.2.123"+version = "0.2.124" edition = "2021" license = "MIT" repository = "https://wiki.adom.inc/adom/adom-aiflow"
bin/adom-aiflow
⋯ 1 unchanged line ⋯
crates/adom-aiflow/src/fields_suggest.rs+89−10
@@ -91,15 +91,69 @@ pub fn capacitor_lines(fields: &Value) -> Vec<String> {     out } -/// Spec net names Fields read in the board's form (6, adom-fields 0.10.12): "GND" taken as "/GND".+/// Spec net names Fields read in the board's form (6, adom-fields 0.10.12): `specNets` is an array of {spec, board, at}+/// (at: the spec section or path where the name was), absent when no name changed. One line per rename, every place. pub fn spec_net_lines(fields: &Value) -> Vec<String> {-    let v = &fields["specNets"];-    let pairs: Vec<(String, String)> = match v {-        Value::Object(m) => m.iter().filter_map(|(k, b)| b.as_str().filter(|b| *b != k).map(|b| (k.clone(), b.to_string()))).collect(),-        Value::Array(a) => a.iter().filter_map(|e| Some((e["spec"].as_str()?.to_string(), e["board"].as_str()?.to_string()))).filter(|(s, b)| s != b).collect(),-        _ => Vec::new(),-    };-    pairs.into_iter().map(|(s, b)| format!("spec net {s} read as the board's {b}")).collect()+    let mut by: Vec<(String, String, Vec<String>)> = Vec::new();+    for e in fields["specNets"].as_array().into_iter().flatten() {+        let (Some(sp), Some(bd)) = (e["spec"].as_str(), e["board"].as_str()) else { continue };+        if sp == bd { continue; }+        let at = e["at"].as_str().unwrap_or("").to_string();+        match by.iter_mut().find(|(s, b, _)| s == sp && b == bd) {+            Some((_, _, ats)) => { if !at.is_empty() && !ats.contains(&at) { ats.push(at); } }+            None => by.push((sp.to_string(), bd.to_string(), if at.is_empty() { Vec::new() } else { vec![at] })),+        }+    }+    by.into_iter().map(|(s, b, ats)| format!("spec net {s} read as the board's {b}{}", if ats.is_empty() { String::new() } else { format!(" (at {})", ats.join(", ")) })).collect()+}++/// Fields' assumed inputs (2, `review.inputs.items`), most important first: each with its part, the datasheet field to+/// read, the spec key it goes to, what was used meanwhile, and the part's component page when `parts` found one.+pub fn assumed_inputs(fields: &Value, parts: &[Value]) -> Vec<Value> {+    let rank = |m: &str| match m { "high" => 0, "medium" => 1, _ => 2 };+    let mut items: Vec<Value> = fields["review"]["inputs"]["items"].as_array().cloned().unwrap_or_default();+    items.sort_by_key(|i| rank(i["matters"].as_str().unwrap_or("")));+    items.into_iter().map(|i| {+        let r = i["part"]["ref"].as_str().unwrap_or("");+        let page = parts.iter().find(|p| p["refs"].as_array().is_some_and(|a| a.iter().any(|x| x.as_str() == Some(r)))).and_then(|p| p["wiki"].as_str().map(str::to_string));+        json!({"matters": i["matters"], "ref": i["part"]["ref"], "mpn": i["part"]["mpn"], "what": i["what"], "datasheetField": i["datasheetField"], "specKey": i["specKey"], "used": i["used"], "affects": i["affects"], "page": page})+    }).collect()+}++/// One line per assumed input (high and medium; low ones counted), and the counts line.+pub fn input_lines(items: &[Value]) -> Vec<String> {+    let n = |m: &str| items.iter().filter(|i| i["matters"] == m).count();+    if items.is_empty() { return Vec::new(); }+    let mut out = vec![format!("assumed inputs to fill from datasheets: {} high, {} medium, {} low (`adom-aiflow fields inputs` writes the fragment to fill)", n("high"), n("medium"), n("low"))];+    for i in items.iter().filter(|i| i["matters"] != "low") {+        let part = match (i["ref"].as_str(), i["mpn"].as_str()) { (Some(r), Some(m)) => format!("{r} ({m}{})", i["page"].as_str().map(|p| format!(", page {p}")).unwrap_or_default()), (Some(r), None) => r.to_string(), _ => "board".to_string() };+        out.push(format!("  [{}] {part}: {} -> spec {} (now: {})", i["matters"].as_str().unwrap_or(""), i["datasheetField"].as_str().unwrap_or(""), i["specKey"].as_str().unwrap_or(""), i["used"].as_str().unwrap_or("")));+    }+    out+}++/// The leaves of a filled fragment that are still Fields' placeholders ("<... datasheet: ...>") or not numbers.+pub fn unfilled(patch: &Value, path: &str, out: &mut Vec<String>) {+    match patch {+        Value::Object(m) => for (k, v) in m { unfilled(v, &if path.is_empty() { k.clone() } else { format!("{path}.{k}") }, out) },+        Value::Array(a) => for (k, v) in a.iter().enumerate() { unfilled(v, &format!("{path}[{k}]"), out) },+        Value::Number(_) | Value::Bool(_) => {}+        Value::String(t) if t.trim_start().starts_with('<') => out.push(format!("{path} is still a placeholder ({t})")),+        Value::String(_) => {}+        Value::Null => out.push(format!("{path} is empty")),+    }+}++/// Merge a filled fragment into the spec, key by key (objects merge, everything else replaces). Returns the keys set.+pub fn merge(spec: &mut Value, patch: &Value, path: &str, set: &mut Vec<String>) {+    match (spec, patch) {+        (Value::Object(s), Value::Object(p)) => for (k, v) in p {+            let at = if path.is_empty() { k.clone() } else { format!("{path}.{k}") };+            if v.is_object() && s.get(k).is_some_and(Value::is_object) { merge(s.get_mut(k).unwrap(), v, &at, set); }+            else { s.insert(k.clone(), v.clone()); set.push(at); }+        },+        (s, p) => { *s = p.clone(); set.push(path.to_string()); }+    } }  /// The board as Fields solved it (6, adom-fields 0.10.14): its outline and area.@@ -151,16 +205,41 @@ mod tests {         let fields = json!({             "chips": [{"reference": "U1", "watts": 2.0, "riseC": 41.0, "planeW": 1.2, "viaW": 0.5, "dielW": 0.2, "airW": 0.1, "otherViaW": 0.0}, {"reference": "D1", "watts": 0.0}],             "review": {"checks": {"capacitors": [{"ref": "C4", "value": "100n", "tempC": 74.4, "ratingC": 85.0, "ratingAssumed": true}, {"ref": "C3", "tempC": 50.0, "ratingC": 125.0, "ratingAssumed": false}]}},-            "specNets": {"GND": "/GND", "VIN": "VIN"},+            "specNets": [{"at": "ground", "board": "/GND", "spec": "GND"}, {"at": "hot.U1.tabNet", "board": "/GND", "spec": "GND"}, {"at": "loads", "board": "/BAT", "spec": "BAT"}],             "board": {"outline": "shaped", "areaMm2": 706.9},             "modules": {"ran": [], "skipped": [{"module": "rf", "whyItMayMatter": "an antenna footprint"}, {"module": "emc", "whyItMayMatter": null}]}});         let h = heat_paths(&fields);         assert_eq!(h, vec!["U1 (2.00 W, +41 C): heat goes to copper 60 %, its vias 25 %, through the board 10 %, air 5 %".to_string()]);         let c = capacitor_lines(&fields);         assert!(c[0].starts_with("C4 100n at 74 C against its 85 C rating (assumed") && c[1].contains("1 capacitor rating(s) assumed"), "{c:?}");-        assert_eq!(spec_net_lines(&fields), vec!["spec net GND read as the board's /GND".to_string()]);+        assert_eq!(spec_net_lines(&fields), vec!["spec net GND read as the board's /GND (at ground, hot.U1.tabNet)".to_string(), "spec net BAT read as the board's /BAT (at loads)".to_string()]);         assert_eq!(board_line(&fields).unwrap(), "board solved as shaped outline, 707 mm2");         assert_eq!(module_lines(&fields, &[]).len(), 1);         assert!(module_lines(&fields, &["rf".into()]).is_empty());     }++    #[test]+    fn assumed_inputs_are_listed_and_a_filled_fragment_merges_only_without_placeholders() {+        // the Fields thread's item 2: review.inputs.items, specPatch with placeholders naming their source+        let fields = json!({"review": {"inputs": {"items": [+            {"matters": "low", "part": null, "specKey": "ambientC", "datasheetField": "product: worst-case ambient", "used": "25 C", "what": "ambient"},+            {"matters": "high", "part": {"ref": "U7", "mpn": "W25Q32JVSSIQ"}, "specKey": "hot.U7.thetaJcKPerW", "datasheetField": "thermal information: RthJC", "used": "not included", "what": "U7's junction-to-case"}]}}});+        let parts = vec![json!({"refs": ["U7"], "wiki": "adom/w25q32jvssiq"})];+        let items = assumed_inputs(&fields, &parts);+        assert_eq!(items[0]["specKey"], "hot.U7.thetaJcKPerW", "high first");+        let lines = input_lines(&items);+        assert!(lines[0].contains("1 high, 0 medium, 1 low"), "{lines:?}");+        assert!(lines[1].contains("U7 (W25Q32JVSSIQ, page adom/w25q32jvssiq): thermal information: RthJC -> spec hot.U7.thetaJcKPerW"), "{lines:?}");+        assert_eq!(lines.len(), 2, "low ones are counted, not listed");+        let mut gaps = Vec::new();+        unfilled(&json!({"hot": {"U7": {"thetaJcKPerW": "<W25Q32JVSSIQ datasheet: RthJC, K/W>", "tjMaxC": 125}}}), "", &mut gaps);+        assert_eq!(gaps, vec!["hot.U7.thetaJcKPerW is still a placeholder (<W25Q32JVSSIQ datasheet: RthJC, K/W>)".to_string()]);+        let mut spec = json!({"hot": {"U7": {"watts": 0.5, "tabNet": "GND"}}, "ambientC": 25});+        let mut set = Vec::new();+        merge(&mut spec, &json!({"hot": {"U7": {"thetaJcKPerW": 45.0, "tjMaxC": 125}}, "ambientC": 40}), "", &mut set);+        assert_eq!(spec["hot"]["U7"], json!({"watts": 0.5, "tabNet": "GND", "thetaJcKPerW": 45.0, "tjMaxC": 125}), "the part's own keys stay");+        assert_eq!(spec["ambientC"], 40);+        assert_eq!(set, vec!["ambientC", "hot.U7.thetaJcKPerW", "hot.U7.tjMaxC"]);+    }+ }
crates/adom-aiflow/src/main.rs+44
@@ -341,6 +341,11 @@ enum Cmd {     SpecAmend { #[arg(long)] why: String },     /// Accept one item `finish` (or a `step`) refused, on purpose, when the check rather than the board is wrong: `deviate "<item>" --why "..."` (the item as the refusal names it, e.g. "gate", "heatsink vias", "step routing"). Recorded, bound to the saved board and spec, and listed in the finish summary; `--list` shows them, `--clear` removes one.     /// Issue #211: only the human skips a step or approves a workaround. `--human-ok "<their words>"` records that they did; `--replaced-by "<what you did instead>"` records a workaround of a failed step. Without --human-ok the record is the AI's own decision, and finish lists it as one.+    /// Fields' assumed inputs (the Fields thread's item 2): `fields inputs` lists what the latest same-input solve assumed (a hot part's+    /// RthJC and TJ max, a rail's load step, the ambient), most important first, and writes the fragment to fill (fields/inputs-to-fill.json,+    /// each value a placeholder naming its datasheet). Fill the values from the datasheets, then `fields fill --patch <file> --why "<sources>"`+    /// merges them into the spec (refused while a placeholder or an empty value is left), and `analyze` solves again.+    Fields { #[arg(value_parser = ["inputs", "fill"])] action: String, #[arg(long)] patch: Option<String>, #[arg(long)] why: Option<String> },     Deviate { item: Option<String>, #[arg(long)] why: Option<String>, #[arg(long)] list: bool, #[arg(long)] clear: bool, #[arg(long)] human_ok: Option<String>, #[arg(long)] replaced_by: Option<String> },     /// Hands-on AI Flow (docs/hands-on.md): the human chooses, step by step, whether the AI takes care of it (auto), does it and checks in (checkin), leaves it to them (human) or follows their instructions (custom), saved as flow profiles. `plan [--profile P]` shows the choice on the timeline before any design work; `set STEP=MODE ... [--note STEP=TEXT]`, `start [--save-as NAME] [--default]` confirm it from chat; `use <profile>` switches (full-ai is built in); `ask STEP --summary`, `approve|changes|done STEP --quote`, `wait` carry the human's part; `status`, `profiles [--profile P --default] [--delete P]`, `off`.     Handson { #[arg(value_parser = ["plan", "set", "start", "use", "ask", "approve", "changes", "done", "wait", "status", "profiles", "off"])] action: String, args: Vec<String>, #[arg(long)] profile: Option<String>, #[arg(long)] save_as: Option<String>, #[arg(long)] default: bool, #[arg(long)] quote: Option<String>, #[arg(long)] summary: Option<String>, #[arg(long)] note: Vec<String>, #[arg(long)] notify: Option<String>, #[arg(long)] screen: Option<String>, #[arg(long, default_value_t = 540)] timeout: u64, #[arg(long)] delete: Option<String> },@@ -6609,6 +6614,7 @@ fn main() {                     det.extend(fields_suggest::spec_net_lines(fd));                     det.extend(fields_suggest::board_line(fd));                     det.extend(fields_suggest::module_lines(fd, &fields_mod_plan.modules));+                    det.extend(fields_suggest::input_lines(&fields_suggest::assumed_inputs(fd, r.data["outcomes"]["parts"]["parts"].as_array().map(|a| a.as_slice()).unwrap_or(&[]))));                     (sug, det)                 }                 None => (Vec::new(), Vec::new()),@@ -8698,6 +8704,44 @@ fn main() {                 other => err(&format!("tour {other}: use 3d, nets or fields"), &[]),             }         }+        Cmd::Fields { action, patch, why } => {+            thread(&cli);+            let mut r = load_run(&cli);+            let sp = r.data["spec"].as_str().unwrap_or("").to_string();+            if sp.is_empty() { err("this run has no spec", &[]); }+            let fields_file = dir.join("fields/fields.json");+            // the assumed inputs are in fields.json itself (review.inputs): no need for its detail.json+            let fd: Value = std::fs::read(&fields_file).ok().and_then(|b| serde_json::from_slice(&b).ok()).unwrap_or_else(|| err(&format!("no Fields solve to read at {}", fields_file.display()), &["`adom-aiflow analyze thermal` (or current) solves it first.".into()]));+            let parts = r.data["outcomes"]["parts"]["parts"].as_array().cloned().unwrap_or_default();+            match action.as_str() {+                "inputs" => {+                    let items = fields_suggest::assumed_inputs(&fd, &parts);+                    if items.is_empty() { ok("the solve assumed no inputs a datasheet could give: nothing to fill", &[]); return; }+                    let out = dir.join("fields/inputs-to-fill.json");+                    write_json(&out, &fd["review"]["inputs"]["specPatch"]);+                    r.log("fields-inputs", json!({"items": items.len(), "fragment": out}));+                    r.save().unwrap();+                    ok(&fields_suggest::input_lines(&items).join("\n"), &[format!("The fragment to fill is {}: each value is a placeholder naming the datasheet and field. Read each part's datasheet (its component page above, or the sourcing record), replace every placeholder with the number, keep only the keys you filled, then `adom-aiflow fields fill --patch {} --why \"<datasheet and page for each>\"`.", out.display(), out.display()),+                        "Low-impact items are counted, not listed; fill them too when the datasheet is at hand.".into()]);+                }+                "fill" => {+                    let pp = patch.as_deref().unwrap_or_else(|| err("fields fill needs --patch <the filled fragment>", &[]));+                    let w = why.as_deref().filter(|w| !w.trim().is_empty()).unwrap_or_else(|| err("fields fill needs --why naming where each value came from (datasheet, revision, page)", &[]));+                    let pv = read_json(pp);+                    let mut gaps = Vec::new();+                    fields_suggest::unfilled(&pv, "", &mut gaps);+                    if !gaps.is_empty() { err(&format!("the fragment is not filled yet:\n  {}", gaps.join("\n  ")), &["Replace each placeholder with the datasheet's number, or take the key out of the fragment when the datasheet does not give it.".into()]); }+                    let mut spec = read_json(&sp);+                    let mut set = Vec::new();+                    fields_suggest::merge(&mut spec, &pv, "", &mut set);+                    write_json(Path::new(&sp), &spec);+                    r.log("fields-inputs-filled", json!({"keys": set, "why": w, "patch": pp}));+                    r.save().unwrap();+                    ok(&format!("{} input(s) filled from datasheets into the spec: {}", set.len(), set.join(", ")), &["Next: `adom-aiflow analyze thermal` (and current): Fields solves again with the datasheet values, and they leave the assumed list.".into()]);+                }+                _ => unreachable!(),+            }+        }         Cmd::Ledger { json: as_json } => {             let r = load_run(&cli);             let led = r.ledger();
docs/release-0.2.124.mdadded+14
@@ -0,0 +1,14 @@+# adom-aiflow 0.2.124++## Fill Fields' assumed inputs from the datasheets (the Fields thread's item 2)++Adom Fields says which inputs it assumed for want of a datasheet value: a hot part's RθJC and TJ max, a rail's load step and tolerance, the ambient. For each, it names the datasheet field to read, the spec key it goes to, and what it used meanwhile. AI Flow showed only the high-impact ones, one line each.++- `analyze current` and `analyze thermal` list every assumed input, most important first (high, medium; low ones counted), with the part's MPN and its component page when `parts` found one.+- `adom-aiflow fields inputs` writes the fragment to fill, `fields/inputs-to-fill.json`, from the solve's own `specPatch` (each value a placeholder naming its datasheet field).+- `adom-aiflow fields fill --patch <file> --why "<datasheet, revision, page for each>"` merges the filled values into the spec, keeping the keys already there. It is refused while a placeholder or an empty value is left. The run's log keeps which keys were filled and from where.+- `analyze` then solves again, and the filled inputs leave the assumed list.++## Fields: spec net renames, read the way Fields writes them++`specNets` is an array of `{spec, board, at}`, and absent when no name changed (the Fields thread). `analyze` now prints each rename once with every place it was used ("spec net GND read as the board's /GND (at ground, hot.U1.tabNet)"). The unused object form is no longer read.
package.json+1−1
@@ -1,7 +1,7 @@ {   "slug": "adom-aiflow",   "type": "app",-  "version": "0.2.123",+  "version": "0.2.124",   "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.123",+  "version": "0.2.124",   "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/adom-aiflow/SKILL.md+1−1
@@ -362,7 +362,7 @@ After the pours and the analyses: `adom-fields analyze --board <the current boar  adom-fields 0.10 and later write a lean `fields.json` and put each net's plated connections, the flow nets, parts and vias in `detail.json` beside it. aiflow reads both, merged the way adom-fields does, everywhere it reads a Fields report (`analyze`, `finish`, the converter check, the current acknowledgements, the board sink); keep the two files together. A lean report whose `detail.json` is missing is an ERROR naming the file, and the watched-solve record binds the hash of `detail.json` as well as `fields.json`. Older inline reports read as before. -`analyze current` and `analyze thermal` read more of the same-input solve and print it under `fields:`: where each hot part's heat goes (its copper, its vias, through the board, the air), capacitors within 20 C of their rating (and how many ratings were assumed), spec net names Fields read in the board's form (`GND` as `/GND`), the board's outline and area, and a module Fields suggests that AI Flow did not pick. They also print `fields suggestion:` lines, spec keys for Fields with the value and why, recorded in the outcome (`fieldsSuggestions`) and never written for you: `hStillWM2k` for a board in a sealed enclosure (about 5 to 8 W/m2K, Fields' default 10; `hMovingWM2k` for a known airflow, default 25), `fanLevels: [0, 0.25, 0.5, 0.75, 1]` for a board with a fan (Fields solves each speed; `fanExponent` 0.5), `decouplingSkip` for a U-numbered part that is not a chip (a resistor network, LED, connector), and `electroThermal: true` when the solve reports copper heating over 10 %. Write the ones that apply into the spec and solve again. Keys for boards that have them, written by you from the design: `transient: {durationS, steps, powerScale, fromSteady}` for pulsed loads (motor start, hot-plug), `emcFmaxHz` (the stitching-fence frequency), `victimBudgetsMv` (crosstalk budgets per net), `tdr` (TDR runs per net). The rf module is recommended for a board with an antenna footprint or a spec `rf` section.+`analyze current` and `analyze thermal` read more of the same-input solve and print it under `fields:`: where each hot part's heat goes (its copper, its vias, through the board, the air), capacitors within 20 C of their rating (and how many ratings were assumed), spec net names Fields read in the board's form (`GND` as `/GND`), the board's outline and area, and a module Fields suggests that AI Flow did not pick. They also print `fields suggestion:` lines, spec keys for Fields with the value and why, recorded in the outcome (`fieldsSuggestions`) and never written for you: `hStillWM2k` for a board in a sealed enclosure (about 5 to 8 W/m2K, Fields' default 10; `hMovingWM2k` for a known airflow, default 25), `fanLevels: [0, 0.25, 0.5, 0.75, 1]` for a board with a fan (Fields solves each speed; `fanExponent` 0.5), `decouplingSkip` for a U-numbered part that is not a chip (a resistor network, LED, connector), and `electroThermal: true` when the solve reports copper heating over 10 %. Write the ones that apply into the spec and solve again. Fields also lists the inputs it assumed for want of a datasheet value (a hot part's RthJC and TJ max, a rail's load step, the ambient), printed by `analyze` most important first with each part's component page: `adom-aiflow fields inputs` writes the fragment to fill (`fields/inputs-to-fill.json`, each value a placeholder naming its datasheet field); read the datasheets, put the numbers in, keep only the keys you filled, then `adom-aiflow fields fill --patch <file> --why "<datasheet, revision, page for each>"` merges them into the spec (refused while a placeholder or empty value is left) and `analyze` solves again, so the assumption becomes the datasheet's number. Keys for boards that have them, written by you from the design: `transient: {durationS, steps, powerScale, fromSteady}` for pulsed loads (motor start, hot-plug), `emcFmaxHz` (the stitching-fence frequency), `victimBudgetsMv` (crosstalk budgets per net), `tdr` (TDR runs per net). The rf module is recommended for a board with an antenna footprint or a spec `rf` section.  The fields walkthrough's take is capped: every window recording aiflow starts carries a 12 Mbit/s peak (`maxBitrate`; `AIFLOW_CLIP_MAX_BITRATE` overrides) and the walkthrough stops itself after 15 minutes. A clip stop never waits without a limit: a take still finalising is polled for up to 5 minutes (`AIFLOW_CLIP_FINALISE_SECONDS`), a take Adom Bridge no longer knows ("No recording with id") is flagged `pullFailed` with the reason at once, and `recut`, `finish` and `deliver` stop and pull a take that was still finalising.