| name | check-onhand-coverage |
| description | Diff a project's BOM against the user's local on-hand inventory (the free-form list captured during onboarding). Reports which parts are already available, which need to be ordered, and which have plausible substitutes on hand. |
Check On-Hand Coverage
Lightweight local inventory check — uses the inventory captured during onboard (free-form text or local file). For MCP-backed live inventory, use check-inventory instead.
Inputs
- Project slug →
bom.json.
inventory_source from config.json. If type is file, read it. If type is mcp, defer to check-inventory. If none, prompt the user to update onboarding.
Matching strategy
For each BOM line:
- Exact match — same part number / module name.
- Functional substitute — different part, same role (e.g. BOM wants BME280, user has BMP280; flag as "substitute, no humidity").
- No match — must be sourced.
Substitutes are suggestions, not silent swaps. Flag every substitute so the user can decide whether the trade-off is acceptable.
Output
Write <projects_dir>/<slug>/coverage.md:
- Have (exact match) — qty available vs. qty needed.
- Have (substitute) — with trade-off note.
- Need to order — feeds directly into
suggest-sourcing-options.
Print a one-line summary to the conversation: "X of Y parts on hand; Z need ordering."