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.
route: no single-face / no-via mode (milled 1-layer PTH boards plan F.Cu copper and vias the process cannot make)
What blocked the board
A real board in an AI Flow run: a railway track-gauge meter, 135 through-hole footprints,
74 nets, 287 connections, 150 x 195 mm, CNC-milled at home on phenolic, ONE copper face
(B.Cu), no plated holes, therefore no vias. Project rules (.kicad_dru) are 0.8 mm track,
0.5 mm clearance, (constraint disallow via) and disallow track zone on F.Cu.
route cannot be told about this process. crates/aiflow-router/src/lib.rs:3 states it:
"0.1 mm grid over the outline, two signal layers (F.Cu, B.Cu), through vias between them",
and lib.rs:349 hardwires the layer set. route --help has no layer or via option, and the
spec has no key for it. So the router plans F.Cu copper and through vias that this process
physically cannot make, and the gate then reports every one of them against the project's own
rules.
Why this is worth a mode, not a workaround
Single-face milled prototypes are a large share of hobby and lab boards, and they have a property that makes them easy to support: when every pad is through-hole, a layer change at a pad is free (the pad is already plated-through by the component lead). So the honest model for such a board is:
- B.Cu track = milled copper
- F.Cu track = a wire jumper on the component side
- layer change allowed only on a through-hole pad
- a via anywhere else = refused
That is a small restriction of the existing grid router (restrict the layer set, and allow
the layer-change move only where pad_raw[l][c] is a through-hole pad of the same net),
not a new algorithm. It would also give the user something genuinely useful: the count and
the list of jumpers, which is exactly the build information a single-sided board needs.
Suggested shape
Two spec keys, both optional and defaulting to today's behaviour:
"routeLayers": ["B.Cu"],
"vias": false
routeLayers restricts the layer set; vias: false forbids the via move and allows a layer
transition only on a shared through-hole pad. route's report would then say how many
connections closed on the single layer and how many need a jumper, and land route would
land the F.Cu segments as what they are.
Reading the project's .kicad_dru for disallow via would be an alternative, but an explicit
spec key is clearer and testable.
What I did instead
Took the stage myself (take route=ai) and routed outside the grid router, which works but
means this board does not exercise AI Flow's router at all, and two Adom users milling the
same kind of board would each write their own.
Evidence from this board
- 135 footprints, all PTH, all on the top side, all with courtyards
- baseline DRC on the placed board: 0 errors outside silkscreen (105 silkscreen warnings, which do not apply: a milled board has no silkscreen)
- 287 unconnected items to route
- the WeAct module's inner header rows have no escape between pads (2.54 mm pitch with 1.8 mm pads leaves 0.74 mm; a 0.8 mm track with 0.5 mm clearance needs 1.8 mm), but they do have the 30.48 mm channel under the module: 17 inner-row nets for 23 slots at 1.3 mm pitch. A single-layer-aware router would find that; a two-layer one has no reason to.
I could not send a PR because this container has no Rust toolchain (cargo is not
installed), so I am filing it with the evidence instead, as the skill says to.