Create a high-fidelity design specification for complex UI features
From product-playbook-for-agentic-codingnpx claudepluginhub daviswhitehead/product-playbook-for-agentic-coding-plugin --plugin product-playbook-for-agentic-coding[optional: project name or feature]workflows/You are facilitating an optional Design Spec step that can be used in any phase when UX clarity will reduce implementation risk. Adopt the perspective of a Product Designer as the lead.
This workflow is optional. Not all projects require a design critique or a design spec. Only run this when:
Help the user produce a high-fidelity, engineer-executable design spec that enables junior engineers (including agentic engineers) to build a pixel-accurate implementation with minimal ambiguity.
Before proceeding, inventory available tools:
/playbook:* commands (tech-plan, tasks, work)Select the most appropriate tools for the task at hand.
/playbook:design-critique (optional)/playbook:design-system (recommended for Stitch prompt generation)Ask:
If the user says a design spec is not needed, stop here and proceed to the next appropriate workflow (e.g., /playbook:tech-plan).
projects/[project-name]/.agent-reply-states.png, composer-states.png).(Optional) If images are huge and hard to view in tooling, suggest exporting a smaller JPG alongside the original PNG.
resources/templates/projects/[project-name]/design-spec.mdWrite the spec as if a junior engineer will implement it without further explanation:
End the draft with a short "Open Decisions" list. Ask the user to resolve them. Update the spec accordingly.
Confirm the doc has:
This step generates structured prompts for Stitch MCP screen generation. It is optional and only runs when Stitch MCP is available.
Gate: Check for Stitch MCP availability
Use ToolSearch to search for "stitch". If Stitch MCP tools are not found, skip this step entirely and note:
Stitch MCP not available — skipping prompt generation. To enable this step, install the Stitch MCP plugin and re-run
/playbook:design-spec.
Gate: Check for DESIGN.md prerequisite
Look for a DESIGN.md file in the project root or docs/ directory. If not found:
DESIGN.md not found. Run
/playbook:design-systemfirst to generate your design system reference, then re-run this step. DESIGN.md provides the token definitions, component inventory, and spacing scale that Stitch needs for consistent screen generation.
If DESIGN.md exists, load the stitch-integration skill via Skill tool for prompt construction rules.
Prompt Generation Process
For each screen defined in the design spec:
Rules:
[P1] critical path, [P2] important, [P3] nice-to-havePrompt Template:
## [Screen Name] [P1/P2/P3]
**Purpose**: [One sentence: what does this screen do and what user goal does it serve?]
**DESIGN SYSTEM**:
[Paste relevant DESIGN.md sections — tokens, colors, typography, spacing]
**Components**:
- [Component name]: [UI/UX term] — [brief behavioral note]
- [Component name]: [UI/UX term] — [brief behavioral note]
**Layout**:
- Viewport: [desktop 1440x900 | mobile 375x812]
- [Grid/structure description with explicit dimensions]
- [Spacing values between sections]
**Styling**: [2-3 mood adjectives, e.g., "warm, approachable, and clean"]
**States**: [List key states if interactive: default, hover, active, disabled, loading, error]
**Dark mode**: [Yes — include variant | No — light only]
Save prompts to: projects/[project-name]/design-spec-prompts.md
Include a header in the output file:
# Design Spec Prompts — [Project Name]
Generated from: `projects/[project-name]/design-spec.md`
Design system: `DESIGN.md`
Date: [current date]
> These prompts are structured for Stitch MCP screen generation.
> Use `/playbook:mockups` to batch-generate screens from these prompts.
After the design spec:
/playbook:mockups to batch-generate screens/playbook:tech-plan/playbook:tasks/playbook:work