New component workflow
New component workflow
Run these steps from the project root, in order. This checklist owns a new or replacement component from its exact identity through the committed, published reference. It is the detailed form of Workflow B in circuit/. It does not authorize an unresolved electrical or firmware design change.
Preconditions
Resolve before editing:
manufacturer, complete MPN (suffix and package variant), supplier order codes;
intended function, placements (board and reference designator) and population (fitted, not fitted, hand-fitted, external);
the source that will establish identity and behavior;
whether the part needs CAD assets on a board, and whether its page and previews will be published.
Do not invent a reference designator, pin, fact, order code or document kind to make the workflow progress. Stop and record the missing design or review decision in next actions instead.
Run pnpm circuit:check first and note what already fails.
1. Lock the identity
The configured inventory provider (inventoryProvider in circuit.config.ts) decides how identity is locked.
Manual provider (the default)
Edit .:
Add one line per orderable identity, with the same keys as existing lines (
line_id,mpn,manufacturer,lcsc,package,dnp,owner_skill,identity_state,source_state,function,placements;mountingdefaults topcb). The validator names any key that is missing.Identity is a unique
line_idplus a unique (manufacturer, complete MPN) pair. Two manufacturers may share an MPN; each line then resolves only with its manufacturer qualifier.lcscmust be present. Use""unless you read a C-number from the supplier's listing for this exact part. Never fabricate, guess or reuse a C-number from a similar part.Optional
suppliers: [{ "supplier": "...", "order_code": "..." }]records other order codes. They are display-only and create no routing aliases.placementsmay be[]. Placements are declared, not verified: the manual provider does not bind them to a schematic, and theSCOPE:line printed by the validator says so. Repeat that limit in your report.identity_stateisVERIFIEDorUNRESOLVED;source_stateisAVAILABLEorSOURCE UNAVAILABLE. Keep them consistent with the owner bundle; the validator warns when the summary lags the evidence.Update the reviewed
assertionscounts (orderable_lines,fitted_lines,dnp_or_hand_fit_lines) by hand. Do not change a count only to make a check pass.
Generator provider (optional)
When the project configures a generator-based provider, the generator specification is the identity lock: add the exact part to the configured spec, regenerate the schematic with the project's generator, commit the spec and its output together, and then reconcile the inventory line against it. Do not hand-edit an inventory line to disagree with its generator.
2. Build the evidence owner
Create the bundle from the package template:
pnpm exec zudo-circuit-doc new-component SUFFIXThis creates
.and refuses an existing directory. Use a suffix derived from the exact part.claude/ skills/ component- SUFFIX/ Replace every placeholder in all eight files. Fill
manifest.json,sources.json,facts.json,coverage.json,routing.json,interactions.jsonandpin-map.jsonfrom audited sources (Workflow C for acquisition). Record units, conditions, provenance, verdicts, calculation dependencies, open domains with theirblocking_fact_ids, routing cases and the real pin map. Retain short normalized extracts, not whole documents.Keep the bundle
SKILL.mdfrontmatter valid:nameequals the directory name, anddescriptionis at least 80 characters and says when to use it.The record's
mpn,manufacturer,lcscandpackagemust equal the inventory line;owner_skillon the line names this bundle.Add the line's positive and negative cases to
.. Add a vendor qualifier toclaude/ skills/ component- spec- audit/ references/ direct- routing. json external-vendor-qualifiers.jsononly when routing needs one.When the part affects another component or domain, add or update a rule in
.(see the circuit-spec-integration skill). Evidence-chain stages stayclaude/ skills/ circuit- spec- integration/ references/ rules. json OPENuntil real evidence exists.
Run pnpm circuit:check now; fix every failure the new bundle introduced.
3. CAD assets (optional)
Only when the part goes on a board and cad.enabled is true in circuit.config.ts. With CAD disabled, the pin-asset check is reported as SKIPPED; say so in the report rather than implying pins were checked.
Acquire the symbol, footprint and model (Workflow D): a pinned KiCad library release tag, the manufacturer, or
easyeda2kicadfor an LCSC-listed part. Import into.circuit-cache/cad/first, never straight into the libraries.Merge only this part's symbol into the configured symbol library. Never overwrite a shared multi-symbol library with importer output.
Place the footprint in the configured footprint roots. If the config names both a master root and a library root, keep the two
.kicad_modcopies byte-identical (cmp -s).Place the WRL model in the configured model root — it is required and is what gets published. A STEP file is optional; if you add one, it must share the WRL's basename (a mismatched pair fails the check). Review the footprint's model reference and its offset, rotation and scale. The web viewer renders WRL only; if no WRL exists for the pinned library release, record the model as unavailable rather than converting one.
The pin map's
symbolandfootprintmust exist in the configured libraries, and symbol pin numbers, footprint pad numbers and pin-map pins must be identical sets. Check them against the datasheet yourself; the validator checks only agreement.Write the receipt
circuit/fromcad- receipts/ ASSET_ ID. receipt. json circuit/, with the fidelity class (templates/ cad- asset- receipt. json exact-vendor,family,derived,unavailable) and the evidence for it.
4. Choose what becomes public
Edit circuit/ in the same change. Nothing is published unless it is listed.
Add the record to
recordIds, every public source tosourceIds, and every approved outbound URL tolinkableSourceIds.Add exactly one entry to
documentSelectionsfor the record, with its audited document source and a truthfuldocumentKind(datasheet,specificationordrawing). Inspect the retrieved content first: a product page or HTML denial is not a datasheet because its URL ends in.pdf. The bytes must start with%PDF-, and the title and part list must cover the exact MPN.Update the reviewed
expectlocks:records,sources,integrationRulesandpackages(the number of selected footprint/model packages;0is valid). Keep them explicit; never infer them.A file deliberately published under
doc/public/(for example a redistributable drawing) needs an entry incircuit/with its path and reason. Raw sources and CAD files otherwise stay out ofpublication/ assets. json doc/public/.
5. Regenerate, review, commit
If CAD previews were selected, regenerate and check them:
pnpm previews:generate pnpm exec zudo-circuit-doc footprints check pnpm exec zudo-circuit-doc models pnpm exec zudo-circuit-doc models --checkRestart a running dev server after adding public assets.
Regenerate and check:
pnpm circuit:generate pnpm circuit:check pnpm checkBuild and run the post-build checks:
pnpm build pnpm check:siteCommit the evidence, inventory, routing, selection, receipts, generated pages,
circuit/and previews together. Never hand-edit generated files. Review the generated diff with:generated/ preflight. json git add --intent-to-add -A -- doc/src/content/docs/components circuit/generated doc/public/assets/component-previews git diff -- doc/src/content/docs/components circuit/generated doc/public/assets/component-previewsOpen the new record page in the built site or dev server. A passing link check proves the route exists, not that it reads correctly.
External (off-board) components
A purchased, hand-wired component that is not soldered to a PCB (a panel switch, a connector on a cable) is not a board part. Set inventory mounting: external, keep its footprint empty, and record its physical terminal numbers in the pin map's footprint_pad. Do not fabricate PCB pads or model geometry for it. Verify system wiring and its absence from the PCB assembly separately; both remain explicit checks.