SKILL.md

 1---
 2name: shape
 3description: "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written."
 4argument-hint: "[feature to shape]"
 5user-invocable: true
 6---
 7
 8## MANDATORY PREPARATION
 9
10Invoke {{command_prefix}}impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}impeccable teach first.
11
12---
13
14Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork.
15
16**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good.
17
18**Output**: A design brief that can be handed off to {{command_prefix}}impeccable craft, {{command_prefix}}impeccable, or any other implementation skill.
19
20## Philosophy
21
22Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise.
23
24## Phase 1: Discovery Interview
25
26**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later.
27
28Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. {{ask_instruction}}
29
30### Purpose & Context
31- What is this feature for? What problem does it solve?
32- Who specifically will use it? (Not "users"; be specific: role, context, frequency)
33- What does success look like? How will you know this feature is working?
34- What's the user's state of mind when they reach this feature? (Rushed? Exploring? Anxious? Focused?)
35
36### Content & Data
37- What content or data does this feature display or collect?
38- What are the realistic ranges? (Minimum, typical, maximum, e.g., 0 items, 5 items, 500 items)
39- What are the edge cases? (Empty state, error state, first-time use, power user)
40- Is any content dynamic? What changes and how often?
41
42### Design Goals
43- What's the single most important thing a user should do or understand here?
44- What should this feel like? (Fast/efficient? Calm/trustworthy? Fun/playful? Premium/refined?)
45- Are there existing patterns in the product this should be consistent with?
46- Are there specific examples (inside or outside the product) that capture what you're going for?
47
48### Constraints
49- Are there technical constraints? (Framework, performance budget, browser support)
50- Are there content constraints? (Localization, dynamic text length, user-generated content)
51- Mobile/responsive requirements?
52- Accessibility requirements beyond WCAG AA?
53
54### Anti-Goals
55- What should this NOT be? What would be a wrong direction?
56- What's the biggest risk of getting this wrong?
57
58## Phase 2: Design Brief
59
60After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete.
61
62### Brief Structure
63
64**1. Feature Summary** (2-3 sentences)
65What this is, who it's for, what it needs to accomplish.
66
67**2. Primary User Action**
68The single most important thing a user should do or understand here.
69
70**3. Design Direction**
71How this should feel. What aesthetic approach fits. Reference the project's design context from `.impeccable.md` and explain how this feature should express it.
72
73**4. Layout Strategy**
74High-level spatial approach: what gets emphasis, what's secondary, how information flows. Describe the visual hierarchy and rhythm, not specific CSS.
75
76**5. Key States**
77List every state the feature needs: default, empty, loading, error, success, edge cases. For each, note what the user needs to see and feel.
78
79**6. Interaction Model**
80How users interact with this feature. What happens on click, hover, scroll? What feedback do they get? What's the flow from entry to completion?
81
82**7. Content Requirements**
83What copy, labels, empty state messages, error messages, and microcopy are needed. Note any dynamic content and its realistic ranges.
84
85**8. Recommended References**
86Based on the brief, list which impeccable reference files would be most valuable during implementation (e.g., spatial-design.md for complex layouts, motion-design.md for animated features, interaction-design.md for form-heavy features).
87
88**9. Open Questions**
89Anything unresolved that the implementer should resolve during build.
90
91---
92
93{{ask_instruction}} Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions.
94
95Once confirmed, the brief is complete. The user can now hand it to {{command_prefix}}impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use {{command_prefix}}impeccable craft instead, which runs this skill internally.)