Packs / manufacturing-public
bom-rollup
Generate a flattened bill of materials with total quantities and cost from an assembly tree
Install
logicpacks pack use manufacturing-public/bom-rollupget_pack manufacturing-public/bom-rollupThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
local-python - Checks: 3 in
outcome/checks.yaml - Code:
bom.py - Tools: python3
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
A flat BOM CSV (part, description, total qty, unit cost, extended cost) rolled up from a multi-level assembly CSV, plus a grand total.
Verified by: Totals on a fixture tree match hand-computed values; cycles are rejected.
Steps
- Export the assembly structure as parent,child,qty and the parts master as part,description,unit_cost.
- Run
python3 code/bom.py assembly.csv parts.csv TOP-LEVEL-PART --units 10 > bom.csv. - Review parts with missing cost (flagged) and the grand total line.
Edge cases
- Cycles in the tree (A contains B contains A) must stop with an error.
- Phantom/sub-assemblies have no cost of their own: only leaves are costed.
- Units of measure must match between assembly and parts master.
Don'ts
- Don't hand-edit totals; fix the source CSVs and re-run.
- Don't mix revisions of the assembly in one run.