@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.
- package/{template/.claude → .claude}/CHANGELOG-v1.1.1.md +259 -259
- package/{template/.claude → .claude}/CLAUDE.md +555 -329
- package/{template/.claude → .claude}/agents/01-integration.md +797 -797
- package/{template/.claude → .claude}/agents/02-uxui-frontend.md +955 -899
- package/{template/.claude → .claude}/agents/03-test-debug.md +759 -759
- package/{template/.claude → .claude}/agents/04-frontend.md +1099 -1099
- package/{template/.claude → .claude}/agents/05-backend.md +1217 -1217
- package/{template/.claude → .claude}/agents/06-database.md +969 -969
- package/{template/.claude → .claude}/commands/agentsetup.md +1464 -1464
- package/{template/.claude → .claude}/commands/cdev.md +327 -327
- package/{template/.claude → .claude}/commands/csetup.md +447 -447
- package/{template/.claude → .claude}/commands/cstatus.md +60 -60
- package/{template/.claude → .claude}/commands/cview.md +364 -364
- package/.claude/commands/designsetup.md +838 -0
- package/.claude/commands/extract.md +1005 -0
- package/.claude/commands/pageplan.md +327 -0
- package/{template/.claude → .claude}/commands/psetup.md +101 -101
- package/{template/.claude → .claude}/contexts/design/accessibility.md +611 -611
- package/{template/.claude → .claude}/contexts/design/box-thinking.md +566 -553
- package/{template/.claude → .claude}/contexts/design/color-theory.md +519 -498
- package/{template/.claude → .claude}/contexts/design/index.md +290 -247
- package/{template/.claude → .claude}/contexts/design/layout.md +400 -400
- package/{template/.claude → .claude}/contexts/design/responsive.md +551 -551
- package/{template/.claude → .claude}/contexts/design/shadows.md +522 -522
- package/{template/.claude → .claude}/contexts/design/spacing.md +445 -428
- package/{template/.claude → .claude}/contexts/design/typography.md +465 -465
- package/{template/.claude → .claude}/contexts/domain/README.md +164 -164
- package/{template/.claude → .claude}/contexts/patterns/agent-coordination.md +388 -388
- package/{template/.claude → .claude}/contexts/patterns/agent-discovery.md +182 -182
- package/{template/.claude → .claude}/contexts/patterns/change-workflow.md +538 -538
- package/{template/.claude → .claude}/contexts/patterns/code-standards.md +515 -515
- package/{template/.claude → .claude}/contexts/patterns/development-principles.md +513 -513
- package/{template/.claude → .claude}/contexts/patterns/error-handling.md +478 -478
- package/{template/.claude → .claude}/contexts/patterns/error-recovery.md +365 -365
- package/{template/.claude → .claude}/contexts/patterns/logging.md +424 -424
- package/{template/.claude → .claude}/contexts/patterns/task-breakdown.md +452 -452
- package/{template/.claude → .claude}/contexts/patterns/task-classification.md +523 -523
- package/{template/.claude → .claude}/contexts/patterns/tdd-classification.md +516 -516
- package/{template/.claude → .claude}/contexts/patterns/testing.md +413 -413
- package/{template/.claude → .claude}/contexts/patterns/validation-framework.md +776 -776
- package/{template/.claude → .claude}/lib/README.md +39 -39
- package/{template/.claude → .claude}/lib/agent-executor.md +258 -258
- package/{template/.claude → .claude}/lib/agent-router.md +572 -572
- package/{template/.claude → .claude}/lib/flags-updater.md +469 -469
- package/{template/.claude → .claude}/lib/tdd-classifier.md +345 -345
- package/{template/.claude → .claude}/lib/validation-gates.md +484 -484
- package/{template/.claude → .claude}/settings.local.json +42 -42
- package/.claude/templates/STYLE_GUIDE.template.md +879 -0
- package/{template/.claude → .claude}/templates/context-template.md +45 -45
- package/{template/.claude → .claude}/templates/flags-template.json +42 -42
- package/.claude/templates/page-plan-example.md +562 -0
- package/{template/.claude → .claude}/templates/phase-templates.json +124 -124
- package/{template/.claude → .claude}/templates/phases-sections/accessibility-test.md +17 -17
- package/{template/.claude → .claude}/templates/phases-sections/api-design.md +37 -37
- package/{template/.claude → .claude}/templates/phases-sections/backend-tests.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/backend.md +37 -37
- package/{template/.claude → .claude}/templates/phases-sections/business-logic-validation.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/component-tests.md +17 -17
- package/{template/.claude → .claude}/templates/phases-sections/contract-backend.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/contract-frontend.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/database.md +35 -35
- package/{template/.claude → .claude}/templates/phases-sections/documentation.md +17 -17
- package/{template/.claude → .claude}/templates/phases-sections/e2e-tests.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/fix-implementation.md +17 -17
- package/{template/.claude → .claude}/templates/phases-sections/frontend-integration.md +18 -18
- package/{template/.claude → .claude}/templates/phases-sections/frontend-mockup.md +123 -123
- package/{template/.claude → .claude}/templates/phases-sections/manual-flow-test.md +15 -15
- package/{template/.claude → .claude}/templates/phases-sections/manual-ux-test.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/refactor-implementation.md +17 -17
- package/{template/.claude → .claude}/templates/phases-sections/refactor.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/regression-tests.md +15 -15
- package/{template/.claude → .claude}/templates/phases-sections/report.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/responsive-test.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/script-implementation.md +43 -43
- package/{template/.claude → .claude}/templates/phases-sections/test-coverage.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/user-approval.md +14 -14
- package/LICENSE +21 -21
- package/README.md +758 -331
- package/lib/init.js +1 -1
- package/lib/update.js +1 -1
- package/package.json +2 -2
- /package/{template/.claude → .claude}/contexts/patterns/frontend-component-strategy.md +0 -0
- /package/{template/.claude → .claude}/contexts/patterns/git-workflow.md +0 -0
- /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
|
-
##
|
|
8
|
-
|
|
9
|
-
**
|
|
10
|
-
|
|
11
|
-
1
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
**
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- **
|
|
76
|
-
- **
|
|
77
|
-
- **
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
**
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
**
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
**
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
```css
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
.
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
**
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
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!**
|