| name | generate-budget-approximation |
| description | Estimate the total cost of a project's BOM. Reads bom.json from a project, applies typical price ranges per vendor (informed by the user's preferred suppliers and location), and produces low/mid/high cost envelopes plus shipping considerations. |
Generate Budget Approximation
Produce a cost estimate for a project's BOM.
Inputs
- Project slug (or path). Read
<projects_dir>/<slug>/bom.json.
- User profile — preferred vendors, location, currency.
research.md if present — use its dated live prices for matching lines instead of estimating.
Method
For each BOM line:
- Identify 1–3 likely vendors based on the part type and the user's preferred vendors (e.g. ESP32 dev boards from AliExpress for cost or Adafruit for premium; precision sensors from Mouser/DigiKey).
- Estimate a price band (low / typical / high) based on current market knowledge. Be explicit that these are approximations and may be stale — flag any line with high price volatility.
- Apply a shipping/customs uplift appropriate to the user's location (e.g. import VAT for EU, customs thresholds for Israel, free-shipping minimums for US Prime/AliExpress Choice).
Output
Update or create <projects_dir>/<slug>/budget.md with:
- A table per vendor strategy (e.g. "All-AliExpress", "Mixed: AliExpress + DigiKey for precision parts", "Premium: Adafruit/SparkFun").
- Subtotals, shipping uplift, total range (low/mid/high).
- Assumptions and caveats (currency, date of estimate, parts flagged as volatile).
- Suggestion of which strategy best fits the user's stated budget posture.
Recommend suggest-sourcing-options next to firm up actual vendor links.