app
AI Flow
Public Made by Adomby adom
Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board.
← Commit history
Reject display-clipped current maxima in Fields acceptance
10 files changed
+50−14
Cargo.lock+10−10@@ -4,7 +4,7 @@ version = 4 [[package]] name = "adom-aiflow"-version = "0.1.79"+version = "0.1.80" dependencies = [ "aiflow-analyze", "aiflow-board",@@ -24,7 +24,7 @@ dependencies = [ [[package]] name = "aiflow-analyze"-version = "0.1.79"+version = "0.1.80" dependencies = [ "aiflow-board", "serde",@@ -34,7 +34,7 @@ dependencies = [ [[package]] name = "aiflow-board"-version = "0.1.79"+version = "0.1.80" dependencies = [ "roxmltree", "serde",@@ -43,7 +43,7 @@ dependencies = [ [[package]] name = "aiflow-bridge"-version = "0.1.79"+version = "0.1.80" dependencies = [ "aiflow-board", "serde",@@ -52,7 +52,7 @@ dependencies = [ [[package]] name = "aiflow-copper"-version = "0.1.79"+version = "0.1.80" dependencies = [ "aiflow-board", "aiflow-grid",@@ -62,7 +62,7 @@ dependencies = [ [[package]] name = "aiflow-grid"-version = "0.1.79"+version = "0.1.80" dependencies = [ "aiflow-board", "serde",@@ -71,7 +71,7 @@ dependencies = [ [[package]] name = "aiflow-place"-version = "0.1.79"+version = "0.1.80" dependencies = [ "aiflow-board", "serde",@@ -80,7 +80,7 @@ dependencies = [ [[package]] name = "aiflow-pours"-version = "0.1.79"+version = "0.1.80" dependencies = [ "aiflow-board", "aiflow-copper",@@ -90,7 +90,7 @@ dependencies = [ [[package]] name = "aiflow-router"-version = "0.1.79"+version = "0.1.80" dependencies = [ "aiflow-board", "aiflow-grid",@@ -100,7 +100,7 @@ dependencies = [ [[package]] name = "aiflow-run"-version = "0.1.79"+version = "0.1.80" dependencies = [ "serde", "serde_json",
Cargo.toml+1−1@@ -14,7 +14,7 @@ members = [ ] [workspace.package]-version = "0.1.79"+version = "0.1.80" edition = "2021" license = "MIT" repository = "https://wiki.adom.inc/adom/adom-aiflow"
SKILL.md+4@@ -373,3 +373,7 @@ Do not present a saved capture as live state or a workflow completion as hardwar ## Explicit branch currents When a narrow sense or parallel branch causes a full-net width warning, read `docs/branch-current-screen.md`. Do not widen a signal branch blindly or waive the current gate. The optional resistive-branches model requires explicit balanced pin currents, every pad accounted for, stated copper/barrel assumptions and actual saved-board geometry. It still requires a matching, converged filled-copper Fields solve with the same explicit terminals. Test genuine narrow-main-path failures and preserve original width results. Prototype assumptions are not fabrication measurements or hardware qualification.++### Unclipped Fields current maxima++Current acceptance requires `peakJDefinition` declaring an unclipped, unrounded cell maximum with a copper-fraction cutoff no greater than 0.25. Earlier Fields reports clipped peaks for visualization and can hide current-density failures. Do not copy the new marker onto an old report: rerun a reviewed solver with the reporting fix. Owner review, release and installed availability remain separate; a pending source fix is not a qualified board. Keep the failed gate visible while correcting bottlenecks and continue other authorized work.
bin/adom-aiflow⋯ 1 unchanged line ⋯
crates/aiflow-analyze/src/lib.rs+20−1@@ -238,6 +238,13 @@ pub fn field_screen(fields: &Value, spec: &Value, board_bytes: &[u8], spec_bytes if value[demand].as_f64().unwrap_or(0.0) <= 0.0 { continue; } let row = entries.iter().find(|r|r[key].as_str()==Some(name.as_str())).ok_or_else(||format!("Fields did not solve {group}.{name}; resolve its missing terminals or copper and rerun analyze"))?; if kind == "current" {+ let definition = &fields["peakJDefinition"];+ if definition["statistic"] != "unclipped-cell-maximum"+ || definition["rounded"] != false+ || !definition["minimumCopperFraction"].as_f64().is_some_and(|v| v.is_finite() && v > 0.0 && v <= 0.25)+ {+ return Err("Fields report lacks an unclipped, unrounded current maximum; older reports use display-percentile clipping. Rerun with the reviewed peak-reporting fix; do not relabel old results or waive the density limit".into());+ } let residual = row["residual"].as_f64().filter(|v| v.is_finite() && *v >= 0.0 && *v <= 1e-6); let peak = row["peakJ"].as_f64().filter(|v| v.is_finite() && *v >= 0.0); let amps = row["amps"].as_f64().unwrap_or(f64::NAN);@@ -275,7 +282,19 @@ pub fn field_screen(fields: &Value, spec: &Value, board_bytes: &[u8], spec_bytes mod field_screen_tests { use super::*; use sha2::{Digest,Sha256};- fn report() -> Value { serde_json::json!({"inputIdentity":{"board":format!("{:x}",Sha256::digest(b"board")),"spec":format!("{:x}",Sha256::digest(b"spec"))},"nets":[{"net":"VCC","amps":2,"residual":1e-8,"peakJ":20}],"chips":[{"reference":"Q1"}],"issues":[]}) }+ fn report() -> Value { serde_json::json!({"peakJDefinition":{"statistic":"unclipped-cell-maximum","rounded":false,"minimumCopperFraction":0.25},"inputIdentity":{"board":format!("{:x}",Sha256::digest(b"board")),"spec":format!("{:x}",Sha256::digest(b"spec"))},"nets":[{"net":"VCC","amps":2,"residual":1e-8,"peakJ":20}],"chips":[{"reference":"Q1"}],"issues":[]}) }+ #[test]+ fn display_clipped_or_rounded_peaks_cannot_pass_acceptance() {+ let spec=json!({"loads":{"VCC":{"amps":2}}});+ for definition in [Value::Null, json!({"statistic":"percentile"}),+ json!({"statistic":"unclipped-cell-maximum","rounded":true,"minimumCopperFraction":0.25}),+ json!({"statistic":"unclipped-cell-maximum","rounded":false,"minimumCopperFraction":0.5})] {+ let mut f=report();f["peakJDefinition"]=definition;+ assert!(field_screen(&f,&spec,b"board",b"spec","current").unwrap_err().contains("unclipped"));+ }+ let mut f=report(); f["nets"][0]["peakJ"]=json!(60.04);+ assert!(field_screen(&f,&spec,b"board",b"spec","current").is_err());+ } #[test] fn nonconvergence_underload_and_suppressed_neck_issue_cannot_pass() { let spec=json!({"loads":{"VCC":{"amps":2}}});
docs/release-0.1.80.mdadded+5@@ -0,0 +1,5 @@+# 0.1.80: reject clipped current-density reports++Current acceptance now requires an unclipped, unrounded Fields maximum with an explicit copper-coverage cutoff. Older Fields reports use a display percentile and can hide narrow violations. The actual electronic-load diagnostic exposed ground, drain and shunt hotspots that the earlier isolated test missed. Its live gate remained failed.++Reports without the semantic marker are refused with a rerun instruction; do not relabel cached data. This deliberately requires the reviewed Fields reporting fix (owner PR 7, stacked on 6 and 5); installed Fields 0.6.2 is not updated by this AIFlow release. Other commands and the continuation guard are preserved.
package.json+1−1@@ -1,7 +1,7 @@ { "slug": "adom-aiflow", "type": "app",- "version": "0.1.79",+ "version": "0.1.80", "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 today; Altium, Fusion and 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.1.79",+ "version": "0.1.80", "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 today; Altium, Fusion and 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+4@@ -339,3 +339,7 @@ Refill acknowledgement is asynchronous. Request it once, then read without refil ## Explicit branch currents When a narrow sense or parallel branch causes a full-net width warning, read `docs/branch-current-screen.md`. Do not widen a signal branch blindly or waive the current gate. The optional resistive-branches model requires explicit balanced pin currents, every pad accounted for, stated copper/barrel assumptions and actual saved-board geometry. It still requires a matching, converged filled-copper Fields solve with the same explicit terminals. Test genuine narrow-main-path failures and preserve original width results. Prototype assumptions are not fabrication measurements or hardware qualification.++### Unclipped Fields current maxima++Current acceptance requires `peakJDefinition` declaring an unclipped, unrounded cell maximum with a copper-fraction cutoff no greater than 0.25. Earlier Fields reports clipped peaks for visualization and can hide current-density failures. Do not copy the new marker onto an old report: rerun a reviewed solver with the reporting fix. Owner review, release and installed availability remain separate; a pending source fix is not a qualified board. Keep the failed gate visible while correcting bottlenecks and continue other authorized work.
skills/aiflow-measurement/SKILL.md+4@@ -65,3 +65,7 @@ Before closing a session or emitting a final checkpoint, run `adom-aiflow finish ## Explicit branch currents When a narrow sense or parallel branch causes a full-net width warning, read `docs/branch-current-screen.md`. Do not widen a signal branch blindly or waive the current gate. The optional resistive-branches model requires explicit balanced pin currents, every pad accounted for, stated copper/barrel assumptions and actual saved-board geometry. It still requires a matching, converged filled-copper Fields solve with the same explicit terminals. Test genuine narrow-main-path failures and preserve original width results. Prototype assumptions are not fabrication measurements or hardware qualification.++### Unclipped Fields current maxima++Current acceptance requires `peakJDefinition` declaring an unclipped, unrounded cell maximum with a copper-fraction cutoff no greater than 0.25. Earlier Fields reports clipped peaks for visualization and can hide current-density failures. Do not copy the new marker onto an old report: rerun a reviewed solver with the reporting fix. Owner review, release and installed availability remain separate; a pending source fix is not a qualified board. Keep the failed gate visible while correcting bottlenecks and continue other authorized work.