| name | create-hardware-spec |
| description | Build a structured hardware specification and BOM for a project. Walks the user through goals, constraints, and functional requirements, then produces a markdown spec plus a structured BOM (parts, quantities, rationale) saved into the project directory. |
Create Hardware Spec
Produce a written specification and BOM for a single hardware project.
Inputs
Read $CLAUDE_USER_DATA/hardware-spec-assembly/config.json for the user's profile and projects_dir. If missing, prompt to run onboard first.
Flow
If <projects_dir>/<slug>/research.md exists (from research-components), seed part candidates and prices from it instead of asking from scratch.
- Project name — kebab-case slug, used as the directory name under
projects_dir.
- One-line summary.
- Goals & non-goals — what the build must do; what's explicitly out of scope.
- Functional requirements — sensors, actuators, connectivity (Wi-Fi / BLE / LoRa / wired), power source, enclosure constraints, target environment (indoor/outdoor/humid/etc.).
- MCU choice — default to ESP32 family; pick a specific variant (ESP32-WROOM-32, ESP32-S3, ESP32-C3, ESP32-C6) with a one-line rationale tied to the requirements (e.g. "S3 for USB-native + more RAM for camera buffer").
- Peripherals & modules — for each, capture: function, candidate part(s), interface (I2C/SPI/UART/GPIO/PWM/ADC), voltage, current draw, qty, optional alternatives.
- Power budget — sum estimated current draw, choose regulator/battery/PSU accordingly.
- Mechanical — enclosure, mounts, fasteners; flag if
suggest-3d-printables should run after.
- Open questions — explicit list of things the user still needs to decide.
Output
Create <projects_dir>/<project-slug>/:
spec.md — full written spec following the structure above.
bom.json — machine-readable BOM:
{
"project": "<slug>",
"currency": "USD",
"items": [
{
"ref": "U1",
"category": "mcu",
"part": "ESP32-S3-DevKitC-1",
"qty": 1,
"interface": "USB-C",
"notes": "Main controller",
"alternatives": ["ESP32-WROOM-32"]
}
]
}
bom.md — human-readable table view of the same BOM.
After
Recommend the user run compatibility-check, then generate-budget-approximation and suggest-sourcing-options. If part choices are still speculative, recommend research-components first to ground them in live listings.