agentic-team-templates 0.16.0 → 0.18.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/README.md +30 -24
- package/package.json +1 -1
- package/src/index.js +221 -123
- package/src/index.test.js +138 -66
- package/templates/ux-designer/.cursor/rules/accessibility.md +214 -0
- package/templates/ux-designer/.cursor/rules/emotional-design.md +217 -0
- package/templates/ux-designer/.cursor/rules/handoff.md +251 -0
- package/templates/ux-designer/.cursor/rules/information-architecture.md +193 -0
- package/templates/ux-designer/.cursor/rules/interaction-design.md +221 -0
- package/templates/ux-designer/.cursor/rules/overview.md +110 -0
- package/templates/ux-designer/.cursor/rules/research.md +181 -0
- package/templates/ux-designer/.cursor/rules/visual-design.md +191 -0
- package/templates/ux-designer/CLAUDE.md +124 -0
- /package/templates/blockchain/{.cursorrules → .cursor/rules}/defi-patterns.md +0 -0
- /package/templates/blockchain/{.cursorrules → .cursor/rules}/gas-optimization.md +0 -0
- /package/templates/blockchain/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/blockchain/{.cursorrules → .cursor/rules}/security.md +0 -0
- /package/templates/blockchain/{.cursorrules → .cursor/rules}/smart-contracts.md +0 -0
- /package/templates/blockchain/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/blockchain/{.cursorrules → .cursor/rules}/web3-integration.md +0 -0
- /package/templates/cli-tools/{.cursorrules → .cursor/rules}/architecture.md +0 -0
- /package/templates/cli-tools/{.cursorrules → .cursor/rules}/arguments.md +0 -0
- /package/templates/cli-tools/{.cursorrules → .cursor/rules}/distribution.md +0 -0
- /package/templates/cli-tools/{.cursorrules → .cursor/rules}/error-handling.md +0 -0
- /package/templates/cli-tools/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/cli-tools/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/cli-tools/{.cursorrules → .cursor/rules}/user-experience.md +0 -0
- /package/templates/cpp-expert/{.cursorrules → .cursor/rules}/concurrency.md +0 -0
- /package/templates/cpp-expert/{.cursorrules → .cursor/rules}/error-handling.md +0 -0
- /package/templates/cpp-expert/{.cursorrules → .cursor/rules}/memory-and-ownership.md +0 -0
- /package/templates/cpp-expert/{.cursorrules → .cursor/rules}/modern-cpp.md +0 -0
- /package/templates/cpp-expert/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/cpp-expert/{.cursorrules → .cursor/rules}/performance.md +0 -0
- /package/templates/cpp-expert/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/cpp-expert/{.cursorrules → .cursor/rules}/tooling.md +0 -0
- /package/templates/csharp-expert/{.cursorrules → .cursor/rules}/aspnet-core.md +0 -0
- /package/templates/csharp-expert/{.cursorrules → .cursor/rules}/async-patterns.md +0 -0
- /package/templates/csharp-expert/{.cursorrules → .cursor/rules}/dependency-injection.md +0 -0
- /package/templates/csharp-expert/{.cursorrules → .cursor/rules}/error-handling.md +0 -0
- /package/templates/csharp-expert/{.cursorrules → .cursor/rules}/language-features.md +0 -0
- /package/templates/csharp-expert/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/csharp-expert/{.cursorrules → .cursor/rules}/performance.md +0 -0
- /package/templates/csharp-expert/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/csharp-expert/{.cursorrules → .cursor/rules}/tooling.md +0 -0
- /package/templates/data-engineering/{.cursorrules → .cursor/rules}/data-modeling.md +0 -0
- /package/templates/data-engineering/{.cursorrules → .cursor/rules}/data-quality.md +0 -0
- /package/templates/data-engineering/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/data-engineering/{.cursorrules → .cursor/rules}/performance.md +0 -0
- /package/templates/data-engineering/{.cursorrules → .cursor/rules}/pipeline-design.md +0 -0
- /package/templates/data-engineering/{.cursorrules → .cursor/rules}/security.md +0 -0
- /package/templates/data-engineering/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/devops-sre/{.cursorrules → .cursor/rules}/capacity-planning.md +0 -0
- /package/templates/devops-sre/{.cursorrules → .cursor/rules}/change-management.md +0 -0
- /package/templates/devops-sre/{.cursorrules → .cursor/rules}/chaos-engineering.md +0 -0
- /package/templates/devops-sre/{.cursorrules → .cursor/rules}/disaster-recovery.md +0 -0
- /package/templates/devops-sre/{.cursorrules → .cursor/rules}/incident-management.md +0 -0
- /package/templates/devops-sre/{.cursorrules → .cursor/rules}/observability.md +0 -0
- /package/templates/devops-sre/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/devops-sre/{.cursorrules → .cursor/rules}/postmortems.md +0 -0
- /package/templates/devops-sre/{.cursorrules → .cursor/rules}/runbooks.md +0 -0
- /package/templates/devops-sre/{.cursorrules → .cursor/rules}/slo-sli.md +0 -0
- /package/templates/devops-sre/{.cursorrules → .cursor/rules}/toil-reduction.md +0 -0
- /package/templates/documentation/{.cursorrules → .cursor/rules}/adr.md +0 -0
- /package/templates/documentation/{.cursorrules → .cursor/rules}/api-documentation.md +0 -0
- /package/templates/documentation/{.cursorrules → .cursor/rules}/code-comments.md +0 -0
- /package/templates/documentation/{.cursorrules → .cursor/rules}/maintenance.md +0 -0
- /package/templates/documentation/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/documentation/{.cursorrules → .cursor/rules}/readme-standards.md +0 -0
- /package/templates/educator/{.cursorrules → .cursor/rules}/accessibility.md +0 -0
- /package/templates/educator/{.cursorrules → .cursor/rules}/assessment.md +0 -0
- /package/templates/educator/{.cursorrules → .cursor/rules}/curriculum.md +0 -0
- /package/templates/educator/{.cursorrules → .cursor/rules}/engagement.md +0 -0
- /package/templates/educator/{.cursorrules → .cursor/rules}/instructional-design.md +0 -0
- /package/templates/educator/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/educator/{.cursorrules → .cursor/rules}/retention.md +0 -0
- /package/templates/fullstack/{.cursorrules → .cursor/rules}/api-contracts.md +0 -0
- /package/templates/fullstack/{.cursorrules → .cursor/rules}/architecture.md +0 -0
- /package/templates/fullstack/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/fullstack/{.cursorrules → .cursor/rules}/shared-types.md +0 -0
- /package/templates/fullstack/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/golang-expert/{.cursorrules → .cursor/rules}/concurrency.md +0 -0
- /package/templates/golang-expert/{.cursorrules → .cursor/rules}/error-handling.md +0 -0
- /package/templates/golang-expert/{.cursorrules → .cursor/rules}/interfaces-and-types.md +0 -0
- /package/templates/golang-expert/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/golang-expert/{.cursorrules → .cursor/rules}/performance.md +0 -0
- /package/templates/golang-expert/{.cursorrules → .cursor/rules}/production-patterns.md +0 -0
- /package/templates/golang-expert/{.cursorrules → .cursor/rules}/stdlib-and-tooling.md +0 -0
- /package/templates/golang-expert/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/java-expert/{.cursorrules → .cursor/rules}/concurrency.md +0 -0
- /package/templates/java-expert/{.cursorrules → .cursor/rules}/error-handling.md +0 -0
- /package/templates/java-expert/{.cursorrules → .cursor/rules}/modern-java.md +0 -0
- /package/templates/java-expert/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/java-expert/{.cursorrules → .cursor/rules}/performance.md +0 -0
- /package/templates/java-expert/{.cursorrules → .cursor/rules}/persistence.md +0 -0
- /package/templates/java-expert/{.cursorrules → .cursor/rules}/spring-boot.md +0 -0
- /package/templates/java-expert/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/java-expert/{.cursorrules → .cursor/rules}/tooling.md +0 -0
- /package/templates/javascript-expert/{.cursorrules → .cursor/rules}/language-deep-dive.md +0 -0
- /package/templates/javascript-expert/{.cursorrules → .cursor/rules}/node-patterns.md +0 -0
- /package/templates/javascript-expert/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/javascript-expert/{.cursorrules → .cursor/rules}/performance.md +0 -0
- /package/templates/javascript-expert/{.cursorrules → .cursor/rules}/react-patterns.md +0 -0
- /package/templates/javascript-expert/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/javascript-expert/{.cursorrules → .cursor/rules}/tooling.md +0 -0
- /package/templates/javascript-expert/{.cursorrules → .cursor/rules}/typescript-deep-dive.md +0 -0
- /package/templates/kotlin-expert/{.cursorrules → .cursor/rules}/coroutines.md +0 -0
- /package/templates/kotlin-expert/{.cursorrules → .cursor/rules}/error-handling.md +0 -0
- /package/templates/kotlin-expert/{.cursorrules → .cursor/rules}/frameworks.md +0 -0
- /package/templates/kotlin-expert/{.cursorrules → .cursor/rules}/language-features.md +0 -0
- /package/templates/kotlin-expert/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/kotlin-expert/{.cursorrules → .cursor/rules}/performance.md +0 -0
- /package/templates/kotlin-expert/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/kotlin-expert/{.cursorrules → .cursor/rules}/tooling.md +0 -0
- /package/templates/ml-ai/{.cursorrules → .cursor/rules}/data-engineering.md +0 -0
- /package/templates/ml-ai/{.cursorrules → .cursor/rules}/deployment.md +0 -0
- /package/templates/ml-ai/{.cursorrules → .cursor/rules}/model-development.md +0 -0
- /package/templates/ml-ai/{.cursorrules → .cursor/rules}/monitoring.md +0 -0
- /package/templates/ml-ai/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/ml-ai/{.cursorrules → .cursor/rules}/security.md +0 -0
- /package/templates/ml-ai/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/mobile/{.cursorrules → .cursor/rules}/navigation.md +0 -0
- /package/templates/mobile/{.cursorrules → .cursor/rules}/offline-first.md +0 -0
- /package/templates/mobile/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/mobile/{.cursorrules → .cursor/rules}/performance.md +0 -0
- /package/templates/mobile/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/platform-engineering/{.cursorrules → .cursor/rules}/ci-cd.md +0 -0
- /package/templates/platform-engineering/{.cursorrules → .cursor/rules}/developer-experience.md +0 -0
- /package/templates/platform-engineering/{.cursorrules → .cursor/rules}/infrastructure-as-code.md +0 -0
- /package/templates/platform-engineering/{.cursorrules → .cursor/rules}/kubernetes.md +0 -0
- /package/templates/platform-engineering/{.cursorrules → .cursor/rules}/observability.md +0 -0
- /package/templates/platform-engineering/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/platform-engineering/{.cursorrules → .cursor/rules}/security.md +0 -0
- /package/templates/platform-engineering/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/product-manager/{.cursorrules → .cursor/rules}/communication.md +0 -0
- /package/templates/product-manager/{.cursorrules → .cursor/rules}/discovery.md +0 -0
- /package/templates/product-manager/{.cursorrules → .cursor/rules}/metrics.md +0 -0
- /package/templates/product-manager/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/product-manager/{.cursorrules → .cursor/rules}/prioritization.md +0 -0
- /package/templates/product-manager/{.cursorrules → .cursor/rules}/requirements.md +0 -0
- /package/templates/python-expert/{.cursorrules → .cursor/rules}/async-python.md +0 -0
- /package/templates/python-expert/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/python-expert/{.cursorrules → .cursor/rules}/patterns-and-idioms.md +0 -0
- /package/templates/python-expert/{.cursorrules → .cursor/rules}/performance.md +0 -0
- /package/templates/python-expert/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/python-expert/{.cursorrules → .cursor/rules}/tooling.md +0 -0
- /package/templates/python-expert/{.cursorrules → .cursor/rules}/type-system.md +0 -0
- /package/templates/python-expert/{.cursorrules → .cursor/rules}/web-and-apis.md +0 -0
- /package/templates/qa-engineering/{.cursorrules → .cursor/rules}/automation.md +0 -0
- /package/templates/qa-engineering/{.cursorrules → .cursor/rules}/metrics.md +0 -0
- /package/templates/qa-engineering/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/qa-engineering/{.cursorrules → .cursor/rules}/quality-gates.md +0 -0
- /package/templates/qa-engineering/{.cursorrules → .cursor/rules}/test-design.md +0 -0
- /package/templates/qa-engineering/{.cursorrules → .cursor/rules}/test-strategy.md +0 -0
- /package/templates/rust-expert/{.cursorrules → .cursor/rules}/concurrency.md +0 -0
- /package/templates/rust-expert/{.cursorrules → .cursor/rules}/ecosystem-and-tooling.md +0 -0
- /package/templates/rust-expert/{.cursorrules → .cursor/rules}/error-handling.md +0 -0
- /package/templates/rust-expert/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/rust-expert/{.cursorrules → .cursor/rules}/ownership-and-borrowing.md +0 -0
- /package/templates/rust-expert/{.cursorrules → .cursor/rules}/performance-and-unsafe.md +0 -0
- /package/templates/rust-expert/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/rust-expert/{.cursorrules → .cursor/rules}/traits-and-generics.md +0 -0
- /package/templates/swift-expert/{.cursorrules → .cursor/rules}/concurrency.md +0 -0
- /package/templates/swift-expert/{.cursorrules → .cursor/rules}/error-handling.md +0 -0
- /package/templates/swift-expert/{.cursorrules → .cursor/rules}/language-features.md +0 -0
- /package/templates/swift-expert/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/swift-expert/{.cursorrules → .cursor/rules}/performance.md +0 -0
- /package/templates/swift-expert/{.cursorrules → .cursor/rules}/swiftui.md +0 -0
- /package/templates/swift-expert/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/swift-expert/{.cursorrules → .cursor/rules}/tooling.md +0 -0
- /package/templates/testing/{.cursorrules → .cursor/rules}/advanced-techniques.md +0 -0
- /package/templates/testing/{.cursorrules → .cursor/rules}/ci-cd-integration.md +0 -0
- /package/templates/testing/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/testing/{.cursorrules → .cursor/rules}/performance-testing.md +0 -0
- /package/templates/testing/{.cursorrules → .cursor/rules}/quality-metrics.md +0 -0
- /package/templates/testing/{.cursorrules → .cursor/rules}/reliability.md +0 -0
- /package/templates/testing/{.cursorrules → .cursor/rules}/tdd-methodology.md +0 -0
- /package/templates/testing/{.cursorrules → .cursor/rules}/test-data.md +0 -0
- /package/templates/testing/{.cursorrules → .cursor/rules}/test-design.md +0 -0
- /package/templates/testing/{.cursorrules → .cursor/rules}/test-types.md +0 -0
- /package/templates/utility-agent/{.cursorrules → .cursor/rules}/action-control.md +0 -0
- /package/templates/utility-agent/{.cursorrules → .cursor/rules}/context-management.md +0 -0
- /package/templates/utility-agent/{.cursorrules → .cursor/rules}/hallucination-prevention.md +0 -0
- /package/templates/utility-agent/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/utility-agent/{.cursorrules → .cursor/rules}/token-optimization.md +0 -0
- /package/templates/web-backend/{.cursorrules → .cursor/rules}/api-design.md +0 -0
- /package/templates/web-backend/{.cursorrules → .cursor/rules}/authentication.md +0 -0
- /package/templates/web-backend/{.cursorrules → .cursor/rules}/database-patterns.md +0 -0
- /package/templates/web-backend/{.cursorrules → .cursor/rules}/error-handling.md +0 -0
- /package/templates/web-backend/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/web-backend/{.cursorrules → .cursor/rules}/security.md +0 -0
- /package/templates/web-backend/{.cursorrules → .cursor/rules}/testing.md +0 -0
- /package/templates/web-frontend/{.cursorrules → .cursor/rules}/accessibility.md +0 -0
- /package/templates/web-frontend/{.cursorrules → .cursor/rules}/component-patterns.md +0 -0
- /package/templates/web-frontend/{.cursorrules → .cursor/rules}/overview.md +0 -0
- /package/templates/web-frontend/{.cursorrules → .cursor/rules}/performance.md +0 -0
- /package/templates/web-frontend/{.cursorrules → .cursor/rules}/state-management.md +0 -0
- /package/templates/web-frontend/{.cursorrules → .cursor/rules}/styling.md +0 -0
- /package/templates/web-frontend/{.cursorrules → .cursor/rules}/testing.md +0 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# Interaction Design
|
|
2
|
+
|
|
3
|
+
Designing how users interact with interfaces — controls, feedback, transitions, and behavior.
|
|
4
|
+
|
|
5
|
+
## Core Principle
|
|
6
|
+
|
|
7
|
+
**Every interaction should feel inevitable.** When a user taps, clicks, or swipes, the response should be exactly what they expected. Surprise is the enemy of usability.
|
|
8
|
+
|
|
9
|
+
## Don Norman's Design Principles
|
|
10
|
+
|
|
11
|
+
Six fundamental principles from *The Design of Everyday Things*:
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
1. Visibility — Can users see what actions are available?
|
|
15
|
+
2. Feedback — Does the system respond to every user action?
|
|
16
|
+
3. Constraints — Does the design prevent errors?
|
|
17
|
+
4. Mapping — Do controls relate naturally to their effects?
|
|
18
|
+
5. Consistency — Do similar things work the same way?
|
|
19
|
+
6. Affordance — Does the element suggest how to interact with it?
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Application
|
|
23
|
+
|
|
24
|
+
```markdown
|
|
25
|
+
Visibility:
|
|
26
|
+
✅ Primary actions are visible buttons, not hidden in menus
|
|
27
|
+
❌ Key features accessible only through right-click or gestures
|
|
28
|
+
|
|
29
|
+
Feedback:
|
|
30
|
+
✅ Button changes state on press; loading spinner appears immediately
|
|
31
|
+
❌ User clicks "Save" and nothing visibly happens for 3 seconds
|
|
32
|
+
|
|
33
|
+
Constraints:
|
|
34
|
+
✅ Date picker prevents selecting impossible dates
|
|
35
|
+
❌ Free text field for dates with no validation until submission
|
|
36
|
+
|
|
37
|
+
Mapping:
|
|
38
|
+
✅ Volume slider moves left-to-right for quieter-to-louder
|
|
39
|
+
❌ Toggle labeled "Enable" that turns things off when activated
|
|
40
|
+
|
|
41
|
+
Consistency:
|
|
42
|
+
✅ "Delete" always requires confirmation, everywhere
|
|
43
|
+
❌ Delete confirms in Settings but is instant in the dashboard
|
|
44
|
+
|
|
45
|
+
Affordance:
|
|
46
|
+
✅ Buttons look clickable (raised, colored, labeled)
|
|
47
|
+
❌ Flat text that is secretly a link with no visual indicator
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Fitts's Law
|
|
51
|
+
|
|
52
|
+
The time to reach a target is proportional to the distance and inversely proportional to the target size.
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
Application:
|
|
56
|
+
- Make primary action targets large (minimum 44x44px touch, 24x24px cursor)
|
|
57
|
+
- Place frequently-used actions close to the user's current focus
|
|
58
|
+
- Corners and edges of the screen are effectively infinite in size (use them)
|
|
59
|
+
- Reduce the distance between related sequential actions
|
|
60
|
+
|
|
61
|
+
Examples:
|
|
62
|
+
✅ Submit button directly below the last form field
|
|
63
|
+
❌ Submit button at the top of the page, far from the form
|
|
64
|
+
✅ "Confirm" dialog button near the action that triggered it
|
|
65
|
+
❌ Confirmation modal that appears at the center regardless of trigger location
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Hick's Law
|
|
69
|
+
|
|
70
|
+
Decision time increases logarithmically with the number of choices.
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
Application:
|
|
74
|
+
- Limit choices to 5-7 options per decision
|
|
75
|
+
- Use smart defaults to eliminate unnecessary decisions
|
|
76
|
+
- Group and categorize when many options are unavoidable
|
|
77
|
+
- Progressive disclosure: show essentials first, details on demand
|
|
78
|
+
- Recommend the best option clearly
|
|
79
|
+
|
|
80
|
+
Examples:
|
|
81
|
+
✅ Pricing page with 3 plans, one highlighted as "Most Popular"
|
|
82
|
+
❌ Pricing page with 12 plans and a comparison matrix
|
|
83
|
+
✅ Smart default selected in a dropdown
|
|
84
|
+
❌ Empty dropdown requiring the user to scroll through 100 options
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Jakob's Law
|
|
88
|
+
|
|
89
|
+
Users spend most of their time on other sites/apps. They expect yours to work the same way.
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
Application:
|
|
93
|
+
- Follow platform conventions (iOS, Android, Web)
|
|
94
|
+
- Use standard interaction patterns (pull-to-refresh, swipe-to-delete)
|
|
95
|
+
- Place navigation where users expect it
|
|
96
|
+
- Don't reinvent standard components for novelty's sake
|
|
97
|
+
|
|
98
|
+
When to break convention:
|
|
99
|
+
- Only when user testing proves the new pattern is measurably better
|
|
100
|
+
- AND the learning cost is low enough to justify the improvement
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Interaction Patterns
|
|
104
|
+
|
|
105
|
+
### Forms
|
|
106
|
+
|
|
107
|
+
```markdown
|
|
108
|
+
Rules:
|
|
109
|
+
- One column layout (users read forms top-to-bottom)
|
|
110
|
+
- Labels above fields (not inline placeholders as labels)
|
|
111
|
+
- Mark optional fields, not required (most fields should be required)
|
|
112
|
+
- Inline validation on blur, not on keystroke
|
|
113
|
+
- Group related fields with clear section headings
|
|
114
|
+
- Smart defaults reduce effort
|
|
115
|
+
- Autofocus the first field
|
|
116
|
+
- Tab order follows visual order
|
|
117
|
+
|
|
118
|
+
Error handling:
|
|
119
|
+
- Show errors inline next to the offending field
|
|
120
|
+
- Use plain language: "Enter a valid email" not "Error 422"
|
|
121
|
+
- Preserve user input on error (never clear the form)
|
|
122
|
+
- Scroll to first error and focus it
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Buttons and CTAs
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
Hierarchy:
|
|
129
|
+
- Primary: One per screen/section. High contrast, filled.
|
|
130
|
+
- Secondary: Supporting actions. Outlined or lower contrast.
|
|
131
|
+
- Tertiary: Minimal actions. Text-only or links.
|
|
132
|
+
- Destructive: Red or distinct treatment. Always requires confirmation.
|
|
133
|
+
|
|
134
|
+
Labels:
|
|
135
|
+
- Use verbs: "Save Changes", "Send Invite", "Delete Account"
|
|
136
|
+
- Be specific: "Create Project" > "Submit" > "OK"
|
|
137
|
+
- Match the action to the outcome: "Place Order" not "Continue"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### States
|
|
141
|
+
|
|
142
|
+
Every interactive element must define all possible states:
|
|
143
|
+
|
|
144
|
+
```markdown
|
|
145
|
+
States:
|
|
146
|
+
- Default — Resting state
|
|
147
|
+
- Hover — Cursor over (desktop only)
|
|
148
|
+
- Focus — Keyboard navigation highlight (mandatory for accessibility)
|
|
149
|
+
- Active/Pressed — During interaction
|
|
150
|
+
- Disabled — Cannot interact (must explain why)
|
|
151
|
+
- Loading — Waiting for response
|
|
152
|
+
- Error — Something went wrong
|
|
153
|
+
- Success — Action completed
|
|
154
|
+
- Empty — No content to display
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Microinteractions (Dan Saffer)
|
|
158
|
+
|
|
159
|
+
Small, contained product moments that accomplish a single task.
|
|
160
|
+
|
|
161
|
+
```markdown
|
|
162
|
+
Structure:
|
|
163
|
+
1. Trigger — What initiates the interaction (user action or system event)
|
|
164
|
+
2. Rules — What happens when triggered
|
|
165
|
+
3. Feedback — How the user knows what happened
|
|
166
|
+
4. Loops & Modes — What changes over time or repeated use
|
|
167
|
+
|
|
168
|
+
Examples:
|
|
169
|
+
- Pull-to-refresh: Trigger → animation → content update → settle
|
|
170
|
+
- Like button: Tap → heart animation → count increment → color change
|
|
171
|
+
- Form submission: Click → button loading state → success message → redirect
|
|
172
|
+
|
|
173
|
+
Rules:
|
|
174
|
+
- Keep them fast (< 300ms for direct manipulation)
|
|
175
|
+
- Make them skippable (animation shouldn't block workflow)
|
|
176
|
+
- Degrade gracefully (functionality works even if animation fails)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Animation and Motion
|
|
180
|
+
|
|
181
|
+
```markdown
|
|
182
|
+
Purpose of motion:
|
|
183
|
+
- Provide feedback (button pressed, item added)
|
|
184
|
+
- Show relationships (element came from here, goes to there)
|
|
185
|
+
- Direct attention (notification appeared)
|
|
186
|
+
- Communicate state change (loading → loaded)
|
|
187
|
+
|
|
188
|
+
Principles:
|
|
189
|
+
- Motion should have purpose — never purely decorative
|
|
190
|
+
- Duration: 100-300ms for micro, 300-500ms for macro transitions
|
|
191
|
+
- Easing: ease-out for entrances, ease-in for exits, ease-in-out for movement
|
|
192
|
+
- Respect prefers-reduced-motion media query (mandatory)
|
|
193
|
+
- Stagger animations for groups (40-80ms offset per item)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Navigation Interactions
|
|
197
|
+
|
|
198
|
+
```markdown
|
|
199
|
+
Page transitions:
|
|
200
|
+
- Forward navigation: slide left / fade in
|
|
201
|
+
- Backward navigation: slide right / fade in
|
|
202
|
+
- Modal opening: scale up from trigger or fade in
|
|
203
|
+
- Modal closing: reverse of opening
|
|
204
|
+
|
|
205
|
+
Tab/section switching:
|
|
206
|
+
- Instant swap (no transition) or quick crossfade (150ms)
|
|
207
|
+
- Never animate content the user is trying to read
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Anti-Patterns
|
|
211
|
+
|
|
212
|
+
```markdown
|
|
213
|
+
- Modal abuse: Using modals for content that should be a page
|
|
214
|
+
- Double-click traps: Actions that fire twice on double-click
|
|
215
|
+
- Invisible scrolling: Content below the fold with no scroll indicator
|
|
216
|
+
- Disabled without explanation: Grayed-out buttons with no tooltip or message
|
|
217
|
+
- Hover-dependent UI: Features only accessible on hover (fails on touch)
|
|
218
|
+
- Infinite scroll without position: No way to return to a specific item
|
|
219
|
+
- Auto-advancing carousels: Users can't read at carousel speed
|
|
220
|
+
- Dark patterns: Trick questions, hidden costs, forced continuity, misdirection
|
|
221
|
+
```
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# UX Designer
|
|
2
|
+
|
|
3
|
+
Principal-level UX design guidelines covering user research, interaction design, design systems, accessibility, and emotional design.
|
|
4
|
+
|
|
5
|
+
## Scope
|
|
6
|
+
|
|
7
|
+
This ruleset applies to:
|
|
8
|
+
|
|
9
|
+
- User research and discovery
|
|
10
|
+
- Information architecture and navigation
|
|
11
|
+
- Interaction design and patterns
|
|
12
|
+
- Visual design and design systems
|
|
13
|
+
- Accessibility and inclusive design
|
|
14
|
+
- Emotional design and user delight
|
|
15
|
+
- Design-to-development handoff and UX metrics
|
|
16
|
+
|
|
17
|
+
## Core Philosophy
|
|
18
|
+
|
|
19
|
+
**Frustration elimination is the north star.** Every design decision should reduce friction, confusion, and cognitive load. Delight follows naturally when barriers disappear.
|
|
20
|
+
|
|
21
|
+
### Guiding Beliefs
|
|
22
|
+
|
|
23
|
+
1. **Simplicity over complexity** - The best interface is the one users don't notice
|
|
24
|
+
2. **Accessibility is non-negotiable** - Design for the margins; everyone benefits
|
|
25
|
+
3. **Evidence over opinion** - Research and data settle design debates, not authority
|
|
26
|
+
4. **Behavior over preference** - What users do matters more than what they say
|
|
27
|
+
5. **Consistency breeds trust** - Predictable patterns reduce cognitive overhead
|
|
28
|
+
|
|
29
|
+
## Fundamental Principles
|
|
30
|
+
|
|
31
|
+
### 1. User-Centered Design
|
|
32
|
+
|
|
33
|
+
Every decision starts and ends with the user. Assumptions are hypotheses to be validated, not truths to be defended.
|
|
34
|
+
|
|
35
|
+
```markdown
|
|
36
|
+
Step 1: Understand (Research who the users are and what they need)
|
|
37
|
+
Step 2: Define (Frame the problem clearly before solving it)
|
|
38
|
+
Step 3: Ideate (Explore multiple solutions, not just the first one)
|
|
39
|
+
Step 4: Prototype (Make it tangible before making it real)
|
|
40
|
+
Step 5: Test (Validate with real users, iterate on findings)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 2. Progressive Disclosure
|
|
44
|
+
|
|
45
|
+
Reveal complexity only when needed. Show the essential, hide the advanced, and let users drill deeper on demand.
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
Level 1: Primary actions visible at all times
|
|
49
|
+
Level 2: Secondary actions one click away
|
|
50
|
+
Level 3: Advanced settings behind explicit navigation
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 3. Don't Make Me Think
|
|
54
|
+
|
|
55
|
+
Borrowed from Steve Krug: interfaces should be self-evident. If a user has to stop and think about how something works, the design has failed.
|
|
56
|
+
|
|
57
|
+
### 4. Respect Cognitive Load
|
|
58
|
+
|
|
59
|
+
Humans have limited working memory (~4 items at a time per Miller's Law, revised). Every unnecessary element competes for attention.
|
|
60
|
+
|
|
61
|
+
### 5. Design for Recovery
|
|
62
|
+
|
|
63
|
+
Users will make mistakes. Design systems that make errors reversible, provide clear feedback, and never punish exploration.
|
|
64
|
+
|
|
65
|
+
## Decision Framework
|
|
66
|
+
|
|
67
|
+
When evaluating design choices, apply this priority stack:
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
1. Does it remove user frustration? (Highest priority)
|
|
71
|
+
2. Does it meet accessibility requirements (WCAG 2.2 AA)?
|
|
72
|
+
3. Does it follow established interaction patterns?
|
|
73
|
+
4. Does it align with the design system?
|
|
74
|
+
5. Does it add delight without adding complexity?
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### When in Doubt
|
|
78
|
+
|
|
79
|
+
- Choose the option that reduces the number of decisions the user must make
|
|
80
|
+
- Choose the option that works for the most constrained user (low vision, motor impairment, cognitive disability)
|
|
81
|
+
- Choose the option that requires fewer taps/clicks to complete the task
|
|
82
|
+
- Prototype both options and test with users
|
|
83
|
+
|
|
84
|
+
## Key Frameworks
|
|
85
|
+
|
|
86
|
+
| Framework | Author/Source | Purpose |
|
|
87
|
+
|-----------|---------------|---------|
|
|
88
|
+
| Jobs-to-be-Done | Clayton Christensen | Understanding user motivations |
|
|
89
|
+
| Don Norman's Design Principles | Don Norman | Interaction design fundamentals |
|
|
90
|
+
| Gestalt Principles | Wertheimer et al. | Visual perception and grouping |
|
|
91
|
+
| Atomic Design | Brad Frost | Scalable design system architecture |
|
|
92
|
+
| WCAG 2.2 | W3C | Accessibility compliance |
|
|
93
|
+
| Nielsen's 10 Heuristics | Jakob Nielsen | Usability evaluation |
|
|
94
|
+
| Emotional Design (3 levels) | Don Norman | Visceral, behavioral, reflective design |
|
|
95
|
+
| Fitts's Law | Paul Fitts | Target size and distance optimization |
|
|
96
|
+
| Hick's Law | William Hick | Decision time and option count |
|
|
97
|
+
|
|
98
|
+
## Definition of Done (Design)
|
|
99
|
+
|
|
100
|
+
A design deliverable is complete when:
|
|
101
|
+
|
|
102
|
+
- [ ] User problem is validated through research (not assumed)
|
|
103
|
+
- [ ] Accessibility audited against WCAG 2.2 AA
|
|
104
|
+
- [ ] Keyboard navigation flow documented
|
|
105
|
+
- [ ] Screen reader experience specified
|
|
106
|
+
- [ ] Responsive behavior defined for all breakpoints
|
|
107
|
+
- [ ] Interaction states documented (default, hover, focus, active, disabled, error, loading, empty)
|
|
108
|
+
- [ ] Edge cases addressed (empty states, error states, long content, truncation)
|
|
109
|
+
- [ ] Handoff spec reviewed with engineering
|
|
110
|
+
- [ ] Usability tested with representative users
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# User Research
|
|
2
|
+
|
|
3
|
+
Evidence-based methods for understanding users, validating assumptions, and making informed design decisions.
|
|
4
|
+
|
|
5
|
+
## Core Principle
|
|
6
|
+
|
|
7
|
+
**Talk to users early, often, and honestly.** Research is not a phase; it is a continuous practice embedded in every stage of design.
|
|
8
|
+
|
|
9
|
+
## Research Methods
|
|
10
|
+
|
|
11
|
+
### User Interviews
|
|
12
|
+
|
|
13
|
+
Structured conversations to uncover user needs, behaviors, and pain points.
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
Planning:
|
|
17
|
+
- Define research questions (what you want to learn, not what you'll ask)
|
|
18
|
+
- Recruit 5-8 participants per segment (saturation point per Nielsen)
|
|
19
|
+
- Prepare a discussion guide with open-ended questions
|
|
20
|
+
|
|
21
|
+
During:
|
|
22
|
+
- Ask about past behavior, not hypothetical futures
|
|
23
|
+
- "Tell me about the last time you..." > "Would you ever..."
|
|
24
|
+
- Follow the energy: when they lean in, dig deeper
|
|
25
|
+
- Silence is a tool; let them fill the gaps
|
|
26
|
+
|
|
27
|
+
After:
|
|
28
|
+
- Synthesize within 24 hours while memory is fresh
|
|
29
|
+
- Tag quotes and observations by theme
|
|
30
|
+
- Share raw findings before interpreting them
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### The Mom Test (Rob Fitzpatrick)
|
|
34
|
+
|
|
35
|
+
Rules for asking questions that even your mom can't lie to you about:
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
1. Talk about their life, not your idea
|
|
39
|
+
2. Ask about specifics in the past, not generics about the future
|
|
40
|
+
3. Talk less, listen more
|
|
41
|
+
|
|
42
|
+
Bad: "Would you use an app that does X?"
|
|
43
|
+
Good: "How do you currently handle X? Walk me through the last time."
|
|
44
|
+
|
|
45
|
+
Bad: "Do you think this is a good idea?"
|
|
46
|
+
Good: "What solutions have you tried? What worked and what didn't?"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Jobs-to-be-Done (Clayton Christensen)
|
|
50
|
+
|
|
51
|
+
Understand the progress users are trying to make in a given circumstance.
|
|
52
|
+
|
|
53
|
+
```markdown
|
|
54
|
+
Framework:
|
|
55
|
+
"When I [situation], I want to [motivation], so I can [expected outcome]."
|
|
56
|
+
|
|
57
|
+
Example:
|
|
58
|
+
"When I'm onboarding a new team member, I want to share access quickly,
|
|
59
|
+
so I can get them productive on day one."
|
|
60
|
+
|
|
61
|
+
Key insight: Users don't buy products; they hire them to do a job.
|
|
62
|
+
Competing products are rarely in the same category.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Empathy Mapping
|
|
66
|
+
|
|
67
|
+
Collaborative visualization of what users say, think, do, and feel.
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
Quadrants:
|
|
71
|
+
┌─────────────────┬─────────────────┐
|
|
72
|
+
│ SAYS │ THINKS │
|
|
73
|
+
│ (Direct quotes) │ (Inferred from │
|
|
74
|
+
│ │ behavior) │
|
|
75
|
+
├─────────────────┼─────────────────┤
|
|
76
|
+
│ DOES │ FEELS │
|
|
77
|
+
│ (Observed │ (Emotional │
|
|
78
|
+
│ actions) │ state) │
|
|
79
|
+
└─────────────────┴─────────────────┘
|
|
80
|
+
|
|
81
|
+
Use after interviews to align the team on user perspective.
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Personas
|
|
85
|
+
|
|
86
|
+
Archetypes representing user segments, grounded in research data.
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
Structure:
|
|
90
|
+
- Name, photo, demographic snapshot
|
|
91
|
+
- Goals (what they want to achieve)
|
|
92
|
+
- Frustrations (what blocks them today)
|
|
93
|
+
- Behaviors (how they currently work)
|
|
94
|
+
- Context (devices, environment, constraints)
|
|
95
|
+
- Quote (real or composite from interviews)
|
|
96
|
+
|
|
97
|
+
Rules:
|
|
98
|
+
- Derived from research, never invented
|
|
99
|
+
- 3-5 personas maximum (more dilutes focus)
|
|
100
|
+
- Include an "edge case" persona (accessibility, low-tech, etc.)
|
|
101
|
+
- Revisit and update quarterly
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Journey Mapping
|
|
105
|
+
|
|
106
|
+
Visualize the end-to-end user experience across touchpoints.
|
|
107
|
+
|
|
108
|
+
```markdown
|
|
109
|
+
Columns: Stages of the journey (Awareness → Consideration → Action → Retention)
|
|
110
|
+
Rows:
|
|
111
|
+
- Actions (what the user does)
|
|
112
|
+
- Touchpoints (where they interact)
|
|
113
|
+
- Thoughts (what they're thinking)
|
|
114
|
+
- Emotions (how they feel — map on a curve)
|
|
115
|
+
- Pain points (friction moments)
|
|
116
|
+
- Opportunities (design intervention points)
|
|
117
|
+
|
|
118
|
+
Rules:
|
|
119
|
+
- Map current state before designing future state
|
|
120
|
+
- Base on observed behavior, not ideal paths
|
|
121
|
+
- Identify the "moments of truth" — where experience breaks or bonds
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Continuous Discovery (Teresa Torres)
|
|
125
|
+
|
|
126
|
+
Research is not a project; it is a weekly habit.
|
|
127
|
+
|
|
128
|
+
```markdown
|
|
129
|
+
Principles:
|
|
130
|
+
1. Talk to users every week (minimum 1 interview/week)
|
|
131
|
+
2. Map the opportunity space, not the solution space
|
|
132
|
+
3. Use opportunity solution trees to connect outcomes → opportunities → solutions
|
|
133
|
+
4. Run small experiments before building features
|
|
134
|
+
5. Separate discovery (what to build) from delivery (how to build it)
|
|
135
|
+
|
|
136
|
+
Opportunity Solution Tree:
|
|
137
|
+
Desired Outcome
|
|
138
|
+
├── Opportunity A
|
|
139
|
+
│ ├── Solution 1 → Experiment
|
|
140
|
+
│ └── Solution 2 → Experiment
|
|
141
|
+
└── Opportunity B
|
|
142
|
+
├── Solution 3 → Experiment
|
|
143
|
+
└── Solution 4 → Experiment
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Survey Design
|
|
147
|
+
|
|
148
|
+
Quantitative validation of qualitative findings.
|
|
149
|
+
|
|
150
|
+
```markdown
|
|
151
|
+
Rules:
|
|
152
|
+
- Use surveys to measure, not to discover (interviews first)
|
|
153
|
+
- Limit to 5-10 questions (completion rate drops after 10)
|
|
154
|
+
- Avoid leading questions and double-barreled items
|
|
155
|
+
- Include a mix of Likert scale, multiple choice, and one open-ended
|
|
156
|
+
- Report confidence intervals, not just percentages
|
|
157
|
+
- Minimum viable sample: 30 for directional, 100+ for statistical significance
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Research Ethics
|
|
161
|
+
|
|
162
|
+
```markdown
|
|
163
|
+
Non-negotiable:
|
|
164
|
+
- Informed consent before every session
|
|
165
|
+
- Anonymize data before sharing
|
|
166
|
+
- Participants can stop at any time without consequence
|
|
167
|
+
- Compensate participants fairly for their time
|
|
168
|
+
- Never manipulate or deceive during research
|
|
169
|
+
- Store recordings securely; delete when analysis is complete
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Anti-Patterns
|
|
173
|
+
|
|
174
|
+
```markdown
|
|
175
|
+
- Confirmation bias: Only talking to users who validate your hypothesis
|
|
176
|
+
- Leading questions: "Don't you think this is easier?"
|
|
177
|
+
- Proxy research: Asking stakeholders what users want instead of asking users
|
|
178
|
+
- Research theater: Conducting research with no intention to act on findings
|
|
179
|
+
- Big-bang research: Doing all research upfront and none after launch
|
|
180
|
+
- Persona fiction: Creating personas from assumptions instead of data
|
|
181
|
+
```
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# Visual Design
|
|
2
|
+
|
|
3
|
+
Principles and systems for visual communication, design systems, and consistent UI expression.
|
|
4
|
+
|
|
5
|
+
## Core Principle
|
|
6
|
+
|
|
7
|
+
**Visual design is communication, not decoration.** Every pixel should serve a purpose: establish hierarchy, group related elements, guide attention, or reinforce meaning.
|
|
8
|
+
|
|
9
|
+
## Gestalt Principles of Visual Perception
|
|
10
|
+
|
|
11
|
+
How humans naturally perceive and group visual elements:
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
Proximity — Elements close together are perceived as related
|
|
15
|
+
→ Group related form fields; separate unrelated sections with whitespace
|
|
16
|
+
|
|
17
|
+
Similarity — Elements that look alike are perceived as related
|
|
18
|
+
→ Use consistent styling for same-type elements (all links blue, all tags pills)
|
|
19
|
+
|
|
20
|
+
Continuity — The eye follows lines, curves, and sequences
|
|
21
|
+
→ Align elements to create visual flow; use grids and alignment
|
|
22
|
+
|
|
23
|
+
Closure — The mind completes incomplete shapes
|
|
24
|
+
→ Progress bars, partially visible cards (indicating scrollable content)
|
|
25
|
+
|
|
26
|
+
Figure-Ground — Users distinguish foreground from background
|
|
27
|
+
→ Modals dim the background; selected items highlight against the list
|
|
28
|
+
|
|
29
|
+
Common Region — Elements within a boundary are perceived as grouped
|
|
30
|
+
→ Cards, bordered sections, background color changes for groupings
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Atomic Design (Brad Frost)
|
|
34
|
+
|
|
35
|
+
Scalable methodology for building design systems from smallest to largest:
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
1. Atoms — Smallest UI elements (button, input, label, icon, color, font)
|
|
39
|
+
2. Molecules — Simple groups of atoms (search bar = input + button)
|
|
40
|
+
3. Organisms — Complex components (header = logo + nav + search + avatar)
|
|
41
|
+
4. Templates — Page-level layouts with placeholder content
|
|
42
|
+
5. Pages — Templates populated with real content
|
|
43
|
+
|
|
44
|
+
Rules:
|
|
45
|
+
- Design atoms before molecules, molecules before organisms
|
|
46
|
+
- Every component should be self-contained and reusable
|
|
47
|
+
- Document every component with usage guidelines and examples
|
|
48
|
+
- Name components by what they are, not where they appear
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Design Tokens (W3C Community Group)
|
|
52
|
+
|
|
53
|
+
The single source of truth for design decisions, expressed as platform-agnostic values.
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
Token categories:
|
|
57
|
+
- Color: color.primary, color.error, color.surface, color.text.primary
|
|
58
|
+
- Typography: font.family.body, font.size.lg, font.weight.bold, line-height.tight
|
|
59
|
+
- Spacing: space.xs (4px), space.sm (8px), space.md (16px), space.lg (24px), space.xl (32px)
|
|
60
|
+
- Border: border.radius.sm, border.width.default, border.color.subtle
|
|
61
|
+
- Shadow: shadow.sm, shadow.md, shadow.lg
|
|
62
|
+
- Motion: duration.fast (100ms), duration.normal (200ms), easing.standard
|
|
63
|
+
- Breakpoints: breakpoint.sm (640px), breakpoint.md (768px), breakpoint.lg (1024px)
|
|
64
|
+
|
|
65
|
+
Rules:
|
|
66
|
+
- Tokens are the API of the design system
|
|
67
|
+
- Never use raw values in components — always reference tokens
|
|
68
|
+
- Semantic tokens (color.error) alias primitive tokens (red.500)
|
|
69
|
+
- Support theming through token swapping (light/dark mode)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Typography
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
Hierarchy:
|
|
76
|
+
- Display: Hero headings, landing pages (32-72px)
|
|
77
|
+
- H1: Page titles (28-36px)
|
|
78
|
+
- H2: Section headings (22-28px)
|
|
79
|
+
- H3: Subsection headings (18-22px)
|
|
80
|
+
- Body: Paragraph text (16px baseline)
|
|
81
|
+
- Small: Captions, metadata (12-14px)
|
|
82
|
+
|
|
83
|
+
Rules:
|
|
84
|
+
- Maximum 2 font families (one for headings, one for body — or the same)
|
|
85
|
+
- Body text minimum 16px (anything smaller causes readability issues)
|
|
86
|
+
- Line height: 1.4-1.6 for body text, 1.1-1.3 for headings
|
|
87
|
+
- Line length: 45-75 characters per line (optimal ~66)
|
|
88
|
+
- Paragraph spacing: 1em minimum between paragraphs
|
|
89
|
+
- Contrast ratio: 4.5:1 minimum for body text, 3:1 for large text (WCAG AA)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Color
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
System:
|
|
96
|
+
- Primary: Brand color, used for CTAs and key interactive elements
|
|
97
|
+
- Secondary: Supporting color for less prominent interactive elements
|
|
98
|
+
- Neutral: Grays for text, borders, backgrounds, dividers
|
|
99
|
+
- Error: Red/warm for error states and destructive actions
|
|
100
|
+
- Warning: Amber/yellow for caution and non-blocking alerts
|
|
101
|
+
- Success: Green for confirmation and positive feedback
|
|
102
|
+
- Info: Blue for informational messages
|
|
103
|
+
|
|
104
|
+
Rules:
|
|
105
|
+
- Never use color as the only indicator (add icons, text, patterns)
|
|
106
|
+
- Test with color blindness simulators (protanopia, deuteranopia, tritanopia)
|
|
107
|
+
- Dark mode is not inverted light mode — redesign contrast and emphasis
|
|
108
|
+
- Limit palette to 5-8 functional colors plus neutrals
|
|
109
|
+
- Ensure all color combinations meet WCAG 2.2 AA contrast ratios
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Spacing and Layout
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
Spacing scale (base-8 system):
|
|
116
|
+
4px — Tight: between related inline elements
|
|
117
|
+
8px — Small: between related stacked elements
|
|
118
|
+
16px — Medium: between components within a section
|
|
119
|
+
24px — Large: between sections
|
|
120
|
+
32px — Extra-large: major section breaks
|
|
121
|
+
48px — 2XL: page-level breathing room
|
|
122
|
+
|
|
123
|
+
Grid:
|
|
124
|
+
- Use a consistent column grid (12-column for web, 4-column for mobile)
|
|
125
|
+
- Gutters match the spacing scale (16px or 24px)
|
|
126
|
+
- Content maxwidth: 1200-1440px for readability
|
|
127
|
+
- Responsive breakpoints: 640, 768, 1024, 1280px
|
|
128
|
+
|
|
129
|
+
Whitespace:
|
|
130
|
+
- Whitespace is not wasted space — it creates hierarchy and breathing room
|
|
131
|
+
- More whitespace = more perceived quality and readability
|
|
132
|
+
- Group related elements with less whitespace; separate unrelated with more
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Iconography
|
|
136
|
+
|
|
137
|
+
```markdown
|
|
138
|
+
Rules:
|
|
139
|
+
- Use a single icon set for consistency (don't mix icon libraries)
|
|
140
|
+
- Icons must be accompanied by text labels (except universally recognized: close, search, menu)
|
|
141
|
+
- Minimum touch target: 44x44px even if the icon is smaller
|
|
142
|
+
- Support both outlined and filled variants for state changes
|
|
143
|
+
- Ensure icons work at small sizes (16px minimum)
|
|
144
|
+
- Provide alt text or aria-label for meaningful icons
|
|
145
|
+
- Use aria-hidden="true" for decorative icons
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Responsive Design
|
|
149
|
+
|
|
150
|
+
```markdown
|
|
151
|
+
Approach: Mobile-first, scale up
|
|
152
|
+
|
|
153
|
+
Breakpoints:
|
|
154
|
+
< 640px — Mobile (single column, stacked layout)
|
|
155
|
+
640-768px — Large mobile / small tablet
|
|
156
|
+
768-1024px — Tablet (2-column where appropriate)
|
|
157
|
+
1024-1280px — Desktop
|
|
158
|
+
> 1280px — Wide desktop (max-width container, don't stretch)
|
|
159
|
+
|
|
160
|
+
Rules:
|
|
161
|
+
- Design mobile first, then adapt for larger screens
|
|
162
|
+
- Touch targets: 44x44px minimum on mobile
|
|
163
|
+
- No horizontal scrolling on any breakpoint
|
|
164
|
+
- Images are fluid (max-width: 100%)
|
|
165
|
+
- Typography scales with viewport (clamp() for fluid type)
|
|
166
|
+
- Test on real devices, not just browser resize
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Design System Governance
|
|
170
|
+
|
|
171
|
+
```markdown
|
|
172
|
+
Rules:
|
|
173
|
+
- Every component needs documentation: usage, props, do/don't examples
|
|
174
|
+
- Changes to tokens or components require design review
|
|
175
|
+
- Deprecate before removing — provide migration path
|
|
176
|
+
- Version the design system alongside code releases
|
|
177
|
+
- Audit for consistency quarterly
|
|
178
|
+
- Component library is the single source of truth (not a Figma file that diverges)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Anti-Patterns
|
|
182
|
+
|
|
183
|
+
```markdown
|
|
184
|
+
- Snowflake components: One-off designs that don't use the design system
|
|
185
|
+
- Token bypass: Hard-coding values instead of referencing tokens
|
|
186
|
+
- Decoration-driven design: Visual flourishes that add no meaning
|
|
187
|
+
- Inconsistent spacing: Mixing arbitrary pixel values instead of a scale
|
|
188
|
+
- Font overload: More than 2 font families or 4+ weights
|
|
189
|
+
- Color soup: Too many colors with no systematic rationale
|
|
190
|
+
- Pixel-perfect obsession: Spending hours on 1px alignment instead of testing usability
|
|
191
|
+
```
|