@champpaba/claude-agent-kit 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +561 -0
- package/bin/cli.js +61 -0
- package/lib/init.js +52 -0
- package/lib/update.js +73 -0
- package/package.json +47 -0
- package/template/.claude/CHANGELOG-v1.1.1.md +259 -0
- package/template/.claude/CLAUDE.md +329 -0
- package/template/.claude/agents/01-integration.md +797 -0
- package/template/.claude/agents/02-uxui-frontend.md +899 -0
- package/template/.claude/agents/03-test-debug.md +759 -0
- package/template/.claude/agents/04-frontend.md +1099 -0
- package/template/.claude/agents/05-backend.md +1217 -0
- package/template/.claude/agents/06-database.md +969 -0
- package/template/.claude/commands/agentsetup.md +1464 -0
- package/template/.claude/commands/cdev.md +327 -0
- package/template/.claude/commands/csetup.md +447 -0
- package/template/.claude/commands/cstatus.md +60 -0
- package/template/.claude/commands/cview.md +364 -0
- package/template/.claude/commands/psetup.md +101 -0
- package/template/.claude/contexts/design/accessibility.md +611 -0
- package/template/.claude/contexts/design/box-thinking.md +553 -0
- package/template/.claude/contexts/design/color-theory.md +498 -0
- package/template/.claude/contexts/design/index.md +247 -0
- package/template/.claude/contexts/design/layout.md +400 -0
- package/template/.claude/contexts/design/responsive.md +551 -0
- package/template/.claude/contexts/design/shadows.md +522 -0
- package/template/.claude/contexts/design/spacing.md +428 -0
- package/template/.claude/contexts/design/typography.md +465 -0
- package/template/.claude/contexts/domain/README.md +164 -0
- package/template/.claude/contexts/patterns/agent-coordination.md +388 -0
- package/template/.claude/contexts/patterns/agent-discovery.md +182 -0
- package/template/.claude/contexts/patterns/change-workflow.md +538 -0
- package/template/.claude/contexts/patterns/code-standards.md +515 -0
- package/template/.claude/contexts/patterns/development-principles.md +513 -0
- package/template/.claude/contexts/patterns/error-handling.md +478 -0
- package/template/.claude/contexts/patterns/error-recovery.md +365 -0
- package/template/.claude/contexts/patterns/frontend-component-strategy.md +365 -0
- package/template/.claude/contexts/patterns/git-workflow.md +207 -0
- package/template/.claude/contexts/patterns/logging.md +424 -0
- package/template/.claude/contexts/patterns/task-breakdown.md +452 -0
- package/template/.claude/contexts/patterns/task-classification.md +523 -0
- package/template/.claude/contexts/patterns/tdd-classification.md +516 -0
- package/template/.claude/contexts/patterns/testing.md +413 -0
- package/template/.claude/contexts/patterns/ui-component-consistency.md +304 -0
- package/template/.claude/contexts/patterns/validation-framework.md +776 -0
- package/template/.claude/lib/README.md +39 -0
- package/template/.claude/lib/agent-executor.md +258 -0
- package/template/.claude/lib/agent-router.md +572 -0
- package/template/.claude/lib/flags-updater.md +469 -0
- package/template/.claude/lib/tdd-classifier.md +345 -0
- package/template/.claude/lib/validation-gates.md +484 -0
- package/template/.claude/settings.local.json +42 -0
- package/template/.claude/templates/context-template.md +45 -0
- package/template/.claude/templates/flags-template.json +42 -0
- package/template/.claude/templates/phase-templates.json +124 -0
- package/template/.claude/templates/phases-sections/accessibility-test.md +17 -0
- package/template/.claude/templates/phases-sections/api-design.md +37 -0
- package/template/.claude/templates/phases-sections/backend-tests.md +16 -0
- package/template/.claude/templates/phases-sections/backend.md +37 -0
- package/template/.claude/templates/phases-sections/business-logic-validation.md +16 -0
- package/template/.claude/templates/phases-sections/component-tests.md +17 -0
- package/template/.claude/templates/phases-sections/contract-backend.md +16 -0
- package/template/.claude/templates/phases-sections/contract-frontend.md +16 -0
- package/template/.claude/templates/phases-sections/database.md +35 -0
- package/template/.claude/templates/phases-sections/documentation.md +17 -0
- package/template/.claude/templates/phases-sections/e2e-tests.md +16 -0
- package/template/.claude/templates/phases-sections/fix-implementation.md +17 -0
- package/template/.claude/templates/phases-sections/frontend-integration.md +18 -0
- package/template/.claude/templates/phases-sections/frontend-mockup.md +123 -0
- package/template/.claude/templates/phases-sections/manual-flow-test.md +15 -0
- package/template/.claude/templates/phases-sections/manual-ux-test.md +16 -0
- package/template/.claude/templates/phases-sections/refactor-implementation.md +17 -0
- package/template/.claude/templates/phases-sections/refactor.md +16 -0
- package/template/.claude/templates/phases-sections/regression-tests.md +15 -0
- package/template/.claude/templates/phases-sections/report.md +16 -0
- package/template/.claude/templates/phases-sections/responsive-test.md +16 -0
- package/template/.claude/templates/phases-sections/script-implementation.md +43 -0
- package/template/.claude/templates/phases-sections/test-coverage.md +16 -0
- package/template/.claude/templates/phases-sections/user-approval.md +14 -0
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
# Typography System
|
|
2
|
+
|
|
3
|
+
> **Purpose:** Consistent type hierarchy, readability, and typographic rhythm
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Type Scale (5-Level Hierarchy)
|
|
8
|
+
|
|
9
|
+
**Core Principle:** Use a modular scale for harmonious font sizes
|
|
10
|
+
|
|
11
|
+
### Standard Type Scale
|
|
12
|
+
|
|
13
|
+
| Level | Token | Size (rem) | Pixels | Use Case |
|
|
14
|
+
|-------|-------|------------|--------|----------|
|
|
15
|
+
| **H1** | `text-4xl` | 2.5rem | 40px | Hero titles, landing page headers |
|
|
16
|
+
| **H2** | `text-3xl` | 2rem | 32px | Page titles, section headers |
|
|
17
|
+
| **H3** | `text-2xl` | 1.5rem | 24px | Subsection titles, card headers |
|
|
18
|
+
| **Body** | `text-base` | 1rem | 16px | Paragraphs, content, buttons |
|
|
19
|
+
| **Small** | `text-sm` | 0.875rem | 14px | Labels, captions, metadata |
|
|
20
|
+
|
|
21
|
+
### Extended Scale (for flexibility)
|
|
22
|
+
|
|
23
|
+
```css
|
|
24
|
+
:root {
|
|
25
|
+
/* Tiny */
|
|
26
|
+
--text-xs: 0.75rem; /* 12px - Fine print, badges */
|
|
27
|
+
|
|
28
|
+
/* Small */
|
|
29
|
+
--text-sm: 0.875rem; /* 14px - Labels, captions */
|
|
30
|
+
|
|
31
|
+
/* Base */
|
|
32
|
+
--text-base: 1rem; /* 16px - Body text */
|
|
33
|
+
|
|
34
|
+
/* Medium */
|
|
35
|
+
--text-lg: 1.125rem; /* 18px - Emphasized body text */
|
|
36
|
+
|
|
37
|
+
/* Large */
|
|
38
|
+
--text-xl: 1.25rem; /* 20px - Small headings */
|
|
39
|
+
--text-2xl: 1.5rem; /* 24px - H3 */
|
|
40
|
+
--text-3xl: 2rem; /* 32px - H2 */
|
|
41
|
+
--text-4xl: 2.5rem; /* 40px - H1 */
|
|
42
|
+
|
|
43
|
+
/* Extra Large */
|
|
44
|
+
--text-5xl: 3rem; /* 48px - Hero (desktop) */
|
|
45
|
+
--text-6xl: 3.75rem; /* 60px - Display (marketing) */
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Font Weights
|
|
52
|
+
|
|
53
|
+
**Standard Weights:**
|
|
54
|
+
|
|
55
|
+
| Weight | Value | Use Case |
|
|
56
|
+
|--------|-------|----------|
|
|
57
|
+
| **Light** | 300 | Rarely used (decorative only) |
|
|
58
|
+
| **Regular** | 400 | Body text, paragraphs |
|
|
59
|
+
| **Medium** | 500 | Emphasized text, labels |
|
|
60
|
+
| **Semibold** | 600 | Buttons, important labels |
|
|
61
|
+
| **Bold** | 700 | Headings (H1-H3), strong emphasis |
|
|
62
|
+
| **Extrabold** | 800 | Hero titles (rare) |
|
|
63
|
+
|
|
64
|
+
**Implementation:**
|
|
65
|
+
```css
|
|
66
|
+
:root {
|
|
67
|
+
--font-weight-light: 300;
|
|
68
|
+
--font-weight-regular: 400;
|
|
69
|
+
--font-weight-medium: 500;
|
|
70
|
+
--font-weight-semibold: 600;
|
|
71
|
+
--font-weight-bold: 700;
|
|
72
|
+
--font-weight-extrabold: 800;
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Usage Guidelines:**
|
|
77
|
+
- ✅ Body text: Regular (400)
|
|
78
|
+
- ✅ Headings: Bold (700)
|
|
79
|
+
- ✅ Buttons: Semibold (600) or Medium (500)
|
|
80
|
+
- ✅ Labels: Medium (500)
|
|
81
|
+
- ❌ Avoid Light (300) for body text (low readability)
|
|
82
|
+
- ❌ Avoid Extrabold (800) except for hero titles
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Line Height (Leading)
|
|
87
|
+
|
|
88
|
+
**Rule:** Tighter for headings, looser for body text
|
|
89
|
+
|
|
90
|
+
### Standard Line Heights
|
|
91
|
+
|
|
92
|
+
| Element Type | Line Height | Ratio | Use Case |
|
|
93
|
+
|--------------|-------------|-------|----------|
|
|
94
|
+
| **Headings** | 1.2 | Tight | Visual impact, hierarchy |
|
|
95
|
+
| **Headings** | 1.3 | Medium | Balance (alternative) |
|
|
96
|
+
| **Body Text** | 1.5 | Comfortable | Readability, long-form |
|
|
97
|
+
| **Body Text** | 1.6 | Loose | Extra comfort (rare) |
|
|
98
|
+
| **Small Text** | 1.4 | Compact | Labels, captions |
|
|
99
|
+
| **Code** | 1.7 | Extra space | Technical content |
|
|
100
|
+
|
|
101
|
+
**Implementation:**
|
|
102
|
+
```css
|
|
103
|
+
:root {
|
|
104
|
+
--leading-tight: 1.2; /* Headings */
|
|
105
|
+
--leading-snug: 1.3; /* Headings (alternative) */
|
|
106
|
+
--leading-normal: 1.5; /* Body text */
|
|
107
|
+
--leading-relaxed: 1.6; /* Body text (loose) */
|
|
108
|
+
--leading-loose: 1.7; /* Code blocks */
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
h1, h2, h3 {
|
|
112
|
+
line-height: var(--leading-tight);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
p, li {
|
|
116
|
+
line-height: var(--leading-normal);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
code, pre {
|
|
120
|
+
line-height: var(--leading-loose);
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Why This Matters:**
|
|
125
|
+
- Tight line height (1.2): Headings feel "punchy" and impactful
|
|
126
|
+
- Normal line height (1.5): Body text is comfortable to read
|
|
127
|
+
- Loose line height (1.7): Code is easier to scan
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Letter Spacing (Tracking)
|
|
132
|
+
|
|
133
|
+
**Rule:** Looser for uppercase, tighter for display text
|
|
134
|
+
|
|
135
|
+
```css
|
|
136
|
+
:root {
|
|
137
|
+
--tracking-tighter: -0.05em; /* Large headings */
|
|
138
|
+
--tracking-tight: -0.025em; /* H1-H3 */
|
|
139
|
+
--tracking-normal: 0; /* Body text */
|
|
140
|
+
--tracking-wide: 0.025em; /* Uppercase, small text */
|
|
141
|
+
--tracking-wider: 0.05em; /* ALL CAPS */
|
|
142
|
+
--tracking-widest: 0.1em; /* Extreme emphasis */
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
h1 {
|
|
146
|
+
letter-spacing: var(--tracking-tighter); /* -0.05em */
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.label-uppercase {
|
|
150
|
+
text-transform: uppercase;
|
|
151
|
+
letter-spacing: var(--tracking-wide); /* 0.025em */
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.all-caps {
|
|
155
|
+
text-transform: uppercase;
|
|
156
|
+
letter-spacing: var(--tracking-wider); /* 0.05em */
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**When to Use:**
|
|
161
|
+
- ✅ Tighter tracking: Large headings (H1, Hero)
|
|
162
|
+
- ✅ Wider tracking: Uppercase text, labels
|
|
163
|
+
- ✅ Normal tracking: Body text, paragraphs
|
|
164
|
+
- ❌ Avoid tight tracking on small text (hard to read)
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Font Families
|
|
169
|
+
|
|
170
|
+
### System Font Stack (Recommended)
|
|
171
|
+
|
|
172
|
+
**Advantages:**
|
|
173
|
+
- ✅ No web font loading (instant render)
|
|
174
|
+
- ✅ Native OS appearance
|
|
175
|
+
- ✅ Optimal performance
|
|
176
|
+
- ✅ Familiar to users
|
|
177
|
+
|
|
178
|
+
**Implementation:**
|
|
179
|
+
```css
|
|
180
|
+
:root {
|
|
181
|
+
/* Sans-serif (default) */
|
|
182
|
+
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
183
|
+
Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
184
|
+
|
|
185
|
+
/* Monospace (code) */
|
|
186
|
+
--font-mono: ui-monospace, "Cascadia Code", "Source Code Pro",
|
|
187
|
+
Menlo, Monaco, "Courier New", monospace;
|
|
188
|
+
|
|
189
|
+
/* Serif (optional) */
|
|
190
|
+
--font-serif: ui-serif, Georgia, Cambria, "Times New Roman",
|
|
191
|
+
Times, serif;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
body {
|
|
195
|
+
font-family: var(--font-sans);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
code, pre {
|
|
199
|
+
font-family: var(--font-mono);
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Web Fonts (Optional)
|
|
204
|
+
|
|
205
|
+
**Popular Choices:**
|
|
206
|
+
- **Inter**: Modern, versatile, excellent readability
|
|
207
|
+
- **Roboto**: Clean, professional, Google's default
|
|
208
|
+
- **Poppins**: Geometric, friendly, modern
|
|
209
|
+
- **Open Sans**: Humanist, neutral, widely used
|
|
210
|
+
- **Lato**: Semi-rounded, approachable
|
|
211
|
+
|
|
212
|
+
**Implementation (Google Fonts):**
|
|
213
|
+
```html
|
|
214
|
+
<!-- In <head> -->
|
|
215
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
216
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
217
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
```css
|
|
221
|
+
:root {
|
|
222
|
+
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**⚠️ Performance Considerations:**
|
|
227
|
+
- Use `font-display: swap` to avoid FOIT (Flash of Invisible Text)
|
|
228
|
+
- Limit to 3-4 weights (e.g., 400, 500, 600, 700)
|
|
229
|
+
- Consider variable fonts (fewer requests)
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Typographic Hierarchy
|
|
234
|
+
|
|
235
|
+
### Complete Heading System
|
|
236
|
+
|
|
237
|
+
```css
|
|
238
|
+
h1 {
|
|
239
|
+
font-size: var(--text-4xl); /* 40px */
|
|
240
|
+
font-weight: var(--font-weight-bold); /* 700 */
|
|
241
|
+
line-height: var(--leading-tight); /* 1.2 */
|
|
242
|
+
letter-spacing: var(--tracking-tighter); /* -0.05em */
|
|
243
|
+
margin-bottom: var(--spacing-6); /* 24px */
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
h2 {
|
|
247
|
+
font-size: var(--text-3xl); /* 32px */
|
|
248
|
+
font-weight: var(--font-weight-bold); /* 700 */
|
|
249
|
+
line-height: var(--leading-tight); /* 1.2 */
|
|
250
|
+
letter-spacing: var(--tracking-tight); /* -0.025em */
|
|
251
|
+
margin-bottom: var(--spacing-4); /* 16px */
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
h3 {
|
|
255
|
+
font-size: var(--text-2xl); /* 24px */
|
|
256
|
+
font-weight: var(--font-weight-semibold); /* 600 */
|
|
257
|
+
line-height: var(--leading-snug); /* 1.3 */
|
|
258
|
+
margin-bottom: var(--spacing-4); /* 16px */
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
p {
|
|
262
|
+
font-size: var(--text-base); /* 16px */
|
|
263
|
+
font-weight: var(--font-weight-regular); /* 400 */
|
|
264
|
+
line-height: var(--leading-normal); /* 1.5 */
|
|
265
|
+
margin-bottom: var(--spacing-4); /* 16px */
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
small {
|
|
269
|
+
font-size: var(--text-sm); /* 14px */
|
|
270
|
+
font-weight: var(--font-weight-regular); /* 400 */
|
|
271
|
+
line-height: var(--leading-normal); /* 1.5 */
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Responsive Typography
|
|
278
|
+
|
|
279
|
+
### Mobile-First Scaling
|
|
280
|
+
|
|
281
|
+
```css
|
|
282
|
+
/* Mobile (default) */
|
|
283
|
+
h1 {
|
|
284
|
+
font-size: 2rem; /* 32px */
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
h2 {
|
|
288
|
+
font-size: 1.5rem; /* 24px */
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* Tablet (640px+) */
|
|
292
|
+
@media (min-width: 640px) {
|
|
293
|
+
h1 {
|
|
294
|
+
font-size: 2.25rem; /* 36px */
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
h2 {
|
|
298
|
+
font-size: 1.75rem; /* 28px */
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* Desktop (1024px+) */
|
|
303
|
+
@media (min-width: 1024px) {
|
|
304
|
+
h1 {
|
|
305
|
+
font-size: 2.5rem; /* 40px */
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
h2 {
|
|
309
|
+
font-size: 2rem; /* 32px */
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**Scaling Pattern:**
|
|
315
|
+
- Mobile: 80% of desktop size
|
|
316
|
+
- Tablet: 90% of desktop size
|
|
317
|
+
- Desktop: 100% (base size)
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Text Color & Contrast
|
|
322
|
+
|
|
323
|
+
### Standard Text Colors
|
|
324
|
+
|
|
325
|
+
```css
|
|
326
|
+
:root {
|
|
327
|
+
/* Light mode */
|
|
328
|
+
--text-primary: rgb(17, 24, 39); /* gray-900 - Headings */
|
|
329
|
+
--text-secondary: rgb(55, 65, 81); /* gray-700 - Body text */
|
|
330
|
+
--text-tertiary: rgb(107, 114, 128); /* gray-500 - Muted text */
|
|
331
|
+
--text-disabled: rgb(156, 163, 175); /* gray-400 - Disabled */
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.dark {
|
|
335
|
+
/* Dark mode */
|
|
336
|
+
--text-primary: rgb(255, 255, 255); /* White - Headings */
|
|
337
|
+
--text-secondary: rgb(229, 231, 235); /* gray-200 - Body */
|
|
338
|
+
--text-tertiary: rgb(156, 163, 175); /* gray-400 - Muted */
|
|
339
|
+
--text-disabled: rgb(75, 85, 99); /* gray-600 - Disabled */
|
|
340
|
+
}
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
**WCAG Contrast Requirements:**
|
|
344
|
+
| Text Size | WCAG AA | WCAG AAA |
|
|
345
|
+
|-----------|---------|----------|
|
|
346
|
+
| Normal text (<18pt) | 4.5:1 | 7:1 |
|
|
347
|
+
| Large text (≥18pt) | 3:1 | 4.5:1 |
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Common Patterns
|
|
352
|
+
|
|
353
|
+
### Article/Blog Post
|
|
354
|
+
|
|
355
|
+
```css
|
|
356
|
+
.prose {
|
|
357
|
+
max-width: 65ch; /* Optimal reading width */
|
|
358
|
+
font-size: var(--text-base);
|
|
359
|
+
line-height: var(--leading-relaxed); /* 1.6 - Extra comfort */
|
|
360
|
+
color: var(--text-secondary);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.prose h1 {
|
|
364
|
+
margin-top: var(--spacing-12);
|
|
365
|
+
margin-bottom: var(--spacing-6);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.prose h2 {
|
|
369
|
+
margin-top: var(--spacing-8);
|
|
370
|
+
margin-bottom: var(--spacing-4);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.prose p {
|
|
374
|
+
margin-bottom: var(--spacing-4);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.prose strong {
|
|
378
|
+
font-weight: var(--font-weight-semibold);
|
|
379
|
+
color: var(--text-primary);
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Button Text
|
|
384
|
+
|
|
385
|
+
```css
|
|
386
|
+
.button {
|
|
387
|
+
font-size: var(--text-base); /* 16px */
|
|
388
|
+
font-weight: var(--font-weight-semibold); /* 600 */
|
|
389
|
+
line-height: 1; /* Tight for buttons */
|
|
390
|
+
letter-spacing: var(--tracking-normal);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.button-sm {
|
|
394
|
+
font-size: var(--text-sm); /* 14px */
|
|
395
|
+
font-weight: var(--font-weight-medium); /* 500 */
|
|
396
|
+
}
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### Labels & Form Fields
|
|
400
|
+
|
|
401
|
+
```css
|
|
402
|
+
.label {
|
|
403
|
+
font-size: var(--text-sm); /* 14px */
|
|
404
|
+
font-weight: var(--font-weight-medium); /* 500 */
|
|
405
|
+
line-height: var(--leading-normal); /* 1.5 */
|
|
406
|
+
color: var(--text-primary);
|
|
407
|
+
margin-bottom: var(--spacing-2); /* 8px */
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.input {
|
|
411
|
+
font-size: var(--text-base); /* 16px - iOS zoom prevention */
|
|
412
|
+
font-weight: var(--font-weight-regular); /* 400 */
|
|
413
|
+
line-height: var(--leading-normal); /* 1.5 */
|
|
414
|
+
}
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## Best Practices
|
|
420
|
+
|
|
421
|
+
### DO:
|
|
422
|
+
- ✅ Use modular scale (1.25x or 1.5x ratio)
|
|
423
|
+
- ✅ Limit to 3-4 font sizes for simplicity
|
|
424
|
+
- ✅ Use relative units (rem, em) for scalability
|
|
425
|
+
- ✅ Test readability on mobile devices
|
|
426
|
+
- ✅ Ensure 4.5:1 contrast for body text
|
|
427
|
+
- ✅ Use system fonts for performance
|
|
428
|
+
- ✅ Match line height to font size (smaller = tighter)
|
|
429
|
+
|
|
430
|
+
### DON'T:
|
|
431
|
+
- ❌ Use more than 2 font families
|
|
432
|
+
- ❌ Use pixel units for font sizes
|
|
433
|
+
- ❌ Set font-size < 16px on inputs (iOS zoom)
|
|
434
|
+
- ❌ Use low-contrast text (fails accessibility)
|
|
435
|
+
- ❌ Use light font weights for body text
|
|
436
|
+
- ❌ Forget responsive scaling
|
|
437
|
+
- ❌ Use excessive letter spacing on body text
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## Quick Reference
|
|
442
|
+
|
|
443
|
+
**Type Scale:**
|
|
444
|
+
| Element | Size | Weight | Line Height |
|
|
445
|
+
|---------|------|--------|-------------|
|
|
446
|
+
| H1 | 40px (2.5rem) | Bold (700) | 1.2 |
|
|
447
|
+
| H2 | 32px (2rem) | Bold (700) | 1.2 |
|
|
448
|
+
| H3 | 24px (1.5rem) | Semibold (600) | 1.3 |
|
|
449
|
+
| Body | 16px (1rem) | Regular (400) | 1.5 |
|
|
450
|
+
| Small | 14px (0.875rem) | Regular (400) | 1.5 |
|
|
451
|
+
|
|
452
|
+
**Font Weights:**
|
|
453
|
+
- Body text: 400 (Regular)
|
|
454
|
+
- Labels: 500 (Medium)
|
|
455
|
+
- Buttons: 600 (Semibold)
|
|
456
|
+
- Headings: 700 (Bold)
|
|
457
|
+
|
|
458
|
+
**Line Heights:**
|
|
459
|
+
- Headings: 1.2-1.3
|
|
460
|
+
- Body text: 1.5-1.6
|
|
461
|
+
- Small text: 1.4-1.5
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
**💡 Remember:** Good typography is invisible. It should aid readability, not distract!
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Domain-Specific Contexts
|
|
2
|
+
|
|
3
|
+
This folder contains **project-specific** business logic, design tokens, and domain patterns.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 📁 Structure
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
domain/
|
|
11
|
+
├── README.md (this file)
|
|
12
|
+
└── {project-name}/ # Your project domain
|
|
13
|
+
├── overview.md # Domain overview
|
|
14
|
+
├── design-tokens.md # Project-specific colors, fonts
|
|
15
|
+
├── business-rules.md # Domain logic, validations
|
|
16
|
+
├── api-contracts.md # API specifications
|
|
17
|
+
└── workflows.md # User flows, process diagrams
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 🎯 Examples
|
|
23
|
+
|
|
24
|
+
### E-commerce Project
|
|
25
|
+
```
|
|
26
|
+
domain/ecommerce/
|
|
27
|
+
├── overview.md # E-commerce platform overview
|
|
28
|
+
├── design-tokens.md # Brand colors (primary, secondary, accent)
|
|
29
|
+
├── checkout-flow.md # 4-step checkout process
|
|
30
|
+
├── inventory-rules.md # Stock management, backorder logic
|
|
31
|
+
└── payment-gateway.md # Stripe integration patterns
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### IELTS Speaking Test
|
|
35
|
+
```
|
|
36
|
+
domain/ielts/
|
|
37
|
+
├── overview.md # IELTS platform overview
|
|
38
|
+
├── design-tokens.md # Primary: rgb(15, 42, 74), Secondary: rgb(212, 185, 120)
|
|
39
|
+
├── test-structure.md # Part 1, 2, 3 specifications
|
|
40
|
+
├── scoring.md # Speechace (0-100) → IELTS (0-9) conversion
|
|
41
|
+
├── speechace-api.md # API integration, rate limits
|
|
42
|
+
└── audio-validation.md # Part-specific audio limits (45s, 110s, 60s)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### CRM System
|
|
46
|
+
```
|
|
47
|
+
domain/crm/
|
|
48
|
+
├── overview.md # CRM system overview
|
|
49
|
+
├── design-tokens.md # Enterprise brand colors
|
|
50
|
+
├── sales-pipeline.md # Lead → Opportunity → Customer
|
|
51
|
+
├── contact-management.md # Contact lifecycle, data model
|
|
52
|
+
└── reporting.md # Dashboard metrics, KPIs
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 🔧 How to Create Your Domain
|
|
58
|
+
|
|
59
|
+
### Step 1: Create Directory
|
|
60
|
+
```bash
|
|
61
|
+
mkdir -p .claude/contexts/domain/myproject
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Step 2: Add Overview
|
|
65
|
+
```markdown
|
|
66
|
+
<!-- domain/myproject/overview.md -->
|
|
67
|
+
# MyProject Overview
|
|
68
|
+
|
|
69
|
+
## What is this?
|
|
70
|
+
Brief description of your project domain.
|
|
71
|
+
|
|
72
|
+
## Core Concepts
|
|
73
|
+
- Concept 1: Description
|
|
74
|
+
- Concept 2: Description
|
|
75
|
+
|
|
76
|
+
## Key Features
|
|
77
|
+
- Feature 1
|
|
78
|
+
- Feature 2
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Step 3: Add Design Tokens (Optional)
|
|
82
|
+
```markdown
|
|
83
|
+
<!-- domain/myproject/design-tokens.md -->
|
|
84
|
+
# MyProject Design Tokens
|
|
85
|
+
|
|
86
|
+
## Colors
|
|
87
|
+
```css
|
|
88
|
+
--color-primary: #007bff /* Brand Blue */
|
|
89
|
+
--color-secondary: #6c757d /* Gray */
|
|
90
|
+
--color-accent: #28a745 /* Green */
|
|
91
|
+
--color-error: #dc3545 /* Red */
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Typography
|
|
95
|
+
- Font Family: 'Inter', sans-serif
|
|
96
|
+
- Headings: 700 (bold)
|
|
97
|
+
- Body: 400 (regular)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Step 4: Add Business Rules (Optional)
|
|
101
|
+
```markdown
|
|
102
|
+
<!-- domain/myproject/business-rules.md -->
|
|
103
|
+
# Business Rules
|
|
104
|
+
|
|
105
|
+
## Validation Rules
|
|
106
|
+
- Email must be unique
|
|
107
|
+
- Password min 8 characters
|
|
108
|
+
- Phone number format: +XX-XXX-XXX-XXXX
|
|
109
|
+
|
|
110
|
+
## Business Logic
|
|
111
|
+
- Free shipping: Orders > $50
|
|
112
|
+
- Discount: 10% for members
|
|
113
|
+
- Refund: Within 30 days
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 🤖 How Agents Use Domain Contexts
|
|
119
|
+
|
|
120
|
+
### Automatic Loading
|
|
121
|
+
```
|
|
122
|
+
Orchestrator:
|
|
123
|
+
1. Detects tech stack (Next.js, Prisma)
|
|
124
|
+
2. Checks domain/ folder
|
|
125
|
+
3. IF exists → Loads domain/{project}/*.md
|
|
126
|
+
4. Passes to specialist agents
|
|
127
|
+
|
|
128
|
+
Example:
|
|
129
|
+
Task: "Create login form"
|
|
130
|
+
→ uxui-frontend agent loads:
|
|
131
|
+
✅ patterns/testing.md (universal)
|
|
132
|
+
✅ design/color-theory.md (universal)
|
|
133
|
+
✅ domain/myproject/design-tokens.md (project-specific)
|
|
134
|
+
✅ Context7: Next.js docs (dynamic)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## ✅ Best Practices
|
|
140
|
+
|
|
141
|
+
### DO:
|
|
142
|
+
- ✅ Create domain folder for each project
|
|
143
|
+
- ✅ Document business rules clearly
|
|
144
|
+
- ✅ Include examples and edge cases
|
|
145
|
+
- ✅ Keep design tokens separate from universal design foundation
|
|
146
|
+
- ✅ Update when requirements change
|
|
147
|
+
|
|
148
|
+
### DON'T:
|
|
149
|
+
- ❌ Mix domain logic with universal patterns
|
|
150
|
+
- ❌ Hardcode values (use env variables)
|
|
151
|
+
- ❌ Leave outdated documentation
|
|
152
|
+
- ❌ Skip domain context for complex projects
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## 📖 References
|
|
157
|
+
|
|
158
|
+
- **Universal Patterns:** `.claude/contexts/patterns/`
|
|
159
|
+
- **Design Foundation:** `.claude/contexts/design/`
|
|
160
|
+
- **Agents:** `.claude/agents/`
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
**Start by creating `domain/{your-project}/overview.md`!**
|