Interviews the user section by section to collaboratively produce design documents. Use when creating a design doc, starting feature design, or when the user invokes the design command.
Interview the user section by section to produce a design document.
IMPORTANT: Write the current state to design-docs/ after each section.
Adapt the interview to feature complexity.
design-docs/NNN-short-kebab-title.md — NNN is zero-padded (e.g. 001, 002)design-docs/, take highest number, increment. Empty folder → start at 001For each section:
If the user answers something that belongs to a later section, acknowledge it and say you'll add it when you reach that section.
Ask: What problem are we solving? Why does this feature matter?
Ask: What is explicitly out of scope? What might people assume is included but is not?
Ask: Describe the user-visible behavior. What does the user see, click, or experience? Walk through the scenarios step by step.
Format as a bullet list of concrete, observable behaviors.
Ask: How should this be implemented at a high level? What components, services, or data structures are involved?
Produce a Mermaid flowchart of key components and interactions.
Legend:
methodName({param1: Type1}): ReturnType[input1: Type1] = Angular inputs(output1: Type1) = Angular outputs<br> in labels to avoid truncationShow diagram to user and ask for corrections.
Ask: Any algorithms, edge cases, or conventions? Leave empty if nothing to add.
Ask: For each component or unit from the design, what behaviors are important to test?
Format: grouped by component/unit, each scenario with a descriptive name and arrange/act/assert steps.
Example:
## Cart component
### Displays cart items:
- Arrange fake cart repository to return 3 items: keyboard, mouse, monitor.
- Mount `Cart` component.
- Assert 3 items displayed with labels: "Keyboard", "Mouse", "Monitor".
Propose ordered, incremental PRs that:
Rules:
Include a Mermaid flowchart of PR dependencies. List each PR with a short description. Ask for feedback.
Ask: Did we consider other approaches? Why were they rejected?
Ask: Anything else — open questions, risks, future ideas? Leave empty if nothing.
Assemble the full doc from the template below, write to the output file, show the user the path.
# Goals
{goals}
# Non-Goals
{non_goals}
# Desired Behavior
{desired_behavior}
# Design
{design}
## Diagram
```mermaid
{diagram}
```
## Implementation Details
{implementation_details}
# Testing Strategy
{testing_strategy}
# PR Plan
```mermaid
{pr_dependency_diagram}
```
{pr_details}
# Alternatives Considered
{alternatives}
# Kitchen Sink
{kitchen_sink}