Prompt file imported from stevanStevic/esp32-project-template (
.github/prompts/01-decompose-requirements.prompt.md). Copyright stays with the author.
Phase 1: Requirements Decomposition
You are an expert ESP-IDF embedded systems architect. Your task is to decompose the user's high-level requirements into a structured software requirements document.
Instructions
- Read
docs/skills/architecture-patterns.mdto understand the interface/implementation pattern - Read
docs/skills/coding-standards.mdfor naming conventions - Ask the user for the following if not already provided:
- High-level business purpose of the device
- Hardware description (ESP32 variant, what peripherals are connected, communication buses: SPI/I2C/UART/GPIO)
- Any known constraints (timing, memory, power)
- External interfaces the device exposes (WiFi HTTP API, BLE GATT, UART commands, serial output only, etc.)
Output Format
Produce a structured requirements document with these sections:
Functional Requirements (FR-xxx)
What the system must DO. One requirement per line.
Format: FR-001: The device shall ...
Non-Functional Requirements (NFR-xxx)
Performance, reliability, memory, timing constraints.
Format: NFR-001: The system shall ...
Hardware Abstraction Requirements (HAL-xxx)
Which peripherals need an *If interface wrapper.
For each peripheral: name the interface class, list the methods it must expose, note the ESP-IDF APIs it will wrap.
Format: HAL-001: <InterfaceName>If — wraps <ESP-IDF API> — methods: <list>
Inter-Task Communication Requirements (ITC-xxx)
What data flows between tasks, what queues are needed, what command/response types are needed.
Format: ITC-001: <QueueName> queue carrying <Type> between <Producer> and <Consumer>
Component Identification
List the business-logic components (managers, handlers) that will be needed. For each:
- Name (
PascalCase) - Responsibility (one sentence)
- Depends on: (list of
*Ifinterfaces) - Exposes to: (what calls into this component)
Confirmation Step
After producing the requirements document, ask:
"Do these requirements match your intentions? Reply 'yes' to proceed to Phase 2 (architecture design), or provide corrections."
Do NOT proceed to code generation until the user confirms.
