parts and sourcing: when a part's component page cannot be made, retry once with better inputs, then assess the part's long-term supply risk and propose well-documented alternatives before reporting failure

Drew Owens · ·closed by Colby Knox

adom-aiflow 0.2.62 (latest) · adom-wiki 1.8.15 · adom-parts-search 2.1.5 · adom/core 4.15.3 · Adom cloud container (Linux)

Ask

In my words: AI Flow should always retry at least once instead of being so quick to report failure. If we cannot get the data needed for the wiki, we should assess whether the parts we are using are actually reliable for a long-term product, or whether we need to seek a more popular alternative that we can count on for years to come.

This is for the sourcing and parts steps (sourcing check, parts, the aiflow-sourcing skill): what happens when a part's component page cannot be made.

What happened

On 2026-11-10 my agent asked Adom's part factory (adom-wiki part request, one call per MPN, each with a datasheet or Mouser link) to build component pages for the 24 parts of a production board's BOM that had none. 10 were built, 2 are still queued, and 12 were refused. The agent re-requested two of them under their orderable MPN (both refused again) and reported all 12 as failures.

The refusal reasons, as the factory gave them:

Reason Parts
The datasheet has no land-pattern drawing 2
Two independent readings of the datasheet's land pattern disagreed 2
No datasheet found from the manufacturer or the distributors (one of the two requests carried a datasheet link) 2
No distributor sells this exact part number (one had a packaging suffix, one was not the orderable number; re-requested under the orderable MPN, one was again "no distributor", the other then hit "no land-pattern drawing") 2
The footprint drawn from the datasheet failed a geometry check (pads overlap) 1
The 3D model does not sit on the footprint (rotated or offset) 1
Stopped at the 3D model step (factory-internal) 1
Stopped at publishing the page (factory-internal) 1

Most of these are worth a second try with different inputs: the factory-internal stops, the missing datasheet, the land-pattern disagreement (a manufacturer's own footprint or package drawing settles it), the missing land pattern (it is often in a separate package drawing or the manufacturer's CAD download). Some are also a signal about the part itself: a part no distributor sells under its number, or whose maker publishes no land pattern, may not be one to build a product on for years.

Today parts says only: a part with no page fails; make it (wiki-component skill) and run again, or give it from the project library. Nothing asks for a retry, and nothing asks whether the part is a good long-term choice.

Proposed behaviour

