Closed feature request

F.Fab text sprawls over the board (values off their parts, five reference sizes): add a Fab standard, fab-tidy and a check

noah · ·closed by John Lauer

F.Fab text sprawls over the board: values hang off their parts, references come in five sizes

Version: adom-aiflow 0.2.55, kicad-new lane, full-ai profile. The run was an AM32 ESC molecule (40 x 40 mm, 89 parts, 2026-11-06).

What happened. The board's F.Fab layer (image below, F.Fab and the outline only) looks sloppy, and Noah noticed it at once:

  • 172 Fab texts. Every part shows its reference and its value.
  • 87 of them sit more than 0.3 mm from their part's centre. The values are 1.0 mm text that runs past the part body, over neighbouring parts and off the board edge: "470uF 35V" 6.2 mm away from C101, "DRV8300DPWR" 4.2 mm from U301, "10uF 50V X7R 1210" across the half-bridge.
  • The references come in five sizes: 0.15, 0.25, 0.26, 0.5 and 0.6 mm, plus the 1.0 mm values.

How it got there: the footprints came from mixed libraries, each with its own Fab text size and position. build_board.py sets values (MPN plus rating) longer than the library's. The silkscreen step moved the references off the silkscreen onto F.Fab "to keep them in the assembly data" without centring or sizing them. No step looks at F.Fab: silkscreen-audit judges silkscreen only, and finish has no Fab check.

F.Fab is not plotted for the fab, but it is in the assembly drawing, the 3D and the KiCad view people review the board in. It also shows on the board page.

Ask.

  1. A Fab standard in the aiflow-silkscreen skill. F.Fab carries the reference only (${REFERENCE}), centred on the part body. It reads along the body's long axis, upright (0 or 90 degrees). It is one size per board, shrunk only where a body is too small to hold it, with a floor of 0.3 mm and the text inside the courtyard. Values are hidden on F.Fab (they are in the BOM).
  2. A command that applies it, silkscreen fab-tidy --board <board> (offline pcbnew, refill-safe, records the change), so no engine writes its own script.
  3. A check in silkscreen-audit --record and in finish. It counts Fab texts outside their own part's courtyard, values visible on F.Fab, and the spread of reference sizes, and warns with the worst offenders named.

fab-only

1 Reply

John Lauer ·

Thanks Noah, and for the clear numbers (172 Fab texts, 87 off their parts, five reference sizes). You're right that no step looked at F.Fab.

What was wrong. The footprints came from mixed libraries, each with its own Fab text size and place. The board's values were longer than the libraries', and the silkscreen step moved references onto F.Fab without centring or sizing them. silkscreen-audit judges the silkscreen only, and finish had no Fab check, so nothing reported it.

What changed (in adom-aiflow 0.2.56).

  • A Fab standard in the aiflow-silkscreen skill:
    • F.Fab carries the reference only, once per part, centred on the part body;
    • it reads along the body's long axis and stays upright (0 or 90 degrees);
    • there is one size per board, shrunk only where the body is too small to hold it, never below 0.3 mm, and the text stays inside the courtyard;
    • values are hidden on Fab (they are in the BOM).
  • adom-aiflow silkscreen fab-check [--board B] reports Fab texts reaching outside their part's courtyard, values shown on Fab, references more than 0.3 mm off their body, parts with two Fab references or none, and references that are not the board size (or its shrink to fit). Each finding names the worst offenders, for example "470uF 35V" of C101 (6.2 mm from its body).
  • adom-aiflow silkscreen fab-tidy [--board B] [--out O] [--size MM] applies the standard to a copy of the board (default <board>-fab.kicad_pcb). Only Fab text changes: copper, zones, fills and the silkscreen labels are byte for byte as they were. The change is logged in the run (fab-tidy), and a second run changes nothing. It edits the .kicad_pcb directly, so no pcbnew is needed. Then adopt-board makes the copy the run's board. Fab text is not part of the copper fingerprint, so the copper evidence carries over; only the silkscreen proof needs recording again.
  • The check rides along: silkscreen-audit --record stores it with the silkscreen proof (fab) and prints it as a warning, and finish prints it as a warning too.

You asked for a check and an optional command, not a gate, and that is how it works: it is never an open item at finish and never blocks a step. AI Flow does not refuse a board over its Fab layer. The skill says the AI may run fab-tidy without asking.

How it was verified. Unit tests use a board with your symptoms: a 1210 cap with "470uF 35V" 6.2 mm off its body and a 0.26 mm reference, a 0402 with a 0.6 mm reference, and a back-side part with two Fab references. The check names all three problems. fab-tidy then gives a clean check, leaves pads and silk untouched, keeps the back-side text mirrored, shrinks the 0402's reference to fit its body, and changes nothing on a second pass. A CLI suite runs check, tidy, then check again. On two real boards here (502 and 38 parts) the tidied copy passed the check, and the second board's 0.26 mm references were raised to the 0.3 mm floor. All unit tests and workflow suites pass.

Still open. The text size comes from AI Flow's stroke-font estimate, not KiCad's renderer, so a reference that is just at the edge of its courtyard may be judged a little differently than KiCad would draw it.

Upgrade: tell your AI "give me the latest adom-aiflow" (or adom-wiki pkg install adom/adom-aiflow); adom-aiflow --version says 0.2.56.

John Lauer closed this ·

Log in to reply.