@champpaba/claude-agent-kit 1.1.0 → 1.4.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.
Files changed (95) hide show
  1. package/.claude/CHANGELOG-v1.1.1.md +259 -0
  2. package/.claude/CLAUDE.md +163 -0
  3. package/.claude/agents/01-integration.md +651 -0
  4. package/.claude/agents/02-uxui-frontend.md +809 -0
  5. package/.claude/agents/03-test-debug.md +616 -0
  6. package/.claude/agents/04-frontend.md +671 -0
  7. package/.claude/agents/05-backend.md +767 -0
  8. package/.claude/agents/06-database.md +817 -0
  9. package/.claude/commands/agentsetup.md +1464 -0
  10. package/.claude/commands/cdev.md +412 -0
  11. package/.claude/commands/csetup.md +760 -0
  12. package/.claude/commands/cstatus.md +60 -0
  13. package/.claude/commands/cview.md +364 -0
  14. package/.claude/commands/designsetup.md +1169 -0
  15. package/.claude/commands/extract.md +1005 -0
  16. package/.claude/commands/pageplan.md +357 -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 +81 -0
  45. package/.claude/lib/agent-executor.md +258 -0
  46. package/.claude/lib/agent-router.md +572 -0
  47. package/.claude/lib/context-loading-protocol.md +462 -0
  48. package/.claude/lib/detailed-guides/agent-system.md +237 -0
  49. package/.claude/lib/detailed-guides/best-practices-system.md +150 -0
  50. package/.claude/lib/detailed-guides/context-optimization.md +118 -0
  51. package/.claude/lib/detailed-guides/design-system.md +98 -0
  52. package/.claude/lib/detailed-guides/page-planning.md +147 -0
  53. package/.claude/lib/detailed-guides/taskmaster-analysis.md +263 -0
  54. package/.claude/lib/document-loader.md +353 -0
  55. package/.claude/lib/flags-updater.md +469 -0
  56. package/.claude/lib/handoff-protocol.md +665 -0
  57. package/.claude/lib/task-analyzer.md +694 -0
  58. package/.claude/lib/tdd-classifier.md +345 -0
  59. package/.claude/lib/tdd-workflow.md +891 -0
  60. package/.claude/lib/validation-gates.md +484 -0
  61. package/.claude/settings.local.json +42 -0
  62. package/.claude/templates/STYLE_GUIDE.template.md +879 -0
  63. package/.claude/templates/context-template.md +45 -0
  64. package/.claude/templates/design-context-template.md +220 -0
  65. package/.claude/templates/flags-template.json +42 -0
  66. package/.claude/templates/page-plan-example.md +562 -0
  67. package/.claude/templates/phase-templates.json +124 -0
  68. package/.claude/templates/phases-sections/accessibility-test.md +17 -0
  69. package/.claude/templates/phases-sections/api-design.md +37 -0
  70. package/.claude/templates/phases-sections/backend-tests.md +16 -0
  71. package/.claude/templates/phases-sections/backend.md +37 -0
  72. package/.claude/templates/phases-sections/business-logic-validation.md +16 -0
  73. package/.claude/templates/phases-sections/component-tests.md +17 -0
  74. package/.claude/templates/phases-sections/contract-backend.md +16 -0
  75. package/.claude/templates/phases-sections/contract-frontend.md +16 -0
  76. package/.claude/templates/phases-sections/database.md +35 -0
  77. package/.claude/templates/phases-sections/documentation.md +17 -0
  78. package/.claude/templates/phases-sections/e2e-tests.md +16 -0
  79. package/.claude/templates/phases-sections/fix-implementation.md +17 -0
  80. package/.claude/templates/phases-sections/frontend-integration.md +18 -0
  81. package/.claude/templates/phases-sections/frontend-mockup.md +123 -0
  82. package/.claude/templates/phases-sections/manual-flow-test.md +15 -0
  83. package/.claude/templates/phases-sections/manual-ux-test.md +16 -0
  84. package/.claude/templates/phases-sections/refactor-implementation.md +17 -0
  85. package/.claude/templates/phases-sections/refactor.md +16 -0
  86. package/.claude/templates/phases-sections/regression-tests.md +15 -0
  87. package/.claude/templates/phases-sections/report.md +16 -0
  88. package/.claude/templates/phases-sections/responsive-test.md +16 -0
  89. package/.claude/templates/phases-sections/script-implementation.md +43 -0
  90. package/.claude/templates/phases-sections/test-coverage.md +16 -0
  91. package/.claude/templates/phases-sections/user-approval.md +14 -0
  92. package/README.md +191 -0
  93. package/lib/init.js +1 -1
  94. package/lib/update.js +1 -1
  95. package/package.json +2 -2
