ARBI
Documents / bom/README.md

Bill of materials

ARBI keeps engineering requirements, physical ownership, supplier identity, purchasable offers, destination-specific quotes, and calculation scenarios as separate versioned JSON inputs. This avoids treating a supplier row or a component type as a physical subsystem.

Source of truth

The files under bom/ are the sole canonical BOM records for the project. Parts, assembly quantities, offer selections, quote observations, and calculation policy change only through reviewed Git commits. There is no external database, synchronization job, or row-mapping authority.

Supplier websites and offer URLs are procurement evidence. Dated price, availability, tax, and shipping observations live in quote snapshots. Those references support the repository records but never override them.

Canonical inputs

  • catalog/parts.json: stable engineering part identities and requirements. Quantities do not live here.
  • assemblies/assemblies.json: quantities owned by actual physical assemblies.
  • assemblies/builds.json: build definitions and assembly instances.
  • catalog/suppliers.json: stable supplier identities and uniquely owned checkout groups for each seller, warehouse, or basket boundary.
  • catalog/customs.json: shared destination customs policies with start/end dates, fixed charge per item type and order-value limits.
  • catalog/offers.json: purchasable packages, bundles, URLs, qualification state, MOQ, package contents, and relevant notes.
  • catalog/fabrication.json: print-kit quantities, source-matched CAD volumes, material densities and dated roll prices and bulk-order conditions for material consumption estimates.
  • locations/locations.json: privacy-safe destination and tax context.
  • quotes/*.json: immutable destination-specific price observations, currencies, exchange rates, timestamps, and checkout-group shipping evidence.
  • scenarios/scenarios.json: pinned selection and reporting policy.
  • schemas/*.schema.json: contributor-facing JSON Schema contracts.

Fasteners, cables, electronics, electrical parts, mechanical parts, optics, and printed or fabricated parts are disciplines or traits. They can appear inside every physical assembly; they are not top-level ownership categories.

Item pages

Browse the BOM item index for a separate Markdown page for every catalog part, including optional and deferred items. Link directly to bom/generated/parts/<part-id>.md from other documents using a relative path. Stable part IDs keep these links usable when display names change.

Archived parts use lifecycle: archived and a required archiveReason. Their stable item pages, supplier offers, quotes and SCAD sources preserve historical evidence. Current assembly usages cannot reference archived items; the website excludes them and their warnings from current Parts/BOM inventories and purchasing totals. Their CAD entries live in archivedModels and have no current fabrication downloads. The selected printed corner-head kits, bought hardware and shared marking tool replace the archived metal and split-clamp selections; all remain subject to physical acceptance.

Each page shows canonical requirements and notes, assembly usage quantities and inclusion status, links to the owning assembly documentation and BOM reports, and fabrication sources where recorded. Assembly documentation links are repository-relative paths in assemblies/assemblies.json. Quantities shown on item pages are per assembly definition; scenario reports apply build multipliers and inclusion policy.

Warning priorities

  • Critical: unknown dimensions, approximate geometry, missing requirements or fabrication sources, and temporary workarounds. Resolve dimensions and interfaces before dependent assembly design or accepting the final assembly.
  • Warning: unconfirmed designs, concepts, prototypes and supplier selections awaiting review. Record the design review or physical acceptance evidence before advancing their status.
  • Issues: procurement details such as package quantities, price, tax/VAT, shipping, availability, customs and observation dates. Resolve these when the design and parts are confirmed; they still prevent a complete landed cost when evidence is missing.

Cable ties are temporary workarounds only, never a final retention or fastening solution. The affected catalog parts carry a critical temporary-cable-tie design warning with the replacement work described. Current geometry and historical booklets may still show ties; these interfaces remain unresolved until dedicated removable mounts, fasteners or strain relief are designed and reviewed. Ties must never carry positioning-line tension.

Part-specific designWarnings belong to the canonical catalog. The schema prevents downgrading a cable-tie warning or an explicit approximate-geometry warning. The calculator adds structured warningDetails with priority and part/assembly ownership while retaining its existing text warnings list. partWarnings includes optional and deferred parts, even when excluded from the scenario. Generated item pages show design warnings; scenario reports and website Parts/BOM pages also show procurement issues. The website adds critical geometry warnings from the active CAD registry to affected part rows and summaries. It uses red Critical, amber Warning and neutral Issues badges, with expandable work lists and links to affected items.

Calculation complete continues to describe procurement cost completeness; engineering warnings do not grant physical acceptance or establish that a design is ready to build.

Item pages and their index are generated: change canonical inputs and run pnpm bom:generate. pnpm bom:check detects missing, stale, and orphaned item pages. Both commands handle the complete item catalog even when a single scenario is requested.

Physical ownership

The V1 build has five canonical physical root owners: the corner-support set, camera pod, dock, control cabinet, and site installation. The four-winch set is a child of the corner-support set and owns the four positioning lines; its powered variant additionally owns the hybrid-line conductors and slip ring. There is no separate positioning-line BOM owner. See ADR-0010. Site installation owns installed power and signal routes plus the deferred weather-sensing endpoint rather than promoting cabling or weather into type-based top-level subsystems. A complex root may gain physical child assemblies through parentAssemblyId; parent links must stay within the physical hierarchy and cannot self-reference or form cycles.

Builds explicitly include parent and child definitions once each. parentAssemblyId describes ownership; it does not recursively expand child quantities. Goods allocations remain direct-owner amounts, so support and winch costs are separate and are summed only once.

shared-procurement-stock is an explicitly typed, non-physical purchasing exception. It represents assortments whose exact installed size-level allocation is not yet defensible. Reports keep this stock separate and never describe it as subsystem ownership.

OpenSCAD-backed parts link to canonical entries under hardware/assemblies. Fabrication status can advance through planned, concept-unvalidated, prototype, validated, released, and deprecated. Planned parts have no claimed manufacturing source; every later status requires at least one linked source. Reference-only geometry studies are not claimed as fabrication sources.

Offer qualification

Offer qualification is explicit:

  • approved: engineering compatibility and procurement assumptions have supporting evidence.
  • baseline-selected: the repository's current pinned selection, not yet approved.
  • candidate: an alternative awaiting review.
  • unresolved: a placeholder or materially incomplete offer.

A supplier link, order, or receipt alone is not engineering approval. Add alternate suppliers as new offers so price, packaging, and location comparisons remain reviewable in Git.

Pricing and shipping

Quantities and money are decimal strings. The calculator uses BigInt-backed exact decimal arithmetic and never totals money with binary floating point.

An offer purchase unit can contain one part, a spool or box quantity, or several component types. This models a kit without assigning the purchasing bundle to the wrong physical assembly. Package rounding exposes purchased quantity and surplus, including:

  • 180 m Dyneema from 50 m spools: 200 m purchased, 20 m surplus.
  • 85 m Cat5e from a 100 m reel: 100 m purchased, 15 m surplus.
  • 16 washers from a 100-piece box: 84 surplus.
  • two servos from a three-pack: one surplus.
  • five required microswitches from a ten-pack: five surplus.

Shipping belongs to a checkout group and is charged once. A supplier can own multiple checkout groups when seller, basket, or warehouse boundaries create separate charges; each offer selects exactly one group. Null shipping means unknown, never free. Different currencies are converted only through explicit rates committed in the quote snapshot.

A checkout quote can set basis: "selected-offer" to apply its fixed amount once per distinct selected offer in the group, independent of required quantity or purchase-unit count. Omitted basis defaults to checkout-group. Unselected offers incur no charge.

The 2026-09-08 Croatian quote applies the owner's EUR 3 delivery/customs allowance to each selected AliExpress offer for orders below EUR 150. This assumes one BOM offer per declared item and does not model split shipments or customs grouping. Croatian Customs guidance describes the duty per declared item. Other prices retain their earlier observation dates; this snapshot does not re-verify them. The earlier quote remains preserved.

The BAUHAUS shaft revision of the 2026-09-08 quote preserves those observations and adds the owner-selected EUR 6.95, VAT-inclusive 2000 mm steel rod. The later segmented-drum layout allocates three 340 mm passive shafts and one 660 mm powered shaft from the same rod, superseding four approximately 400 mm blanks. Local availability, cutting/finishing cost and BAUHAUS shipping remain unknown; the earlier snapshot is preserved.

capturedAt records when a quote snapshot was assembled. It does not claim that every price, availability state, or shipping charge was observed at that instant. Individual rows use observedAt: null until a defensible observation time is known, and the calculator reports the missing evidence as a completeness warning.

The current 2026-10-08 purchase quote preserves those earlier observations and records the owner's four Barton BA01090 pulleys at EUR 14.20 each, EUR 56.80 total, collected in store with zero delivery charge. The scenario now selects wasi-barton-30mm instead of the unresolved combined supplier offer. WASI purchase and shipping evidence keeps the separate WASI delivery tariff for future orders; it is not charged to this purchase.

The same quote records the owner's four Dive Store 50 m spools at EUR 18.38 each, EUR 73.52 goods, plus EUR 6.91 actual delivery to Zagreb, EUR 80.43 total. The goods price matches the earlier EUR 0.3676/m observation; delivery replaces the earlier EUR 6.25. Dive Store purchase evidence separates the confirmed total from supplier stock and the original purchase date, which remain unknown. VAT breakdowns were not supplied for either purchase. The earlier quotes remain preserved.

The 2026-10-08 coupling quote is now selected and records EUR 3.09 per piece and free Croatian delivery for the coupling. The dated sourcing note records the owner-confirmed EUR 16.12 actual delivered total for four couplings, with no additional VAT or customs added; the EUR 3.09 quoted unit price remains separate. The shared customs policy applies EUR 3 per item type per order from 2026-07-01, with no end date set, for order goods strictly below EUR 150. The estimate is EUR 12.36 goods plus EUR 3 conditional customs, EUR 15.36; the actual delivered purchase total is EUR 16.12. The owner confirmed EUR 3.76 actual import charges: EUR 12.36 goods + EUR 0 delivery + EUR 3.76 import charges = EUR 16.12. Actual delivered totals are displayed separately and are not summed with estimated customs. Customs is separate from delivery in the report. Basket goods must be known and below the threshold; unknown or larger baskets leave actual duty unresolved. One selected offer approximates one declared item type; no split orders are assumed. Free delivery is confirmed for the coupling only. Earlier snapshots preserve their combined allowance.

In-house fabrication offers retain an unknown full quote while a separate material estimate accounts for the plastic consumed. The current PETG Matte and bulk costing evidence records Bambu Lab's 10+ mixed eligible 1 kg filament-with-spool rates, densities, White/Black variants and component-specific print choices. Eligible PLA Basic, PETG Basic and PETG Matte use bulk prices; ASA remains at its evidenced single-spool price because it is absent from the eligible bulk selection. Refill, coupon and membership prices are excluded. The earlier single-spool record remains historical.

The calculator extends each chosen recipe by the required BOM quantity, preserves each component’s material and colour, then calculates solid volume in cm³ × density in g/cm³ × roll price / roll grams using exact decimal arithmetic. It applies each weight-based material cost once, including the separately owned funnel and nest within the shared dock offer. A quoted fabrication price supersedes its material allowance. Printed parts without procurement offers, such as the full cover, still receive an estimate. Optional/deferred prints remain outside the base subtotal.

The current weights are estimates of fully dense CAD plastic, not sliced or measured weights. Infill is not modeled by multiplying the entire mesh by a nominal infill percentage, which would incorrectly scale walls and skins. Supports, brims, purge, failed prints, filament shipping, Croatian checkout VAT adjustments, energy, machine time and labour remain unresolved. Changing print settings requires new slicer evidence; a material costing choice does not qualify it for physical use. Planned parts without geometry and machined metal parts retain unknown costs.

Reports expose estimatedMaterialSubtotal and estimatedPartialSubtotal alongside quoted goods and shipping. The website identifies estimated material amounts in each item row and assembly sum, and shows selected material/colour weights and PLA/PETG Basic/PETG Matte/ASA comparisons on included printed-item pages. completeLandedTotal remains unavailable. not-applicable in-house shipping describes the absence of a fabricated-part shipment; it does not make raw filament delivery or fabrication free.

Geometry evidence pins each STL checksum, model revision and the CAD source hashes. bom:generate and bom:check reject changed geometry until volumes are recaptured. To reproduce a release capture, download its cad-release.json, SHA256SUMS.txt and recipe STLs into an external directory and run:

python3 packages/arbi-bom/scripts/capture-print-volumes.py /path/to/cad-release-assets
pnpm bom:generate
pnpm bom:check

The capture script verifies source and release/STL checksums, closed consistently oriented mesh edges and positive signed volume before updating canonical evidence. It commits no generated meshes. The recipe lists select installed variants explicitly rather than totaling every linked fabrication source.

Release reuse pins the registry and every transitive include/use dependency of the costed fabrication entrypoints. A changed purchased-part visualization does not invalidate unchanged print volumes. Changed print identities, shared dependencies, missing release dependencies and altered mesh/source checksums still reject reuse; registry metadata changes require comparison with the checksum-verified original registry in the release source archive.

The capture tool and its independent mesh-volume tests use Python 3's standard library. Package tests include ASCII/binary volume-unit and invalid-mesh controls alongside the TypeScript costing regressions.

For changed CAD awaiting a release, omit the directory argument to export the current recipes with the registry-pinned OpenSCAD version. This uses temporary meshes, checks source hashes before/after export and records local evidence with releaseTag: null; sourceCommit is the base commit, while source hashes identify the exact geometry. The website compiler also rejects stale geometry evidence.

Local exports default to 120 seconds per mesh. On a slower host, pass --export-timeout-seconds 480 to allow a bounded longer export without changing the pinned OpenSCAD version, mesh checks or source-provenance checks.

Reports

System pages expand costed print kits into model IDs, copy quantities, material assignments and individual consumption estimates. Component amounts retain four decimal places; material-group and kit totals retain their existing cent rounding. CAD file counts also include assembly references, alternatives and test pieces, so they are not physical quantities or expected BOM row counts.

The compact pod now owns explicit fastener and internal-wiring sets; the cabinet owns mounting/termination and protection/stop-interface sets for the previously unmapped layout reserves. Their required quantities are one set per assembly. Exact kit requirements are in the catalog; unresolved products and quotes remain visible as missing prices. Reconcile OEM accessories and shared procurement stock before ordering. Optional head and stand print sets carry ASA consumption estimates as costing assumptions only; machined metal and full fabrication costs remain unknown. This does not resolve the report's completeness warnings.

Delivery tracking

Order and receipt log records orders, incoming items, and actual deliveries confirmed by the owner, using the stable offer IDs from catalog/offers.json. Keep actual ordered/received quantities and confirmation dates separate from calculated purchase quantities; leave unspecified quantities unknown. Items absent from the log have no recorded order or receipt status. These records do not change offer qualification or establish inspection, testing, or installation status.

The receipt log is maintained manually and is not consumed by the BOM calculator or generated reports.

generated/arbi-v1-hr-zagreb.json is the deterministic machine-readable result. generated/arbi-v1-hr-zagreb.md is the GitHub-readable report.

The current report is intentionally incomplete. It exposes a known partial subtotal but leaves the complete landed total unavailable while package rules, prices, tax treatment, shipping, availability, and qualification remain unresolved. The partial subtotal must not be presented as the project cost.

Bundle goods for countable components (each) are allocated in proportion to the quantity of each part in the purchased bundle, including surplus. For example, a kit with four motors, four drivers, four cables and two power supplies assigns 4/14 of its goods cost to each four-piece line and 2/14 to the power supplies. These are accounting shares, not individual supplier prices. Exact cent allocation uses largest remainders with part ID as the tie-breaker, so shares sum to the quoted bundle amount. Each part's share is then allocated across its owners by required quantity. Reports and the website display those shares and include them in assembly goods totals without counting the bundle again.

Unknown bundle prices remain unknown. Costs for unselected bundle contents and bundles whose contents are not all countable components remain in the shared bundle bucket. Checkout shipping stays separate from physical-assembly goods.

The file calculator supports deterministic pinned selection and honest incomplete reporting. Cheapest-compliant selection, quote-staleness optimization, lead-time planning, and interactive destination comparison are future website capabilities, not current CLI claims.

Commands

Run from the repository root:

pnpm --filter @arbi/bom build
pnpm --filter @arbi/bom lint
pnpm --filter @arbi/bom typecheck
pnpm --filter @arbi/bom test
pnpm --filter @arbi/bom generate
pnpm --filter @arbi/bom check

generate validates every canonical input against the committed JSON Schemas, applies cross-file engineering validation, and writes tracked <scenario-id>.json and <scenario-id>.md reports for every scenario. check performs the same validation, calculates every expected report without modifying files, and fails when a tracked artifact is missing or stale. Pass a scenario ID after either command to operate on one scenario explicitly.

Contribution workflow

  1. Change canonical inputs, never generated reports.
  2. Preserve stable IDs; change display names without renaming IDs.
  3. Add alternative suppliers as new offers rather than overwriting existing observations.
  4. Record package contents, minimum, increment, observed price, currency, destination, tax treatment, checkout group, and observation date. Use null for unknown.
  5. Reserve approved for an evidence-backed engineering qualification.
  6. Add complex physical subassemblies under one of the five roots with parentAssemblyId; keep shared-procurement-stock outside the physical hierarchy.
  7. Run package tests and generate, then commit both canonical inputs and generated changes.
  8. Treat calculation, OpenSCAD compilation, procurement, installation, and physical safety validation as separate evidence.