Inventory profiles
The manual (generic-v1) inventory profile and the led-generator-v1 profile, and what each one does and does not verify.
The inventory (.) holds orderable identities and declared placements; the owner bundle holds evidence. How the inventory is populated and checked is pluggable — inventoryProvider.kind in circuit.config.ts selects one of two profiles.
manual (generic-v1)
The default for every new project. Set with:
inventoryProvider: { kind: "manual" },Identity is a unique
line_idplus a unique (manufacturer, complete MPN) pair.lcscis a required key, but an empty string is allowed. A non-empty value must be a real LCSC C-number read from the supplier listing for the exact part — never fabricated or guessed; leave it empty when the part isn't on LCSC, or hasn't been checked yet.suppliers: [{ supplier, order_code }]is optional and display-only — it never creates a routing alias.placementsmay be[], and is declared, not verified: the manual profile does not bind a placement to a schematic or netlist.
Every run of pnpm circuit:check prints a SCOPE: line stating exactly this — how many lines and declared placements it saw, and whether the pin-asset check ran or was skipped because CAD is disabled. That line is the honest limit of what the check proved, and the workflow asks you to repeat it in a completion report rather than letting a green check imply more than it showed.
led-generator-v1
Use this profile when inventory should be derived from one or more configured board-generator specifications. Set it with:
inventoryProvider: { kind: "led-generator-v1", specs: [{ path: "scripts/schgen/board_p_spec.py" }] },Specs come explicitly from config — there is no implicit fallback to a hard-coded board list.
Board names come from each spec's
PROJECT_NAME; an optional nonblankboardon a spec overrides that name.inventory.json'sgenerator_specsmust match the configured specs. A spec without an explicit board is represented by its path; a board-scoped spec may use the normalized{ board, spec }form, with its path relative to the project root.fitdefaults to"line", which keeps the existing line-leveldnpbehavior. Use"placement"when each placement has its owndnp. A line with a mix of fitted and DNP placements contributes to both fitted and DNP line totals. When a line and its placement both declarednp, their values must agree.mpnFromValueLcscis an optional finite reviewed list of generator LCSC codes. Each entry must be a uniqueCnumber matching^C[0-9]+$and must occur in the generator output; only those codes take their MPN from the generatedvalue.These options do not skip generator parity: the generator's symbol/footprint checks still run.
Choose this profile when your project already has a generator script that provides board names, components and placements. Otherwise, use the manual profile.
Audited replacement candidates
Candidates are audited alternatives kept separate from fitted inventory lines. Configure evidence.candidates with a path to a JSON file shaped like this:
{
"schema_version": 1,
"candidates": [
{
"candidate_id": "candidate-regulator-b",
"owner_skill": "component-regulators",
"mpn": "REG-B",
"manufacturer": "Parts Manufacturer",
"lcsc": "",
"package": "SOT-23-5",
"function": "voltage regulator",
"replaces_line_ids": ["line-regulator-a"]
}
]
}Each entry requires candidate_id, owner_skill, mpn, manufacturer, lcsc, package and function; values must be nonblank strings except that lcsc may be empty. Candidate IDs use the inventory line ID syntax and must be unique and distinct from every line_id. The case-insensitive (manufacturer, mpn) pair must be unique across fitted lines and candidates. A non-empty LCSC code must also be unique across them. Optional replaces_line_ids lists existing inventory lines. placements is forbidden, including as an empty array; candidates have no fitted or DNP placement state.
Each candidate has exactly one record in its declared owner_skill bundle. The record identifies it with line_id: null and its candidate_id, and its mpn, manufacturer, lcsc and package must match the candidate entry. An owner may hold both fitted lines and candidates, or candidates alone; candidate-only owner bundles are still discovered and fully validated. Candidate records can carry the usual owner-bundle evidence, including a routing entry that is validated against its exact identity. They do not enter generated placements or fitted line counts, CAD pin-asset binding, fitted line routing or publication.
Candidate evidence forms a separate partition. Validation rejects an interaction that names both fitted and candidate records, a calculated fact whose depends_on crosses partitions, and a subordinate record whose parent is in the other partition. An integration rule also cannot name a candidate record or one of its facts. These links are errors rather than references silently dropped at publication. Configured project policy checks still cover the full evidence aggregate: for example, pin-locks still requires locks for candidate pin maps.
The shared pin-asset rule
Independent of which profile is active, every pin map declares a symbol and a footprint. When CAD is enabled, both must exist in the configured cad.symbolLibraries / footprint directories, and symbol pins must equal footprint pads — the led-generator-v1 profile additionally keeps the generator's own symbol/footprint parity. When CAD is disabled, this check is SKIPPED, with an explicit line, never silently treated as passing. See CAD fidelity for what a passing pin-asset check does and does not establish.