@uocnv1998/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.
Files changed (77) hide show
  1. package/README.md +56 -0
  2. package/bin/index.js +161 -0
  3. package/package.json +14 -0
  4. package/templates/.agent/ARCHITECTURE.md +37 -0
  5. package/templates/.agent/common/workflows/brainstorm.md +113 -0
  6. package/templates/.agent/designer/ARCHITECTURE.md +24 -0
  7. package/templates/.agent/designer/rules/GEMINI.md +110 -0
  8. package/templates/.agent/designer/skills/SKILL.md +46 -0
  9. package/templates/.agent/designer/workflows/designer-workflow.md +29 -0
  10. package/templates/.agent/dev/backend/ARCHITECTURE.md +49 -0
  11. package/templates/.agent/dev/backend/agents/backend-specialist.md +116 -0
  12. package/templates/.agent/dev/backend/rules/GEMINI.md +114 -0
  13. package/templates/.agent/dev/backend/skills/clichouse-expert/SKILL.md +144 -0
  14. package/templates/.agent/dev/backend/skills/docker/SKILL.md +409 -0
  15. package/templates/.agent/dev/backend/skills/laravel/SKILL.md +63 -0
  16. package/templates/.agent/dev/backend/skills/laravel-tdd/SKILL.md +146 -0
  17. package/templates/.agent/dev/backend/skills/mysql/SKILL.md +83 -0
  18. package/templates/.agent/dev/backend/skills/mysql/references/character-sets.md +66 -0
  19. package/templates/.agent/dev/backend/skills/mysql/references/composite-indexes.md +59 -0
  20. package/templates/.agent/dev/backend/skills/mysql/references/connection-management.md +70 -0
  21. package/templates/.agent/dev/backend/skills/mysql/references/covering-indexes.md +47 -0
  22. package/templates/.agent/dev/backend/skills/mysql/references/data-types.md +69 -0
  23. package/templates/.agent/dev/backend/skills/mysql/references/deadlocks.md +72 -0
  24. package/templates/.agent/dev/backend/skills/mysql/references/explain-analysis.md +66 -0
  25. package/templates/.agent/dev/backend/skills/mysql/references/fulltext-indexes.md +28 -0
  26. package/templates/.agent/dev/backend/skills/mysql/references/index-maintenance.md +110 -0
  27. package/templates/.agent/dev/backend/skills/mysql/references/isolation-levels.md +49 -0
  28. package/templates/.agent/dev/backend/skills/mysql/references/json-column-patterns.md +77 -0
  29. package/templates/.agent/dev/backend/skills/mysql/references/n-plus-one.md +77 -0
  30. package/templates/.agent/dev/backend/skills/mysql/references/online-ddl.md +53 -0
  31. package/templates/.agent/dev/backend/skills/mysql/references/partitioning.md +92 -0
  32. package/templates/.agent/dev/backend/skills/mysql/references/primary-keys.md +70 -0
  33. package/templates/.agent/dev/backend/skills/mysql/references/query-optimization-pitfalls.md +117 -0
  34. package/templates/.agent/dev/backend/skills/mysql/references/replication-lag.md +46 -0
  35. package/templates/.agent/dev/backend/skills/mysql/references/row-locking-gotchas.md +63 -0
  36. package/templates/.agent/dev/common/rules/GIT_COMMIT.md +9 -0
  37. package/templates/.agent/dev/common/skills/tdd-workflow/SKILL.md +149 -0
  38. package/templates/.agent/dev/common/workflows/dev-workflow.md +46 -0
  39. package/templates/.agent/dev/frontend/ARCHITECTURE.md +47 -0
  40. package/templates/.agent/dev/frontend/agents/frontend-specialist.md +593 -0
  41. package/templates/.agent/dev/frontend/rules/GEMINI.md +117 -0
  42. package/templates/.agent/dev/frontend/skills/frontend-design/SKILL.md +418 -0
  43. package/templates/.agent/dev/frontend/skills/frontend-design/animation-guide.md +331 -0
  44. package/templates/.agent/dev/frontend/skills/frontend-design/color-system.md +311 -0
  45. package/templates/.agent/dev/frontend/skills/frontend-design/decision-trees.md +418 -0
  46. package/templates/.agent/dev/frontend/skills/frontend-design/motion-graphics.md +306 -0
  47. package/templates/.agent/dev/frontend/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  48. package/templates/.agent/dev/frontend/skills/frontend-design/scripts/ux_audit.py +722 -0
  49. package/templates/.agent/dev/frontend/skills/frontend-design/typography-system.md +345 -0
  50. package/templates/.agent/dev/frontend/skills/frontend-design/ux-psychology.md +1116 -0
  51. package/templates/.agent/dev/frontend/skills/frontend-design/visual-effects.md +383 -0
  52. package/templates/.agent/dev/frontend/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  53. package/templates/.agent/dev/frontend/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  54. package/templates/.agent/dev/frontend/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  55. package/templates/.agent/dev/frontend/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  56. package/templates/.agent/dev/frontend/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  57. package/templates/.agent/dev/frontend/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  58. package/templates/.agent/dev/frontend/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  59. package/templates/.agent/dev/frontend/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  60. package/templates/.agent/dev/frontend/skills/nextjs-react-expert/SKILL.md +286 -0
  61. package/templates/.agent/dev/frontend/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  62. package/templates/.agent/dev/frontend/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  63. package/templates/.agent/dev/frontend/skills/tailwind-patterns/SKILL.md +269 -0
  64. package/templates/.agent/dev/frontend/skills/web-design-guidelines/SKILL.md +57 -0
  65. package/templates/.agent/po_ba/ARCHITECTURE.md +28 -0
  66. package/templates/.agent/po_ba/agents/documentation-writer.md +104 -0
  67. package/templates/.agent/po_ba/agents/product-manager.md +112 -0
  68. package/templates/.agent/po_ba/agents/product-owner.md +95 -0
  69. package/templates/.agent/po_ba/rules/GEMINI.md +142 -0
  70. package/templates/.agent/po_ba/skills/SKILL.md +42 -0
  71. package/templates/.agent/po_ba/workflows/po_ba-workflow.md +21 -0
  72. package/templates/.agent/tester/ARCHITECTURE.md +27 -0
  73. package/templates/.agent/tester/agents/qa-automation-engineer.md +103 -0
  74. package/templates/.agent/tester/agents/test-engineer.md +158 -0
  75. package/templates/.agent/tester/rules/GEMINI.md +147 -0
  76. package/templates/.agent/tester/skills/SKILL.md +57 -0
  77. package/templates/.agent/tester/workflows/tester-workflow.md +32 -0