When a part's component page cannot be made (a part request ends cannot_build or review, or no datasheet, land pattern or 3D model can be found):

  1. Retry once, with better inputs. Exactly one more attempt per part, with at least one input changed, never the same request again:

    • another datasheet source (the manufacturer's product page instead of a distributor PDF, or the reverse);
    • the orderable MPN (adom-wiki part candidates <MPN>), without a packaging or reel suffix where the factory names pages that way;
    • the manufacturer's land-pattern drawing or CAD download (aiflow-sourcing section 5 order), or the manufacturer page as the link.

    Both attempts and their reasons go in the run. This is one bounded retry, not a loop: the "one search per question, never retry" quota rule for vendor searches stays as it is.

  2. If it still fails, flag the part as a long-term supply risk and assess it. Write a short assessment per part into the run (for example design/supply-risk.json), each figure with its source and date:

    • lifecycle status (active, NRND, last time buy, obsolete);
    • how many distributors stock it, and the stock depth at each against the build quantity and the expected product life;
    • lead time;
    • second sources: pin-compatible or footprint-compatible parts from other makers;
    • how widely the package is used (common package, or one maker's own);
    • whether the datasheet and a land pattern are published at all.
  3. Propose alternatives before reporting failure. Up to three more popular, well-documented parts that do the same job: active, multi-sourced, in stock at the profile's preferred source, ideally already on the wiki or in Adom Basic Parts, with what each changes on the board (footprint, values, firmware). The human chooses; never substitute silently.

Only then report the part as failed, and lead the report with the decision the human has to make, for example: "U7: refused twice (no land pattern); supply risk high (one distributor, 300 in stock, single source); alternatives A, B, C".

Acceptance criteria

  1. A part whose page request is refused gets exactly one retry with at least one changed input, recorded in the run with both reasons; a retry with identical inputs is refused by the tool.
  2. A part still without a page after the retry is flagged in the parts outcome (for example supplyRisk: high | medium | low) with the assessment file beside it; every figure carries its source and date.
  3. The outcome lists up to three alternatives per flagged part, each with lifecycle, stock, source and whether it already has a wiki page, and what it changes on the board.
  4. parts and finish report a refused part only together with its retry and its assessment; the hint names the next command to run.
  5. Nothing is substituted without the human's choice, and the choice is recorded.
  6. The same assessment can run on a part that came from a project library (--project-lib), since a part with no public page is often the same part that is hard to buy.
  7. The aiflow-sourcing skill describes the three steps, and the parts failure hint points to them.

5 Replies

Colby Knox marked this in progress ·
Colby Knox ·

Thanks Drew, this is a good one and I'm building it now. The plan follows your three steps:

  1. One retry with better inputs. AI Flow sends the part request itself and keeps every attempt in the run, with its inputs and the factory's answer. A second request with the same inputs is turned away. The retry has to change at least one thing: the orderable part number, another datasheet or land-pattern link, or the manufacturer.
  2. A supply-risk assessment in design/supply-risk.json for a part still without a page: lifecycle, stock per distributor against the build, lead time, second sources, how common the package is, and whether a datasheet and land pattern are published. Every figure carries its source and date.
  3. Up to three alternatives per flagged part, with what each changes on the board. The human's choice is recorded, and nothing is substituted without it.

parts and finish will lead with the decision to make ("U7: refused twice (no land pattern); supply risk high; alternatives A, B, C") and name the next command. The assessment also works on project-library parts.

@ray, looping you in since this sits next to the part factory and Parts Search. Some of these refusals (the two factory-internal stops, the land-pattern readings that disagreed) may be worth a look on the factory side, and Parts Search is where the stock and lifecycle figures come from. Shout if you'd rather AI Flow read anything differently.

Colby Knox linked pull request #81, which closes this when it merges ·
Colby Knox closed this in pull request #81 ·
Colby Knox ·

This is in AI Flow 0.2.64. How it works now:

  • adom-aiflow part-request <MPN> sends the factory request and keeps each attempt in the run with its inputs and the factory's answer. A refused part gets one retry with a changed input: --as <orderable MPN> (from adom-wiki part candidates), --datasheet <the maker's product page, package drawing or CAD link>, or --manufacturer. The same inputs are turned away. part-request --refresh reads the answers of queued requests. If the retry builds a page under the orderable number, parts uses that page for the BOM line.
  • adom-aiflow supply-risk records the assessment in design/supply-risk.json: risk, lifecycle, stock per distributor, lead time, second sources, package, whether a datasheet and land pattern are published, and up to three alternatives with what each changes on the board. Each figure needs its source and date, and anything left out is listed. Project-library parts can be assessed too.
  • supply-risk --choose <MPN> --pick <alternative|keep> --why "..." records the human's choice. Nothing is substituted without it.
  • parts and finish lead with each part's decision, like "U7 (U7X): refused twice (no land-pattern drawing; no distributor sells this exact part number); supply risk high (NRND, 1 distributor); alternatives A, B, C", followed by the next command to run.

The aiflow-sourcing skill has a new section, "When a part cannot get a page", that walks through the three steps and says which change to make for each refusal reason. Upgrade with adom-wiki pkg install adom/adom-aiflow; adom-aiflow --version then shows 0.2.64.

Ray ·

Thanks Drew, and thanks Colby for picking this up. I went through the 12 on the factory side, and about half of them were the factory's fault, not the parts'.

Fixed, and these build now

  • TLC5925IDBQR: the catalog's package name "24-SSOP (0.154", 3.90mm Width)" didn't resolve to a footprint, so the factory went looking for a land drawing and read the PW package's pages. It now builds on SSOP-24 3.9 mm.
  • RT9080-33GJ5: your Mouser datasheet link was never tried once the catalog's links failed. The factory now falls back to the other catalog links, then to the link on the request.
  • RC0603FR-0737K4L: the publish landed, but a retry read "already published" as a failure. Built and public now.
  • 74HCT244PW-Q100 (both requests) and RMC20452T: these were never "not sold anywhere". The distributor lookup was out of quota and the factory reported it as unsold. They now wait and retry on their own, and ",11" is just Nexperia's packaging suffix, so it's the same page.
  • The two that sat "queued" (CMT-8530S-SMT-TR, TSM-110-01-L-DV-P-TR) were stuck in a retry loop on a packaging-suffix slug mismatch. That's fixed and both got a real answer.

With our part reviewer (it settles lands and pinouts from the maker's drawings):

  • 20021122-00010T4LF and KRL3216T4A-M-R068-F-T1: the two readings of the land pattern disagreed.
  • SC1169: the land is in the datasheet (figure 6, page 10). The factory didn't send that page to the reader, which is on us.
  • TPS259474LRPWR: the drawn footprint failed its geometry check.
  • VBPW34S: the generated 3D model didn't sit on its footprint.

Real gaps that AI Flow's retry and alternatives steps should handle

  • HLE-110-02-F-DV-BE and TSM-110-01-L-DV-P-TR: Samtec prints the land pattern in a separate footprint drawing, not the datasheet. The right retry is that drawing's link.
  • CMT-8530S-SMT-TR: the datasheet prints no pin numbers, so it needs the maker's footprint or 3D download.
  • 20021321-00010C1LF: Amphenol's datasheet host turns away our fetcher and there's no other copy. A retry with a different datasheet link would get it through.

So for these 12, the retry-with-better-inputs step is what was missing. I haven't looked at stock or lifecycle for any of them, so the supply-risk read is still Parts Search's to make.

Ray ·

Update on the requests that were still open: 5 of the 6 are built.

Still open: 20021321-00010C1LF (1523), because we could not fetch Amphenol's datasheet. It will be retried once our datasheet fetch can get around the maker sites that block our servers.

Colby Knox mentioned this in pull request #93 ·
Colby Knox ·

Thanks Ray, that breakdown was really useful. Two things changed on the AI Flow side because of it, in 0.2.74:

  • parts now finds a packaging variant on its base number's page. With your new pages, 74HCT244PW-Q100,11 and TSM-110-01-L-DV-P-TR were still reported as having no page. parts now also tries the number without a ,nnn orderable suffix or a reel suffix (-TR, -REEL, -RL), as it already did for /OT, and says which suffix it dropped. Checked against your pages: both now match.
  • The retry list in the sourcing skill now names your cases: the land in a separate drawing (Samtec), a datasheet with no pin numbers (the maker's footprint or 3D download), and a maker site that turns the fetcher away (another copy of the datasheet).

Upgrade with adom-wiki pkg install adom/adom-aiflow; adom-aiflow --version then shows 0.2.74.

Log in to reply.