AI Flow: Reverse Engineering
Public Made by Adomby adom
Photos of a PCB to a tagged KiCad copy: parts placed, copper and nets with their evidence, a schematic, a measured confidence score, bench tests and a video of the run.
| Name | Last updated |
|---|---|
| build | |
| process-video-icon.jpg | |
| README.md |
Process video: how it was made
The video was built after the run from what the run saved. Nothing was filmed live, so every shot below is a saved file, a recorded view or a drawing over one. It covers the Driver board on version 0.3.0.
What differs from the AI Flow video standard
- No clip review. The standard asks for review of each clip before assembly. This one was assembled directly because the video was asked for as one finished piece, and
adom-video-postis not installed here. - Size. The player copy follows the 15 MB limit, so the 1080p copy on the Releases tab shows the photos better.
Where each scene comes from
| Scene | Source |
|---|---|
| The board | The original Driver1.JPG at full resolution, with an eased camera, then all four photos. |
| The other side | The original Driver3.JPG at full resolution. |
| The job | The first prompt typed on screen from the saved text, shortened and tidied; a re-enactment, not filmed. The three later requirements are quotes from the owner, with one spelling corrected. |
| The flow | Screenshot of the flow window, record 133 of this run. |
| Photos | evidence/outline-*.jpg, the straightened board images and evidence/prep-Driver3.jpg, with the registration figure from scale.json. |
| Scale | board/top.jpg with the holes and rows from detect/holes-top.json drawn over it. |
| Parts | board/top.jpg with positions from parts.json, and evidence/pin1-U2.jpg. |
| Blocks | board/top.jpg with block outlines drawn from blocks.json and parts.json. |
| Reading the copper | board/bottom.jpg, evidence/gaps-bottom.jpg and evidence/copper-islands-bottom.jpg, then copper drawn from copper.json of the published run and of this run. |
| Dome shadows | A crop of board/bottom.jpg, with B.Cu drawn from the first merged test and from this run. |
| Vias | Each run's own board/bottom.jpg with rings drawn from its copper.json. |
| Every layer | evidence/materials-top.jpg, then recorded board view 123 with one layer on at a time. Mask and copper stills are brightened for legibility. |
| The KiCad copy | evidence/overlay-*.jpg, then recorded board view 123 with nets selected in the viewer's list. |
| Against the photos | evidence/fidelity-F_Cu.jpg and fidelity-B_Cu.jpg, with figures from fidelity.json and check fidelity. |
| Every piece on a net | Copper from copper.json coloured by net and by netEvidence.rung, figures from net-evidence.json, then recorded schematic view 123. |
| Routing what's hidden | routes/L6/routed.json drawn on the dimmed top photo. White circles are router vias, white crosses are failures with a known position. |
| Layer count | routes/L2, L4, L6 and L8 drawn the same way, and the table from layers.json. |
| Measured confidence | An audit contact sheet from audits/vias, then scores from confidence-scores.json. The void is the first blocks sample. |
| Tests for the unknowns | tests.json, system tests first. |
| The answer key | Totals from the sealed scoring log, entries "published 0.2.0 baseline" and "merged test 2". No item-level comparison is shown. |
| Not done | The same routed drawing, with figures from layers.json. |
| The record | Screenshots of the flow window stepping through its recorded views. |
| Cost | Counted from the session logs, 2026-11-03 20:34 UTC to the build of this video, sub-agents included. Gaps over 15 minutes are cut from the main thread's AI time. |
Tools
Voice: adom-tts with en-US-AndrewNeural, the standard Adom narration voice, at the default rate. Stings: dark-intro-16x9.mp4 and dark-outro-16x9.mp4 from adom/adom-video-brand. Picture: one canvas page per scene, rendered frame by frame in headless Chrome and encoded with the ffmpeg from imageio_ffmpeg. Captions are separate files, not burned in.
The scripts are in build/: script.py holds the narration, prep.py makes the stills, composer.html draws each scene, render.js renders them, assemble.py joins them and writes the captions. They use paths from the session that built them, so expect to adjust those.
Voice-over script
The board. This is a three phase motor controller. A power connector, a bank of capacitors, six MOSFETs. A gate driver and a microcontroller in the middle, each turned 45 degrees. We have no design files in this flow. Just four photos.
The other side. Turn it over, and the copper shows through the solder mask. Pours, fine tracks, gaps between them, and more than a thousand tiny domes where vias push up through the mask. Everything from here on is read from pictures like these.
The job. The job: find the parts and the blocks. Copy all the copper. Work out what can't be seen, propose a layer count, say how sure you are, and list the tests that would settle the rest. Then a harder bar. Put every piece of copper on a net. Make the layers match the photos. And keep going until confidence measures 90%, or say why it can't.
The flow. This is AI Flow: Reverse Engineering. A Rust program does the measuring, and an AI supplies the judgment, like what a part is called. 11 steps, from intake to report. Each one has a check that has to pass, and each one gets recorded.
Photos. First, the photos. It finds the board edge in each one and straightens it. The bottom gets turned over and pinned to the top through 40 holes that both sides share. With one hole held out each time, they land within about 0.03 mm.
Scale. Scale comes from the board itself. Header rows have standard pitches, 2 mm and 2.54 mm. The driver chip's 6 mm body confirms which standard they are. That gives 46.6 pixels per millimeter.
Parts. Next, the parts. 137 of them, and 103 get placed by their own pads. Markings get read where they're legible, like this TI DRV8323S. Most small ceramics carry no marking at all, so their values just aren't in the photos. The flow says so, and doesn't guess.
Blocks. Silkscreen and circuit role sort them into 11 blocks. Power entry, the power stage, sensing, the logic supply, the gate driver and the microcontroller. Then CAN, AUX, the fan, motor temperature and the mounting holes.
Reading the copper. Now the hard part. Under solder mask, copper looks a little lighter than bare laminate, and thin dark lines mark the gaps. The reader follows those gaps, and the board comes apart into islands. Here's the published version next to this one. Fine tracks that used to be missing now come through. That's 828 pours and 2,588 tracks.
Dome shadows. Looking closely found a real defect. The dark side of each dome was being cut out of solid pours. So the reader learned what a dome's shadow looks like, and now those pours read solid. Domes with a hole beside them dropped from 396 to 68.
Vias. Vias get a shading test. A real dome is lit on one side and shadowed on the other, in the same direction as all the rest. The published filter ringed silkscreen and missed most of the domes. The new one sits on them. 1,329 kept. The top face shows none it can trust, so these all come from the bottom. A few are still missed along the edges.
Every layer. It doesn't stop at copper. Each pixel gets sorted by material: mask, silkscreen, metal, or a part sitting on top. Silkscreen, mask openings, exposed metal, holes and the outline all get read from the photos, then written into their own KiCad layers.
The KiCad copy. All of it goes into a real KiCad project, as photographed, before anything gets guessed. Here it is over the top photo, and over the bottom. Every stage opens as an interactive board. Pick a net and all of it lights up: ground, the input rail, a phase.
Against the photos. Then a separate check compares what KiCad draws with what the photos show, on tiles the reader wasn't tuned on. Green agrees. Red is drawn but not seen. Blue is seen but not drawn. Purple is hidden under a part, so it isn't scored. The bottom scores 0.87. The top, 0.82, on only about half the board, because parts cover the rest.
Every piece on a net. Next, every piece of copper gets a net, and a record of how it got it. Pieces get stitched into conductors wherever no gap separates them. Green means a pad touches it. Blue, it's joined through a via. Yellow is inferred, orange only by group. Red has no net. Three quarters of the copper area now has direct evidence. But 47% of track length is still red, so that goal isn't met. A schematic comes out too. All 77 nets are still marked inferred.
Routing what's hidden. Now the connections nobody can see. The flow has its own router, and it uses every inner layer. Real vias pass through pours, so crossing copper from the photos is expensive, not forbidden. And the length crossed gets reported. At 6 layers, 45 of 253 connections stay open. The white crosses are where it got stuck, mostly at the two chips.
Layer count. That difficulty is how the layer count gets proposed. 2 layers cross 454 mm of seen copper. 4 layers, 384. 6 layers, just 11. 8, about 8. Past 6, more layers stop helping. So the proposal is 6.
Measured confidence. Confidence isn't self graded. Auditors who did none of the work judge random crops, and some of the claims are planted false. Pass one of those, and the whole sample gets thrown out. That actually happened here, on blocks. Identity clears 90. Vias, blocks and placement land around 60. Values are at 34, because most small parts carry no marking. Copper scores 9, because through smooth green mask, an auditor mostly can't tell copper from bare board. Layers stop at 30 without outside evidence. And connectivity is 0, because KiCad finds more missing than expected. Overall is the lowest category, so the loop reports stalled, at 0. It did not reach 90. From photos alone, it can't: values, layers and nets need measurements on the real board.
Tests for the unknowns. Whatever is still unknown gets a test. 119 of them, each saying what to measure, what result to expect, and what to change if it's different.
The answer key. We did find the real design. It went in a sealed folder as an answer key. The flow never reads it, the agents never see it, and only totals come out. Real vias went from 42% to over 95%. Vias found, from 26% to 75%. Copper match went from 61% to 67% on top, and from 80% to 89% on the bottom. And 6 layers is correct. Pin nets barely moved. 46% to 48%. That's the weakest result here.
Not done. So this isn't a finished board. 45 connections stay open, and KiCad counts 441 missing. Finer copper also made routing harder. New design rule errors at 6 layers went from 6 to 594. And these thresholds came from this one board, so a second board has to come next.
The record. Every stage stays in the flow window, so you can step back through the whole run and open any board along the way.
Cost. From the first prompt to this point took about 13 hours of AI time in the main thread, with idle gaps cut out, plus 46 sub-agents. About 3.4 million output tokens and 634 million cache reads, across 1,811 model calls. Next up: real measurements on this board, and a second board.