New BOM component workflow
New BOM component workflow
Run these steps from the repository root, in order. This checklist owns a new or replacement BOM part from circuit identity through the committed public reference. It does not authorize an unresolved electrical or firmware design change.
Preconditions
Resolve the exact MPN, LCSC ID, manufacturer, board/refdes, symbol, package, pin map, connectivity, DNP state, source authority, and intended public document/preview names before editing. Do not invent a refdes, pin, fact, model basename, or document kind to make the workflow progress; stop and obtain the missing design or review decision.
1. Lock the circuit identity
Add the exact MPN, LCSC ID, symbol, footprint, fields, pins, and connectivity to
scripts/orschgen/ board_ p_ spec. py scripts/; regenerate the matching committed schematic with exactly one of:schgen/ board_ l_ spec. py python3 scripts/schgen/gen_schematic.py board_p_spec python3 scripts/schgen/gen_schematic.py board_l_specRun
scripts/(for exampleschgen/ verify. sh <project> board-p,board-l, orswd-adapter) whenkicad-cliis available; commit the edited spec and generated.kicad_schtogether.Add or update the exact line in
.. Update its reviewedclaude/ skills/ component- spec- audit/ references/ inventory. json assertions; do not change validator constants to accommodate corpus growth.
2. Build the evidence owner
Copy
assets/component-skill-template/to.and replace every example value. If this creates or changes an owner assignment, update the exact-owner map in rootclaude/ skills/ component- <exact- part>/ CLAUDE.md; root routing stays a map to this owner workflow, not a second workflow.Fill
manifest.json,sources.json,facts.json,coverage.json,routing.json,interactions.json, andpin-map.jsonfrom audited sources. Record fact conditions, coverage, routes, interactions, and the real pin map; retain short normalized extracts, not PDFs.Add the matching
## Human component referenceto the ownerSKILL.md, linking every owned/page plus the catalog and integration pages. The JSON bundle remains authoritative.docs/ components/ records/ <slug>/ Update the reviewed locks with the evidence: direct-routing negatives in
., real-pin locks inclaude/ skills/ component- spec- audit/ fixtures/ direct- routing. json fixtures/, and any affected critical-fact fixture. Add agolden/ real- pin- maps. json fixtures/entry only when the new fact is a validator-protected critical design claim; then update its paired review fixture. Do not add incidental facts merely to raise fixture coverage. Add cross-component rules ingolden/ critical- facts. json .and their forward tests when the part affects another component or domain. If those rules change, updateclaude/ skills/ circuit- spec- integration/ references/ rules. json references/too: its prompt/response SHA-256 values lock explicit-skill policy rendering/refusal against the frozen evidence packet, whileobserved- runs. json forward-tests.jsonseparately proves deterministic routing and discovery parity.
3. Acquire KiCad and model assets
Acquire the symbol and canonical footprint. For an LCSC/EasyEDA import, use:
easyeda2kicad --lcsc_id <LCSC_ID> --footprint --symbol --3d --output /tmp/<part>Merge only the imported symbol entry into
symbols/; never copy or overwrite the whole shared multi-symbol library. Put the canonicalzudo- led- lamp. kicad_ sym .kicad_modinfootprints/kicad/and an identical copy infootprints/; verify withkicad/ zudo- led- lamp. pretty/ cmp -.s footprints/ kicad/ <name>. kicad_ mod footprints/ kicad/ zudo- led- lamp. pretty/ <name>. kicad_ mod Put a matching same-basename
*.stepand*.wrlinfootprints/. The canonical footprint must reference that WRL throughkicad/ zudo- led- lamp. 3dshapes/ ${KIPRJMOD}/and carry reviewed offset, rotation, and scale transforms. Do not treat a STEP-only import as complete.. . / . . / footprints/ kicad/ zudo- led- lamp. 3dshapes/
4. Choose what becomes public
Explicitly add the record to
recordIds, every public source tosourceIds, and every approved outbound source URL tolinkableSourceIdsindoc/. Add exactly one audited document source plus its truthfulcomponent- docs/ adapters/ circuit/ selection. ts documentKind(datasheet,specification, ordrawing). Inspect the retrieved content: a product page or HTML denial is not a datasheet because its URL ends in.pdf. Retrieve the candidate only into ignoredtmp/pdfs/(or another temporary path), follow redirects, retain response headers, verify the first bytes are%PDF-, and inspect the document title/page content against the exact MPN before selecting it. For example:curl -fsSL --max-redirs 10 -D /tmp/<source>.headers -o tmp/pdfs/<source>.pdf <URL>followed byhead -c 5 tmp/pdfs/<source>.pdfand a PDF viewer/text extractor. This is dated human verification, not a build-time live URL check: re-audit on a changed URL/content or scheduled source refresh, then updateCIRCUIT_DOCUMENT_VERIFICATION(includingcheckedOn) and the selection.Select the footprint and model preview through the record pin map and canonical footprint/model pair; do not rely on discovery or a default selection.
Update every deliberately reviewed count/shape lock that the changed selection reaches:
selection.tsexpect,adapters/,circuit/ references. ts adapters/,circuit/ model- assets. ts footprint-, andpreviews/ generate. ts footprint-. Update the matching explicit assertions inpreviews/ check. ts component-,docs/ tests/ references. test. ts footprint-previews.test.ts,model-viewer.test.ts, and the applicable corpus/pipeline/publication tests. Keep these locks explicit and reviewed; do not weaken them into inferred counts. Refresh current corpus/preview statements indoc/when their asserted values change. Leave dated historical verification narratives alone unless this change actually repeats and re-verifies that stated baseline.component- docs/ ARCHITECTURE. md
5. Regenerate, review, and commit
Regenerate and check committed previews:
pnpm --dir doc generate:footprint-previews pnpm --dir doc check:footprint-previews pnpm --dir doc generate:models pnpm --dir doc check:modelsRegenerate component MDX and its committed preflight report, review the exact corpus counts, then run the focused pre-build checks:
pnpm --dir doc generate:components PYTHONDONTWRITEBYTECODE=1 python3 .claude/skills/component-spec-audit/scripts/validate.py PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s .claude/skills/component-spec-audit/scripts -p 'test_*.py' PYTHONDONTWRITEBYTECODE=1 python3 .claude/skills/circuit-spec-integration/scripts/check_forward_tests.py pnpm --dir doc check pnpm --dir doc test:components pnpm --dir doc check:componentsRun
pnpm --dir doc b4pushbefore delivery. It builds the current site before running the built-reference, artifact, and isolated doc-skill scans, so those gates never inspect missing or staledoc/distoutput. Commit reviewed generated component MDX,component-, footprint previews, public WRL previews, and every changed generator-owneddocs/ preflight. json doc/projection with their authored source changes; never hand-edit generated files. Inspect them with:src/ content/ docs/ claude* git add --intent-to-add -A -- doc/src/content/docs doc/component-docs/preflight.json doc/public/assets/component-previews git diff --exit-code -- doc/src/content/docs doc/component-docs/preflight.json doc/public/assets/component-previewsCheck the new
/route itself in the built output or on the PR preview. The PR smoke route is representative, not proof that a new route renders; this issue does not change CI smoke ownership.docs/ components/ records/ <slug>/ verify.shreportingSKIPPEDwithoutkicad-clialso is not a substitute for opening the regenerated schematic in Eeschema, running ERC, and performing visual pin/orientation review.
External panel components
A purchased, hand-wired panel component is not a PCB part. Declare it explicitly in the board spec's EXTERNAL_COMPONENTS before NETS, with exact MPN, manufacturer, package, supplier, order code and datasheet URL. Keep its LCSC and PCB footprint fields empty, but set inventory mounting: external with matching supplier/order code. The generator emits in_bom yes and on_board no.
Use an exact manufacturer terminal symbol and evidence owner. Its pin map sets mounting: external, an empty footprint, and physical terminal numbers in footprint_pad. Record this meaning explicitly; do not fabricate PCB pads or model geometry. The current public viewer publishes only PCB package models. A future external model needs its own reviewed publication contract; do not attach it to a wire-pad footprint or fabricate STEP geometry. The former WR11AS-only external model path was removed when the lamp switched to JLCPCB C496154. Add separate bare-copper wire pads to both footprint library locations, with an inventory exclusion only for those real board features. Verify system assembly connectivity and PCB exclusion separately. All PCB-component asset requirements remain intact.