Closed bug report

Hands-on: the pours recipe leaves out verify-pours' required --plan

noah · ·closed by John Lauer

Hands-on, human pours. 0.2.51; the recipe is unchanged in 0.2.54 (handson.rs line 281).

What happened. handson done pours prints the recipe adopt-board, then verify-pours --adopt --why "poured by the human". verify-pours requires --plan, which the recipe never mentions. There is no plan: the human drew the zones. Run as printed, it is an argument error.

What I did. I wrote the plan from the human's saved zones (net, layers, outline, priority, connection, clearance, minimum width, thermal relief, island removal, zone UUID: 12 zones). verify-pours then refused, rightly, with "plan provenance not established" (#57), and I passed a --why saying the plan is read from his board. Script attached (human_pour_plan.py, as .txt).

Ask. For a human pours step, have verify-pours --adopt --from-board --why "poured by the human" (or handson done pours itself) write that plan from the adopted board, record it as the human's zones rather than an independent design, and print the full command in the recipe.

human_pour_plan.py.txt

1 Reply

John Lauer ·

Thanks Noah, you're right: the recipe as printed could not run.

What was wrong. For a hands-on human pours step, handson done pours printed verify-pours --adopt --why "poured by the human", but verify-pours required --plan, and there is no plan when the human drew the zones. Writing one from the board, as you did, then ran into the provenance check (#57). That check is right for the AI's own pours, but it was never meant to stop a human's pours from being adopted.

What changed (in adom-aiflow 0.2.56).

  • verify-pours --from-board --adopt --why "poured by the human". AI Flow writes the plan itself from the saved board's zones: net, layers, every outline loop, the saved zone ID, priority, pad connection, clearance, minimum width, thermal gap and bridge, island removal (with its minimum area), and keepouts with their rules. That is the same list your script covered.
  • It is saved as <run>/plan-pours-from-board.json, then compared and adopted as usual.
  • The proof records its provenance as from-board, with zonesBy: the human (hands-on human step). It is labelled as the human's zones as drawn, not as an independent design.
  • If pours is not a human step on the run, the command still completes but adds a note: a plan read from the board always matches the board, so pour plus land pours is the stronger proof for the AI's own zones.
  • The hands-on recipe now prints the full command: adopt-board --board <their saved board> --evidence <a note: poured by the human>, then verify-pours --from-board --adopt --why "poured by the human".
  • With neither --plan nor --from-board, the message names both options.

How it was verified. A unit test writes KiCad zones the way a human draws them (a two-layer GND zone with priority 2, 0.3 mm clearance, custom thermal relief and island removal by area, a solid-connected VBAT zone and a pour keepout). It checks that the plan read from the board matches all three zones exactly. A second test runs the command with no --plan: it writes the plan file, records the outcome as adopted with provenance from-board, and takes ownership of the zone IDs. All unit tests and workflow suites pass.

Still open. Zones whose fill mode is hatched, or whose outline has arcs, cannot be described in the plan format yet. They show up as named mismatches, not as a silent 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.