@champpaba/claude-agent-kit 1.0.0 → 1.1.1

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.
Files changed (84) hide show
  1. package/{template/.claude → .claude}/CHANGELOG-v1.1.1.md +259 -259
  2. package/{template/.claude → .claude}/CLAUDE.md +555 -329
  3. package/{template/.claude → .claude}/agents/01-integration.md +797 -797
  4. package/{template/.claude → .claude}/agents/02-uxui-frontend.md +955 -899
  5. package/{template/.claude → .claude}/agents/03-test-debug.md +759 -759
  6. package/{template/.claude → .claude}/agents/04-frontend.md +1099 -1099
  7. package/{template/.claude → .claude}/agents/05-backend.md +1217 -1217
  8. package/{template/.claude → .claude}/agents/06-database.md +969 -969
  9. package/{template/.claude → .claude}/commands/agentsetup.md +1464 -1464
  10. package/{template/.claude → .claude}/commands/cdev.md +327 -327
  11. package/{template/.claude → .claude}/commands/csetup.md +447 -447
  12. package/{template/.claude → .claude}/commands/cstatus.md +60 -60
  13. package/{template/.claude → .claude}/commands/cview.md +364 -364
  14. package/.claude/commands/designsetup.md +838 -0
  15. package/.claude/commands/extract.md +1005 -0
  16. package/.claude/commands/pageplan.md +327 -0
  17. package/{template/.claude → .claude}/commands/psetup.md +101 -101
  18. package/{template/.claude → .claude}/contexts/design/accessibility.md +611 -611
  19. package/{template/.claude → .claude}/contexts/design/box-thinking.md +566 -553
  20. package/{template/.claude → .claude}/contexts/design/color-theory.md +519 -498
  21. package/{template/.claude → .claude}/contexts/design/index.md +290 -247
  22. package/{template/.claude → .claude}/contexts/design/layout.md +400 -400
  23. package/{template/.claude → .claude}/contexts/design/responsive.md +551 -551
  24. package/{template/.claude → .claude}/contexts/design/shadows.md +522 -522
  25. package/{template/.claude → .claude}/contexts/design/spacing.md +445 -428
  26. package/{template/.claude → .claude}/contexts/design/typography.md +465 -465
  27. package/{template/.claude → .claude}/contexts/domain/README.md +164 -164
  28. package/{template/.claude → .claude}/contexts/patterns/agent-coordination.md +388 -388
  29. package/{template/.claude → .claude}/contexts/patterns/agent-discovery.md +182 -182
  30. package/{template/.claude → .claude}/contexts/patterns/change-workflow.md +538 -538
  31. package/{template/.claude → .claude}/contexts/patterns/code-standards.md +515 -515
  32. package/{template/.claude → .claude}/contexts/patterns/development-principles.md +513 -513
  33. package/{template/.claude → .claude}/contexts/patterns/error-handling.md +478 -478
  34. package/{template/.claude → .claude}/contexts/patterns/error-recovery.md +365 -365
  35. package/{template/.claude → .claude}/contexts/patterns/logging.md +424 -424
  36. package/{template/.claude → .claude}/contexts/patterns/task-breakdown.md +452 -452
  37. package/{template/.claude → .claude}/contexts/patterns/task-classification.md +523 -523
  38. package/{template/.claude → .claude}/contexts/patterns/tdd-classification.md +516 -516
  39. package/{template/.claude → .claude}/contexts/patterns/testing.md +413 -413
  40. package/{template/.claude → .claude}/contexts/patterns/validation-framework.md +776 -776
  41. package/{template/.claude → .claude}/lib/README.md +39 -39
  42. package/{template/.claude → .claude}/lib/agent-executor.md +258 -258
  43. package/{template/.claude → .claude}/lib/agent-router.md +572 -572
  44. package/{template/.claude → .claude}/lib/flags-updater.md +469 -469
  45. package/{template/.claude → .claude}/lib/tdd-classifier.md +345 -345
  46. package/{template/.claude → .claude}/lib/validation-gates.md +484 -484
  47. package/{template/.claude → .claude}/settings.local.json +42 -42
  48. package/.claude/templates/STYLE_GUIDE.template.md +879 -0
  49. package/{template/.claude → .claude}/templates/context-template.md +45 -45
  50. package/{template/.claude → .claude}/templates/flags-template.json +42 -42
  51. package/.claude/templates/page-plan-example.md +562 -0
  52. package/{template/.claude → .claude}/templates/phase-templates.json +124 -124
  53. package/{template/.claude → .claude}/templates/phases-sections/accessibility-test.md +17 -17
  54. package/{template/.claude → .claude}/templates/phases-sections/api-design.md +37 -37
  55. package/{template/.claude → .claude}/templates/phases-sections/backend-tests.md +16 -16
  56. package/{template/.claude → .claude}/templates/phases-sections/backend.md +37 -37
  57. package/{template/.claude → .claude}/templates/phases-sections/business-logic-validation.md +16 -16
  58. package/{template/.claude → .claude}/templates/phases-sections/component-tests.md +17 -17
  59. package/{template/.claude → .claude}/templates/phases-sections/contract-backend.md +16 -16
  60. package/{template/.claude → .claude}/templates/phases-sections/contract-frontend.md +16 -16
  61. package/{template/.claude → .claude}/templates/phases-sections/database.md +35 -35
  62. package/{template/.claude → .claude}/templates/phases-sections/documentation.md +17 -17
  63. package/{template/.claude → .claude}/templates/phases-sections/e2e-tests.md +16 -16
  64. package/{template/.claude → .claude}/templates/phases-sections/fix-implementation.md +17 -17
  65. package/{template/.claude → .claude}/templates/phases-sections/frontend-integration.md +18 -18
  66. package/{template/.claude → .claude}/templates/phases-sections/frontend-mockup.md +123 -123
  67. package/{template/.claude → .claude}/templates/phases-sections/manual-flow-test.md +15 -15
  68. package/{template/.claude → .claude}/templates/phases-sections/manual-ux-test.md +16 -16
  69. package/{template/.claude → .claude}/templates/phases-sections/refactor-implementation.md +17 -17
  70. package/{template/.claude → .claude}/templates/phases-sections/refactor.md +16 -16
  71. package/{template/.claude → .claude}/templates/phases-sections/regression-tests.md +15 -15
  72. package/{template/.claude → .claude}/templates/phases-sections/report.md +16 -16
  73. package/{template/.claude → .claude}/templates/phases-sections/responsive-test.md +16 -16
  74. package/{template/.claude → .claude}/templates/phases-sections/script-implementation.md +43 -43
  75. package/{template/.claude → .claude}/templates/phases-sections/test-coverage.md +16 -16
  76. package/{template/.claude → .claude}/templates/phases-sections/user-approval.md +14 -14
  77. package/LICENSE +21 -21
  78. package/README.md +758 -331
  79. package/lib/init.js +1 -1
  80. package/lib/update.js +1 -1
  81. package/package.json +2 -2
  82. /package/{template/.claude → .claude}/contexts/patterns/frontend-component-strategy.md +0 -0
  83. /package/{template/.claude → .claude}/contexts/patterns/git-workflow.md +0 -0
  84. /package/{template/.claude → .claude}/contexts/patterns/ui-component-consistency.md +0 -0
