@champpaba/claude-agent-kit 1.1.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 (82) hide show
  1. package/.claude/CHANGELOG-v1.1.1.md +259 -0
  2. package/.claude/CLAUDE.md +555 -0
  3. package/.claude/agents/01-integration.md +797 -0
  4. package/.claude/agents/02-uxui-frontend.md +955 -0
  5. package/.claude/agents/03-test-debug.md +759 -0
  6. package/.claude/agents/04-frontend.md +1099 -0
  7. package/.claude/agents/05-backend.md +1217 -0
  8. package/.claude/agents/06-database.md +969 -0
  9. package/.claude/commands/agentsetup.md +1464 -0
  10. package/.claude/commands/cdev.md +327 -0
  11. package/.claude/commands/csetup.md +447 -0
  12. package/.claude/commands/cstatus.md +60 -0
  13. package/.claude/commands/cview.md +364 -0
  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/.claude/commands/psetup.md +101 -0
  18. package/.claude/contexts/design/accessibility.md +611 -0
  19. package/.claude/contexts/design/box-thinking.md +566 -0
  20. package/.claude/contexts/design/color-theory.md +519 -0
  21. package/.claude/contexts/design/index.md +290 -0
  22. package/.claude/contexts/design/layout.md +400 -0
  23. package/.claude/contexts/design/responsive.md +551 -0
  24. package/.claude/contexts/design/shadows.md +522 -0
  25. package/.claude/contexts/design/spacing.md +445 -0
  26. package/.claude/contexts/design/typography.md +465 -0
  27. package/.claude/contexts/domain/README.md +164 -0
  28. package/.claude/contexts/patterns/agent-coordination.md +388 -0
  29. package/.claude/contexts/patterns/agent-discovery.md +182 -0
  30. package/.claude/contexts/patterns/change-workflow.md +538 -0
  31. package/.claude/contexts/patterns/code-standards.md +515 -0
  32. package/.claude/contexts/patterns/development-principles.md +513 -0
  33. package/.claude/contexts/patterns/error-handling.md +478 -0
  34. package/.claude/contexts/patterns/error-recovery.md +365 -0
  35. package/.claude/contexts/patterns/frontend-component-strategy.md +365 -0
  36. package/.claude/contexts/patterns/git-workflow.md +207 -0
  37. package/.claude/contexts/patterns/logging.md +424 -0
  38. package/.claude/contexts/patterns/task-breakdown.md +452 -0
  39. package/.claude/contexts/patterns/task-classification.md +523 -0
  40. package/.claude/contexts/patterns/tdd-classification.md +516 -0
  41. package/.claude/contexts/patterns/testing.md +413 -0
  42. package/.claude/contexts/patterns/ui-component-consistency.md +304 -0
  43. package/.claude/contexts/patterns/validation-framework.md +776 -0
  44. package/.claude/lib/README.md +39 -0
  45. package/.claude/lib/agent-executor.md +258 -0
  46. package/.claude/lib/agent-router.md +572 -0
  47. package/.claude/lib/flags-updater.md +469 -0
  48. package/.claude/lib/tdd-classifier.md +345 -0
  49. package/.claude/lib/validation-gates.md +484 -0
  50. package/.claude/settings.local.json +42 -0
  51. package/.claude/templates/STYLE_GUIDE.template.md +879 -0
  52. package/.claude/templates/context-template.md +45 -0
  53. package/.claude/templates/flags-template.json +42 -0
  54. package/.claude/templates/page-plan-example.md +562 -0
  55. package/.claude/templates/phase-templates.json +124 -0
  56. package/.claude/templates/phases-sections/accessibility-test.md +17 -0
  57. package/.claude/templates/phases-sections/api-design.md +37 -0
  58. package/.claude/templates/phases-sections/backend-tests.md +16 -0
  59. package/.claude/templates/phases-sections/backend.md +37 -0
  60. package/.claude/templates/phases-sections/business-logic-validation.md +16 -0
  61. package/.claude/templates/phases-sections/component-tests.md +17 -0
  62. package/.claude/templates/phases-sections/contract-backend.md +16 -0
  63. package/.claude/templates/phases-sections/contract-frontend.md +16 -0
  64. package/.claude/templates/phases-sections/database.md +35 -0
  65. package/.claude/templates/phases-sections/documentation.md +17 -0
  66. package/.claude/templates/phases-sections/e2e-tests.md +16 -0
  67. package/.claude/templates/phases-sections/fix-implementation.md +17 -0
  68. package/.claude/templates/phases-sections/frontend-integration.md +18 -0
  69. package/.claude/templates/phases-sections/frontend-mockup.md +123 -0
  70. package/.claude/templates/phases-sections/manual-flow-test.md +15 -0
  71. package/.claude/templates/phases-sections/manual-ux-test.md +16 -0
  72. package/.claude/templates/phases-sections/refactor-implementation.md +17 -0
  73. package/.claude/templates/phases-sections/refactor.md +16 -0
  74. package/.claude/templates/phases-sections/regression-tests.md +15 -0
  75. package/.claude/templates/phases-sections/report.md +16 -0
  76. package/.claude/templates/phases-sections/responsive-test.md +16 -0
  77. package/.claude/templates/phases-sections/script-implementation.md +43 -0
  78. package/.claude/templates/phases-sections/test-coverage.md +16 -0
  79. package/.claude/templates/phases-sections/user-approval.md +14 -0
  80. package/lib/init.js +1 -1
  81. package/lib/update.js +1 -1
  82. package/package.json +2 -2