@@ -0,0 +1,252 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ React Performance Checker
4
+ Automated performance audit for React/Next.js projects
5
+ Based on Vercel Engineering best practices
6
+ """
7
+
8
+ import os
9
+ import re
10
+ import json
11
+ from pathlib import Path
12
+ from typing import List, Dict, Tuple
13
+
14
+ class PerformanceChecker:
15
+ def __init__(self, project_path: str):
16
+ self.project_path = Path(project_path)
17
+ self.issues = []
18
+ self.warnings = []
19
+ self.passed = []
20
+
21
+ def check_waterfalls(self):
22
+ """Check for sequential await patterns (Section 1)"""
23
+ print("\n[*] Checking for waterfalls (sequential awaits)...")
24
+
25
+ for filepath in self.project_path.rglob('*.{ts,tsx,js,jsx}'):
26
+ if 'node_modules' in str(filepath):
27
+ continue
28
+
29
+ try:
30
+ content = filepath.read_text(encoding='utf-8')
31
+
32
+ # Pattern: multiple awaits in sequence without Promise.all
33
+ sequential_awaits = re.findall(r'await\s+\w+.*?\n\s*await\s+\w+', content)
34
+
35
+ if sequential_awaits:
36
+ self.issues.append({
37
+ 'file': str(filepath.relative_to(self.project_path)),
38
+ 'type': 'CRITICAL',
39
+ 'issue': 'Sequential awaits detected (waterfall)',
40
+ 'fix': 'Use Promise.all() for parallel fetching',
41
+ 'section': '1-async-eliminating-waterfalls.md'
42
+ })
43
+ except Exception as e:
44
+ continue
45
+
46
+ def check_barrel_imports(self):
47
+ """Check for barrel imports (Section 2)"""
48
+ print("[*] Checking for barrel imports...")
49
+
50
+ for filepath in self.project_path.rglob('*.{ts,tsx,js,jsx}'):
51
+ if 'node_modules' in str(filepath):
52
+ continue
53
+
54
+ try:
55
+ content = filepath.read_text(encoding='utf-8')
56
+
57
+ # Pattern: import from index files or barrel exports
58
+ barrel_imports = re.findall(r"import.*from\s+['\"](@/.*?)/index['\"]", content)
59
+ barrel_imports += re.findall(r"import.*from\s+['\"]\.\.?/.*?['\"](?!.*?\.tsx?)", content)
60
+
61
+ if barrel_imports:
62
+ self.warnings.append({
63
+ 'file': str(filepath.relative_to(self.project_path)),
64
+ 'type': 'CRITICAL',
65
+ 'issue': 'Potential barrel imports detected',
66
+ 'fix': 'Import directly from specific files',
67
+ 'section': '2-bundle-bundle-size-optimization.md'
68
+ })
69
+ except Exception as e:
70
+ continue
71
+
72
+ def check_dynamic_imports(self):
73
+ """Check if large components use dynamic imports (Section 2)"""
74
+ print("[*] Checking for missing dynamic imports...")
75
+
76
+ for filepath in self.project_path.rglob('*.{ts,tsx}'):
77
+ if 'node_modules' in str(filepath):
78
+ continue
79
+
80
+ try:
81
+ content = filepath.read_text(encoding='utf-8')
82
+
83
+ # Check file size - if > 10KB, should probably use dynamic import
84
+ if len(content) > 10000:
85
+ # Check if it's imported statically somewhere
86
+ filename = filepath.stem
87
+
88
+ # Search for static imports of this component
89
+ for check_file in self.project_path.rglob('*.{ts,tsx}'):
90
+ if check_file == filepath or 'node_modules' in str(check_file):
91
+ continue
92
+
93
+ check_content = check_file.read_text(encoding='utf-8')
94
+ if f"import {filename}" in check_content or f"import {{ {filename}" in check_content:
95
+ if 'dynamic(' not in check_content:
96
+ self.warnings.append({
97
+ 'file': str(check_file.relative_to(self.project_path)),
98
+ 'type': 'CRITICAL',
99
+ 'issue': f'Large component {filename} imported statically',
100
+ 'fix': 'Use dynamic() for code splitting',
101
+ 'section': '2-bundle-bundle-size-optimization.md'
102
+ })
103
+ break
104
+ except Exception as e:
105
+ continue
106
+
107
+ def check_useEffect_fetching(self):
108
+ """Check for data fetching in useEffect (Section 4)"""
109
+ print("[*] Checking for useEffect data fetching...")
110
+
111
+ for filepath in self.project_path.rglob('*.{ts,tsx}'):
112
+ if 'node_modules' in str(filepath):
113
+ continue
114
+
115
+ try:
116
+ content = filepath.read_text(encoding='utf-8')
117
+
118
+ # Pattern: fetch or axios in useEffect
119
+ if 'useEffect' in content:
120
+ if re.search(r'useEffect.*?fetch\(', content, re.DOTALL):
121
+ self.warnings.append({
122
+ 'file': str(filepath.relative_to(self.project_path)),
123
+ 'type': 'MEDIUM-HIGH',
124
+ 'issue': 'Data fetching in useEffect',
125
+ 'fix': 'Consider using SWR or React Query for deduplication',
126
+ 'section': '4-client-client-side-data-fetching.md'
127
+ })
128
+ except Exception as e:
129
+ continue
130
+
131
+ def check_missing_memoization(self):
132
+ """Check for missing React.memo, useMemo, useCallback (Section 5)"""
133
+ print("[*] Checking for missing memoization...")
134
+
135
+ for filepath in self.project_path.rglob('*.{tsx}'):
136
+ if 'node_modules' in str(filepath):
137
+ continue
138
+
139
+ try:
140
+ content = filepath.read_text(encoding='utf-8')
141
+
142
+ # Check for component definitions without memo
143
+ components = re.findall(r'(?:export\s+)?(?:const|function)\s+([A-Z]\w+)', content)
144
+
145
+ if components and 'React.memo' not in content and 'memo(' not in content:
146
+ # Check if component receives props
147
+ if 'props:' in content or 'Props>' in content:
148
+ self.warnings.append({
149
+ 'file': str(filepath.relative_to(self.project_path)),
150
+ 'type': 'MEDIUM',
151
+ 'issue': 'Component with props not memoized',
152
+ 'fix': 'Consider using React.memo if props are stable',
153
+ 'section': '5-rerender-re-render-optimization.md'
154
+ })
155
+ except Exception as e:
156
+ continue
157
+
158
+ def check_image_optimization(self):
159
+ """Check for unoptimized images (Section 6)"""
160
+ print("[*] Checking for image optimization...")
161
+
162
+ for filepath in self.project_path.rglob('*.{ts,tsx,js,jsx}'):
163
+ if 'node_modules' in str(filepath):
164
+ continue
165
+
166
+ try:
167
+ content = filepath.read_text(encoding='utf-8')
168
+
169
+ # Check for <img> tags instead of next/image
170
+ if '<img' in content and 'next/image' not in content:
171
+ self.warnings.append({
172
+ 'file': str(filepath.relative_to(self.project_path)),
173
+ 'type': 'MEDIUM',
174
+ 'issue': 'Using <img> instead of next/image',
175
+ 'fix': 'Use next/image for automatic optimization',
176
+ 'section': '6-rendering-rendering-performance.md'
177
+ })
178
+ except Exception as e:
179
+ continue
180
+
181
+ def generate_report(self):
182
+ """Generate final report"""
183
+ print("\n" + "="*60)
184
+ print("REACT PERFORMANCE AUDIT REPORT")
185
+ print("="*60)
186
+
187
+ print(f"\n[CRITICAL ISSUES] ({len([i for i in self.issues if i['type'] == 'CRITICAL'])})")
188
+ for issue in self.issues:
189
+ if issue['type'] == 'CRITICAL':
190
+ print(f" - {issue['file']}")
191
+ print(f" Issue: {issue['issue']}")
192
+ print(f" Fix: {issue['fix']}")
193
+ print(f" Reference: {issue['section']}\n")
194
+
195
+ print(f"\n[WARNINGS] ({len(self.warnings)})")
196
+ for warning in self.warnings[:10]: # Show first 10
197
+ print(f" - {warning['file']}")
198
+ print(f" Issue: {warning['issue']}")
199
+ print(f" Fix: {warning['fix']}")
200
+ print(f" Reference: {warning['section']}\n")
201
+
202
+ if len(self.warnings) > 10:
203
+ print(f" ... and {len(self.warnings) - 10} more warnings")
204
+
205
+ print("\n" + "="*60)
206
+ print(f"SUMMARY:")
207
+ print(f" Critical Issues: {len([i for i in self.issues if i['type'] == 'CRITICAL'])}")
208
+ print(f" Warnings: {len(self.warnings)}")
209
+ print("="*60)
210
+
211
+ if len(self.issues) == 0 and len(self.warnings) == 0:
212
+ print("\n[SUCCESS] No major performance issues detected!")
213
+ else:
214
+ print("\n[ACTION REQUIRED] Review and fix issues above")
215
+ print("Priority: CRITICAL > HIGH > MEDIUM > LOW")
216
+
217
+ def run(self):
218
+ """Run all checks"""
219
+ print("="*60)
220
+ print("React Performance Checker (Vercel Engineering)")
221
+ print("="*60)
222
+ print(f"Scanning: {self.project_path}")
223
+
224
+ self.check_waterfalls()
225
+ self.check_barrel_imports()
226
+ self.check_dynamic_imports()
227
+ self.check_useEffect_fetching()
228
+ self.check_missing_memoization()
229
+ self.check_image_optimization()
230
+
231
+ self.generate_report()
232
+
233
+
234
+ def main():
235
+ import sys
236
+
237
+ if len(sys.argv) < 2:
238
+ print("Usage: python react_performance_checker.py <project_path>")
239
+ sys.exit(1)
240
+
241
+ project_path = sys.argv[1]
242
+
243
+ if not os.path.exists(project_path):
244
+ print(f"[ERROR] Path not found: {project_path}")
245
+ sys.exit(1)
246
+
247
+ checker = PerformanceChecker(project_path)
248
+ checker.run()
249
+
250
+
251
+ if __name__ == '__main__':
252
+ main()
@@ -0,0 +1,269 @@
1
+ ---
2
+ name: tailwind-patterns
3
+ description: Tailwind CSS v4 principles. CSS-first configuration, container queries, modern patterns, design token architecture.
4
+ allowed-tools: Read, Write, Edit, Glob, Grep
5
+ ---
6
+
7
+ # Tailwind CSS Patterns (v4 - 2025)
8
+
9
+ > Modern utility-first CSS with CSS-native configuration.
10
+
11
+ ---
12
+
13
+ ## 1. Tailwind v4 Architecture
14
+
15
+ ### What Changed from v3
16
+
17
+ | v3 (Legacy) | v4 (Current) |
18
+ |-------------|--------------|
19
+ | `tailwind.config.js` | CSS-based `@theme` directive |
20
+ | PostCSS plugin | Oxide engine (10x faster) |
21
+ | JIT mode | Native, always-on |
22
+ | Plugin system | CSS-native features |
23
+ | `@apply` directive | Still works, discouraged |
24
+
25
+ ### v4 Core Concepts
26
+
27
+ | Concept | Description |
28
+ |---------|-------------|
29
+ | **CSS-first** | Configuration in CSS, not JavaScript |
30
+ | **Oxide Engine** | Rust-based compiler, much faster |
31
+ | **Native Nesting** | CSS nesting without PostCSS |
32
+ | **CSS Variables** | All tokens exposed as `--*` vars |
33
+
34
+ ---
35
+
36
+ ## 2. CSS-Based Configuration
37
+
38
+ ### Theme Definition
39
+
40
+ ```
41
+ @theme {
42
+ /* Colors - use semantic names */
43
+ --color-primary: oklch(0.7 0.15 250);
44
+ --color-surface: oklch(0.98 0 0);
45
+ --color-surface-dark: oklch(0.15 0 0);
46
+
47
+ /* Spacing scale */
48
+ --spacing-xs: 0.25rem;
49
+ --spacing-sm: 0.5rem;
50
+ --spacing-md: 1rem;
51
+ --spacing-lg: 2rem;
52
+
53
+ /* Typography */
54
+ --font-sans: 'Inter', system-ui, sans-serif;
55
+ --font-mono: 'JetBrains Mono', monospace;
56
+ }
57
+ ```
58
+
59
+ ### When to Extend vs Override
60
+
61
+ | Action | Use When |
62
+ |--------|----------|
63
+ | **Extend** | Adding new values alongside defaults |
64
+ | **Override** | Replacing default scale entirely |
65
+ | **Semantic tokens** | Project-specific naming (primary, surface) |
66
+
67
+ ---
68
+
69
+ ## 3. Container Queries (v4 Native)
70
+
71
+ ### Breakpoint vs Container
72
+
73
+ | Type | Responds To |
74
+ |------|-------------|
75
+ | **Breakpoint** (`md:`) | Viewport width |
76
+ | **Container** (`@container`) | Parent element width |
77
+
78
+ ### Container Query Usage
79
+
80
+ | Pattern | Classes |
81
+ |---------|---------|
82
+ | Define container | `@container` on parent |
83
+ | Container breakpoint | `@sm:`, `@md:`, `@lg:` on children |
84
+ | Named containers | `@container/card` for specificity |
85
+
86
+ ### When to Use
87
+
88
+ | Scenario | Use |
89
+ |----------|-----|
90
+ | Page-level layouts | Viewport breakpoints |
91
+ | Component-level responsive | Container queries |
92
+ | Reusable components | Container queries (context-independent) |
93
+
94
+ ---
95
+
96
+ ## 4. Responsive Design
97
+
98
+ ### Breakpoint System
99
+
100
+ | Prefix | Min Width | Target |
101
+ |--------|-----------|--------|
102
+ | (none) | 0px | Mobile-first base |
103
+ | `sm:` | 640px | Large phone / small tablet |
104
+ | `md:` | 768px | Tablet |
105
+ | `lg:` | 1024px | Laptop |
106
+ | `xl:` | 1280px | Desktop |
107
+ | `2xl:` | 1536px | Large desktop |
108
+
109
+ ### Mobile-First Principle
110
+
111
+ 1. Write mobile styles first (no prefix)
112
+ 2. Add larger screen overrides with prefixes
113
+ 3. Example: `w-full md:w-1/2 lg:w-1/3`
114
+
115
+ ---
116
+
117
+ ## 5. Dark Mode
118
+
119
+ ### Configuration Strategies
120
+
121
+ | Method | Behavior | Use When |
122
+ |--------|----------|----------|
123
+ | `class` | `.dark` class toggles | Manual theme switcher |
124
+ | `media` | Follows system preference | No user control |
125
+ | `selector` | Custom selector (v4) | Complex theming |
126
+
127
+ ### Dark Mode Pattern
128
+
129
+ | Element | Light | Dark |
130
+ |---------|-------|------|
131
+ | Background | `bg-white` | `dark:bg-zinc-900` |
132
+ | Text | `text-zinc-900` | `dark:text-zinc-100` |
133
+ | Borders | `border-zinc-200` | `dark:border-zinc-700` |
134
+
135
+ ---
136
+
137
+ ## 6. Modern Layout Patterns
138
+
139
+ ### Flexbox Patterns
140
+
141
+ | Pattern | Classes |
142
+ |---------|---------|
143
+ | Center (both axes) | `flex items-center justify-center` |
144
+ | Vertical stack | `flex flex-col gap-4` |
145
+ | Horizontal row | `flex gap-4` |
146
+ | Space between | `flex justify-between items-center` |
147
+ | Wrap grid | `flex flex-wrap gap-4` |
148
+
149
+ ### Grid Patterns
150
+
151
+ | Pattern | Classes |
152
+ |---------|---------|
153
+ | Auto-fit responsive | `grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))]` |
154
+ | Asymmetric (Bento) | `grid grid-cols-3 grid-rows-2` with spans |
155
+ | Sidebar layout | `grid grid-cols-[auto_1fr]` |
156
+
157
+ > **Note:** Prefer asymmetric/Bento layouts over symmetric 3-column grids.
158
+
159
+ ---
160
+
161
+ ## 7. Modern Color System
162
+
163
+ ### OKLCH vs RGB/HSL
164
+
165
+ | Format | Advantage |
166
+ |--------|-----------|
167
+ | **OKLCH** | Perceptually uniform, better for design |
168
+ | **HSL** | Intuitive hue/saturation |
169
+ | **RGB** | Legacy compatibility |
170
+
171
+ ### Color Token Architecture
172
+
173
+ | Layer | Example | Purpose |
174
+ |-------|---------|---------|
175
+ | **Primitive** | `--blue-500` | Raw color values |
176
+ | **Semantic** | `--color-primary` | Purpose-based naming |
177
+ | **Component** | `--button-bg` | Component-specific |
178
+
179
+ ---
180
+
181
+ ## 8. Typography System
182
+
183
+ ### Font Stack Pattern
184
+
185
+ | Type | Recommended |
186
+ |------|-------------|
187
+ | Sans | `'Inter', 'SF Pro', system-ui, sans-serif` |
188
+ | Mono | `'JetBrains Mono', 'Fira Code', monospace` |
189
+ | Display | `'Outfit', 'Poppins', sans-serif` |
190
+
191
+ ### Type Scale
192
+
193
+ | Class | Size | Use |
194
+ |-------|------|-----|
195
+ | `text-xs` | 0.75rem | Labels, captions |
196
+ | `text-sm` | 0.875rem | Secondary text |
197
+ | `text-base` | 1rem | Body text |
198
+ | `text-lg` | 1.125rem | Lead text |
199
+ | `text-xl`+ | 1.25rem+ | Headings |
200
+
201
+ ---
202
+
203
+ ## 9. Animation & Transitions
204
+
205
+ ### Built-in Animations
206
+
207
+ | Class | Effect |
208
+ |-------|--------|
209
+ | `animate-spin` | Continuous rotation |
210
+ | `animate-ping` | Attention pulse |
211
+ | `animate-pulse` | Subtle opacity pulse |
212
+ | `animate-bounce` | Bouncing effect |
213
+
214
+ ### Transition Patterns
215
+
216
+ | Pattern | Classes |
217
+ |---------|---------|
218
+ | All properties | `transition-all duration-200` |
219
+ | Specific | `transition-colors duration-150` |
220
+ | With easing | `ease-out` or `ease-in-out` |
221
+ | Hover effect | `hover:scale-105 transition-transform` |
222
+
223
+ ---
224
+
225
+ ## 10. Component Extraction
226
+
227
+ ### When to Extract
228
+
229
+ | Signal | Action |
230
+ |--------|--------|
231
+ | Same class combo 3+ times | Extract component |
232
+ | Complex state variants | Extract component |
233
+ | Design system element | Extract + document |
234
+
235
+ ### Extraction Methods
236
+
237
+ | Method | Use When |
238
+ |--------|----------|
239
+ | **React/Vue component** | Dynamic, JS needed |
240
+ | **@apply in CSS** | Static, no JS needed |
241
+ | **Design tokens** | Reusable values |
242
+
243
+ ---
244
+
245
+ ## 11. Anti-Patterns
246
+
247
+ | Don't | Do |
248
+ |-------|-----|
249
+ | Arbitrary values everywhere | Use design system scale |
250
+ | `!important` | Fix specificity properly |
251
+ | Inline `style=` | Use utilities |
252
+ | Duplicate long class lists | Extract component |
253
+ | Mix v3 config with v4 | Migrate fully to CSS-first |
254
+ | Use `@apply` heavily | Prefer components |
255
+
256
+ ---
257
+
258
+ ## 12. Performance Principles
259
+
260
+ | Principle | Implementation |
261
+ |-----------|----------------|
262
+ | **Purge unused** | Automatic in v4 |
263
+ | **Avoid dynamism** | No template string classes |
264
+ | **Use Oxide** | Default in v4, 10x faster |
265
+ | **Cache builds** | CI/CD caching |
266
+
267
+ ---
268
+
269
+ > **Remember:** Tailwind v4 is CSS-first. Embrace CSS variables, container queries, and native features. The config file is now optional.
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: web-design-guidelines
3
+ description: Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
4
+ metadata:
5
+ author: vercel
6
+ version: "1.0.0"
7
+ argument-hint: <file-or-pattern>
8
+ ---
9
+
10
+ # Web Interface Guidelines
11
+
12
+ Review files for compliance with Web Interface Guidelines.
13
+
14
+ ## How It Works
15
+
16
+ 1. Fetch the latest guidelines from the source URL below
17
+ 2. Read the specified files (or prompt user for files/pattern)
18
+ 3. Check against all rules in the fetched guidelines
19
+ 4. Output findings in the terse `file:line` format
20
+
21
+ ## Guidelines Source
22
+
23
+ Fetch fresh guidelines before each review:
24
+
25
+ ```
26
+ https://raw.githubusercontent.com/vercel-labs/web-interface-guidelines/main/command.md
27
+ ```
28
+
29
+ Use WebFetch to retrieve the latest rules. The fetched content contains all the rules and output format instructions.
30
+
31
+ ## Usage
32
+
33
+ When a user provides a file or pattern argument:
34
+ 1. Fetch guidelines from the source URL above
35
+ 2. Read the specified files
36
+ 3. Apply all rules from the fetched guidelines
37
+ 4. Output findings using the format specified in the guidelines
38
+
39
+ If no files specified, ask the user which files to review.
40
+
41
+ ---
42
+
43
+ ## Related Skills
44
+
45
+ | Skill | When to Use |
46
+ |-------|-------------|
47
+ | **[frontend-design](../frontend-design/SKILL.md)** | Before coding - Learn design principles (color, typography, UX psychology) |
48
+ | **web-design-guidelines** (this) | After coding - Audit for accessibility, performance, and best practices |
49
+
50
+ ## Design Workflow
51
+
52
+ ```
53
+ 1. DESIGN → Read frontend-design principles
54
+ 2. CODE → Implement the design
55
+ 3. AUDIT → Run web-design-guidelines review ← YOU ARE HERE
56
+ 4. FIX → Address findings from audit
57
+ ```
@@ -0,0 +1,28 @@
1
+ # PO / BA Architecture
2
+
3
+ ---
4
+
5
+ ## 🤖 Agents
6
+
7
+ Specialist AI personas for product and requirements management.
8
+
9
+ | Agent | Focus |
10
+ | :--- | :--- |
11
+ | `product-owner` | Requirements, Roadmap, Vision |
12
+ | `product-manager` | Execution, Problem solving |
13
+ | `documentation-writer` | PRD, Technical documentation |
14
+
15
+ ---
16
+
17
+ ## 🧩 Skills
18
+
19
+ Modular knowledge domains for product management.
20
+
21
+ - **Product**: `SKILL.md` (Product goals and metrics).
22
+ - **Workflow**: `po_ba-workflow.md`.
23
+
24
+ ---
25
+
26
+ ## 🛠️ Rules
27
+
28
+ - `GEMINI.md`: Guidelines for product requirements and documentation standards.