@@ -1,247 +1,290 @@
1
- # Design System Hub
2
-
3
- > 🎯 **Purpose**: Design Principal Index - Guide all design decisions with proper context
4
-
5
- ---
6
-
7
- ## 🧠 Design Decision Framework
8
-
9
- **Before ANY design recommendation, ask:**
10
-
11
- 1. **What type of decision?**
12
- - Color/Palette
13
- - Layout/Spacing
14
- - Depth/Shadows
15
- - Typography
16
- - Component Structure
17
- - Box Relationships
18
-
19
- 2. **What context?**
20
- - Project-specific design tokens (see `@/.claude/contexts/domain/[project]/design-tokens.md`)
21
- - Universal design principles (this directory)
22
-
23
- 3. **What's the user goal?**
24
- - Usability (Can users complete tasks easily?)
25
- - Accessibility (Can ALL users access content?)
26
- - Aesthetics (Does it look professional and trustworthy?)
27
-
28
- **Then route to:**
29
- - **Color** → See `color-theory.md` for harmony, contrast, accessibility
30
- - **Layout** → See `layout.md` + `box-thinking.md` for structure and flow
31
- - **Depth** See `shadows.md` for elevation and layering
32
- - **Typography** → See `typography.md` for hierarchy and readability
33
- - **Spacing** See `spacing.md` for consistent gaps and rhythm
34
- - **Responsive** See `responsive.md` for behavior across devices
35
- - **Accessibility** → See `accessibility.md` for WCAG compliance
36
-
37
- ---
38
-
39
- ## 📦 Box Thinking Framework
40
-
41
- **Core Principle:** Every element is a box. Understand box relationships before writing code.
42
-
43
- ### Box Analysis Method
44
-
45
- > "Before building or improving this layout, take a step back and observe **every element on the screen** — navigation, headers, cards, buttons, sidebars, text blocks — everything that occupies space. Imagine **each of them as a box** and describe how they relate to one another: which boxes contain others, how they align, and how space flows between them."
46
-
47
- ### Box Relationship Patterns
48
-
49
- - **Container Boxes**: What contains what (hierarchy)
50
- - **Adjacent Boxes**: Side-by-side relationships
51
- - **Nested Boxes**: Parent-child relationships
52
- - **Space Flow**: How space flows between boxes
53
- - **Alignment Logic**: How boxes position relative to each other
54
-
55
- ### Box Behavior in Responsive Context
56
-
57
- > "Now, describe how this layout behaves when the screen or container changes size. Think in terms of movement, proportion, and flow, not pixels. Which sections move above or below others? Which expand, and which step back?"
58
-
59
- **Box Movement Patterns:**
60
- - **Stacking**: Horizontal → Vertical arrangement
61
- - **Merging**: Multiple boxes → Single unified box
62
- - **Prioritizing**: Important boxes maintain prominence
63
- - **Compressing**: Boxes shrink but maintain relationships
64
- - **Reorganizing**: Smart rules for box rearrangement
65
-
66
- **See `box-thinking.md` for complete framework.**
67
-
68
- ---
69
-
70
- ## 🎨 Universal Design Principles
71
-
72
- ### Color System
73
-
74
- **60-30-10 Rule** (Industry standard for balanced color distribution)
75
- - **60% Dominant**: Neutral colors (backgrounds, text) - Creates calm foundation
76
- - **30% Secondary**: Supporting colors (secondary brand color, muted tones)
77
- - **10% Accent**: Primary brand color for emphasis (CTAs, highlights)
78
-
79
- **Color Harmony Types:**
80
- - **Monochromatic**: Variations of single hue (most harmonious)
81
- - **Complementary**: Opposite colors on color wheel (high contrast)
82
- - **Analogous**: Adjacent colors (cohesive, natural)
83
- - **Triadic**: 3 colors evenly spaced (vibrant, balanced)
84
-
85
- **Accessibility Requirements:**
86
- - Text on background: Minimum 4.5:1 contrast (WCAG AA)
87
- - Large text (18pt+): Minimum 3:1 contrast
88
- - UI components: Minimum 3:1 contrast
89
-
90
- **See `color-theory.md` for complete color system.**
91
-
92
- ---
93
-
94
- ### Spacing System
95
-
96
- **Base Unit Approach:**
97
- ```css
98
- --spacing: 0.25rem; /* 4px - Base spacing unit */
99
- ```
100
-
101
- **Scale (Multiples of base):**
102
- - `1x` (0.25rem / 4px) - Tiny gaps
103
- - `2x` (0.5rem / 8px) - Small gaps
104
- - `3x` (0.75rem / 12px) - Medium gaps
105
- - `4x` (1rem / 16px) - Default gaps
106
- - `6x` (1.5rem / 24px) - Large gaps
107
- - `8x` (2rem / 32px) - XL gaps
108
- - `12x` (3rem / 48px) - XXL gaps
109
-
110
- **See `spacing.md` for complete spacing system.**
111
-
112
- ---
113
-
114
- ### Shadow System
115
-
116
- **3-Tier Elevation:**
117
-
118
- **Level 1: Subtle** (Cards, Inputs)
119
- ```css
120
- --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
121
- ```
122
-
123
- **Level 2: Medium** (Dropdowns, Modals)
124
- ```css
125
- --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1),
126
- 0 2px 4px -2px rgb(0 0 0 / 0.1);
127
- ```
128
-
129
- **Level 3: Large** (Overlays, Popovers)
130
- ```css
131
- --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
132
- 0 4px 6px -4px rgb(0 0 0 / 0.1);
133
- ```
134
-
135
- **See `shadows.md` for complete shadow system.**
136
-
137
- ---
138
-
139
- ### Typography Hierarchy
140
-
141
- **5-Level System:**
142
-
143
- 1. **H1** (Display) - 2.5rem (40px) - Hero titles
144
- 2. **H2** (Headline) - 2rem (32px) - Section titles
145
- 3. **H3** (Title) - 1.5rem (24px) - Subsection titles
146
- 4. **Body** (Text) - 1rem (16px) - Paragraphs, content
147
- 5. **Small** (Caption) - 0.875rem (14px) - Labels, metadata
148
-
149
- **Line Height Rules:**
150
- - Headings: 1.2-1.3 (tight for impact)
151
- - Body text: 1.5-1.6 (comfortable reading)
152
- - Small text: 1.4-1.5 (legible but compact)
153
-
154
- **See `typography.md` for complete typography system.**
155
-
156
- ---
157
-
158
- ### Responsive Behavior
159
-
160
- **3-Tier Breakpoint System:**
161
-
162
- ```css
163
- /* Mobile-first approach */
164
- --breakpoint-sm: 640px; /* Tablets */
165
- --breakpoint-md: 768px; /* Small laptops */
166
- --breakpoint-lg: 1024px; /* Desktops */
167
- ```
168
-
169
- **Layout Flow Rules:**
170
- - Mobile (< 640px): Stack all boxes vertically
171
- - Tablet (640-1024px): Partial side-by-side, smart stacking
172
- - Desktop (> 1024px): Full multi-column layouts
173
-
174
- **See `responsive.md` for complete responsive patterns.**
175
-
176
- ---
177
-
178
- ## 🔍 When to Use Each File
179
-
180
- | Need | File | Purpose |
181
- |------|------|---------|
182
- | Choose colors for new feature | `color-theory.md` | Color harmony, contrast, accessibility |
183
- | Set spacing between elements | `spacing.md` | Consistent gaps, rhythm, whitespace |
184
- | Add shadows to cards/modals | `shadows.md` | Elevation, depth, layering |
185
- | Define text hierarchy | `typography.md` | Font sizes, weights, line heights |
186
- | Plan component layout | `layout.md` + `box-thinking.md` | Box structure, alignment |
187
- | Make responsive design | `responsive.md` | Breakpoints, movement patterns |
188
- | Ensure accessibility | `accessibility.md` | WCAG compliance, keyboard nav |
189
-
190
- ---
191
-
192
- ## 🎯 Quick Start Checklist
193
-
194
- **For every new UI component:**
195
-
196
- - [ ] **Box Structure** - Identify all boxes and their relationships
197
- - [ ] **Color** - Apply 60-30-10 rule, check contrast (4.5:1 min)
198
- - [ ] **Spacing** - Use multiples of base unit (0.25rem)
199
- - [ ] **Typography** - Follow 5-level hierarchy
200
- - [ ] **Shadows** - Use 3-tier elevation system
201
- - [ ] **Responsive** - Test all 3 breakpoints (mobile, tablet, desktop)
202
- - [ ] **Accessibility** - Keyboard navigation, screen reader support
203
-
204
- ---
205
-
206
- ## 📖 Design System Files
207
-
208
- ```
209
- design/
210
- ├── index.md (this file) # Design hub and decision framework
211
- ├── color-theory.md # Color harmony, contrast, accessibility
212
- ├── spacing.md # Spacing scale, rhythm, whitespace
213
- ├── shadows.md # 3-tier shadow system
214
- ├── typography.md # Font hierarchy, sizes, weights
215
- ├── layout.md # Layout patterns, alignment
216
- ├── responsive.md # Breakpoints, responsive behavior
217
- ├── box-thinking.md # Box analysis framework
218
- └── accessibility.md # WCAG compliance, a11y patterns
219
- ```
220
-
221
- ---
222
-
223
- ## 🔗 Project-Specific Design
224
-
225
- **Universal principles (this directory) + Project tokens (domain folder)**
226
-
227
- **Project design tokens go in:**
228
- ```
229
- .claude/contexts/domain/[project-name]/design-tokens.md
230
- ```
231
-
232
- **Example:**
233
- ```css
234
- /* domain/ecommerce/design-tokens.md */
235
- --primary: #3B82F6; /* Blue - Trust */
236
- --secondary: #10B981; /* Green - Success */
237
- --accent: #F59E0B; /* Amber - Urgency */
238
- ```
239
-
240
- **How agents use this:**
241
- 1. Load universal principles (design/)
242
- 2. Load project tokens (domain/[project]/)
243
- 3. Apply principles with project colors
244
-
245
- ---
246
-
247
- **💡 Remember: Think in boxes, design with purpose, implement with consistency!**
1
+ # Design System Hub
2
+
3
+ > 🎯 **Purpose**: Design Principal Index - Guide all design decisions with proper context
4
+
5
+ ---
6
+
7
+ ## 🎨 IMPORTANT: Style Guide Priority System
8
+
9
+ **uxui-frontend agents MUST check this priority order:**
10
+
11
+ ### Priority 1: Project-Specific Style Guide (Highest)
12
+ ```
13
+ design-system/STYLE_GUIDE.md
14
+ ```
15
+
16
+ **If this file exists:**
17
+ - Use STYLE_GUIDE.md as **PRIMARY source of truth**
18
+ - Contains: Complete design system (colors, typography, spacing, components)
19
+ - Generated by: `/designsetup` command (from reference/codebase/AI)
20
+ - **DO NOT** override with universal principles below
21
+
22
+ **If this file does NOT exist:**
23
+ - ⚠️ Fallback to Priority 2 (universal principles)
24
+ - 💡 Suggest user run: `/designsetup`
25
+
26
+ ### Priority 2: Universal Design Principles (Fallback)
27
+ ```
28
+ .claude/contexts/design/*.md (this directory)
29
+ ```
30
+
31
+ **Use these when:**
32
+ - No STYLE_GUIDE.md exists
33
+ - Need general design theory
34
+ - Understanding design concepts (box thinking, color theory)
35
+
36
+ ### Priority 3: Legacy Project Tokens (Deprecated)
37
+ ```
38
+ .claude/contexts/domain/[project]/design-tokens.md
39
+ ```
40
+
41
+ **Note:** This is being replaced by STYLE_GUIDE.md
42
+
43
+ ---
44
+
45
+ ## 🧠 Design Decision Framework
46
+
47
+ **Before ANY design recommendation, ask:**
48
+
49
+ 1. **Do we have a style guide?**
50
+ - Check: `design-system/STYLE_GUIDE.md`
51
+ - If YES Use it (Priority 1)
52
+ - If NO Use universal principles (Priority 2)
53
+
54
+ 2. **What type of decision?**
55
+ - Color/Palette
56
+ - Layout/Spacing
57
+ - Depth/Shadows
58
+ - Typography
59
+ - Component Structure
60
+ - Box Relationships
61
+
62
+ 3. **What context?**
63
+ - Project-specific style guide (STYLE_GUIDE.md)
64
+ - Universal design principles (this directory)
65
+
66
+ 4. **What's the user goal?**
67
+ - Usability (Can users complete tasks easily?)
68
+ - Accessibility (Can ALL users access content?)
69
+ - Aesthetics (Does it look professional and trustworthy?)
70
+
71
+ **Then route to:**
72
+ - **Color** → See `color-theory.md` for harmony, contrast, accessibility
73
+ - **Layout** → See `layout.md` + `box-thinking.md` for structure and flow
74
+ - **Depth** See `shadows.md` for elevation and layering
75
+ - **Typography** See `typography.md` for hierarchy and readability
76
+ - **Spacing** See `spacing.md` for consistent gaps and rhythm
77
+ - **Responsive** See `responsive.md` for behavior across devices
78
+ - **Accessibility** → See `accessibility.md` for WCAG compliance
79
+
80
+ ---
81
+
82
+ ## 📦 Box Thinking Framework
83
+
84
+ **Core Principle:** Every element is a box. Understand box relationships before writing code.
85
+
86
+ ### Box Analysis Method
87
+
88
+ > "Before building or improving this layout, take a step back and observe **every element on the screen** — navigation, headers, cards, buttons, sidebars, text blocks — everything that occupies space. Imagine **each of them as a box** and describe how they relate to one another: which boxes contain others, how they align, and how space flows between them."
89
+
90
+ ### Box Relationship Patterns
91
+
92
+ - **Container Boxes**: What contains what (hierarchy)
93
+ - **Adjacent Boxes**: Side-by-side relationships
94
+ - **Nested Boxes**: Parent-child relationships
95
+ - **Space Flow**: How space flows between boxes
96
+ - **Alignment Logic**: How boxes position relative to each other
97
+
98
+ ### Box Behavior in Responsive Context
99
+
100
+ > "Now, describe how this layout behaves when the screen or container changes size. Think in terms of movement, proportion, and flow, not pixels. Which sections move above or below others? Which expand, and which step back?"
101
+
102
+ **Box Movement Patterns:**
103
+ - **Stacking**: Horizontal Vertical arrangement
104
+ - **Merging**: Multiple boxes Single unified box
105
+ - **Prioritizing**: Important boxes maintain prominence
106
+ - **Compressing**: Boxes shrink but maintain relationships
107
+ - **Reorganizing**: Smart rules for box rearrangement
108
+
109
+ **See `box-thinking.md` for complete framework.**
110
+
111
+ ---
112
+
113
+ ## 🎨 Universal Design Principles
114
+
115
+ ### Color System
116
+
117
+ **60-30-10 Rule** (Industry standard for balanced color distribution)
118
+ - **60% Dominant**: Neutral colors (backgrounds, text) - Creates calm foundation
119
+ - **30% Secondary**: Supporting colors (secondary brand color, muted tones)
120
+ - **10% Accent**: Primary brand color for emphasis (CTAs, highlights)
121
+
122
+ **Color Harmony Types:**
123
+ - **Monochromatic**: Variations of single hue (most harmonious)
124
+ - **Complementary**: Opposite colors on color wheel (high contrast)
125
+ - **Analogous**: Adjacent colors (cohesive, natural)
126
+ - **Triadic**: 3 colors evenly spaced (vibrant, balanced)
127
+
128
+ **Accessibility Requirements:**
129
+ - Text on background: Minimum 4.5:1 contrast (WCAG AA)
130
+ - Large text (18pt+): Minimum 3:1 contrast
131
+ - UI components: Minimum 3:1 contrast
132
+
133
+ **See `color-theory.md` for complete color system.**
134
+
135
+ ---
136
+
137
+ ### Spacing System
138
+
139
+ **Base Unit Approach:**
140
+ ```css
141
+ --spacing: 0.25rem; /* 4px - Base spacing unit */
142
+ ```
143
+
144
+ **Scale (Multiples of base):**
145
+ - `1x` (0.25rem / 4px) - Tiny gaps
146
+ - `2x` (0.5rem / 8px) - Small gaps
147
+ - `3x` (0.75rem / 12px) - Medium gaps
148
+ - `4x` (1rem / 16px) - Default gaps
149
+ - `6x` (1.5rem / 24px) - Large gaps
150
+ - `8x` (2rem / 32px) - XL gaps
151
+ - `12x` (3rem / 48px) - XXL gaps
152
+
153
+ **See `spacing.md` for complete spacing system.**
154
+
155
+ ---
156
+
157
+ ### Shadow System
158
+
159
+ **3-Tier Elevation:**
160
+
161
+ **Level 1: Subtle** (Cards, Inputs)
162
+ ```css
163
+ --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
164
+ ```
165
+
166
+ **Level 2: Medium** (Dropdowns, Modals)
167
+ ```css
168
+ --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1),
169
+ 0 2px 4px -2px rgb(0 0 0 / 0.1);
170
+ ```
171
+
172
+ **Level 3: Large** (Overlays, Popovers)
173
+ ```css
174
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
175
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
176
+ ```
177
+
178
+ **See `shadows.md` for complete shadow system.**
179
+
180
+ ---
181
+
182
+ ### Typography Hierarchy
183
+
184
+ **5-Level System:**
185
+
186
+ 1. **H1** (Display) - 2.5rem (40px) - Hero titles
187
+ 2. **H2** (Headline) - 2rem (32px) - Section titles
188
+ 3. **H3** (Title) - 1.5rem (24px) - Subsection titles
189
+ 4. **Body** (Text) - 1rem (16px) - Paragraphs, content
190
+ 5. **Small** (Caption) - 0.875rem (14px) - Labels, metadata
191
+
192
+ **Line Height Rules:**
193
+ - Headings: 1.2-1.3 (tight for impact)
194
+ - Body text: 1.5-1.6 (comfortable reading)
195
+ - Small text: 1.4-1.5 (legible but compact)
196
+
197
+ **See `typography.md` for complete typography system.**
198
+
199
+ ---
200
+
201
+ ### Responsive Behavior
202
+
203
+ **3-Tier Breakpoint System:**
204
+
205
+ ```css
206
+ /* Mobile-first approach */
207
+ --breakpoint-sm: 640px; /* Tablets */
208
+ --breakpoint-md: 768px; /* Small laptops */
209
+ --breakpoint-lg: 1024px; /* Desktops */
210
+ ```
211
+
212
+ **Layout Flow Rules:**
213
+ - Mobile (< 640px): Stack all boxes vertically
214
+ - Tablet (640-1024px): Partial side-by-side, smart stacking
215
+ - Desktop (> 1024px): Full multi-column layouts
216
+
217
+ **See `responsive.md` for complete responsive patterns.**
218
+
219
+ ---
220
+
221
+ ## 🔍 When to Use Each File
222
+
223
+ | Need | File | Purpose |
224
+ |------|------|---------|
225
+ | Choose colors for new feature | `color-theory.md` | Color harmony, contrast, accessibility |
226
+ | Set spacing between elements | `spacing.md` | Consistent gaps, rhythm, whitespace |
227
+ | Add shadows to cards/modals | `shadows.md` | Elevation, depth, layering |
228
+ | Define text hierarchy | `typography.md` | Font sizes, weights, line heights |
229
+ | Plan component layout | `layout.md` + `box-thinking.md` | Box structure, alignment |
230
+ | Make responsive design | `responsive.md` | Breakpoints, movement patterns |
231
+ | Ensure accessibility | `accessibility.md` | WCAG compliance, keyboard nav |
232
+
233
+ ---
234
+
235
+ ## 🎯 Quick Start Checklist
236
+
237
+ **For every new UI component:**
238
+
239
+ - [ ] **Box Structure** - Identify all boxes and their relationships
240
+ - [ ] **Color** - Apply 60-30-10 rule, check contrast (4.5:1 min)
241
+ - [ ] **Spacing** - Use multiples of base unit (0.25rem)
242
+ - [ ] **Typography** - Follow 5-level hierarchy
243
+ - [ ] **Shadows** - Use 3-tier elevation system
244
+ - [ ] **Responsive** - Test all 3 breakpoints (mobile, tablet, desktop)
245
+ - [ ] **Accessibility** - Keyboard navigation, screen reader support
246
+
247
+ ---
248
+
249
+ ## 📖 Design System Files
250
+
251
+ ```
252
+ design/
253
+ ├── index.md (this file) # Design hub and decision framework
254
+ ├── color-theory.md # Color harmony, contrast, accessibility
255
+ ├── spacing.md # Spacing scale, rhythm, whitespace
256
+ ├── shadows.md # 3-tier shadow system
257
+ ├── typography.md # Font hierarchy, sizes, weights
258
+ ├── layout.md # Layout patterns, alignment
259
+ ├── responsive.md # Breakpoints, responsive behavior
260
+ ├── box-thinking.md # Box analysis framework
261
+ └── accessibility.md # WCAG compliance, a11y patterns
262
+ ```
263
+
264
+ ---
265
+
266
+ ## 🔗 Project-Specific Design
267
+
268
+ **Universal principles (this directory) + Project tokens (domain folder)**
269
+
270
+ **Project design tokens go in:**
271
+ ```
272
+ .claude/contexts/domain/[project-name]/design-tokens.md
273
+ ```
274
+
275
+ **Example:**
276
+ ```css
277
+ /* domain/ecommerce/design-tokens.md */
278
+ --primary: #3B82F6; /* Blue - Trust */
279
+ --secondary: #10B981; /* Green - Success */
280
+ --accent: #F59E0B; /* Amber - Urgency */
281
+ ```
282
+
283
+ **How agents use this:**
284
+ 1. Load universal principles (design/)
285
+ 2. Load project tokens (domain/[project]/)
286
+ 3. Apply principles with project colors
287
+
288
+ ---
289
+
290
+ **💡 Remember: Think in boxes, design with purpose, implement with consistency!**