@@ -0,0 +1,566 @@
1
+ # Box Thinking Framework
2
+
3
+ > **Purpose:** Analyze and plan layouts by thinking of all elements as boxes
4
+
5
+ ---
6
+
7
+ ## ⚠️ Context Note
8
+
9
+ **This file contains layout analysis METHODOLOGY** (applies to all projects).
10
+
11
+ **If your project has a STYLE_GUIDE.md with reference screenshot:**
12
+ → View the screenshot and apply Box Thinking to understand its layout
13
+ → Use STYLE_GUIDE.md spacing values when implementing boxes
14
+
15
+ Box Thinking = **How to think about layout**
16
+ STYLE_GUIDE.md = **What values to use**
17
+
18
+ ---
19
+
20
+ ## Core Philosophy
21
+
22
+ **Every element on a screen is a box.**
23
+
24
+ Before writing any layout code, **observe and describe**:
25
+ 1. What boxes exist?
26
+ 2. How do boxes relate to each other?
27
+ 3. How do boxes move when resized?
28
+
29
+ ---
30
+
31
+ ## The Box Analysis Method
32
+
33
+ ### Step 1: Identify All Boxes
34
+
35
+ > "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**."
36
+
37
+ **Example: E-commerce Product Page**
38
+
39
+ ```
40
+ Boxes identified:
41
+ ├─ Header Box (navigation, logo, cart)
42
+ ├─ Hero Box (product image + title)
43
+ ├─ Sidebar Box (filters, categories)
44
+ ├─ Main Content Box
45
+ │ ├─ Product Grid Box
46
+ │ │ ├─ Product Card Box 1
47
+ │ │ ├─ Product Card Box 2
48
+ │ │ └─ Product Card Box 3
49
+ │ └─ Pagination Box
50
+ └─ Footer Box (links, copyright)
51
+ ```
52
+
53
+ ---
54
+
55
+ ### Step 2: Describe Box Relationships
56
+
57
+ **5 Types of Relationships:**
58
+
59
+ #### 1. Container Boxes (Hierarchy)
60
+ **What contains what?**
61
+
62
+ ```
63
+ Header Box CONTAINS:
64
+ ├─ Logo Box
65
+ ├─ Navigation Box (contains menu items)
66
+ └─ User Actions Box (contains cart, profile)
67
+
68
+ Product Card Box CONTAINS:
69
+ ├─ Image Box
70
+ ├─ Title Box
71
+ ├─ Price Box
72
+ └─ Button Box
73
+ ```
74
+
75
+ **Code Implication:**
76
+ ```html
77
+ <header class="header-box">
78
+ <div class="logo-box">Logo</div>
79
+ <nav class="nav-box">
80
+ <a>Home</a>
81
+ <a>Products</a>
82
+ </nav>
83
+ <div class="actions-box">
84
+ <button>Cart</button>
85
+ </div>
86
+ </header>
87
+ ```
88
+
89
+ ---
90
+
91
+ #### 2. Adjacent Boxes (Side-by-Side)
92
+ **Which boxes sit next to each other?**
93
+
94
+ ```
95
+ Desktop Layout:
96
+ [Sidebar Box] [Main Content Box]
97
+
98
+ Header Layout:
99
+ [Logo Box] [Nav Box] [Actions Box]
100
+ ```
101
+
102
+ **Code Implication:**
103
+ ```css
104
+ .header-box {
105
+ display: flex;
106
+ justify-content: space-between;
107
+ align-items: center;
108
+ }
109
+
110
+ .layout {
111
+ display: grid;
112
+ grid-template-columns: 250px 1fr;
113
+ }
114
+ ```
115
+
116
+ ---
117
+
118
+ #### 3. Nested Boxes (Parent-Child)
119
+ **How deep does nesting go?**
120
+
121
+ ```
122
+ Page Box
123
+ └─ Section Box
124
+ └─ Container Box
125
+ └─ Card Box
126
+ └─ Content Box
127
+ ├─ Title Box
128
+ └─ Text Box
129
+ ```
130
+
131
+ **⚠️ Warning:** Too much nesting = complex CSS
132
+ **Rule:** Max 3-4 levels deep
133
+
134
+ ---
135
+
136
+ #### 4. Space Flow (Gaps Between Boxes)
137
+ **How does space flow between boxes?**
138
+
139
+ ```
140
+ Vertical Flow (Stack):
141
+ ┌─────────────┐
142
+ │ Header Box │ ← 16px gap ↓
143
+ ├─────────────┤
144
+ │ Hero Box │ ← 24px gap ↓
145
+ ├─────────────┤
146
+ │ Content Box │ ← 24px gap ↓
147
+ └─────────────┘
148
+
149
+ Horizontal Flow (Inline):
150
+ [Logo] ←20px→ [Nav] ←20px→ [Actions]
151
+ ```
152
+
153
+ **Code Implication:**
154
+ ```css
155
+ .stack {
156
+ display: flex;
157
+ flex-direction: column;
158
+ gap: var(--spacing-6); /* 24px */
159
+ }
160
+
161
+ .inline {
162
+ display: flex;
163
+ gap: var(--spacing-5); /* 20px */
164
+ }
165
+ ```
166
+
167
+ ---
168
+
169
+ #### 5. Alignment Logic
170
+ **How do boxes position relative to each other?**
171
+
172
+ ```
173
+ Top-aligned:
174
+ ┌──┐ ┌────┐ ┌──────┐
175
+ │ │ │ │ │ │
176
+ │ │ │ │ └──────┘
177
+ │ │ └────┘
178
+ └──┘
179
+
180
+ Center-aligned:
181
+ ┌────┐
182
+ ┌──┐ │ │ ┌──────┐
183
+ │ │ │ │ │ │
184
+ └──┘ │ │ └──────┘
185
+ └────┘
186
+
187
+ Bottom-aligned:
188
+ ┌──┐
189
+ │ │ ┌────┐
190
+ │ │ │ │ ┌──────┐
191
+ └──┘ └────┘ └──────┘
192
+ ```
193
+
194
+ **Code Implication:**
195
+ ```css
196
+ .align-top { align-items: flex-start; }
197
+ .align-center { align-items: center; }
198
+ .align-bottom { align-items: flex-end; }
199
+ ```
200
+
201
+ ---
202
+
203
+ ## Box Behavior in Responsive Context
204
+
205
+ ### Question to Ask:
206
+
207
+ > "How does this layout behave 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?"
208
+
209
+ ---
210
+
211
+ ### 4 Box Movement Patterns
212
+
213
+ #### 1. Stacking (Horizontal → Vertical)
214
+
215
+ **Desktop (Wide Screen):**
216
+ ```
217
+ ┌────────────┬──────────────────┐
218
+ │ Sidebar │ Main Content │
219
+ │ Box │ Box │
220
+ └────────────┴──────────────────┘
221
+ ```
222
+
223
+ **Mobile (Narrow Screen):**
224
+ ```
225
+ ┌──────────────────┐
226
+ │ Main Content Box │
227
+ ├──────────────────┤
228
+ │ Sidebar Box │
229
+ └──────────────────┘
230
+ ```
231
+
232
+ **Code:**
233
+ ```css
234
+ .container {
235
+ display: flex;
236
+ gap: var(--spacing-6);
237
+ }
238
+
239
+ @media (max-width: 768px) {
240
+ .container {
241
+ flex-direction: column;
242
+ }
243
+ }
244
+ ```
245
+
246
+ ---
247
+
248
+ #### 2. Merging (Multiple → Single)
249
+
250
+ **Desktop (3 columns):**
251
+ ```
252
+ ┌─────┬─────┬─────┐
253
+ │ Box │ Box │ Box │
254
+ │ 1 │ 2 │ 3 │
255
+ └─────┴─────┴─────┘
256
+ ```
257
+
258
+ **Tablet (2 columns):**
259
+ ```
260
+ ┌─────────┬─────────┐
261
+ │ Box 1 │ Box 2 │
262
+ ├─────────┴─────────┤
263
+ │ Box 3 │
264
+ └───────────────────┘
265
+ ```
266
+
267
+ **Mobile (1 column):**
268
+ ```
269
+ ┌───────────────────┐
270
+ │ Box 1 │
271
+ ├───────────────────┤
272
+ │ Box 2 │
273
+ ├───────────────────┤
274
+ │ Box 3 │
275
+ └───────────────────┘
276
+ ```
277
+
278
+ **Code:**
279
+ ```css
280
+ .grid {
281
+ display: grid;
282
+ gap: var(--spacing-4);
283
+ }
284
+
285
+ /* Desktop: 3 columns */
286
+ @media (min-width: 1024px) {
287
+ .grid { grid-template-columns: repeat(3, 1fr); }
288
+ }
289
+
290
+ /* Tablet: 2 columns */
291
+ @media (min-width: 640px) and (max-width: 1023px) {
292
+ .grid { grid-template-columns: repeat(2, 1fr); }
293
+ }
294
+
295
+ /* Mobile: 1 column */
296
+ @media (max-width: 639px) {
297
+ .grid { grid-template-columns: 1fr; }
298
+ }
299
+ ```
300
+
301
+ ---
302
+
303
+ #### 3. Prioritizing (Show Important, Hide Secondary)
304
+
305
+ **Desktop (Show All):**
306
+ ```
307
+ ┌─────┬──────────┬────────┬─────┐
308
+ │Logo │ Nav │ Search │ User│
309
+ └─────┴──────────┴────────┴─────┘
310
+ ```
311
+
312
+ **Mobile (Hide Nav, Show Hamburger):**
313
+ ```
314
+ ┌─────┬──────────────┬─────┐
315
+ │Logo │ │ ☰ │
316
+ └─────┴──────────────┴─────┘
317
+ ```
318
+
319
+ **Code:**
320
+ ```css
321
+ .nav { display: flex; }
322
+ .hamburger { display: none; }
323
+
324
+ @media (max-width: 768px) {
325
+ .nav { display: none; }
326
+ .hamburger { display: block; }
327
+ }
328
+ ```
329
+
330
+ ---
331
+
332
+ #### 4. Compressing (Shrink, Maintain Relationships)
333
+
334
+ **Desktop (Generous Spacing):**
335
+ ```
336
+ ┌─────────────────────────┐
337
+ │ │
338
+ │ Hero Box │ ← 48px padding
339
+ │ │
340
+ └─────────────────────────┘
341
+ ```
342
+
343
+ **Mobile (Compact Spacing):**
344
+ ```
345
+ ┌───────────────┐
346
+ │ Hero Box │ ← 16px padding
347
+ └───────────────┘
348
+ ```
349
+
350
+ **Code:**
351
+ ```css
352
+ .hero {
353
+ padding: var(--spacing-12); /* 48px on desktop */
354
+ }
355
+
356
+ @media (max-width: 768px) {
357
+ .hero {
358
+ padding: var(--spacing-4); /* 16px on mobile */
359
+ }
360
+ }
361
+ ```
362
+
363
+ ---
364
+
365
+ ## Box Implementation Rules
366
+
367
+ ### Margins (Space Outside Box)
368
+
369
+ **Use for:** Pushing boxes away from each other
370
+
371
+ ```css
372
+ .box {
373
+ margin-bottom: var(--spacing-6); /* 24px gap below */
374
+ }
375
+
376
+ /* Or use gap in parent */
377
+ .container {
378
+ display: flex;
379
+ gap: var(--spacing-6); /* 24px between all children */
380
+ }
381
+ ```
382
+
383
+ **Prefer `gap` over `margin`** (cleaner, more predictable)
384
+
385
+ ---
386
+
387
+ ### Padding (Space Inside Box)
388
+
389
+ **Use for:** Creating breathing room inside a box
390
+
391
+ ```css
392
+ .card-box {
393
+ padding: var(--spacing-6); /* 24px inside box */
394
+ }
395
+
396
+ .button-box {
397
+ padding: var(--spacing-2) var(--spacing-4); /* 8px top/bottom, 16px left/right */
398
+ }
399
+ ```
400
+
401
+ ---
402
+
403
+ ### Borders (Box Boundaries)
404
+
405
+ **Use sparingly** - Prefer color/shadow for separation
406
+
407
+ ```css
408
+ /* ❌ Heavy borders everywhere */
409
+ .box {
410
+ border: 2px solid black;
411
+ }
412
+
413
+ /* ✅ Subtle separation */
414
+ .box {
415
+ border: 1px solid rgb(0 0 0 / 0.1);
416
+ box-shadow: var(--shadow-sm);
417
+ }
418
+ ```
419
+
420
+ **Alternative:** Use background color contrast instead of borders
421
+
422
+ ---
423
+
424
+ ### Consistent Gaps
425
+
426
+ **Always use spacing scale:**
427
+
428
+ ```css
429
+ /* ✅ Good */
430
+ gap: var(--spacing-4); /* 16px */
431
+ gap: var(--spacing-6); /* 24px */
432
+
433
+ /* ❌ Bad */
434
+ gap: 17px; /* Arbitrary value */
435
+ ```
436
+
437
+ ---
438
+
439
+ ## Practical Example: Product Card
440
+
441
+ ### Box Analysis
442
+
443
+ **Identify Boxes:**
444
+ ```
445
+ Product Card Box
446
+ ├─ Image Box
447
+ ├─ Content Box
448
+ │ ├─ Title Box
449
+ │ ├─ Price Box
450
+ │ └─ Description Box
451
+ └─ Action Box
452
+ └─ Button Box
453
+ ```
454
+
455
+ **Relationships:**
456
+ - Container: Card contains Image, Content, Action
457
+ - Nested: Content contains Title, Price, Description
458
+ - Vertical Flow: Image → Content → Action
459
+ - Gaps: 16px between sections
460
+
461
+ **Responsive Behavior:**
462
+ - Desktop: Image left, Content right (side-by-side)
463
+ - Mobile: Image top, Content bottom (stacked)
464
+
465
+ ---
466
+
467
+ ### Implementation
468
+
469
+ ```html
470
+ <div class="product-card-box">
471
+ <div class="image-box">
472
+ <img src="product.jpg" alt="Product">
473
+ </div>
474
+ <div class="content-box">
475
+ <h3 class="title-box">Product Title</h3>
476
+ <p class="price-box">$99.99</p>
477
+ <p class="description-box">Description text</p>
478
+ </div>
479
+ <div class="action-box">
480
+ <button class="button-box">Add to Cart</button>
481
+ </div>
482
+ </div>
483
+ ```
484
+
485
+ ```css
486
+ /* Box structure */
487
+ .product-card-box {
488
+ display: flex;
489
+ flex-direction: column;
490
+ gap: var(--spacing-4); /* 16px between sections */
491
+ padding: var(--spacing-6); /* 24px inside card */
492
+ border-radius: var(--spacing-2);
493
+ box-shadow: var(--shadow-sm);
494
+ }
495
+
496
+ /* Content box (nested) */
497
+ .content-box {
498
+ display: flex;
499
+ flex-direction: column;
500
+ gap: var(--spacing-2); /* 8px between title/price/desc */
501
+ }
502
+
503
+ /* Responsive: side-by-side on desktop */
504
+ @media (min-width: 768px) {
505
+ .product-card-box {
506
+ flex-direction: row;
507
+ align-items: center;
508
+ }
509
+
510
+ .image-box {
511
+ flex-shrink: 0;
512
+ width: 200px;
513
+ }
514
+
515
+ .content-box {
516
+ flex: 1;
517
+ }
518
+ }
519
+ ```
520
+
521
+ ---
522
+
523
+ ## Best Practices
524
+
525
+ ### DO:
526
+ - ✅ Identify all boxes before coding
527
+ - ✅ Describe relationships in plain language
528
+ - ✅ Think in terms of movement (stack, merge, compress)
529
+ - ✅ Use consistent gaps (spacing scale)
530
+ - ✅ Keep nesting shallow (max 3-4 levels)
531
+ - ✅ Test responsive behavior on real devices
532
+
533
+ ### DON'T:
534
+ - ❌ Jump straight to code without box analysis
535
+ - ❌ Use arbitrary spacing values
536
+ - ❌ Nest boxes too deeply (> 4 levels)
537
+ - ❌ Forget responsive behavior
538
+ - ❌ Think in pixels (think in relationships)
539
+
540
+ ---
541
+
542
+ ## Quick Reference
543
+
544
+ **Box Analysis Questions:**
545
+ 1. What boxes exist? (List all elements)
546
+ 2. What contains what? (Hierarchy)
547
+ 3. What's next to what? (Adjacent)
548
+ 4. How does space flow? (Gaps)
549
+ 5. How do boxes align? (Top/Center/Bottom)
550
+ 6. How do boxes move? (Stack/Merge/Compress)
551
+
552
+ **Box Implementation:**
553
+ - **Margins**: Space outside (prefer `gap`)
554
+ - **Padding**: Space inside
555
+ - **Borders**: Use sparingly (prefer shadows)
556
+ - **Gaps**: Use spacing scale (4, 8, 16, 24, 32, 48px)
557
+
558
+ **Responsive Patterns:**
559
+ - **Stacking**: Horizontal → Vertical
560
+ - **Merging**: 3 cols → 2 cols → 1 col
561
+ - **Prioritizing**: Show essential, hide secondary
562
+ - **Compressing**: Reduce spacing, maintain structure
563
+
564
+ ---
565
+
566
+ **💡 Remember:** If you can't describe the boxes and their relationships, you can't build the layout!