design-protocol 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +225 -0
- package/agents/dp-researcher.md +239 -0
- package/agents/dp-verifier.md +207 -0
- package/bin/install.js +464 -0
- package/commands/dp-back.md +221 -0
- package/commands/dp-discuss.md +257 -0
- package/commands/dp-execute.md +513 -0
- package/commands/dp-journey.md +85 -0
- package/commands/dp-progress.md +178 -0
- package/commands/dp-roadmap.md +83 -0
- package/commands/dp-skip.md +186 -0
- package/commands/dp-start.md +510 -0
- package/commands/dp-storytell.md +94 -0
- package/commands/dp-verify.md +207 -0
- package/package.json +59 -0
- package/skills/dp-color/SKILL.md +214 -0
- package/skills/dp-color/export_tokens.py +297 -0
- package/skills/dp-color/references/apca-contrast.md +87 -0
- package/skills/dp-color/references/hue-emotions.md +109 -0
- package/skills/dp-color/references/oklch-gamut.md +79 -0
- package/skills/dp-color/references/pitfalls.md +171 -0
- package/skills/dp-color/references/scale-patterns.md +206 -0
- package/skills/dp-color/references/tool-workflows.md +200 -0
- package/skills/dp-discovery/SKILL.md +480 -0
- package/skills/dp-eng_review/SKILL.md +471 -0
- package/skills/dp-eng_review/references/code-review-checklist.md +385 -0
- package/skills/dp-eng_review/references/react-patterns.md +512 -0
- package/skills/dp-eng_review/references/shadcn-patterns.md +510 -0
- package/skills/dp-eng_review/references/tailwind-conventions.md +351 -0
- package/skills/dp-journey/SKILL.md +682 -0
- package/skills/dp-journey/references/journey-types.md +97 -0
- package/skills/dp-journey/references/map-structures.md +177 -0
- package/skills/dp-journey/references/omnichannel-patterns.md +208 -0
- package/skills/dp-journey/references/research-methods.md +125 -0
- package/skills/dp-prd/SKILL.md +201 -0
- package/skills/dp-prd/references/claude-code-spec.md +107 -0
- package/skills/dp-prd/references/interview-questions.md +158 -0
- package/skills/dp-prd/references/section-templates.md +231 -0
- package/skills/dp-research/SKILL.md +540 -0
- package/skills/dp-research/references/facilitation-guide.md +291 -0
- package/skills/dp-research/references/interview-guide-template.md +190 -0
- package/skills/dp-research/references/method-selection.md +195 -0
- package/skills/dp-research/references/question-writing.md +244 -0
- package/skills/dp-research/references/research-report-template.md +363 -0
- package/skills/dp-research/references/synthesis-methods.md +289 -0
- package/skills/dp-research/references/usability-test-template.md +260 -0
- package/skills/dp-roadmap/SKILL.md +648 -0
- package/skills/dp-roadmap/references/prioritization-frameworks.md +312 -0
- package/skills/dp-roadmap/references/roadmap-structures.md +179 -0
- package/skills/dp-roadmap/references/roadmap-workshops.md +264 -0
- package/skills/dp-roadmap/references/theme-development.md +168 -0
- package/skills/dp-storytell/SKILL.md +645 -0
- package/skills/dp-storytell/references/audience-playbooks.md +260 -0
- package/skills/dp-storytell/references/content-type-templates.md +310 -0
- package/skills/dp-storytell/references/delivery-tactics.md +228 -0
- package/skills/dp-storytell/references/narrative-frameworks.md +259 -0
- package/skills/dp-ui/SKILL.md +503 -0
- package/skills/dp-ui/references/b2b-enterprise-patterns.md +319 -0
- package/skills/dp-ui/references/data-visualization.md +304 -0
- package/skills/dp-ui/references/visual-design-principles.md +237 -0
- package/skills/dp-ux/SKILL.md +414 -0
- package/skills/dp-ux/references/accessibility-checklist.md +128 -0
- package/skills/dp-ux/references/product-excellence.md +149 -0
- package/skills/dp-ux/references/usability-principles.md +140 -0
- package/skills/dp-ux/references/ux-patterns.md +221 -0
- package/templates/config.json +55 -0
- package/templates/context.md +96 -0
- package/templates/project.md +83 -0
- package/templates/requirements.md +137 -0
- package/templates/roadmap.md +168 -0
- package/templates/state.md +107 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
# Visual Design Principles
|
|
2
|
+
|
|
3
|
+
The foundational rules behind polished, professional interfaces.
|
|
4
|
+
|
|
5
|
+
## Grid Systems
|
|
6
|
+
|
|
7
|
+
### The 8px Grid
|
|
8
|
+
All spacing, sizing, and positioning should use multiples of 8px:
|
|
9
|
+
- **4px** — Fine adjustments only (icon padding, border radius)
|
|
10
|
+
- **8px** — Minimum spacing unit
|
|
11
|
+
- **16px** — Common element padding
|
|
12
|
+
- **24px** — Section spacing
|
|
13
|
+
- **32px** — Major section breaks
|
|
14
|
+
- **48px, 64px** — Large spacing, hero areas
|
|
15
|
+
|
|
16
|
+
**Why 8px?** Divisible by 2 and 4, scales well, aligns with common screen sizes.
|
|
17
|
+
|
|
18
|
+
### Column Grids
|
|
19
|
+
```
|
|
20
|
+
┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐
|
|
21
|
+
│1 │2 │3 │4 │5 │6 │7 │8 │9 │10│11│12│ ← 12-column grid
|
|
22
|
+
└──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
|
|
23
|
+
```
|
|
24
|
+
- **12 columns** — Most flexible (divisible by 2, 3, 4, 6)
|
|
25
|
+
- **Gutters** — 16px (compact), 24px (standard), 32px (spacious)
|
|
26
|
+
- **Margins** — Consistent left/right page margins (16-64px depending on viewport)
|
|
27
|
+
|
|
28
|
+
### Responsive Breakpoints
|
|
29
|
+
```
|
|
30
|
+
Mobile: 320px - 767px (1-4 columns)
|
|
31
|
+
Tablet: 768px - 1023px (6-8 columns)
|
|
32
|
+
Desktop: 1024px - 1439px (12 columns)
|
|
33
|
+
Large: 1440px+ (12 columns, max-width container)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Visual Hierarchy
|
|
37
|
+
|
|
38
|
+
### Size Scale
|
|
39
|
+
Establish a type scale with clear hierarchy:
|
|
40
|
+
```
|
|
41
|
+
Display: 32-48px — Hero headlines
|
|
42
|
+
H1: 24-32px — Page titles
|
|
43
|
+
H2: 20-24px — Section headers
|
|
44
|
+
H3: 16-18px — Subsection headers
|
|
45
|
+
Body: 14-16px — Primary content
|
|
46
|
+
Caption: 12-13px — Secondary info, metadata
|
|
47
|
+
Micro: 10-11px — Badges, labels (use sparingly)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Weight Hierarchy
|
|
51
|
+
- **Bold (600-700)** — Headlines, emphasis, primary labels
|
|
52
|
+
- **Medium (500)** — Subheadings, interactive elements
|
|
53
|
+
- **Regular (400)** — Body text, secondary content
|
|
54
|
+
- **Light (300)** — Use rarely, only for large display text
|
|
55
|
+
|
|
56
|
+
### Creating Hierarchy
|
|
57
|
+
```
|
|
58
|
+
┌─────────────────────────────────────┐
|
|
59
|
+
│ MOST IMPORTANT │ ← Largest, boldest, highest contrast
|
|
60
|
+
│ │
|
|
61
|
+
│ Secondary Information │ ← Medium size, regular weight
|
|
62
|
+
│ │
|
|
63
|
+
│ Supporting details and metadata │ ← Smaller, lighter, lower contrast
|
|
64
|
+
└─────────────────────────────────────┘
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**The Squint Test**: Blur your vision — can you still identify what's most important?
|
|
68
|
+
|
|
69
|
+
## Gestalt Principles
|
|
70
|
+
|
|
71
|
+
### Proximity
|
|
72
|
+
Items close together are perceived as related.
|
|
73
|
+
```
|
|
74
|
+
Good: Bad:
|
|
75
|
+
┌────────┐ ┌────────┐ ┌────────┐
|
|
76
|
+
│ Name │ │ Email │ │ Name │
|
|
77
|
+
│ [____] │ │ [____] │ │ [____] │
|
|
78
|
+
└────────┘ └────────┘ │ │
|
|
79
|
+
│ Email │
|
|
80
|
+
┌────────┐ ┌────────┐ │ [____] │
|
|
81
|
+
│ City │ │ Zip │ │ │
|
|
82
|
+
│ [____] │ │ [____] │ │ City │
|
|
83
|
+
└────────┘ └────────┘ └────────┘
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Similarity
|
|
87
|
+
Similar-looking elements are perceived as related.
|
|
88
|
+
- Same color = same category/type
|
|
89
|
+
- Same shape = same function
|
|
90
|
+
- Same size = same importance
|
|
91
|
+
|
|
92
|
+
### Continuity
|
|
93
|
+
Eyes follow lines, edges, and curves.
|
|
94
|
+
- Align elements to create visual flow
|
|
95
|
+
- Use consistent left edges for forms
|
|
96
|
+
- Horizontal rules guide scanning
|
|
97
|
+
|
|
98
|
+
### Closure
|
|
99
|
+
The mind completes incomplete shapes.
|
|
100
|
+
- Progress indicators don't need full circles
|
|
101
|
+
- Icons can be simplified/abstracted
|
|
102
|
+
- Negative space can define shapes
|
|
103
|
+
|
|
104
|
+
### Figure/Ground
|
|
105
|
+
Clear separation between content (figure) and background (ground).
|
|
106
|
+
- Sufficient contrast between layers
|
|
107
|
+
- Cards/panels create figure separation
|
|
108
|
+
- Shadows establish depth hierarchy
|
|
109
|
+
|
|
110
|
+
## Typography
|
|
111
|
+
|
|
112
|
+
### Font Pairing
|
|
113
|
+
- **One family** often enough — Use weight/size for variation
|
|
114
|
+
- **Two families max** — Display + body (e.g., serif headlines + sans body)
|
|
115
|
+
- **Contrast is key** — If pairing, make them clearly different
|
|
116
|
+
|
|
117
|
+
### Line Length
|
|
118
|
+
- **Optimal**: 50-75 characters per line
|
|
119
|
+
- **Minimum**: 45 characters
|
|
120
|
+
- **Maximum**: 90 characters
|
|
121
|
+
- Too wide = hard to track back to next line
|
|
122
|
+
- Too narrow = choppy, awkward breaks
|
|
123
|
+
|
|
124
|
+
### Line Height
|
|
125
|
+
- **Body text**: 1.4-1.6 (150% is safe default)
|
|
126
|
+
- **Headlines**: 1.1-1.3 (tighter for large text)
|
|
127
|
+
- **Dense UI**: 1.3-1.4 (tables, lists)
|
|
128
|
+
|
|
129
|
+
### Letter Spacing
|
|
130
|
+
- **Body**: 0 (default)
|
|
131
|
+
- **Headlines**: -0.5 to -2% (slightly tighter)
|
|
132
|
+
- **ALL CAPS**: +2 to +5% (more spacing needed)
|
|
133
|
+
- **Small text**: +1 to +2% (improves legibility)
|
|
134
|
+
|
|
135
|
+
## Color Theory
|
|
136
|
+
|
|
137
|
+
### Color Roles
|
|
138
|
+
```
|
|
139
|
+
Primary: Brand color, primary actions
|
|
140
|
+
Secondary: Supporting actions, accents
|
|
141
|
+
Neutral: Text, borders, backgrounds (gray scale)
|
|
142
|
+
Success: Confirmations, positive states (green)
|
|
143
|
+
Warning: Caution, attention needed (yellow/orange)
|
|
144
|
+
Error: Problems, destructive actions (red)
|
|
145
|
+
Info: Informational states (blue)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Color Application
|
|
149
|
+
- **60-30-10 Rule**: 60% dominant, 30% secondary, 10% accent
|
|
150
|
+
- **Backgrounds**: Neutral, low saturation
|
|
151
|
+
- **Text**: High contrast against background
|
|
152
|
+
- **Interactive**: Consistent color for clickable elements
|
|
153
|
+
- **Status**: Reserved colors for semantic meaning
|
|
154
|
+
|
|
155
|
+
### Creating Depth
|
|
156
|
+
```
|
|
157
|
+
Background layers (light theme):
|
|
158
|
+
Layer 0: #FFFFFF (white) — Base
|
|
159
|
+
Layer 1: #F9FAFB (gray-50) — Subtle sections
|
|
160
|
+
Layer 2: #F3F4F6 (gray-100) — Cards, panels
|
|
161
|
+
Layer 3: #E5E7EB (gray-200) — Hover states
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Dark Mode Considerations
|
|
165
|
+
- Don't just invert — redesign surfaces
|
|
166
|
+
- Reduce contrast slightly (not pure white on black)
|
|
167
|
+
- Desaturate colors slightly
|
|
168
|
+
- Shadows become less visible — use borders instead
|
|
169
|
+
- Elevation through lighter surfaces, not shadows
|
|
170
|
+
|
|
171
|
+
## Alignment & Consistency
|
|
172
|
+
|
|
173
|
+
### The Alignment Principle
|
|
174
|
+
**Everything should align to something.**
|
|
175
|
+
- Create invisible lines that elements follow
|
|
176
|
+
- Left-align most content (for LTR languages)
|
|
177
|
+
- Center only for short, focused content
|
|
178
|
+
- Right-align numbers in columns
|
|
179
|
+
|
|
180
|
+
### Consistency Rules
|
|
181
|
+
- Same spacing for same relationships
|
|
182
|
+
- Same size for same importance level
|
|
183
|
+
- Same color for same meaning
|
|
184
|
+
- Same component for same function
|
|
185
|
+
- If breaking consistency, do it dramatically (not subtly)
|
|
186
|
+
|
|
187
|
+
## Motion & Interaction
|
|
188
|
+
|
|
189
|
+
### Timing Guidelines
|
|
190
|
+
- **Instant (0-100ms)**: Hovers, micro-interactions.
|
|
191
|
+
- **Fast (200-300ms)**: Dropdowns, toggles, small transitions.
|
|
192
|
+
- **Natural (300-500ms)**: Page transitions, large movements.
|
|
193
|
+
|
|
194
|
+
### Easing
|
|
195
|
+
- **Ease-out (Decelerate)**: Elements entering view (feels natural).
|
|
196
|
+
- **Ease-in (Accelerate)**: Elements exiting view.
|
|
197
|
+
- **Linear**: Loaders and color changes only.
|
|
198
|
+
|
|
199
|
+
## Elevation & Depth
|
|
200
|
+
|
|
201
|
+
### Shadow Scale
|
|
202
|
+
- **Level 1 (Pressed/Low)**: `0 1px 2px rgba(0,0,0,0.05)` — Cards, controls
|
|
203
|
+
- **Level 2 (Dropdowns)**: `0 4px 6px -1px rgba(0,0,0,0.1)` — Popovers
|
|
204
|
+
- **Level 3 (Sticky)**: `0 10px 15px -3px rgba(0,0,0,0.1)` — Header, dock
|
|
205
|
+
- **Level 4 (Modal)**: `0 20px 25px -5px rgba(0,0,0,0.1)` — Dialogs, drawers
|
|
206
|
+
|
|
207
|
+
### Z-Index Layers
|
|
208
|
+
- **0-99**: Content layers
|
|
209
|
+
- **100-199**: Navigation (Sticky headers)
|
|
210
|
+
- **200-299**: Dropdowns & Popovers
|
|
211
|
+
- **300-399**: Overlays (Backdrops)
|
|
212
|
+
- **400-499**: Modals
|
|
213
|
+
- **500+**: Toasts and Tooltips
|
|
214
|
+
|
|
215
|
+
## Accessibility Standards
|
|
216
|
+
|
|
217
|
+
### WCAG AA Compliance
|
|
218
|
+
- **Comparison**: 4.5:1 ratio for normal text, 3:1 for large text.
|
|
219
|
+
- **UI Elements**: 3:1 contrast for borders on inputs/buttons.
|
|
220
|
+
- **Focus Indicators**: Visible outline (2px recommended) for keyboard navigation.
|
|
221
|
+
|
|
222
|
+
### Semantic Structure
|
|
223
|
+
- Use real `<button>` and `<a>` tags.
|
|
224
|
+
- Headings (`h1`-`h6`) must be in descending order.
|
|
225
|
+
- Meaningful `alt` text for informational images.
|
|
226
|
+
|
|
227
|
+
## Visual Polish Checklist
|
|
228
|
+
|
|
229
|
+
- [ ] All elements align to the grid
|
|
230
|
+
- [ ] Spacing is consistent (8px multiples)
|
|
231
|
+
- [ ] Type scale is defined and followed
|
|
232
|
+
- [ ] Colors are from a defined palette
|
|
233
|
+
- [ ] Visual hierarchy is clear (squint test)
|
|
234
|
+
- [ ] Related items are grouped (proximity)
|
|
235
|
+
- [ ] Similar items look similar (consistency)
|
|
236
|
+
- [ ] Sufficient contrast for accessibility
|
|
237
|
+
- [ ] Details are refined (borders, shadows, radius)
|
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dp-ux
|
|
3
|
+
description: Apply UX/UI design principles for intuitive, accessible interfaces. Use with "/dp:ux", UX review, usability improvements, or user-centered design. Phase 2 of DP workflow.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UX/UI Design Excellence
|
|
7
|
+
|
|
8
|
+
Create interfaces that feel as polished as Linear, Stripe, Notion, and Vercel — products where every interaction feels intentional and effortless.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## DP Workflow Integration
|
|
13
|
+
|
|
14
|
+
This skill is Phase 2 of the DP (Design Protocol) workflow. It automatically detects and integrates with the workflow when present.
|
|
15
|
+
|
|
16
|
+
### Detecting Workflow Mode
|
|
17
|
+
|
|
18
|
+
At the start of any `/dp:ux` invocation:
|
|
19
|
+
|
|
20
|
+
1. **Check for `.design/config.json`**
|
|
21
|
+
2. **If found** (workflow mode):
|
|
22
|
+
- Load `.design/phases/DISCOVERY.md` for context
|
|
23
|
+
- Load `.design/REQUIREMENTS.md` for requirements to address
|
|
24
|
+
- Check for `02-CONTEXT.md` if `/dp:discuss` was run first
|
|
25
|
+
- Announce: "Loading context from discovery phase..."
|
|
26
|
+
- Display summary: "Working on: [problem statement]"
|
|
27
|
+
3. **If not found** (standalone mode):
|
|
28
|
+
- Run with default behavior
|
|
29
|
+
- Ask: "What would you like me to review for UX principles?"
|
|
30
|
+
|
|
31
|
+
### Context Loading (Workflow Mode)
|
|
32
|
+
|
|
33
|
+
When `.design/phases/DISCOVERY.md` exists, extract and display:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
DP WORKFLOW ACTIVE
|
|
37
|
+
────────────────────────────────────────────────────────────────────────────────
|
|
38
|
+
Project: [name]
|
|
39
|
+
Phase: 2 of 4 (UX)
|
|
40
|
+
Previous: Discovery complete
|
|
41
|
+
|
|
42
|
+
From Discovery:
|
|
43
|
+
• Problem: [problem statement one-liner]
|
|
44
|
+
• User: [primary user role]
|
|
45
|
+
• Goals: [user goals]
|
|
46
|
+
• Key Requirements:
|
|
47
|
+
- [Must-have 1]
|
|
48
|
+
- [Must-have 2]
|
|
49
|
+
- [Must-have 3]
|
|
50
|
+
|
|
51
|
+
Your Focus This Phase:
|
|
52
|
+
Apply UX principles to design user flows and component states.
|
|
53
|
+
────────────────────────────────────────────────────────────────────────────────
|
|
54
|
+
|
|
55
|
+
Ready to proceed? Or /dp:back to revisit discovery.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Context Sources
|
|
59
|
+
|
|
60
|
+
| From Discovery | Used For |
|
|
61
|
+
|----------------|----------|
|
|
62
|
+
| Problem statement | Focus area for UX work |
|
|
63
|
+
| Primary user | Persona context for decisions |
|
|
64
|
+
| User goals | Flow design targets |
|
|
65
|
+
| Requirements | Constraint checklist |
|
|
66
|
+
| Constraints | Design boundaries |
|
|
67
|
+
| Open questions | Items to address |
|
|
68
|
+
| Journey map | Starting point for flows |
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Workflow
|
|
73
|
+
|
|
74
|
+
1. **Always combine with frontend-design skill** — Read and apply both skills together
|
|
75
|
+
2. **Audit against UX principles** — Check references/usability-principles.md
|
|
76
|
+
3. **Verify accessibility** — Check references/accessibility-checklist.md
|
|
77
|
+
4. **Apply proven patterns** — Check references/dp:ux-patterns.md for states, feedback, navigation
|
|
78
|
+
5. **Benchmark against excellence** — Check references/product-excellence.md for inspiration
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Core UX Principles
|
|
83
|
+
|
|
84
|
+
### Clarity Over Cleverness
|
|
85
|
+
|
|
86
|
+
- One primary action per screen/component
|
|
87
|
+
- Labels over icons alone (or icon + tooltip minimum)
|
|
88
|
+
- Show, don't tell — progressive disclosure over upfront complexity
|
|
89
|
+
|
|
90
|
+
### Respect Cognitive Load
|
|
91
|
+
|
|
92
|
+
- Chunk information (7±2 items max in lists/groups)
|
|
93
|
+
- Sensible defaults — users shouldn't configure before starting
|
|
94
|
+
- Recognition over recall — show options, don't make users remember
|
|
95
|
+
|
|
96
|
+
### Feedback & Responsiveness
|
|
97
|
+
|
|
98
|
+
- Every action needs visible feedback (< 100ms perceived)
|
|
99
|
+
- Optimistic UI for common actions
|
|
100
|
+
- Clear system status — loading, success, error states always visible
|
|
101
|
+
|
|
102
|
+
### Error Prevention > Error Messages
|
|
103
|
+
|
|
104
|
+
- Disable invalid actions, don't just error on them
|
|
105
|
+
- Inline validation as users type, not on submit
|
|
106
|
+
- Undo over confirmation dialogs when possible
|
|
107
|
+
|
|
108
|
+
### Consistency & Predictability
|
|
109
|
+
|
|
110
|
+
- Same action = same result everywhere
|
|
111
|
+
- Standard patterns for standard tasks (don't reinvent navigation)
|
|
112
|
+
- Spatial consistency — elements don't jump between states
|
|
113
|
+
|
|
114
|
+
### Mobile-First Thinking
|
|
115
|
+
|
|
116
|
+
- Touch targets minimum 44×44px
|
|
117
|
+
- Thumb-zone awareness for primary actions
|
|
118
|
+
- Content hierarchy must work at 320px width
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## State Coverage Matrix
|
|
123
|
+
|
|
124
|
+
**Every interactive component needs ALL of these states defined:**
|
|
125
|
+
|
|
126
|
+
| State | Description | Required? |
|
|
127
|
+
|-------|-------------|-----------|
|
|
128
|
+
| **Default** | Normal resting state | Yes |
|
|
129
|
+
| **Hover** | Mouse over (desktop) | Yes |
|
|
130
|
+
| **Focus** | Keyboard focus (visible ring) | Yes |
|
|
131
|
+
| **Active/Pressed** | Being clicked/tapped | Yes |
|
|
132
|
+
| **Disabled** | Cannot interact | When applicable |
|
|
133
|
+
| **Loading** | Async operation in progress | For async actions |
|
|
134
|
+
| **Error** | Something went wrong | For forms/inputs |
|
|
135
|
+
| **Empty** | No content/data | For lists/tables |
|
|
136
|
+
| **Success** | Operation completed | For confirmations |
|
|
137
|
+
|
|
138
|
+
**In workflow mode, explicitly document each state for key components.**
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Implementation Checklist
|
|
143
|
+
|
|
144
|
+
Before finalizing any UI:
|
|
145
|
+
|
|
146
|
+
- [ ] Can a new user complete the primary task without instructions?
|
|
147
|
+
- [ ] Are all interactive states covered? (see matrix above)
|
|
148
|
+
- [ ] Does it work with keyboard only?
|
|
149
|
+
- [ ] Is color not the only indicator of meaning?
|
|
150
|
+
- [ ] Are error messages actionable? (what happened + how to fix)
|
|
151
|
+
- [ ] Does it feel fast? (perceived performance)
|
|
152
|
+
- [ ] Is the most important action visually dominant?
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Output Structure (Workflow Mode)
|
|
157
|
+
|
|
158
|
+
When in workflow mode, produce structured output:
|
|
159
|
+
|
|
160
|
+
### UX-DECISIONS.md Structure
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
---
|
|
164
|
+
phase: ux
|
|
165
|
+
skill: ux
|
|
166
|
+
completed: YYYY-MM-DDTHH:MM:SSZ
|
|
167
|
+
context_loaded:
|
|
168
|
+
- DISCOVERY.md
|
|
169
|
+
- 02-CONTEXT.md (if existed)
|
|
170
|
+
requirements_addressed:
|
|
171
|
+
- REQ-01
|
|
172
|
+
- REQ-02
|
|
173
|
+
components_specified:
|
|
174
|
+
- ComponentName1
|
|
175
|
+
- ComponentName2
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
# UX Decisions: [Feature Name]
|
|
179
|
+
|
|
180
|
+
## User Flow
|
|
181
|
+
|
|
182
|
+
[Flow diagram or description]
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
[Entry Point] → [Step 1] → [Decision Point] → [Step 2a/2b] → [Success State]
|
|
186
|
+
↓
|
|
187
|
+
[Error Path]
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Usability Principles Applied
|
|
191
|
+
|
|
192
|
+
| Principle | Application | Rationale |
|
|
193
|
+
|-----------|-------------|-----------|
|
|
194
|
+
| Clarity | [How applied] | [Why] |
|
|
195
|
+
| Cognitive Load | [How applied] | [Why] |
|
|
196
|
+
| ... | ... | ... |
|
|
197
|
+
|
|
198
|
+
## Key UX Decisions
|
|
199
|
+
|
|
200
|
+
| Decision | Options Considered | Chosen | Rationale |
|
|
201
|
+
|----------|-------------------|--------|-----------|
|
|
202
|
+
| [Decision 1] | A, B, C | B | [Why B was chosen] |
|
|
203
|
+
| ... | ... | ... | ... |
|
|
204
|
+
|
|
205
|
+
## Component Behaviors
|
|
206
|
+
|
|
207
|
+
### [Component 1]
|
|
208
|
+
|
|
209
|
+
**Purpose:** [What it does]
|
|
210
|
+
|
|
211
|
+
**States:**
|
|
212
|
+
| State | Behavior | Visual Indicator |
|
|
213
|
+
|-------|----------|------------------|
|
|
214
|
+
| Default | [behavior] | [visual] |
|
|
215
|
+
| Hover | [behavior] | [visual] |
|
|
216
|
+
| Focus | [behavior] | [visual] |
|
|
217
|
+
| Active | [behavior] | [visual] |
|
|
218
|
+
| Disabled | [behavior] | [visual] |
|
|
219
|
+
| Loading | [behavior] | [visual] |
|
|
220
|
+
| Error | [behavior] | [visual] |
|
|
221
|
+
| Empty | [behavior] | [visual] |
|
|
222
|
+
| Success | [behavior] | [visual] |
|
|
223
|
+
|
|
224
|
+
**Interactions:**
|
|
225
|
+
- Click: [what happens]
|
|
226
|
+
- Keyboard: [what keys do what]
|
|
227
|
+
- Touch: [mobile behavior]
|
|
228
|
+
|
|
229
|
+
### [Component 2]
|
|
230
|
+
...
|
|
231
|
+
|
|
232
|
+
## Accessibility Requirements
|
|
233
|
+
|
|
234
|
+
| Requirement | WCAG | Implementation |
|
|
235
|
+
|-------------|------|----------------|
|
|
236
|
+
| Keyboard navigation | 2.1.1 | [How] |
|
|
237
|
+
| Focus visibility | 2.4.7 | [How] |
|
|
238
|
+
| Color independence | 1.4.1 | [How] |
|
|
239
|
+
| Label association | 1.3.1 | [How] |
|
|
240
|
+
| Touch targets | 2.5.5 | [How] |
|
|
241
|
+
|
|
242
|
+
## Error Handling
|
|
243
|
+
|
|
244
|
+
| Error Scenario | User Message | Recovery Action |
|
|
245
|
+
|----------------|--------------|-----------------|
|
|
246
|
+
| [Scenario 1] | [Message] | [What user can do] |
|
|
247
|
+
| ... | ... | ... |
|
|
248
|
+
|
|
249
|
+
## Empty States
|
|
250
|
+
|
|
251
|
+
| Empty State | What Shows | User Action |
|
|
252
|
+
|-------------|------------|-------------|
|
|
253
|
+
| No data | [Message + visual] | [CTA] |
|
|
254
|
+
| No results | [Message] | [Suggestions] |
|
|
255
|
+
| First use | [Onboarding] | [Getting started] |
|
|
256
|
+
|
|
257
|
+
## Loading States
|
|
258
|
+
|
|
259
|
+
| Operation | Loading Indicator | Placement |
|
|
260
|
+
|-----------|-------------------|-----------|
|
|
261
|
+
| Page load | [Skeleton/Spinner] | [Where] |
|
|
262
|
+
| Form submit | [Button state] | [In button] |
|
|
263
|
+
| Data fetch | [Placeholder] | [In container] |
|
|
264
|
+
|
|
265
|
+
## Requirements Coverage
|
|
266
|
+
|
|
267
|
+
| Requirement | Addressed By | Notes |
|
|
268
|
+
|-------------|--------------|-------|
|
|
269
|
+
| REQ-01: [text] | [Component/Flow] | |
|
|
270
|
+
| REQ-02: [text] | [Component/Flow] | |
|
|
271
|
+
|
|
272
|
+
## Handoff Notes for UI Phase
|
|
273
|
+
|
|
274
|
+
- Key visual direction: [guidance]
|
|
275
|
+
- Critical interactions: [list]
|
|
276
|
+
- Accessibility priorities: [list]
|
|
277
|
+
- Open visual questions: [list]
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## State Updates (Workflow Mode)
|
|
283
|
+
|
|
284
|
+
After completing UX analysis:
|
|
285
|
+
|
|
286
|
+
1. **Write output to `.design/phases/UX-DECISIONS.md`**
|
|
287
|
+
|
|
288
|
+
2. **Update `.design/STATE.md`**:
|
|
289
|
+
```markdown
|
|
290
|
+
## Current Position
|
|
291
|
+
Phase: 2 of 4 (UX)
|
|
292
|
+
Status: completed
|
|
293
|
+
Progress: [█████░░░░░] 50%
|
|
294
|
+
|
|
295
|
+
### Last Activity
|
|
296
|
+
- **Date:** [TIMESTAMP]
|
|
297
|
+
- **Action:** Completed UX phase with /dp:ux
|
|
298
|
+
- **User:** [session user]
|
|
299
|
+
|
|
300
|
+
### Accumulated Context
|
|
301
|
+
...
|
|
302
|
+
#### Major Decisions Made
|
|
303
|
+
| Phase | Decision | Impact |
|
|
304
|
+
|-------|----------|--------|
|
|
305
|
+
| Discovery | [decision] | [impact] |
|
|
306
|
+
| UX | [key UX decision 1] | [impact] |
|
|
307
|
+
| UX | [key UX decision 2] | [impact] |
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
3. **Update `.design/config.json`**:
|
|
311
|
+
```json
|
|
312
|
+
{
|
|
313
|
+
"workflow": {
|
|
314
|
+
"current_phase": 3,
|
|
315
|
+
"phases_completed": ["discovery", "ux"],
|
|
316
|
+
"workflow_status": "in_progress"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
4. **Update `.design/REQUIREMENTS.md`** with addressed requirements
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Handoff (Workflow Mode)
|
|
326
|
+
|
|
327
|
+
```
|
|
328
|
+
═══════════════════════════════════════════════════════════════════════════════
|
|
329
|
+
UX DECISIONS COMPLETE
|
|
330
|
+
═══════════════════════════════════════════════════════════════════════════════
|
|
331
|
+
|
|
332
|
+
Output: .design/phases/UX-DECISIONS.md
|
|
333
|
+
|
|
334
|
+
Summary:
|
|
335
|
+
• User flow documented with [N] steps
|
|
336
|
+
• [M] components specified with full state coverage
|
|
337
|
+
• [P] accessibility requirements documented
|
|
338
|
+
• Requirements addressed: [list]
|
|
339
|
+
|
|
340
|
+
Progress: [█████░░░░░] 50%
|
|
341
|
+
|
|
342
|
+
Ready for Next Phase?
|
|
343
|
+
────────────────────────────────────────────────────────────────────────────────
|
|
344
|
+
→ /dp:ui to continue to visual design (recommended)
|
|
345
|
+
→ /dp:discuss to capture visual direction first
|
|
346
|
+
|
|
347
|
+
Or:
|
|
348
|
+
→ /dp:progress to review full status
|
|
349
|
+
→ /dp:back to revisit discovery
|
|
350
|
+
|
|
351
|
+
═══════════════════════════════════════════════════════════════════════════════
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## Standalone Mode Behavior
|
|
357
|
+
|
|
358
|
+
When no `.design/` directory exists:
|
|
359
|
+
|
|
360
|
+
1. Output UX analysis inline (current behavior)
|
|
361
|
+
2. Ask standard handoff question:
|
|
362
|
+
> "Would you like me to run `/dp:ui` for visual design principles?"
|
|
363
|
+
3. Optionally offer: "Or start a full DP workflow with `/dp:start`?"
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## Reference Files
|
|
368
|
+
|
|
369
|
+
Load these as needed for detailed guidance:
|
|
370
|
+
|
|
371
|
+
- **references/usability-principles.md** — Nielsen's heuristics + modern interpretations
|
|
372
|
+
- **references/accessibility-checklist.md** — Essential WCAG compliance
|
|
373
|
+
- **references/dp:ux-patterns.md** — Patterns for states, feedback, navigation, forms
|
|
374
|
+
- **references/product-excellence.md** — What makes Linear, Stripe, Notion exceptional
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
## Config Integration
|
|
379
|
+
|
|
380
|
+
Respects these settings from `.design/config.json`:
|
|
381
|
+
```json
|
|
382
|
+
{
|
|
383
|
+
"phases": {
|
|
384
|
+
"ux": {
|
|
385
|
+
"enabled": true,
|
|
386
|
+
"includeAccessibility": true,
|
|
387
|
+
"includeAllStates": true
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
When `includeAccessibility: true`, always include accessibility requirements section.
|
|
394
|
+
When `includeAllStates: true`, require full state matrix for all components.
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Workflow Navigation
|
|
399
|
+
|
|
400
|
+
```
|
|
401
|
+
┌─────────┐
|
|
402
|
+
/dp:start → /dp:discovery → │ YOU ARE │ → /dp:execute → /dp:ui → /dp:execute → /dp:eng_review → /dp:verify
|
|
403
|
+
Phase 1 │ HERE │ (wireframe) Phase 3 (polished) Phase 4
|
|
404
|
+
│ Phase 2 │
|
|
405
|
+
└─────────┘
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
| | |
|
|
409
|
+
|---|---|
|
|
410
|
+
| **Previous** | `/dp:discovery` — Discovery & requirements (Phase 1) |
|
|
411
|
+
| **Current** | `/dp:ux` — UX principles & states (Phase 2) |
|
|
412
|
+
| **Next** | `/dp:execute` — Generate wireframe implementation |
|
|
413
|
+
| **Related** | `/dp:discuss` — Capture context before this phase |
|
|
414
|
+
| | `/dp:back` — Return to discovery if requirements changed |
|