@@ -0,0 +1,445 @@
1
+ # Spacing System
2
+
3
+ > **Purpose:** Consistent spacing scale for layouts, components, and rhythm
4
+
5
+ ---
6
+
7
+ ## ⚠️ Priority: Project-Specific vs Generic
8
+
9
+ **This file contains GENERIC spacing guidelines.**
10
+
11
+ **If your project has a STYLE_GUIDE.md:**
12
+ → STYLE_GUIDE.md values take **priority** (use its spacing values)
13
+ → This file = **reference** for concepts and principles only
14
+
15
+ **Check:** `.claude/contexts/domain/{project}/STYLE_GUIDE.md`
16
+
17
+ **Priority order:**
18
+ 1. `STYLE_GUIDE.md` (project-specific) ← **Use this if exists!**
19
+ 2. Existing components (brownfield) ← Extract from code
20
+ 3. This file (generic defaults) ← Fallback only
21
+
22
+ ---
23
+
24
+ ## Base Unit Approach
25
+
26
+ **Core Principle:** All spacing should be multiples of a base unit for consistency
27
+
28
+ ```css
29
+ --spacing: 0.25rem; /* 4px - Base spacing unit (at default 16px root font size) */
30
+ ```
31
+
32
+ **Why 0.25rem (4px)?**
33
+ - ✅ Divisible by 2, 4, 8 (common design ratios)
34
+ - ✅ Works with 8px grid systems (common in Figma, Sketch)
35
+ - ✅ Small enough for fine-tuning
36
+ - ✅ Large enough to be visually meaningful
37
+
38
+ ---
39
+
40
+ ## Spacing Scale
41
+
42
+ ### Standard Scale (Multiples of Base)
43
+
44
+ | Token | Value | Pixels | Common Use Case |
45
+ |-------|-------|--------|-----------------|
46
+ | `spacing-1` | 0.25rem | 4px | Tiny gaps (icon padding, tight spacing) |
47
+ | `spacing-2` | 0.5rem | 8px | Small gaps (button padding, input padding) |
48
+ | `spacing-3` | 0.75rem | 12px | Medium gaps (card padding, list items) |
49
+ | `spacing-4` | 1rem | 16px | Default gaps (section spacing, form fields) |
50
+ | `spacing-5` | 1.25rem | 20px | Between default and large |
51
+ | `spacing-6` | 1.5rem | 24px | Large gaps (component spacing, cards) |
52
+ | `spacing-8` | 2rem | 32px | XL gaps (section margins, page headers) |
53
+ | `spacing-10` | 2.5rem | 40px | XXL gaps (major sections) |
54
+ | `spacing-12` | 3rem | 48px | XXXL gaps (page margins, hero sections) |
55
+ | `spacing-16` | 4rem | 64px | Huge gaps (full section spacing) |
56
+ | `spacing-20` | 5rem | 80px | Extra huge (landing page sections) |
57
+ | `spacing-24` | 6rem | 96px | Maximum (hero padding, page dividers) |
58
+
59
+ ### Implementation
60
+
61
+ ```css
62
+ :root {
63
+ /* Base unit */
64
+ --spacing-base: 0.25rem;
65
+
66
+ /* Scale */
67
+ --spacing-1: calc(var(--spacing-base) * 1); /* 0.25rem / 4px */
68
+ --spacing-2: calc(var(--spacing-base) * 2); /* 0.5rem / 8px */
69
+ --spacing-3: calc(var(--spacing-base) * 3); /* 0.75rem / 12px */
70
+ --spacing-4: calc(var(--spacing-base) * 4); /* 1rem / 16px */
71
+ --spacing-5: calc(var(--spacing-base) * 5); /* 1.25rem / 20px */
72
+ --spacing-6: calc(var(--spacing-base) * 6); /* 1.5rem / 24px */
73
+ --spacing-8: calc(var(--spacing-base) * 8); /* 2rem / 32px */
74
+ --spacing-10: calc(var(--spacing-base) * 10); /* 2.5rem / 40px */
75
+ --spacing-12: calc(var(--spacing-base) * 12); /* 3rem / 48px */
76
+ --spacing-16: calc(var(--spacing-base) * 16); /* 4rem / 64px */
77
+ --spacing-20: calc(var(--spacing-base) * 20); /* 5rem / 80px */
78
+ --spacing-24: calc(var(--spacing-base) * 24); /* 6rem / 96px */
79
+ }
80
+ ```
81
+
82
+ ---
83
+
84
+ ## Usage Patterns
85
+
86
+ ### Component Padding
87
+
88
+ **Buttons:**
89
+ ```css
90
+ /* Small button */
91
+ .btn-sm {
92
+ padding: var(--spacing-1) var(--spacing-3); /* 4px 12px */
93
+ }
94
+
95
+ /* Default button */
96
+ .btn {
97
+ padding: var(--spacing-2) var(--spacing-4); /* 8px 16px */
98
+ }
99
+
100
+ /* Large button */
101
+ .btn-lg {
102
+ padding: var(--spacing-3) var(--spacing-6); /* 12px 24px */
103
+ }
104
+ ```
105
+
106
+ **Cards:**
107
+ ```css
108
+ .card {
109
+ padding: var(--spacing-6); /* 24px */
110
+ }
111
+
112
+ .card-compact {
113
+ padding: var(--spacing-4); /* 16px */
114
+ }
115
+
116
+ .card-spacious {
117
+ padding: var(--spacing-8); /* 32px */
118
+ }
119
+ ```
120
+
121
+ **Inputs:**
122
+ ```css
123
+ .input {
124
+ padding: var(--spacing-2) var(--spacing-3); /* 8px 12px */
125
+ }
126
+
127
+ .input-large {
128
+ padding: var(--spacing-3) var(--spacing-4); /* 12px 16px */
129
+ }
130
+ ```
131
+
132
+ ---
133
+
134
+ ### Component Gaps (Spacing Between Elements)
135
+
136
+ **Stack (Vertical Spacing):**
137
+ ```css
138
+ /* Tight stack (list items) */
139
+ .stack-tight > * + * {
140
+ margin-top: var(--spacing-2); /* 8px */
141
+ }
142
+
143
+ /* Default stack (form fields) */
144
+ .stack > * + * {
145
+ margin-top: var(--spacing-4); /* 16px */
146
+ }
147
+
148
+ /* Loose stack (sections) */
149
+ .stack-loose > * + * {
150
+ margin-top: var(--spacing-8); /* 32px */
151
+ }
152
+ ```
153
+
154
+ **Inline (Horizontal Spacing):**
155
+ ```css
156
+ /* Tight inline (breadcrumbs) */
157
+ .inline-tight > * + * {
158
+ margin-left: var(--spacing-2); /* 8px */
159
+ }
160
+
161
+ /* Default inline (button groups) */
162
+ .inline > * + * {
163
+ margin-left: var(--spacing-4); /* 16px */
164
+ }
165
+
166
+ /* Loose inline (navigation items) */
167
+ .inline-loose > * + * {
168
+ margin-left: var(--spacing-6); /* 24px */
169
+ }
170
+ ```
171
+
172
+ **Grid Gaps:**
173
+ ```css
174
+ /* Tight grid (image galleries) */
175
+ .grid-tight {
176
+ gap: var(--spacing-2); /* 8px */
177
+ }
178
+
179
+ /* Default grid (product listings) */
180
+ .grid {
181
+ gap: var(--spacing-4); /* 16px */
182
+ }
183
+
184
+ /* Loose grid (feature cards) */
185
+ .grid-loose {
186
+ gap: var(--spacing-8); /* 32px */
187
+ }
188
+ ```
189
+
190
+ ---
191
+
192
+ ### Layout Spacing
193
+
194
+ **Page Margins:**
195
+ ```css
196
+ /* Mobile (small screens) */
197
+ .page-container {
198
+ padding: var(--spacing-4); /* 16px */
199
+ }
200
+
201
+ /* Tablet */
202
+ @media (min-width: 640px) {
203
+ .page-container {
204
+ padding: var(--spacing-6); /* 24px */
205
+ }
206
+ }
207
+
208
+ /* Desktop */
209
+ @media (min-width: 1024px) {
210
+ .page-container {
211
+ padding: var(--spacing-8); /* 32px */
212
+ }
213
+ }
214
+ ```
215
+
216
+ **Section Spacing:**
217
+ ```css
218
+ /* Between page sections */
219
+ .section {
220
+ margin-bottom: var(--spacing-12); /* 48px */
221
+ }
222
+
223
+ @media (min-width: 1024px) {
224
+ .section {
225
+ margin-bottom: var(--spacing-16); /* 64px */
226
+ }
227
+ }
228
+ ```
229
+
230
+ **Component Spacing:**
231
+ ```css
232
+ /* Between components in a section */
233
+ .component {
234
+ margin-bottom: var(--spacing-6); /* 24px */
235
+ }
236
+ ```
237
+
238
+ ---
239
+
240
+ ## Vertical Rhythm
241
+
242
+ **Definition:** Consistent vertical spacing creates visual harmony
243
+
244
+ ### Line Height + Margin System
245
+
246
+ ```css
247
+ /* Typography with rhythm */
248
+ p {
249
+ margin-bottom: var(--spacing-4); /* 16px */
250
+ line-height: 1.5; /* 24px at 16px font size */
251
+ }
252
+
253
+ h1 {
254
+ margin-bottom: var(--spacing-6); /* 24px */
255
+ line-height: 1.2; /* 48px at 40px font size */
256
+ }
257
+
258
+ h2 {
259
+ margin-bottom: var(--spacing-4); /* 16px */
260
+ line-height: 1.3; /* 41.6px at 32px font size */
261
+ }
262
+ ```
263
+
264
+ **Rule:** Margin-bottom should be a multiple of base unit (4px)
265
+
266
+ ---
267
+
268
+ ## White Space
269
+
270
+ **Principle:** White space (negative space) is as important as content
271
+
272
+ ### Content Density Levels
273
+
274
+ **Tight (Compact):**
275
+ ```css
276
+ /* Use for: Data tables, dashboards, dense information */
277
+ .container-tight {
278
+ padding: var(--spacing-2); /* 8px */
279
+ gap: var(--spacing-2); /* 8px */
280
+ }
281
+ ```
282
+
283
+ **Default (Balanced):**
284
+ ```css
285
+ /* Use for: Standard pages, forms, articles */
286
+ .container {
287
+ padding: var(--spacing-4); /* 16px */
288
+ gap: var(--spacing-4); /* 16px */
289
+ }
290
+ ```
291
+
292
+ **Loose (Spacious):**
293
+ ```css
294
+ /* Use for: Landing pages, marketing content, hero sections */
295
+ .container-loose {
296
+ padding: var(--spacing-8); /* 32px */
297
+ gap: var(--spacing-8); /* 32px */
298
+ }
299
+ ```
300
+
301
+ ---
302
+
303
+ ## Responsive Spacing
304
+
305
+ ### Mobile-First Scaling
306
+
307
+ ```css
308
+ /* Mobile (default) */
309
+ .section {
310
+ padding: var(--spacing-4); /* 16px */
311
+ margin-bottom: var(--spacing-8); /* 32px */
312
+ }
313
+
314
+ /* Tablet (640px+) */
315
+ @media (min-width: 640px) {
316
+ .section {
317
+ padding: var(--spacing-6); /* 24px */
318
+ margin-bottom: var(--spacing-12); /* 48px */
319
+ }
320
+ }
321
+
322
+ /* Desktop (1024px+) */
323
+ @media (min-width: 1024px) {
324
+ .section {
325
+ padding: var(--spacing-8); /* 32px */
326
+ margin-bottom: var(--spacing-16); /* 64px */
327
+ }
328
+ }
329
+ ```
330
+
331
+ **Pattern:** Increase spacing ~1.5-2x per breakpoint
332
+
333
+ ---
334
+
335
+ ## Common Spacing Patterns
336
+
337
+ ### Navigation
338
+
339
+ ```css
340
+ /* Header padding */
341
+ .header {
342
+ padding: var(--spacing-4) var(--spacing-6); /* 16px 24px */
343
+ }
344
+
345
+ /* Navigation item spacing */
346
+ .nav-item + .nav-item {
347
+ margin-left: var(--spacing-6); /* 24px */
348
+ }
349
+ ```
350
+
351
+ ### Forms
352
+
353
+ ```css
354
+ /* Label to input */
355
+ .form-field label {
356
+ margin-bottom: var(--spacing-2); /* 8px */
357
+ }
358
+
359
+ /* Between form fields */
360
+ .form-field + .form-field {
361
+ margin-top: var(--spacing-4); /* 16px */
362
+ }
363
+
364
+ /* Form groups */
365
+ .form-group + .form-group {
366
+ margin-top: var(--spacing-8); /* 32px */
367
+ }
368
+ ```
369
+
370
+ ### Cards
371
+
372
+ ```css
373
+ .card {
374
+ padding: var(--spacing-6); /* 24px */
375
+ border-radius: var(--spacing-2); /* 8px */
376
+ }
377
+
378
+ .card-header {
379
+ margin-bottom: var(--spacing-4); /* 16px */
380
+ padding-bottom: var(--spacing-4); /* 16px */
381
+ border-bottom: 1px solid var(--color-border);
382
+ }
383
+
384
+ .card-body {
385
+ padding: var(--spacing-4) 0; /* 16px 0 */
386
+ }
387
+
388
+ .card-footer {
389
+ margin-top: var(--spacing-4); /* 16px */
390
+ padding-top: var(--spacing-4); /* 16px */
391
+ border-top: 1px solid var(--color-border);
392
+ }
393
+ ```
394
+
395
+ ---
396
+
397
+ ## Best Practices
398
+
399
+ ### DO:
400
+ - ✅ Use spacing scale values only (no arbitrary values)
401
+ - ✅ Maintain consistent gaps in similar contexts
402
+ - ✅ Scale spacing up for larger screens
403
+ - ✅ Use generous white space for readability
404
+ - ✅ Align spacing with vertical rhythm
405
+ - ✅ Test spacing on all screen sizes
406
+
407
+ ### DON'T:
408
+ - ❌ Use arbitrary spacing values (e.g., `padding: 13px`)
409
+ - ❌ Mix different spacing systems
410
+ - ❌ Overcrowd content (too little spacing)
411
+ - ❌ Use excessive spacing (too much empty space)
412
+ - ❌ Forget to scale spacing responsively
413
+ - ❌ Inconsistent spacing for similar elements
414
+
415
+ ---
416
+
417
+ ## Quick Reference
418
+
419
+ **Component Padding:**
420
+ | Component | Padding |
421
+ |-----------|---------|
422
+ | Button (small) | `spacing-1` `spacing-3` (4px 12px) |
423
+ | Button (default) | `spacing-2` `spacing-4` (8px 16px) |
424
+ | Button (large) | `spacing-3` `spacing-6` (12px 24px) |
425
+ | Input | `spacing-2` `spacing-3` (8px 12px) |
426
+ | Card | `spacing-6` (24px) |
427
+
428
+ **Component Gaps:**
429
+ | Context | Gap |
430
+ |---------|-----|
431
+ | List items | `spacing-2` (8px) |
432
+ | Form fields | `spacing-4` (16px) |
433
+ | Cards in grid | `spacing-4` to `spacing-6` (16-24px) |
434
+ | Page sections | `spacing-12` to `spacing-16` (48-64px) |
435
+
436
+ **Responsive Scale:**
437
+ | Breakpoint | Multiplier |
438
+ |------------|------------|
439
+ | Mobile (< 640px) | 1x (base) |
440
+ | Tablet (640-1024px) | 1.5x |
441
+ | Desktop (> 1024px) | 2x |
442
+
443
+ ---
444
+
445
+ **💡 Remember:** Consistent spacing creates visual rhythm and improves readability!