@kood/claude-code 0.4.1 → 0.5.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 (149) hide show
  1. package/dist/index.js +69 -12
  2. package/package.json +2 -1
  3. package/templates/.claude/PARALLEL_AGENTS.md +737 -0
  4. package/templates/.claude/agents/analyst.md +416 -0
  5. package/templates/.claude/agents/architect.md +569 -0
  6. package/templates/.claude/agents/code-reviewer.md +132 -133
  7. package/templates/.claude/agents/dependency-manager.md +93 -94
  8. package/templates/.claude/agents/deployment-validator.md +64 -65
  9. package/templates/.claude/agents/designer.md +655 -0
  10. package/templates/.claude/agents/document-writer.md +500 -0
  11. package/templates/.claude/agents/explore.md +499 -0
  12. package/templates/.claude/agents/git-operator.md +74 -75
  13. package/templates/.claude/agents/implementation-executor.md +138 -109
  14. package/templates/.claude/agents/ko-to-en-translator.md +18 -22
  15. package/templates/.claude/agents/lint-fixer.md +250 -93
  16. package/templates/.claude/agents/planner.md +356 -0
  17. package/templates/.claude/agents/refactor-advisor.md +135 -136
  18. package/templates/.claude/commands/bug-fix.md +296 -207
  19. package/templates/.claude/commands/git-all.md +199 -46
  20. package/templates/.claude/commands/git-session.md +113 -57
  21. package/templates/.claude/commands/lint-fix.md +219 -153
  22. package/templates/.claude/commands/lint-init.md +113 -76
  23. package/templates/.claude/commands/pre-deploy.md +190 -124
  24. package/templates/.claude/commands/refactor.md +407 -162
  25. package/templates/.claude/commands/version-update.md +138 -37
  26. package/templates/.claude/instructions/context-engineering/ANTHROPIC_CONTEXT_ENGINEERING.md +178 -0
  27. package/templates/.claude/instructions/context-engineering/references/claude-4x.md +215 -0
  28. package/templates/.claude/instructions/context-engineering/references/core-principles.md +137 -0
  29. package/templates/.claude/instructions/context-engineering/references/examples.md +351 -0
  30. package/templates/.claude/instructions/context-engineering/references/techniques.md +162 -0
  31. package/templates/.claude/instructions/parallel-agent-execution.md +874 -0
  32. package/templates/.claude/skills/docs-creator/AGENTS.md +238 -0
  33. package/templates/.claude/{commands/docs-creator.md → skills/docs-creator/SKILL.md} +61 -75
  34. package/templates/.claude/skills/docs-refactor/AGENTS.md +270 -0
  35. package/templates/.claude/{commands/docs-refactor.md → skills/docs-refactor/SKILL.md} +30 -44
  36. package/templates/.claude/skills/execute/SKILL.md +451 -0
  37. package/templates/.claude/skills/figma-to-code/AGENTS.md +287 -0
  38. package/templates/.claude/skills/figma-to-code/SKILL.md +225 -225
  39. package/templates/.claude/skills/figma-to-code/references/design-tokens.md +75 -73
  40. package/templates/.claude/skills/figma-to-code/references/figma-mcp-tools.md +73 -73
  41. package/templates/.claude/skills/figma-to-code/references/layout-mapping.md +104 -104
  42. package/templates/.claude/skills/figma-to-code/references/responsive-design.md +99 -99
  43. package/templates/.claude/skills/figma-to-code/references/verification.md +91 -91
  44. package/templates/.claude/skills/global-uiux-design/AGENTS.md +317 -0
  45. package/templates/.claude/skills/global-uiux-design/SKILL.md +738 -0
  46. package/templates/.claude/skills/global-uiux-design/references/accessibility.md +401 -0
  47. package/templates/.claude/skills/global-uiux-design/references/color-system.md +275 -0
  48. package/templates/.claude/skills/global-uiux-design/references/design-philosophy.md +206 -0
  49. package/templates/.claude/skills/global-uiux-design/references/design-systems.md +446 -0
  50. package/templates/.claude/skills/korea-uiux-design/AGENTS.md +307 -0
  51. package/templates/.claude/skills/korea-uiux-design/SKILL.md +170 -0
  52. package/templates/.claude/skills/nextjs-react-best-practices/AGENTS.md +95 -116
  53. package/templates/.claude/skills/nextjs-react-best-practices/SKILL.md +134 -152
  54. package/templates/.claude/skills/nextjs-react-best-practices/rules/advanced-event-handler-refs.md +6 -6
  55. package/templates/.claude/skills/nextjs-react-best-practices/rules/advanced-use-latest.md +5 -5
  56. package/templates/.claude/skills/nextjs-react-best-practices/rules/async-api-routes.md +5 -5
  57. package/templates/.claude/skills/nextjs-react-best-practices/rules/async-defer-await.md +22 -22
  58. package/templates/.claude/skills/nextjs-react-best-practices/rules/async-dependencies.md +5 -5
  59. package/templates/.claude/skills/nextjs-react-best-practices/rules/async-parallel.md +4 -4
  60. package/templates/.claude/skills/nextjs-react-best-practices/rules/async-suspense-boundaries.md +21 -21
  61. package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-barrel-imports.md +18 -18
  62. package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-conditional.md +4 -4
  63. package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-defer-third-party.md +4 -4
  64. package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-dynamic-imports.md +4 -4
  65. package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-preload.md +5 -5
  66. package/templates/.claude/skills/nextjs-react-best-practices/rules/client-event-listeners.md +9 -9
  67. package/templates/.claude/skills/nextjs-react-best-practices/rules/client-swr-dedup.md +7 -7
  68. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-batch-dom-css.md +13 -13
  69. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-cache-function-results.md +14 -14
  70. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-cache-property-access.md +4 -4
  71. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-cache-storage.md +10 -10
  72. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-combine-iterations.md +4 -4
  73. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-early-exit.md +7 -7
  74. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-hoist-regexp.md +6 -6
  75. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-index-maps.md +6 -6
  76. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-length-check-first.md +14 -14
  77. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-min-max-loop.md +16 -16
  78. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-set-map-lookups.md +4 -4
  79. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-tosorted-immutable.md +17 -17
  80. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-activity.md +4 -4
  81. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-animate-svg-wrapper.md +11 -11
  82. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-conditional-render.md +8 -8
  83. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-content-visibility.md +4 -4
  84. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-hoist-jsx.md +6 -6
  85. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-hydration-no-flicker.md +14 -14
  86. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-svg-precision.md +5 -5
  87. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-defer-reads.md +4 -4
  88. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-dependencies.md +7 -7
  89. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-derived-state.md +5 -5
  90. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-functional-setstate.md +34 -34
  91. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-lazy-state-init.md +15 -15
  92. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-memo.md +5 -5
  93. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-transitions.md +4 -4
  94. package/templates/.claude/skills/nextjs-react-best-practices/rules/server-after-nonblocking.md +24 -24
  95. package/templates/.claude/skills/nextjs-react-best-practices/rules/server-cache-lru.md +10 -10
  96. package/templates/.claude/skills/nextjs-react-best-practices/rules/server-cache-react.md +4 -4
  97. package/templates/.claude/skills/nextjs-react-best-practices/rules/server-parallel-fetching.md +5 -5
  98. package/templates/.claude/skills/nextjs-react-best-practices/rules/server-serialization.md +6 -6
  99. package/templates/.claude/skills/plan/SKILL.md +594 -0
  100. package/templates/.claude/skills/prd/SKILL.md +496 -0
  101. package/templates/.claude/skills/ralph/AGENTS.md +393 -0
  102. package/templates/.claude/skills/ralph/SKILL.md +1035 -0
  103. package/templates/.claude/skills/tanstack-start-react-best-practices/AGENTS.md +100 -121
  104. package/templates/.claude/skills/tanstack-start-react-best-practices/SKILL.md +139 -157
  105. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/async-defer-await.md +22 -22
  106. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/async-dependencies.md +5 -5
  107. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/async-loader.md +7 -7
  108. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/async-parallel.md +4 -4
  109. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-barrel-imports.md +18 -18
  110. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-conditional.md +4 -4
  111. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-defer-third-party.md +4 -4
  112. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-lazy-routes.md +12 -12
  113. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-preload.md +5 -5
  114. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/client-event-listeners.md +9 -9
  115. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/client-tanstack-query.md +12 -12
  116. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-batch-dom-css.md +13 -13
  117. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-cache-function-results.md +14 -14
  118. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-cache-property-access.md +4 -4
  119. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-cache-storage.md +10 -10
  120. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-combine-iterations.md +4 -4
  121. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-early-exit.md +7 -7
  122. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-hoist-regexp.md +6 -6
  123. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-index-maps.md +6 -6
  124. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-length-check-first.md +14 -14
  125. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-min-max-loop.md +16 -16
  126. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-set-map-lookups.md +4 -4
  127. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-tosorted-immutable.md +17 -17
  128. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-animate-svg-wrapper.md +11 -11
  129. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-conditional-render.md +8 -8
  130. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-content-visibility.md +4 -4
  131. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-hoist-jsx.md +6 -6
  132. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-svg-precision.md +5 -5
  133. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-defer-reads.md +4 -4
  134. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-dependencies.md +7 -7
  135. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-derived-state.md +5 -5
  136. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-functional-setstate.md +34 -34
  137. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-lazy-state-init.md +15 -15
  138. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-memo.md +5 -5
  139. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-transitions.md +4 -4
  140. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-cache-lru.md +12 -12
  141. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-deferred-data.md +14 -14
  142. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-parallel-fetching.md +9 -9
  143. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-serialization.md +6 -6
  144. package/templates/.claude/commands/agent-creator.md +0 -370
  145. package/templates/.claude/commands/command-creator.md +0 -524
  146. package/templates/.claude/commands/execute.md +0 -469
  147. package/templates/.claude/commands/git.md +0 -98
  148. package/templates/.claude/commands/plan.md +0 -526
  149. package/templates/.claude/commands/prd.md +0 -629
