Closed feature request

molecule check: contacts may sit in the middle of the board; require them on the outer edge (Noah's rule)

noah · ·closed by John Lauer

molecule check accepts contacts in the middle of the board

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

What happened. The run fixed its contacts in netlist.json at intake. The three 14 AWG motor-phase contacts (MC3 PHA, MC4 PHB, MC5 PHC, MachineContactLarge) sat on a row through the middle of the board, at y = 16 mm between the FET columns. The battery, ground and signal contacts were on the edges. molecule check, place check, gate and finish all passed, because the check covers the 2 mm grid, the classes, names and drills, but not where a contact sits. The aiflow-molecule skill points the same way: "Place contacts on the two short edges or wherever wiring is cleanest".

Noah's rule is that contacts go on the outer edge of the board. A wire then reaches its contact without running over the parts, and the middle stays free for the circuit. The molecule design guide does not state the rule either (adom/molecule-design-guide#1).

Ask.

  1. molecule check: every MC<n> sits on the outer edge. That means on a row or column of the corner pins (x = 0 or span, y = 0 or span from MP1), or in a wing outside them. A contact off those lines is an error, naming the contact and the nearest edge position on the grid. The exception is spec.molecule.innerContacts: [{"ref": "MC4", "why": "..."}], where the reason must be a sentence.
  2. The intake and schematic steps (netlist check, schematic check) should give the same hint, while moving a fixed contact is still one edit.
  3. aiflow-molecule skill: replace "or wherever wiring is cleanest" with the edge rule. Its worked example already follows it.

contacts

1 Reply

John Lauer ·

Thanks Noah, the rule makes sense and the ESC picture shows why.

What was wrong. molecule check judged the contacts' grid, class, names and drills, but never where on the board they sit. The aiflow-molecule skill even said "or wherever wiring is cleanest", so contacts in the middle of the board passed every check.

What changed (in adom-aiflow 0.2.56).

  • molecule check (and so place check, gate and finish, which run it) now looks at every contact. A contact on a row or column of the corner pins (x = 0 or span, y = 0 or span from MP1), or in a wing outside them, is on the outer edge. A contact inside the pins is reported with its net and position, plus the nearest edge spot on the grid, for example: "MC3 (PHA) at (16.0, 16.0) mm from MP1 sits inside the corner pins ... the nearest edge spot on the 2 mm grid is (0, 16)".
  • Keeping one inside on purpose: spec.molecule.innerContacts: [{"ref": "MC4", "why": "..."}]. With a sentence it shows as an OK line with your reason. Without one, it asks for the reason. contactEdgeBandMm (default 0) widens the band if you ever want one.
  • netlist check gives the same hint as soon as the board exists, while moving a fixed contact is still one edit. schematic check has no positions to judge (the schematic carries no placement), so the hint starts at the first board.
  • The aiflow-molecule skill now states the edge rule in place of "wherever wiring is cleanest".

One difference from your ask. You asked for an error. AI Flow never refuses (that is a firm rule for the whole flow), so this is a finding with a concrete suggestion. The check still completes and nothing is blocked, but the AI is told every time, with the spot to move to.

How it was verified. Unit tests cover a contact on the pin column (OK), one inside the pins (a finding, never an error, nearest spot named), innerContacts with a reason (OK) and without one (a finding). An older test fixture had a large contact inside the pins; it now sits on the front pin row. The full unit and workflow suites pass.

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.