@@ -0,0 +1,738 @@
1
+ # Global UI/UX Design
2
+
3
+ <context>
4
+
5
+ **Purpose:** Implement modern, accessible UI/UX design for global audiences. Apply industry-standard patterns from Material Design, Apple HIG, Fluent, and other leading design systems.
6
+
7
+ **Trigger:** Frontend UI/UX implementation, React/Vue component design, responsive web/app development, international product design
8
+
9
+ **Key Features:**
10
+ - WCAG 2.2 AA accessibility compliance
11
+ - Cross-platform consistency
12
+ - Mobile-first responsive design
13
+ - Industry-standard design patterns
14
+
15
+ </context>
16
+
17
+ ---
18
+
19
+ <agent_integration>
20
+
21
+ ## 병렬 Agent 활용 (ULTRAWORK MODE)
22
+
23
+ ### 기본 원칙
24
+
25
+ | 원칙 | 실행 방법 |
26
+ |------|----------|
27
+ | **PARALLEL** | 독립 작업은 단일 메시지에서 동시 Tool 호출 |
28
+ | **DELEGATE** | 전문 에이전트에게 즉시 위임 |
29
+ | **SMART MODEL** | 복잡도별 모델 선택 (haiku/sonnet/opus) |
30
+
31
+ ### Phase별 Agent 활용
32
+
33
+ #### Phase 1: 탐색 + 디자인 정의
34
+
35
+ ```typescript
36
+ // 단일 메시지에서 병렬 실행
37
+ Task(
38
+ subagent_type="explore",
39
+ model="haiku",
40
+ prompt=`글로벌 디자인 시스템 패턴 분석:
41
+ - Material 3, Apple HIG, Fluent 2
42
+ - 프로젝트 기존 컴포넌트 구조
43
+ - 크로스 플랫폼 일관성`
44
+ )
45
+
46
+ Task(
47
+ subagent_type="designer",
48
+ model="opus",
49
+ prompt=`[프로젝트명] UI/UX 디자인 방향 정의:
50
+ - 미학적 톤: 리퀴드 글래스 (Apple HIG)
51
+ - 2026 트렌드: 공간 UI, AI 기반, 적응형 테마
52
+ - 글로벌 표준 참조 (global-uiux-design 스킬)`
53
+ )
54
+ ```
55
+
56
+ #### Phase 2: 병렬 구현
57
+
58
+ ```typescript
59
+ // 크로스 플랫폼 컴포넌트 동시 구현
60
+ Task(
61
+ subagent_type="designer",
62
+ model="sonnet",
63
+ prompt="데스크톱 레이아웃 (Material 3 스타일)"
64
+ )
65
+
66
+ Task(
67
+ subagent_type="designer",
68
+ model="sonnet",
69
+ prompt="모바일 레이아웃 (iOS/Android 적응형)"
70
+ )
71
+
72
+ Task(
73
+ subagent_type="designer",
74
+ model="sonnet",
75
+ prompt="공간 UI 컴포넌트 (WebGPU 3D 효과)"
76
+ )
77
+
78
+ Task(
79
+ subagent_type="implementation-executor",
80
+ model="sonnet",
81
+ prompt="API 통합 및 데이터 레이어"
82
+ )
83
+ ```
84
+
85
+ #### Phase 3: 검증
86
+
87
+ ```typescript
88
+ // 병렬 검증
89
+ Task(
90
+ subagent_type="deployment-validator",
91
+ model="sonnet",
92
+ prompt="typecheck/lint/build 전체 검증"
93
+ )
94
+
95
+ Task(
96
+ subagent_type="code-reviewer",
97
+ model="opus",
98
+ prompt="글로벌 표준 준수 검토 (WCAG 2.2, 크로스 플랫폼)"
99
+ )
100
+ ```
101
+
102
+ ### Agent별 역할
103
+
104
+ | Agent | 모델 | 역할 | 활용 시점 |
105
+ |-------|------|------|----------|
106
+ | **explore** | haiku | 디자인 시스템 분석, 패턴 조사 | 프로젝트 시작, 기존 구조 파악 |
107
+ | **designer** | sonnet/opus | UI/UX 디자인 + 구현 (글로벌 표준) | 컴포넌트, 레이아웃, 디자인 시스템 |
108
+ | **implementation-executor** | sonnet | 로직 구현, API 연동 | 비즈니스 로직, 데이터 레이어 |
109
+ | **deployment-validator** | sonnet | 배포 전 검증 | 최종 검증 단계 |
110
+ | **code-reviewer** | opus | 코드 품질 + 표준 준수 리뷰 | 구현 완료 후 |
111
+
112
+ ### 실전 패턴
113
+
114
+ **패턴 1: 글로벌 서비스 디자인 시스템**
115
+
116
+ ```typescript
117
+ // Step 1: 병렬 탐색
118
+ Task(subagent_type="explore", model="haiku",
119
+ prompt="Material 3, Apple HIG, Fluent 2 최신 패턴 분석")
120
+ Task(subagent_type="explore", model="haiku",
121
+ prompt="프로젝트 기존 컴포넌트 및 다국어 지원 현황")
122
+
123
+ // Step 2: 디자인 정의
124
+ Task(subagent_type="designer", model="opus",
125
+ prompt="크로스 플랫폼 디자인 토큰 시스템 설계")
126
+
127
+ // Step 3: 병렬 구현
128
+ Task(subagent_type="designer", model="sonnet", prompt="컬러 시스템 (다크 모드 포함)")
129
+ Task(subagent_type="designer", model="sonnet", prompt="타이포그래피 (다국어)")
130
+ Task(subagent_type="designer", model="sonnet", prompt="컴포넌트 라이브러리 (웹 컴포넌트)")
131
+ ```
132
+
133
+ **패턴 2: 크로스 플랫폼 애플리케이션**
134
+
135
+ ```typescript
136
+ // 병렬 실행 (플랫폼별)
137
+ Task(subagent_type="designer", model="sonnet",
138
+ prompt="웹 인터페이스 (Material 3 기반)")
139
+ Task(subagent_type="designer", model="sonnet",
140
+ prompt="iOS 인터페이스 (Apple HIG 준수)")
141
+ Task(subagent_type="designer", model="sonnet",
142
+ prompt="Android 인터페이스 (Material 3 네이티브)")
143
+ Task(subagent_type="implementation-executor", model="sonnet",
144
+ prompt="공통 비즈니스 로직 및 상태 관리")
145
+ ```
146
+
147
+ **패턴 3: 공간 UI 프로젝트 (AR/VR)**
148
+
149
+ ```typescript
150
+ // Step 1: 탐색
151
+ Task(subagent_type="explore", model="haiku",
152
+ prompt="WebGPU/WebXR 지원 현황 및 공간 UI 패턴")
153
+
154
+ // Step 2: 디자인 + 구현 병렬
155
+ Task(subagent_type="designer", model="opus",
156
+ prompt="3D 공간 UI 디자인 (Vision Pro 스타일)")
157
+ Task(subagent_type="designer", model="sonnet",
158
+ prompt="2D 폴백 인터페이스 (점진적 향상)")
159
+ Task(subagent_type="implementation-executor", model="sonnet",
160
+ prompt="WebXR 통합 및 센서 처리")
161
+
162
+ // Step 3: 검증
163
+ Task(subagent_type="code-reviewer", model="opus",
164
+ prompt="공간 UI 접근성 및 성능 검토")
165
+ ```
166
+
167
+ ### Designer Agent 상세
168
+
169
+ **@designer 에이전트가 제공:**
170
+ - 2026 트렌드 통합 (AI 기반, 공간 UI, 키네틱 타이포, 적응형 테마, 마이크로 인터랙션)
171
+ - 대담한 미학적 방향 정의 (7가지 톤 중 선택)
172
+ - 성능 + 접근성 우선 (WCAG 2.2 AA, 60fps, 배터리/연결 인식)
173
+ - 글로벌 디자인 시스템과 조화 (Material 3, Apple HIG, Fluent 2)
174
+
175
+ **활용 시점:**
176
+ - 글로벌 서비스 디자인 시스템 구축
177
+ - 크로스 플랫폼 일관성 필요
178
+ - 2026 트렌드 선도적 적용
179
+ - 프리미엄 브랜드 경험 구축
180
+
181
+ **참조:** `.claude-kr/agents/designer.md`
182
+
183
+ ### 체크리스트
184
+
185
+ 작업 전 확인:
186
+
187
+ - [ ] 이 작업은 독립적인가? → 병렬 agent 고려
188
+ - [ ] 디자인 시스템 탐색 필요? → explore agent (haiku)
189
+ - [ ] 크로스 플랫폼 동시 개발? → 플랫폼별 designer 병렬
190
+ - [ ] 공간 UI/AR/VR? → designer (opus) + 전문 구현
191
+ - [ ] 복잡한 접근성/국제화? → opus 모델 사용
192
+
193
+ **적극적으로 agent 활용. 혼자 하지 말 것.**
194
+
195
+ </agent_integration>
196
+
197
+ ---
198
+
199
+ <core_principles>
200
+
201
+ ## Design Philosophy
202
+
203
+ | Principle | Application |
204
+ |-----------|-------------|
205
+ | **Clarity** | Interface should not compete with content. Use subtle hierarchy and whitespace. |
206
+ | **Consistency** | Follow platform conventions. iOS apps feel like iOS, web apps follow web standards. |
207
+ | **Accessibility** | Design for everyone. WCAG 2.2 AA minimum, aim for AAA where possible. |
208
+ | **Performance** | Fast, responsive interactions. 60fps animations, instant feedback. |
209
+
210
+ **Details:** [references/design-philosophy.md](references/design-philosophy.md)
211
+
212
+ </core_principles>
213
+
214
+ ---
215
+
216
+ <layout_patterns>
217
+
218
+ ## Layout
219
+
220
+ ### Container Widths
221
+
222
+ ```tsx
223
+ {/* Dashboard - 1280px */}
224
+ <div className="max-w-screen-xl mx-auto px-4 sm:px-6 lg:px-8">
225
+
226
+ {/* Content - 768px */}
227
+ <div className="max-w-3xl mx-auto px-4 sm:px-6">
228
+
229
+ {/* Forms - 560px */}
230
+ <div className="max-w-xl mx-auto px-4">
231
+ ```
232
+
233
+ ### Spacing Scale
234
+
235
+ ```tsx
236
+ {/* 8px base grid */}
237
+ <div className="space-y-8"> {/* 32px */}
238
+ <section className="space-y-4"> {/* 16px */}
239
+ <div className="p-6"> {/* 24px */}
240
+ ```
241
+
242
+ **Mobile tap targets:** Minimum 44x44px (iOS) or 48x48px (Material)
243
+
244
+ </layout_patterns>
245
+
246
+ ---
247
+
248
+ <component_patterns>
249
+
250
+ ## Components
251
+
252
+ ### Buttons
253
+
254
+ ```tsx
255
+ {/* Primary - Material 3 style */}
256
+ <button className="h-10 px-6 rounded-full bg-primary-600 hover:bg-primary-700 text-white font-medium shadow-sm transition-all">
257
+ Save changes
258
+ </button>
259
+
260
+ {/* Secondary - iOS style */}
261
+ <button className="h-10 px-6 rounded-lg bg-gray-100 hover:bg-gray-200 text-gray-900 font-semibold transition-colors">
262
+ Cancel
263
+ </button>
264
+
265
+ {/* Ghost */}
266
+ <button className="h-10 px-4 rounded-lg hover:bg-gray-100 font-medium transition-colors">
267
+ Learn more
268
+ </button>
269
+ ```
270
+
271
+ **Sizes:** Small h-8 px-3 | Medium h-10 px-6 | Large h-12 px-8
272
+
273
+ ### Cards
274
+
275
+ ```tsx
276
+ <div className="p-6 rounded-2xl border border-gray-200 bg-white shadow-sm hover:shadow-md transition-shadow">
277
+ {/* Header */}
278
+ <div className="flex items-center justify-between mb-4">
279
+ <h3 className="text-lg font-semibold">Card Title</h3>
280
+ <button className="p-2 rounded-lg hover:bg-gray-100">
281
+ <svg className="w-5 h-5 text-gray-500" />
282
+ </button>
283
+ </div>
284
+
285
+ {/* Body */}
286
+ <div className="space-y-3">
287
+ <p className="text-sm text-gray-600 leading-relaxed">Content goes here</p>
288
+ </div>
289
+
290
+ {/* Footer */}
291
+ <div className="flex items-center justify-between mt-4 pt-4 border-t">
292
+ <span className="text-sm text-gray-500">2 hours ago</span>
293
+ <button className="text-sm text-primary-600 font-medium">Details</button>
294
+ </div>
295
+ </div>
296
+ ```
297
+
298
+ ### List Items
299
+
300
+ ```tsx
301
+ <div className="flex items-center gap-4 p-4 hover:bg-gray-50 rounded-lg transition-colors cursor-pointer">
302
+ {/* Avatar/Icon */}
303
+ <div className="w-12 h-12 rounded-full bg-primary-100 flex items-center justify-center flex-shrink-0">
304
+ <svg className="w-6 h-6 text-primary-600" />
305
+ </div>
306
+
307
+ {/* Content */}
308
+ <div className="flex-1 min-w-0">
309
+ <div className="font-semibold text-sm truncate">Item Title</div>
310
+ <div className="text-sm text-gray-600 truncate">Description text</div>
311
+ </div>
312
+
313
+ {/* Meta */}
314
+ <div className="flex items-center gap-2 flex-shrink-0">
315
+ <span className="text-sm font-medium text-gray-900">$99</span>
316
+ <svg className="w-5 h-5 text-gray-400" />
317
+ </div>
318
+ </div>
319
+ ```
320
+
321
+ ### Input Fields
322
+
323
+ ```tsx
324
+ <div className="space-y-2">
325
+ <label className="block text-sm font-medium text-gray-900">
326
+ Email address <span className="text-red-500">*</span>
327
+ </label>
328
+ <input
329
+ type="email"
330
+ className="w-full h-11 px-4 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-shadow"
331
+ placeholder="name@example.com"
332
+ />
333
+ <p className="text-sm text-gray-500">We'll never share your email.</p>
334
+ </div>
335
+ ```
336
+
337
+ ### Modals
338
+
339
+ ```tsx
340
+ <div className="fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50 backdrop-blur-sm">
341
+ <div className="bg-white rounded-2xl max-w-lg w-full max-h-[90vh] overflow-auto shadow-xl">
342
+ <div className="flex items-center justify-between p-6 border-b">
343
+ <h2 className="text-xl font-semibold">Modal Title</h2>
344
+ <button className="w-10 h-10 flex items-center justify-center rounded-lg hover:bg-gray-100 transition-colors">
345
+ <svg className="w-5 h-5" />
346
+ </button>
347
+ </div>
348
+ <div className="p-6">
349
+ <p className="text-sm text-gray-700 leading-relaxed">Modal content</p>
350
+ </div>
351
+ <div className="flex gap-3 justify-end p-6 border-t">
352
+ <button className="h-10 px-6 rounded-lg border border-gray-300 hover:bg-gray-50">
353
+ Cancel
354
+ </button>
355
+ <button className="h-10 px-6 rounded-lg bg-primary-600 text-white hover:bg-primary-700">
356
+ Confirm
357
+ </button>
358
+ </div>
359
+ </div>
360
+ </div>
361
+ ```
362
+
363
+ ### Tabs
364
+
365
+ ```tsx
366
+ {/* Underline style - iOS/Material */}
367
+ <div className="border-b border-gray-200">
368
+ <div className="flex gap-8">
369
+ <button className="py-3 text-sm font-medium text-primary-600 border-b-2 border-primary-600">
370
+ All
371
+ </button>
372
+ <button className="py-3 text-sm font-medium text-gray-600 hover:text-gray-900">
373
+ Active
374
+ </button>
375
+ </div>
376
+ </div>
377
+
378
+ {/* Segment control - iOS style */}
379
+ <div className="inline-flex p-1 bg-gray-100 rounded-lg gap-1">
380
+ <button className="px-4 py-2 rounded-md bg-white shadow-sm text-sm font-medium">
381
+ All
382
+ </button>
383
+ <button className="px-4 py-2 rounded-md text-sm font-medium text-gray-600">
384
+ Active
385
+ </button>
386
+ </div>
387
+ ```
388
+
389
+ </component_patterns>
390
+
391
+ ---
392
+
393
+ <color_system>
394
+
395
+ ## Color System
396
+
397
+ | Color | Usage | Ratio |
398
+ |-------|-------|-------|
399
+ | **Primary** | CTA buttons, links, active states | 10% |
400
+ | **Neutral** | Text, borders, backgrounds | 60% |
401
+ | **Secondary** | Filters, chips, supporting actions | 30% |
402
+ | **Semantic** | Success/Error/Warning/Info | As needed |
403
+
404
+ ```tsx
405
+ {/* 60-30-10 rule */}
406
+ <button className="bg-primary-600 hover:bg-primary-700 text-white">Primary action</button>
407
+ <button className="bg-secondary-100 text-secondary-900 hover:bg-secondary-200">Secondary</button>
408
+ ```
409
+
410
+ **WCAG 2.2 AA:** Normal text 4.5:1 | Large text 3:1 | Interactive controls 3:1
411
+
412
+ **Details:** [references/color-system.md](references/color-system.md)
413
+
414
+ </color_system>
415
+
416
+ ---
417
+
418
+ <icon_system>
419
+
420
+ ## Icons
421
+
422
+ | Size | Usage | Touch Target |
423
+ |------|-------|--------------|
424
+ | 16px, 20px | Inline with text | - |
425
+ | 24px | Standard system icons | 44-48px |
426
+ | 32-48px | Feature icons | Use as-is |
427
+
428
+ ```tsx
429
+ {/* Sufficient touch target */}
430
+ <button className="w-12 h-12 flex items-center justify-center rounded-lg hover:bg-gray-100">
431
+ <svg className="w-6 h-6" />
432
+ </button>
433
+
434
+ {/* States: Outline (inactive) | Filled (active) */}
435
+ <svg className="w-6 h-6 stroke-current text-gray-600" fill="none" strokeWidth={2} />
436
+ <svg className="w-6 h-6 fill-current text-primary-600" />
437
+ ```
438
+
439
+ **Icon libraries:** Heroicons, Lucide, Material Symbols, SF Symbols
440
+
441
+ **Details:** [references/icon-guide.md](references/icon-guide.md)
442
+
443
+ </icon_system>
444
+
445
+ ---
446
+
447
+ <typography>
448
+
449
+ ## Typography
450
+
451
+ ```tsx
452
+ {/* Display - Landing pages */}
453
+ <h1 className="text-5xl sm:text-6xl font-bold tracking-tight leading-tight">
454
+ Welcome to our platform
455
+ </h1>
456
+
457
+ {/* Page title */}
458
+ <h1 className="text-3xl font-bold tracking-tight">Dashboard</h1>
459
+
460
+ {/* Section title */}
461
+ <h2 className="text-xl font-semibold tracking-tight">Recent Activity</h2>
462
+
463
+ {/* Body text */}
464
+ <p className="text-base leading-relaxed text-gray-700">
465
+ Body content with comfortable reading line-height
466
+ </p>
467
+
468
+ {/* Caption */}
469
+ <span className="text-sm text-gray-500">2 hours ago</span>
470
+ ```
471
+
472
+ **Font stack:**
473
+ ```css
474
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
475
+ ```
476
+
477
+ **Details:** [references/typography.md](references/typography.md)
478
+
479
+ </typography>
480
+
481
+ ---
482
+
483
+ <responsive_patterns>
484
+
485
+ ## Responsive Design
486
+
487
+ ### Grid Layouts
488
+
489
+ ```tsx
490
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 sm:gap-6">
491
+ {items.map(item => <Card key={item.id} {...item} />)}
492
+ </div>
493
+ ```
494
+
495
+ ### Navigation
496
+
497
+ ```tsx
498
+ {/* Desktop: Sidebar */}
499
+ <aside className="hidden lg:block w-64 border-r" />
500
+
501
+ {/* Mobile: Bottom tab bar */}
502
+ <nav className="lg:hidden fixed bottom-0 inset-x-0 h-16 border-t bg-white safe-area-inset-bottom" />
503
+ ```
504
+
505
+ ### Breakpoints (Tailwind defaults)
506
+
507
+ | Breakpoint | Width |
508
+ |------------|-------|
509
+ | sm | 640px |
510
+ | md | 768px |
511
+ | lg | 1024px |
512
+ | xl | 1280px |
513
+ | 2xl | 1536px |
514
+
515
+ **Details:** [references/responsive-patterns.md](references/responsive-patterns.md)
516
+
517
+ </responsive_patterns>
518
+
519
+ ---
520
+
521
+ <design_systems>
522
+
523
+ ## Leading Design Systems
524
+
525
+ | System | Organization | Characteristics |
526
+ |--------|--------------|-----------------|
527
+ | **[Material Design 3](https://m3.material.io/)** | Google | Dynamic color, expressive motion, adaptive components |
528
+ | **[Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines/)** | Apple | Clarity, deference, depth. Liquid Glass aesthetic (2026) |
529
+ | **[Fluent 2](https://fluent2.microsoft.design/)** | Microsoft | Token-based, cross-platform, Figma-native |
530
+ | **[Carbon](https://carbondesignsystem.com/)** | IBM | Enterprise-grade, accessibility-first, open source |
531
+ | **[Ant Design](https://ant.design/)** | Ant Group | Enterprise UI, comprehensive components, i18n |
532
+ | **[Polaris](https://polaris.shopify.com/)** | Shopify | E-commerce optimized, web components (2026) |
533
+ | **[Lightning](https://www.lightningdesignsystem.com/)** | Salesforce | SLDS 2 with agentic design patterns |
534
+ | **[Spectrum 2](https://spectrum.adobe.com/)** | Adobe | Creative tools focus, cross-app consistency |
535
+ | **[Atlassian DS](https://atlassian.design/)** | Atlassian | Collaboration tools, strict 4px grid |
536
+ | **[Chakra UI](https://chakra-ui.com/)** | Community | Accessible, modular, style props |
537
+
538
+ **When to reference:**
539
+ - B2B/Enterprise → Carbon, Ant Design, Lightning
540
+ - Consumer apps → Material 3, Apple HIG
541
+ - Creative tools → Spectrum 2
542
+ - E-commerce → Polaris
543
+ - Developer tools → Atlassian
544
+
545
+ **Details:** [references/design-systems.md](references/design-systems.md)
546
+
547
+ </design_systems>
548
+
549
+ ---
550
+
551
+ <accessibility_and_states>
552
+
553
+ ## Accessibility & States
554
+
555
+ ### WCAG 2.2 AA Requirements
556
+
557
+ - **Contrast:** 4.5:1 normal text, 3:1 large text (18pt+)
558
+ - **Keyboard:** All interactive elements accessible via keyboard
559
+ - **Screen readers:** Semantic HTML, ARIA labels where needed
560
+ - **Focus visible:** Clear focus indicators (2px outline minimum)
561
+ - **No color alone:** Never convey information with color only
562
+
563
+ ### State Patterns
564
+
565
+ ```tsx
566
+ {/* Loading skeleton */}
567
+ <div className="animate-pulse space-y-3">
568
+ <div className="h-4 bg-gray-200 rounded w-3/4" />
569
+ <div className="h-4 bg-gray-200 rounded w-1/2" />
570
+ </div>
571
+
572
+ {/* Error state */}
573
+ <div className="flex items-center gap-2 text-red-600 text-sm">
574
+ <svg className="w-5 h-5" />
575
+ <span>An error occurred. Please try again.</span>
576
+ </div>
577
+
578
+ {/* Empty state */}
579
+ <div className="py-16 text-center">
580
+ <div className="w-20 h-20 mx-auto mb-4 rounded-full bg-gray-100 flex items-center justify-center">
581
+ <svg className="w-10 h-10 text-gray-400" />
582
+ </div>
583
+ <h3 className="text-lg font-semibold mb-2">No items yet</h3>
584
+ <p className="text-sm text-gray-600 mb-4">Get started by creating your first item</p>
585
+ <button className="h-10 px-6 rounded-lg bg-primary-600 text-white">
586
+ Create item
587
+ </button>
588
+ </div>
589
+
590
+ {/* Success toast */}
591
+ <div className="flex items-center gap-3 px-4 py-3 rounded-lg bg-green-50 border border-green-200">
592
+ <svg className="w-5 h-5 text-green-600" />
593
+ <span className="text-sm font-medium text-green-900">Changes saved successfully</span>
594
+ </div>
595
+ ```
596
+
597
+ **Details:**
598
+ - [references/accessibility.md](references/accessibility.md)
599
+ - [references/micro-interactions.md](references/micro-interactions.md)
600
+ - [references/state-patterns.md](references/state-patterns.md)
601
+
602
+ </accessibility_and_states>
603
+
604
+ ---
605
+
606
+ <references>
607
+
608
+ ## Detailed Documentation
609
+
610
+ | Document | Content |
611
+ |----------|---------|
612
+ | [design-philosophy.md](references/design-philosophy.md) | Core principles, anti-patterns |
613
+ | [color-system.md](references/color-system.md) | Palette generation, semantic colors, dark mode |
614
+ | [icon-guide.md](references/icon-guide.md) | Icon libraries, sizing, accessibility |
615
+ | [typography.md](references/typography.md) | Scale, font stacks, i18n considerations |
616
+ | [design-systems.md](references/design-systems.md) | Deep dive into Material, HIG, Fluent, etc. |
617
+ | [responsive-patterns.md](references/responsive-patterns.md) | Breakpoints, layouts, mobile-first |
618
+ | [accessibility.md](references/accessibility.md) | WCAG 2.2, ARIA, testing tools |
619
+ | [micro-interactions.md](references/micro-interactions.md) | Hover, focus, transitions, animations |
620
+ | [state-patterns.md](references/state-patterns.md) | Loading, error, empty, success states |
621
+ | [checklist.md](references/checklist.md) | Pre-deployment UI/UX audit |
622
+
623
+ ### External Resources
624
+
625
+ | Resource | URL | Focus |
626
+ |----------|-----|-------|
627
+ | Material Design 3 | https://m3.material.io/ | Google's design system |
628
+ | Apple HIG | https://developer.apple.com/design/human-interface-guidelines/ | iOS/macOS guidelines |
629
+ | Fluent 2 | https://fluent2.microsoft.design/ | Microsoft design system |
630
+ | IBM Carbon | https://carbondesignsystem.com/ | Enterprise design system |
631
+ | Nielsen Norman Group | https://www.nngroup.com/ | UX research & guidelines |
632
+ | WCAG 2.2 | https://www.w3.org/WAI/standards-guidelines/wcag/ | Accessibility standard |
633
+ | Laws of UX | https://lawsofux.com/ | Psychology-based design principles |
634
+ | Ant Design | https://ant.design/ | Enterprise component library |
635
+ | Atlassian DS | https://atlassian.design/ | Collaboration tool patterns |
636
+ | Shopify Polaris | https://polaris.shopify.com/ | E-commerce design system |
637
+ | Salesforce Lightning | https://www.lightningdesignsystem.com/ | SLDS 2 (agentic design) |
638
+ | Adobe Spectrum | https://spectrum.adobe.com/ | Creative tool design |
639
+ | Chakra UI | https://chakra-ui.com/ | Accessible component library |
640
+ | Smashing Magazine | https://www.smashingmagazine.com/ | UX best practices |
641
+
642
+ </references>
643
+
644
+ ---
645
+
646
+ <prompt_examples>
647
+
648
+ ## Prompt Examples
649
+
650
+ ### Dashboard
651
+
652
+ ```
653
+ Create a dashboard page.
654
+
655
+ Layout:
656
+ - Desktop: Left sidebar (256px) + main content (max-w-7xl)
657
+ - Mobile: Bottom tab bar
658
+ - Responsive padding (px-4 sm:px-6 lg:px-8)
659
+
660
+ Components:
661
+ - Header with greeting + date
662
+ - 4 stat cards (grid-cols-1 sm:grid-cols-2 lg:grid-cols-4)
663
+ - Recent activity list
664
+ - Quick action buttons
665
+
666
+ Style:
667
+ - Material Design 3 aesthetic
668
+ - Cards: rounded-2xl, subtle shadow
669
+ - Primary color: blue-600
670
+ - Numbers: font-bold text-3xl
671
+ ```
672
+
673
+ ### Settings Screen
674
+
675
+ ```
676
+ Create a settings page.
677
+
678
+ Layout:
679
+ - max-w-2xl mx-auto
680
+ - Sections with space-y-8
681
+
682
+ Components:
683
+ - Profile: Avatar + name + email
684
+ - Notifications: Toggle switches (h-11 touch target)
685
+ - Account: Password change, sign out
686
+ - Danger zone: Delete account (red)
687
+
688
+ Style:
689
+ - Each row: flex justify-between items-center
690
+ - Label: text-sm font-medium
691
+ - Section headers: text-xs text-gray-500 uppercase tracking-wide
692
+ ```
693
+
694
+ ### Data Table
695
+
696
+ ```
697
+ Create a users table.
698
+
699
+ Layout:
700
+ - Desktop: Traditional table
701
+ - Mobile: Card list
702
+
703
+ Components:
704
+ - Header: Search bar + filters + add button
705
+ - Columns: Avatar, name, email, joined date, status
706
+ - Pagination
707
+
708
+ Style:
709
+ - Table header: bg-gray-50
710
+ - Row hover: hover:bg-gray-50
711
+ - No vertical borders
712
+ - Actions: Three-dot menu
713
+ - Sticky header on scroll
714
+ ```
715
+
716
+ ### Form
717
+
718
+ ```
719
+ Create a multi-step form.
720
+
721
+ Layout:
722
+ - max-w-xl mx-auto
723
+ - Progress indicator at top
724
+ - Step transitions with slide animation
725
+
726
+ Components:
727
+ - Step 1: Personal info (name, email, phone)
728
+ - Step 2: Address
729
+ - Step 3: Review + submit
730
+
731
+ Style:
732
+ - Labels: text-sm font-medium mb-2
733
+ - Inputs: h-11 rounded-lg border focus:ring-2
734
+ - Validation: Inline errors below fields
735
+ - Buttons: Back (secondary) + Continue (primary)
736
+ ```
737
+
738
+ </prompt_examples>