heraspec 0.1.13 → 0.1.14

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 (129) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +188 -119
  3. package/bin/heraspec.js +4800 -1126
  4. package/bin/heraspec.js.map +4 -4
  5. package/dist/core/templates/skills/CHANGELOG.md +117 -117
  6. package/dist/core/templates/skills/README-template.md +58 -58
  7. package/dist/core/templates/skills/README.md +38 -38
  8. package/dist/core/templates/skills/content-optimization-skill.md +104 -104
  9. package/dist/core/templates/skills/data/design-systems.csv +54 -0
  10. package/dist/core/templates/skills/data/pages-proposed.csv +21 -21
  11. package/dist/core/templates/skills/data/pages.csv +9 -9
  12. package/dist/core/templates/skills/data/typography.csv +57 -57
  13. package/dist/core/templates/skills/deploy-documentation-skill.md +408 -0
  14. package/dist/core/templates/skills/design-system-skill.md +176 -0
  15. package/dist/core/templates/skills/documents/templates/documentation-landing-page.html +63 -63
  16. package/dist/core/templates/skills/documents/templates/documentation.html +49 -49
  17. package/dist/core/templates/skills/documents/templates/landing-script.js +38 -38
  18. package/dist/core/templates/skills/documents/templates/landing-style.css +158 -158
  19. package/dist/core/templates/skills/documents/templates/script.js +56 -56
  20. package/dist/core/templates/skills/documents/templates/style.css +155 -155
  21. package/dist/core/templates/skills/documents/templates/technical-doc-template.md +16 -16
  22. package/dist/core/templates/skills/documents/templates/user-guide-template.md +16 -16
  23. package/dist/core/templates/skills/documents-skill.md +104 -104
  24. package/dist/core/templates/skills/e2e-test-skill.md +119 -119
  25. package/dist/core/templates/skills/git-embed-skill.md +57 -0
  26. package/dist/core/templates/skills/integration-test-skill.md +118 -118
  27. package/dist/core/templates/skills/knowledge/README.md +63 -0
  28. package/dist/core/templates/skills/knowledge/design-systems/airbnb/DESIGN.md +246 -0
  29. package/dist/core/templates/skills/knowledge/design-systems/airtable/DESIGN.md +89 -0
  30. package/dist/core/templates/skills/knowledge/design-systems/apple/DESIGN.md +313 -0
  31. package/dist/core/templates/skills/knowledge/design-systems/bmw/DESIGN.md +180 -0
  32. package/dist/core/templates/skills/knowledge/design-systems/cal/DESIGN.md +259 -0
  33. package/dist/core/templates/skills/knowledge/design-systems/claude/DESIGN.md +312 -0
  34. package/dist/core/templates/skills/knowledge/design-systems/clay/DESIGN.md +304 -0
  35. package/dist/core/templates/skills/knowledge/design-systems/clickhouse/DESIGN.md +281 -0
  36. package/dist/core/templates/skills/knowledge/design-systems/cohere/DESIGN.md +266 -0
  37. package/dist/core/templates/skills/knowledge/design-systems/coinbase/DESIGN.md +129 -0
  38. package/dist/core/templates/skills/knowledge/design-systems/composio/DESIGN.md +307 -0
  39. package/dist/core/templates/skills/knowledge/design-systems/cursor/DESIGN.md +309 -0
  40. package/dist/core/templates/skills/knowledge/design-systems/elevenlabs/DESIGN.md +265 -0
  41. package/dist/core/templates/skills/knowledge/design-systems/expo/DESIGN.md +281 -0
  42. package/dist/core/templates/skills/knowledge/design-systems/figma/DESIGN.md +220 -0
  43. package/dist/core/templates/skills/knowledge/design-systems/framer/DESIGN.md +246 -0
  44. package/dist/core/templates/skills/knowledge/design-systems/hashicorp/DESIGN.md +278 -0
  45. package/dist/core/templates/skills/knowledge/design-systems/ibm/DESIGN.md +332 -0
  46. package/dist/core/templates/skills/knowledge/design-systems/index.json +72 -0
  47. package/dist/core/templates/skills/knowledge/design-systems/intercom/DESIGN.md +146 -0
  48. package/dist/core/templates/skills/knowledge/design-systems/kraken/DESIGN.md +125 -0
  49. package/dist/core/templates/skills/knowledge/design-systems/linear.app/DESIGN.md +367 -0
  50. package/dist/core/templates/skills/knowledge/design-systems/lovable/DESIGN.md +298 -0
  51. package/dist/core/templates/skills/knowledge/design-systems/minimax/DESIGN.md +257 -0
  52. package/dist/core/templates/skills/knowledge/design-systems/mintlify/DESIGN.md +326 -0
  53. package/dist/core/templates/skills/knowledge/design-systems/miro/DESIGN.md +108 -0
  54. package/dist/core/templates/skills/knowledge/design-systems/mistral.ai/DESIGN.md +261 -0
  55. package/dist/core/templates/skills/knowledge/design-systems/mongodb/DESIGN.md +266 -0
  56. package/dist/core/templates/skills/knowledge/design-systems/notion/DESIGN.md +309 -0
  57. package/dist/core/templates/skills/knowledge/design-systems/nvidia/DESIGN.md +293 -0
  58. package/dist/core/templates/skills/knowledge/design-systems/ollama/DESIGN.md +267 -0
  59. package/dist/core/templates/skills/knowledge/design-systems/opencode.ai/DESIGN.md +281 -0
  60. package/dist/core/templates/skills/knowledge/design-systems/pinterest/DESIGN.md +230 -0
  61. package/dist/core/templates/skills/knowledge/design-systems/posthog/DESIGN.md +256 -0
  62. package/dist/core/templates/skills/knowledge/design-systems/raycast/DESIGN.md +268 -0
  63. package/dist/core/templates/skills/knowledge/design-systems/replicate/DESIGN.md +261 -0
  64. package/dist/core/templates/skills/knowledge/design-systems/resend/DESIGN.md +303 -0
  65. package/dist/core/templates/skills/knowledge/design-systems/revolut/DESIGN.md +185 -0
  66. package/dist/core/templates/skills/knowledge/design-systems/runwayml/DESIGN.md +244 -0
  67. package/dist/core/templates/skills/knowledge/design-systems/sanity/DESIGN.md +357 -0
  68. package/dist/core/templates/skills/knowledge/design-systems/sentry/DESIGN.md +262 -0
  69. package/dist/core/templates/skills/knowledge/design-systems/spacex/DESIGN.md +194 -0
  70. package/dist/core/templates/skills/knowledge/design-systems/spotify/DESIGN.md +246 -0
  71. package/dist/core/templates/skills/knowledge/design-systems/stripe/DESIGN.md +322 -0
  72. package/dist/core/templates/skills/knowledge/design-systems/supabase/DESIGN.md +255 -0
  73. package/dist/core/templates/skills/knowledge/design-systems/superhuman/DESIGN.md +252 -0
  74. package/dist/core/templates/skills/knowledge/design-systems/together.ai/DESIGN.md +263 -0
  75. package/dist/core/templates/skills/knowledge/design-systems/uber/DESIGN.md +295 -0
  76. package/dist/core/templates/skills/knowledge/design-systems/vercel/DESIGN.md +310 -0
  77. package/dist/core/templates/skills/knowledge/design-systems/voltagent/DESIGN.md +323 -0
  78. package/dist/core/templates/skills/knowledge/design-systems/warp/DESIGN.md +253 -0
  79. package/dist/core/templates/skills/knowledge/design-systems/webflow/DESIGN.md +92 -0
  80. package/dist/core/templates/skills/knowledge/design-systems/wise/DESIGN.md +173 -0
  81. package/dist/core/templates/skills/knowledge/design-systems/x.ai/DESIGN.md +257 -0
  82. package/dist/core/templates/skills/knowledge/design-systems/zapier/DESIGN.md +328 -0
  83. package/dist/core/templates/skills/knowledge/frameworks/php/codeigniter/rise-cms/profile.json +27 -0
  84. package/dist/core/templates/skills/knowledge/frameworks/php/codeigniter/rise-cms/structure.md +137 -0
  85. package/dist/core/templates/skills/knowledge/frameworks/php/laravel/botble/profile.json +39 -0
  86. package/dist/core/templates/skills/knowledge/frameworks/php/laravel/botble/structure.md +208 -0
  87. package/dist/core/templates/skills/knowledge/frameworks/php/wordpress/core/profile.json +51 -0
  88. package/dist/core/templates/skills/knowledge/frameworks/php/wordpress/core/structure.md +369 -0
  89. package/dist/core/templates/skills/knowledge/index.json +65 -0
  90. package/dist/core/templates/skills/module-codebase-skill.md +110 -110
  91. package/dist/core/templates/skills/plugin-directory-skill.md +396 -396
  92. package/dist/core/templates/skills/project-memory-skill.md +222 -0
  93. package/dist/core/templates/skills/project-memory-skill.vi.md +223 -0
  94. package/dist/core/templates/skills/scripts/CODE_EXPLANATION.md +394 -394
  95. package/dist/core/templates/skills/scripts/SEARCH_ALGORITHMS_COMPARISON.md +421 -421
  96. package/dist/core/templates/skills/scripts/SEARCH_MODES_GUIDE.md +238 -238
  97. package/dist/core/templates/skills/scripts/__pycache__/core.cpython-311.pyc +0 -0
  98. package/dist/core/templates/skills/scripts/core.py +391 -385
  99. package/dist/core/templates/skills/scripts/search.py +1 -1
  100. package/dist/core/templates/skills/smart-explore-skill.md +141 -0
  101. package/dist/core/templates/skills/sourcecode-analyzer-skill.md +210 -0
  102. package/dist/core/templates/skills/sourcecode-analyzer-skill.vi.md +210 -0
  103. package/dist/core/templates/skills/suggestion-skill.md +118 -118
  104. package/dist/core/templates/skills/templates/accessibility-checklist.md +40 -40
  105. package/dist/core/templates/skills/templates/example-prompt-full-theme.md +333 -333
  106. package/dist/core/templates/skills/templates/page-types-guide.md +338 -338
  107. package/dist/core/templates/skills/templates/pages-proposed-summary.md +273 -273
  108. package/dist/core/templates/skills/templates/pre-delivery-checklist.md +42 -42
  109. package/dist/core/templates/skills/templates/prompt-template-full-theme.md +313 -313
  110. package/dist/core/templates/skills/templates/responsive-design.md +40 -40
  111. package/dist/core/templates/skills/ui-ux-skill.md +595 -584
  112. package/dist/core/templates/skills/unit-test-skill.md +111 -111
  113. package/dist/core/templates/skills/ux-element/templates/Controller.php +50 -50
  114. package/dist/core/templates/skills/ux-element/templates/Shortcode.php +23 -23
  115. package/dist/core/templates/skills/ux-element/templates/Template.html +20 -20
  116. package/dist/core/templates/skills/ux-element/templates/Thumbnail.svg +8 -8
  117. package/dist/core/templates/skills/ux-element/templates/View.php +21 -21
  118. package/dist/core/templates/skills/ux-element-skill.md +83 -83
  119. package/dist/core/templates/skills/wordpress-plugin-check-skill.md +151 -151
  120. package/dist/core/templates/skills/wordpress-plugin-standard/templates/admin-dashboard.php +47 -47
  121. package/dist/core/templates/skills/wordpress-plugin-standard/templates/admin-settings.php +60 -60
  122. package/dist/core/templates/skills/wordpress-plugin-standard/templates/assets/admin-css.css +22 -22
  123. package/dist/core/templates/skills/wordpress-plugin-standard/templates/assets/admin-js.js +15 -15
  124. package/dist/core/templates/skills/wordpress-plugin-standard/templates/plugin-main.php +169 -169
  125. package/dist/core/templates/skills/wordpress-plugin-standard/templates/readme.txt +41 -41
  126. package/dist/core/templates/skills/wordpress-plugin-standard/templates/uninstall.php +21 -21
  127. package/dist/core/templates/skills/wordpress-plugin-standard-skill.md +100 -100
  128. package/dist/index.js +4068 -278
  129. package/package.json +75 -72
@@ -1,584 +1,595 @@
1
- # Skill: UI/UX (Cross-Cutting)
2
-
3
- ## Purpose
4
-
5
- This skill is used to handle style, interface, UX, UI for all project types. Uses UI/UX Builder search engine (built upon [UI UX Pro Max Skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill)) with multiple search modes (BM25, Vector, Hybrid) to search for design intelligence from a database containing 57 UI styles, 95 color palettes, 56 font pairings, 24 chart types, 9+ page types, and 98 UX guidelines.
6
-
7
- ## When to Use
8
-
9
- - When creating or updating user interfaces
10
- - When designing responsive layouts
11
- - When ensuring accessibility (WCAG compliance)
12
- - When creating component styles
13
- - When optimizing user experience
14
- - When finding appropriate color palettes, typography, or UI styles
15
-
16
- ## Prerequisites
17
-
18
- **Python 3.x is required:**
19
-
20
- ```bash
21
- # Check if Python is installed
22
- python3 --version || python --version
23
-
24
- # macOS
25
- brew install python3
26
-
27
- # Ubuntu/Debian
28
- sudo apt update && sudo apt install python3
29
-
30
- # Windows
31
- winget install Python.Python.3.12
32
- ```
33
-
34
- ## Step-by-Step Process
35
-
36
- ### Step 1: Analyze User Requirements
37
-
38
- Extract key information from user request:
39
- - **Product type**: SaaS, e-commerce, portfolio, dashboard, landing page, etc.
40
- - **Style keywords**: minimal, playful, professional, elegant, dark mode, etc.
41
- - **Industry**: healthcare, fintech, gaming, education, etc.
42
- - **Stack**: React, Vue, Next.js, or default `html-tailwind`
43
-
44
- ### Step 2: Search Relevant Domains
45
-
46
- Use `scripts/search.py` multiple times to gather comprehensive information. Search until you have enough context.
47
-
48
- **Search Mode Tips:**
49
- - Use **BM25 (default)** for simple keyword queries
50
- - Use **Vector mode** (`--mode vector`) for natural language queries or when you need semantic matches
51
- - Use **Hybrid mode** (`--mode hybrid`) for best overall results
52
-
53
- **Recommended search order:**
54
-
55
- 1. **Product** - Get style recommendations for product type
56
- ```bash
57
- python3 scripts/search.py "<product-type>" --domain product
58
- # Or with semantic search:
59
- python3 scripts/search.py "<product-type>" --domain product --mode vector
60
- ```
61
-
62
- 2. **Style** - Get detailed style guide (colors, effects, frameworks)
63
- ```bash
64
- python3 scripts/search.py "<style-keywords>" --domain style
65
- # For natural language queries:
66
- python3 scripts/search.py "elegant dark theme for modern apps" --domain style --mode hybrid
67
- ```
68
-
69
- 3. **Typography** - Get font pairings with Google Fonts imports
70
- ```bash
71
- python3 scripts/search.py "<typography-keywords>" --domain typography
72
- ```
73
-
74
- 4. **Color** - Get color palette (Primary, Secondary, CTA, Background, Text, Border)
75
- ```bash
76
- python3 scripts/search.py "<product-type>" --domain color
77
- ```
78
-
79
- 5. **Landing** - Get page structure (if landing page)
80
- ```bash
81
- python3 scripts/search.py "<landing-keywords>" --domain landing
82
- ```
83
-
84
- 6. **Chart** - Get chart recommendations (if dashboard/analytics)
85
- ```bash
86
- python3 scripts/search.py "<chart-type>" --domain chart
87
- ```
88
-
89
- 7. **UX** - Get best practices and anti-patterns
90
- ```bash
91
- python3 scripts/search.py "animation" --domain ux
92
- python3 scripts/search.py "accessibility" --domain ux
93
- ```
94
-
95
- 8. **Stack** - Get stack-specific guidelines (default: html-tailwind)
96
- ```bash
97
- python3 scripts/search.py "<keyword>" --stack html-tailwind
98
- # Or with semantic search:
99
- python3 scripts/search.py "make layout responsive" --stack html-tailwind --mode vector
100
- ```
101
-
102
- ### Step 3: Synthesize Search Results
103
-
104
- Combine all search results to create a complete design system:
105
- - Color palette from color search
106
- - Typography from typography search
107
- - UI style from style search
108
- - UX guidelines from ux search
109
- - Stack-specific patterns from stack search
110
-
111
- ### Step 4: Implement Design
112
-
113
- Implement UI following:
114
- - Color palette found
115
- - Typography pairings with Google Fonts
116
- - UI style patterns
117
- - Stack-specific best practices
118
- - UX guidelines and accessibility rules
119
-
120
- ### Step 5: Pre-Delivery Checklist
121
-
122
- Before delivering UI code, verify:
123
-
124
- **Visual Quality:**
125
- - [ ] No emojis used as icons (use SVG instead - Heroicons, Lucide, Simple Icons)
126
- - [ ] All icons from consistent icon set
127
- - [ ] Brand logos are correct (verified from Simple Icons)
128
- - [ ] Hover states don't cause layout shift
129
-
130
- **Interaction:**
131
- - [ ] All clickable elements have `cursor-pointer`
132
- - [ ] Hover states provide clear visual feedback
133
- - [ ] Transitions are smooth (150-300ms)
134
- - [ ] Focus states visible for keyboard navigation
135
-
136
- **Light/Dark Mode:**
137
- - [ ] Light mode text has sufficient contrast (4.5:1 minimum)
138
- - [ ] Glass/transparent elements visible in light mode (`bg-white/80` not `bg-white/10`)
139
- - [ ] Borders visible in both modes
140
- - [ ] Test both modes before delivery
141
-
142
- **Layout:**
143
- - [ ] Floating elements have proper spacing from edges
144
- - [ ] No content hidden behind fixed navbars
145
- - [ ] Responsive at 320px, 768px, 1024px, 1440px
146
- - [ ] No horizontal scroll on mobile
147
-
148
- **Accessibility:**
149
- - [ ] All images have alt text
150
- - [ ] Form inputs have labels
151
- - [ ] Color is not the only indicator
152
- - [ ] `prefers-reduced-motion` respected
153
-
154
- ## Required Input
155
-
156
- - **Product type**: SaaS, e-commerce, portfolio, dashboard, landing page, etc.
157
- - **Style keywords**: minimal, playful, professional, elegant, dark mode, etc.
158
- - **Industry**: healthcare, fintech, gaming, education, etc.
159
- - **Stack**: React, Vue, Next.js, html-tailwind (default)
160
- - **Target devices**: Desktop, mobile, tablet
161
- - **Accessibility level**: WCAG AA or AAA
162
-
163
- ## Expected Output
164
-
165
- - Complete design system with color palette, typography, and UI style
166
- - Stack-specific implementation code
167
- - Responsive and accessible UI components
168
- - UX-optimized user flows
169
-
170
- ## Search Reference
171
-
172
- ### Available Domains
173
-
174
- | Domain | Use For | Example Keywords |
175
- |--------|---------|------------------|
176
- | `product` | Product type recommendations | SaaS, e-commerce, portfolio, healthcare, beauty, service |
177
- | `style` | UI styles, colors, effects | glassmorphism, minimalism, dark mode, brutalism |
178
- | `typography` | Font pairings, Google Fonts | elegant, playful, professional, modern |
179
- | `color` | Color palettes by product type | saas, ecommerce, healthcare, beauty, fintech, service |
180
- | `landing` | Page structure, CTA strategies | hero, hero-centric, testimonial, pricing, social-proof |
181
- | `pages` | Page type templates (home, about, post, etc.) | home, about, post, category, pricing, faq, contact, product |
182
- | `chart` | Chart types, library recommendations | trend, comparison, timeline, funnel, pie |
183
- | `ux` | Best practices, anti-patterns | animation, accessibility, z-index, loading |
184
- | `prompt` | AI prompts, CSS keywords | (style name) |
185
-
186
- ### Available Stacks
187
-
188
- | Stack | Focus |
189
- |-------|-------|
190
- | `html-tailwind` | Tailwind utilities, responsive, a11y (DEFAULT) |
191
- | `react` | State, hooks, performance, patterns |
192
- | `nextjs` | SSR, routing, images, API routes |
193
- | `vue` | Composition API, Pinia, Vue Router |
194
- | `svelte` | Runes, stores, SvelteKit |
195
- | `swiftui` | Views, State, Navigation, Animation |
196
- | `react-native` | Components, Navigation, Lists |
197
- | `flutter` | Widgets, State, Layout, Theming |
198
-
199
- ## Tone & Rules
200
-
201
- ### Common Rules for Professional UI
202
-
203
- **Icons & Visual Elements:**
204
- - Use SVG icons (Heroicons, Lucide, Simple Icons)
205
- - Use fixed viewBox (24x24) with w-6 h-6
206
- - Stable hover states (color/opacity transitions, not scale transforms)
207
- - NO emoji icons (🎨 🚀 ⚙️)
208
- - ❌ NO incorrect brand logos
209
-
210
- **Interaction & Cursor:**
211
- - Add `cursor-pointer` to all clickable/hoverable cards
212
- - ✅ Provide visual feedback (color, shadow, border) on hover
213
- - Use `transition-colors duration-200` (150-300ms)
214
- - NO instant state changes or too slow (>500ms)
215
-
216
- **Light/Dark Mode Contrast:**
217
- - Glass card light mode: `bg-white/80` or higher
218
- - Text contrast light: `#0F172A` (slate-900) for text
219
- - ✅ Muted text light: `#475569` (slate-600) minimum
220
- - Border visibility: `border-gray-200` in light mode
221
- - NO `bg-white/10` (too transparent)
222
- - NO `#94A3B8` (slate-400) for body text
223
- - NO `border-white/10` (invisible)
224
-
225
- **Layout & Spacing:**
226
- - Floating navbar: `top-4 left-4 right-4` spacing
227
- - ✅ Content padding: Account for fixed navbar height
228
- - ✅ Consistent max-width: Same `max-w-6xl` or `max-w-7xl`
229
- - NO navbar stuck to `top-0 left-0 right-0`
230
- - NO content hidden behind fixed elements
231
-
232
- ### Code Style
233
-
234
- - **Default stack**: `html-tailwind` (unless specified)
235
- - **Mobile-first**: Responsive design approach
236
- - **Accessibility**: WCAG AA minimum
237
- - **Icons**: Heroicons, Lucide, Simple Icons (SVG only)
238
- - **Transitions**: 150-300ms for smooth interactions
239
-
240
- ### Naming Conventions
241
-
242
- - **Tailwind**: Use utility classes
243
- - **Components**: Semantic naming
244
- - **CSS Variables**: For theming
245
-
246
- ### Limitations
247
-
248
- - DO NOT use emoji as icons
249
- - ❌ DO NOT hardcode colors (use variables or search results)
250
- - DO NOT skip accessibility
251
- - ❌ DO NOT create fixed-width layouts (unless necessary)
252
- - DO NOT use inline styles (except dynamic values)
253
- - DO NOT create non-responsive components
254
- - DO NOT use scale transforms for hover (causes layout shift)
255
-
256
- ## Available Scripts
257
-
258
- - `scripts/search.py` - Main search script for UI/UX Builder database
259
- - `scripts/core.py` - Core search engine (BM25, Vector, Hybrid)
260
-
261
- ## Search Modes
262
-
263
- UI/UX Builder supports multiple search algorithms for different use cases:
264
-
265
- UI/UX Builder supports 3 search modes for different use cases:
266
-
267
- 1. **BM25 (default)** - Keyword-based search
268
- - Fastest, zero dependencies
269
- - Best for exact keyword matches
270
- - ✅ Works out of the box
271
-
272
- 2. **Vector** - Semantic search
273
- - Understands meaning and synonyms
274
- - ✅ Better results (~15-20% improvement)
275
- - ⚠️ Requires: `pip install sentence-transformers scikit-learn`
276
-
277
- 3. **Hybrid** - Best of both worlds
278
- - ✅ Combines BM25 + Vector
279
- - ✅ Best results (~25% improvement)
280
- - ⚠️ Requires: `pip install sentence-transformers scikit-learn`
281
-
282
- **Usage:**
283
- ```bash
284
- # Search by domain (BM25 - default)
285
- python3 scripts/search.py "<keyword>" --domain <domain> [-n <max_results>]
286
-
287
- # Search with Vector mode (semantic)
288
- python3 scripts/search.py "<keyword>" --domain <domain> --mode vector
289
-
290
- # Search with Hybrid mode (best results)
291
- python3 scripts/search.py "<keyword>" --domain <domain> --mode hybrid
292
-
293
- # Search by stack
294
- python3 scripts/search.py "<keyword>" --stack <stack> [-n <max_results>] [--mode <mode>]
295
-
296
- # Examples
297
- python3 scripts/search.py "beauty spa wellness" --domain product
298
- python3 scripts/search.py "elegant dark theme" --domain style --mode vector
299
- python3 scripts/search.py "modern minimal design" --domain style --mode hybrid
300
- python3 scripts/search.py "layout responsive" --stack html-tailwind
301
- ```
302
-
303
- **Note:** If Vector/Hybrid mode is requested but dependencies are not installed, the system automatically falls back to BM25 mode with a warning message.
304
-
305
- ## Multi-Page Website Package
306
-
307
- ### When to Create Full Package vs Landing Page
308
-
309
- **Create Full Package** when user requests:
310
- - "Tạo website đầy đủ" / "Create complete website"
311
- - "Tạo gói giao diện đầy đủ" / "Create full interface package"
312
- - Multiple pages mentioned (home, about, contact, etc.)
313
- - E-commerce site (needs product pages)
314
- - Blog/content site (needs post and category pages)
315
-
316
- **Create Landing Page Only** when user requests:
317
- - "Tạo landing page" / "Create landing page"
318
- - Single page conversion focus
319
- - Marketing campaign page
320
- - Product launch page
321
-
322
- ### Default Page Set
323
-
324
- When creating a complete website package (not specified), include these 9 pages:
325
-
326
- 1. **Home** - Main homepage with hero, features, testimonials
327
- 2. **About** - Company story, mission, team
328
- 3. **Post Details** - Blog/article detail page
329
- 4. **Category** - Blog/category listing page
330
- 5. **Pricing** - Pricing plans and comparison
331
- 6. **FAQ** - Frequently asked questions
332
- 7. **Contact** - Contact form and information
333
- 8. **Product Category** - E-commerce category listing (if applicable)
334
- 9. **Product Details** - E-commerce product detail page (if applicable)
335
-
336
- ### Multi-Page Workflow
337
-
338
- **Step 1: Search Design System** (once for all pages)
339
-
340
- ```bash
341
- # Product type
342
- python3 scripts/search.py "<product-type>" --domain product
343
-
344
- # Style
345
- python3 scripts/search.py "<style-keywords>" --domain style
346
-
347
- # Color palette
348
- python3 scripts/search.py "<product-type>" --domain color
349
-
350
- # Typography
351
- python3 scripts/search.py "<typography-keywords>" --domain typography
352
- ```
353
-
354
- **Step 2: Search Each Page Type**
355
-
356
- ```bash
357
- # Home page
358
- python3 scripts/search.py "home homepage" --domain pages
359
- # Or with semantic search for better results:
360
- python3 scripts/search.py "homepage with hero section" --domain pages --mode hybrid
361
-
362
- # About page
363
- python3 scripts/search.py "about company story" --domain pages
364
-
365
- # Post details
366
- python3 scripts/search.py "post article blog" --domain pages
367
-
368
- # Category page
369
- python3 scripts/search.py "category archive listing" --domain pages
370
-
371
- # Pricing page
372
- python3 scripts/search.py "pricing plans tiers" --domain pages
373
-
374
- # FAQ page
375
- python3 scripts/search.py "faq questions help" --domain pages
376
-
377
- # Contact page
378
- python3 scripts/search.py "contact get-in-touch" --domain pages
379
-
380
- # Product category (if e-commerce)
381
- python3 scripts/search.py "product-category shop catalog" --domain pages
382
-
383
- # Product details (if e-commerce)
384
- python3 scripts/search.py "product-detail single-product" --domain pages
385
- ```
386
-
387
- **Step 3: Create Shared Components First**
388
-
389
- Before individual pages, create:
390
- - **Header/Navigation** - Consistent across all pages
391
- - **Footer** - Consistent across all pages
392
- - **Button components** - Primary, secondary, CTA styles
393
- - **Card components** - For features, products, posts
394
- - **Form components** - For contact, search
395
- - **Layout wrapper** - Consistent spacing and max-width
396
-
397
- **Step 4: Implement Pages in Order**
398
-
399
- 1. **Home** - Establishes design system
400
- 2. **About** - Uses same header/footer
401
- 3. **Category** - Reuses card components
402
- 4. **Post Details** - Uses category navigation
403
- 5. **Pricing** - Standalone but consistent
404
- 6. **FAQ** - Standalone but consistent
405
- 7. **Contact** - Standalone but consistent
406
- 8. **Product Category** (if e-commerce)
407
- 9. **Product Details** (if e-commerce)
408
-
409
- **Step 5: Ensure Consistency**
410
-
411
- - Same color palette across all pages
412
- - Same typography (heading + body fonts)
413
- - Same spacing system
414
- - Same navigation structure
415
- - Same footer content
416
- - Consistent button styles
417
- - Consistent card styles
418
-
419
- ### Code Organization
420
-
421
- **File Structure:**
422
- ```
423
- src/
424
- ├── components/
425
- │ ├── shared/
426
- │ │ ├── Header.tsx (or Header.html)
427
- │ │ ├── Footer.tsx (or Footer.html)
428
- │ │ ├── Button.tsx
429
- │ │ └── Card.tsx
430
- │ └── [page-specific components]
431
- ├── pages/
432
- │ ├── index.html (or Home.tsx)
433
- │ ├── about.html (or About.tsx)
434
- ├── blog/
435
- ├── [slug].html
436
- │ │ └── category/[category].html
437
- │ ├── pricing.html
438
- │ ├── faq.html
439
- ├── contact.html
440
- │ └── products/ (if e-commerce)
441
- ├── category/[category].html
442
- └── [slug].html
443
- └── styles/
444
- └── globals.css (or tailwind.config.js)
445
- ```
446
-
447
- **Component Guidelines:**
448
- - Extract common patterns into reusable components
449
- - One component per file
450
- - Keep components under 200-300 lines
451
- - Use props/variables for customization
452
-
453
- See `templates/page-types-guide.md` for detailed page templates.
454
-
455
- ## Available Templates
456
-
457
- - `templates/responsive-design.md` - Responsive checklist
458
- - `templates/accessibility-checklist.md` - Accessibility checklist
459
- - `templates/pre-delivery-checklist.md` - Pre-delivery verification
460
- - `templates/page-types-guide.md` - Multi-page website package guide
461
- - `templates/example-prompt-full-theme.md` - Example prompts for creating full theme packages
462
- - `templates/prompt-template-full-theme.md` - Prompt templates (copy-paste ready)
463
-
464
- ## Examples
465
-
466
- See `examples/` directory for reference:
467
- - `good-ux-patterns/` - Good patterns (high conversion, accessible)
468
- - `bad-ux-patterns/` - Patterns to avoid (confusing, inaccessible)
469
-
470
- ## Example Workflows
471
-
472
- ### Example 1: Landing Page Only
473
-
474
- **User request:** "Create landing page for professional skincare service"
475
-
476
- **Agent should:**
477
-
478
- ```bash
479
- # 1. Search product type
480
- python3 scripts/search.py "beauty spa wellness service" --domain product
481
- # Or with semantic search for better results:
482
- python3 scripts/search.py "professional skincare service business" --domain product --mode vector
483
-
484
- # 2. Search style (based on industry: beauty, elegant)
485
- python3 scripts/search.py "elegant minimal soft" --domain style
486
- # Or with hybrid for best results:
487
- python3 scripts/search.py "elegant minimal design for beauty services" --domain style --mode hybrid
488
-
489
- # 3. Search typography
490
- python3 scripts/search.py "elegant luxury" --domain typography
491
-
492
- # 4. Search color palette
493
- python3 scripts/search.py "beauty spa wellness" --domain color
494
-
495
- # 5. Search landing page structure
496
- python3 scripts/search.py "hero-centric social-proof" --domain landing
497
-
498
- # 6. Search UX guidelines
499
- python3 scripts/search.py "animation" --domain ux
500
- python3 scripts/search.py "accessibility" --domain ux
501
-
502
- # 7. Search stack guidelines (default: html-tailwind)
503
- python3 scripts/search.py "layout responsive" --stack html-tailwind
504
- ```
505
-
506
- **Then:** Synthesize all search results and implement the design.
507
-
508
- ### Example 2: Complete Website Package
509
-
510
- **User request:** "Tạo gói website đầy đủ cho dịch vụ chăm sóc da chuyên nghiệp"
511
-
512
- **Agent should:**
513
-
514
- ```bash
515
- # Step 1: Search design system (once for all pages)
516
- # Use hybrid mode for better semantic understanding
517
- python3 scripts/search.py "beauty spa wellness service" --domain product --mode hybrid
518
- python3 scripts/search.py "elegant minimal soft design" --domain style --mode hybrid
519
- python3 scripts/search.py "beauty spa wellness" --domain color
520
- python3 scripts/search.py "elegant luxury typography" --domain typography --mode vector
521
-
522
- # Step 2: Search each page type
523
- python3 scripts/search.py "home homepage" --domain pages
524
- python3 scripts/search.py "about company story" --domain pages
525
- python3 scripts/search.py "post article blog" --domain pages
526
- python3 scripts/search.py "category archive" --domain pages
527
- python3 scripts/search.py "pricing plans" --domain pages
528
- python3 scripts/search.py "faq questions" --domain pages
529
- python3 scripts/search.py "contact" --domain pages
530
-
531
- # Step 3: Search UX guidelines
532
- python3 scripts/search.py "animation" --domain ux
533
- python3 scripts/search.py "accessibility" --domain ux
534
-
535
- # Step 4: Search stack guidelines
536
- python3 scripts/search.py "layout responsive" --stack html-tailwind
537
- # Or with semantic search:
538
- python3 scripts/search.py "how to make layout responsive" --stack html-tailwind --mode vector
539
- ```
540
-
541
- **Then:**
542
- 1. Create shared components (Header, Footer, Button, Card)
543
- 2. Implement pages in order: Home → About → Category → Post Details → Pricing → FAQ → Contact
544
- 3. Ensure consistency across all pages
545
- 4. Verify with pre-delivery checklist
546
-
547
- ## Tips for Better Results
548
-
549
- 1. **Be specific with keywords** - "healthcare SaaS dashboard" > "app"
550
- 2. **Use appropriate search mode:**
551
- - **BM25 (default)** for simple keyword queries
552
- - **Vector mode** (`--mode vector`) for natural language or when you need semantic matches
553
- - **Hybrid mode** (`--mode hybrid`) for best overall results
554
- 3. **Search multiple times** - Different keywords reveal different insights
555
- 4. **Combine domains** - Style + Typography + Color = Complete design system
556
- 5. **Always check UX** - Search "animation", "z-index", "accessibility" for common issues
557
- 6. **Use stack flag** - Get implementation-specific best practices
558
- 7. **Iterate** - If first search doesn't match, try different keywords or switch search mode
559
- 8. **Split Into Multiple Files** - For better maintainability:
560
- - Separate components into individual files (e.g., `Header.tsx`, `Footer.tsx`)
561
- - Extract reusable styles into dedicated files
562
- - Keep each file focused and under 200-300 lines
563
-
564
- ### Search Mode Selection Guide
565
-
566
- - **Use BM25 when:**
567
- - You have clear, specific keywords
568
- - Speed is priority
569
- - Simple queries work well
570
-
571
- - **Use Vector when:**
572
- - Natural language queries ("elegant dark theme for modern apps")
573
- - Need to find synonyms or related terms
574
- - Dataset > 500 records
575
-
576
- - **Use Hybrid when:**
577
- - Need best possible results
578
- - Mix of keyword and natural language queries
579
- - Production use cases
580
-
581
- ## Links to Other Skills
582
-
583
- - **documents**: Use to document design system
584
- - **content-optimization**: Use to optimize CTA placement and styling
1
+ # Skill: UI/UX (Cross-Cutting)
2
+
3
+ ## Purpose
4
+
5
+ This skill is used to handle style, interface, UX, UI for all project types. Uses UI/UX Builder search engine (built upon [UI UX Pro Max Skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill)) with multiple search modes (BM25, Vector, Hybrid) to search for design intelligence from a database containing 57 UI styles, 95 color palettes, 56 font pairings, 24 chart types, 9+ page types, and 98 UX guidelines.
6
+
7
+ ## When to Use
8
+
9
+ - When creating or updating user interfaces
10
+ - When designing responsive layouts
11
+ - When ensuring accessibility (WCAG compliance)
12
+ - When creating component styles
13
+ - When optimizing user experience
14
+ - When finding appropriate color palettes, typography, or UI styles
15
+
16
+ ## Prerequisites
17
+
18
+ **Python 3.x is required:**
19
+
20
+ ```bash
21
+ # Check if Python is installed
22
+ python3 --version || python --version
23
+
24
+ # macOS
25
+ brew install python3
26
+
27
+ # Ubuntu/Debian
28
+ sudo apt update && sudo apt install python3
29
+
30
+ # Windows
31
+ winget install Python.Python.3.12
32
+ ```
33
+
34
+ ## Step-by-Step Process
35
+
36
+ ### Step 1: Analyze User Requirements
37
+
38
+ Extract key information from user request:
39
+ - **Product type**: SaaS, e-commerce, portfolio, dashboard, landing page, etc.
40
+ - **Style keywords**: minimal, playful, professional, elegant, dark mode, etc.
41
+ - **Industry**: healthcare, fintech, gaming, education, etc.
42
+ - **Stack**: React, Vue, Next.js, or default `html-tailwind`
43
+
44
+ ### Step 2: Search Relevant Domains
45
+
46
+ Use `scripts/search.py` multiple times to gather comprehensive information. Search until you have enough context.
47
+
48
+ **Search Mode Tips:**
49
+ - Use **BM25 (default)** for simple keyword queries
50
+ - Use **Vector mode** (`--mode vector`) for natural language queries or when you need semantic matches
51
+ - Use **Hybrid mode** (`--mode hybrid`) for best overall results
52
+
53
+ **Recommended search order:**
54
+
55
+ 1. **Product** - Get style recommendations for product type
56
+ ```bash
57
+ python3 scripts/search.py "<product-type>" --domain product
58
+ # Or with semantic search:
59
+ python3 scripts/search.py "<product-type>" --domain product --mode vector
60
+ ```
61
+
62
+ 2. **Style** - Get detailed style guide (colors, effects, frameworks)
63
+ ```bash
64
+ python3 scripts/search.py "<style-keywords>" --domain style
65
+ # For natural language queries:
66
+ python3 scripts/search.py "elegant dark theme for modern apps" --domain style --mode hybrid
67
+ ```
68
+
69
+ 3. **Typography** - Get font pairings with Google Fonts imports
70
+ ```bash
71
+ python3 scripts/search.py "<typography-keywords>" --domain typography
72
+ ```
73
+
74
+ 4. **Color** - Get color palette (Primary, Secondary, CTA, Background, Text, Border)
75
+ ```bash
76
+ python3 scripts/search.py "<product-type>" --domain color
77
+ ```
78
+
79
+ 5. **Landing** - Get page structure (if landing page)
80
+ ```bash
81
+ python3 scripts/search.py "<landing-keywords>" --domain landing
82
+ ```
83
+
84
+ 6. **Chart** - Get chart recommendations (if dashboard/analytics)
85
+ ```bash
86
+ python3 scripts/search.py "<chart-type>" --domain chart
87
+ ```
88
+
89
+ 7. **UX** - Get best practices and anti-patterns
90
+ ```bash
91
+ python3 scripts/search.py "animation" --domain ux
92
+ python3 scripts/search.py "accessibility" --domain ux
93
+ ```
94
+
95
+ 8. **Design System** - Get real-world brand design references (54 brands: Stripe, Vercel, Linear, etc.)
96
+ ```bash
97
+ # Search by brand name
98
+ python3 scripts/search.py "stripe" --domain design-system
99
+ # Search by style/industry
100
+ python3 scripts/search.py "dark developer tools" --domain design-system --mode hybrid
101
+ # Then read the full DESIGN.md from knowledge/design-systems/<folder>/DESIGN.md
102
+ ```
103
+
104
+ 9. **Stack** - Get stack-specific guidelines (default: html-tailwind)
105
+ ```bash
106
+ python3 scripts/search.py "<keyword>" --stack html-tailwind
107
+ # Or with semantic search:
108
+ python3 scripts/search.py "make layout responsive" --stack html-tailwind --mode vector
109
+ ```
110
+
111
+ ### Step 3: Synthesize Search Results
112
+
113
+ Combine all search results to create a complete design system:
114
+ - Color palette from color search
115
+ - Typography from typography search
116
+ - UI style from style search
117
+ - UX guidelines from ux search
118
+ - Stack-specific patterns from stack search
119
+
120
+ ### Step 4: Implement Design
121
+
122
+ Implement UI following:
123
+ - Color palette found
124
+ - Typography pairings with Google Fonts
125
+ - UI style patterns
126
+ - Stack-specific best practices
127
+ - UX guidelines and accessibility rules
128
+
129
+ ### Step 5: Pre-Delivery Checklist
130
+
131
+ Before delivering UI code, verify:
132
+
133
+ **Visual Quality:**
134
+ - [ ] No emojis used as icons (use SVG instead - Heroicons, Lucide, Simple Icons)
135
+ - [ ] All icons from consistent icon set
136
+ - [ ] Brand logos are correct (verified from Simple Icons)
137
+ - [ ] Hover states don't cause layout shift
138
+
139
+ **Interaction:**
140
+ - [ ] All clickable elements have `cursor-pointer`
141
+ - [ ] Hover states provide clear visual feedback
142
+ - [ ] Transitions are smooth (150-300ms)
143
+ - [ ] Focus states visible for keyboard navigation
144
+
145
+ **Light/Dark Mode:**
146
+ - [ ] Light mode text has sufficient contrast (4.5:1 minimum)
147
+ - [ ] Glass/transparent elements visible in light mode (`bg-white/80` not `bg-white/10`)
148
+ - [ ] Borders visible in both modes
149
+ - [ ] Test both modes before delivery
150
+
151
+ **Layout:**
152
+ - [ ] Floating elements have proper spacing from edges
153
+ - [ ] No content hidden behind fixed navbars
154
+ - [ ] Responsive at 320px, 768px, 1024px, 1440px
155
+ - [ ] No horizontal scroll on mobile
156
+
157
+ **Accessibility:**
158
+ - [ ] All images have alt text
159
+ - [ ] Form inputs have labels
160
+ - [ ] Color is not the only indicator
161
+ - [ ] `prefers-reduced-motion` respected
162
+
163
+ ## Required Input
164
+
165
+ - **Product type**: SaaS, e-commerce, portfolio, dashboard, landing page, etc.
166
+ - **Style keywords**: minimal, playful, professional, elegant, dark mode, etc.
167
+ - **Industry**: healthcare, fintech, gaming, education, etc.
168
+ - **Stack**: React, Vue, Next.js, html-tailwind (default)
169
+ - **Target devices**: Desktop, mobile, tablet
170
+ - **Accessibility level**: WCAG AA or AAA
171
+
172
+ ## Expected Output
173
+
174
+ - Complete design system with color palette, typography, and UI style
175
+ - Stack-specific implementation code
176
+ - Responsive and accessible UI components
177
+ - UX-optimized user flows
178
+
179
+ ## Search Reference
180
+
181
+ ### Available Domains
182
+
183
+ | Domain | Use For | Example Keywords |
184
+ |--------|---------|------------------|
185
+ | `product` | Product type recommendations | SaaS, e-commerce, portfolio, healthcare, beauty, service |
186
+ | `style` | UI styles, colors, effects | glassmorphism, minimalism, dark mode, brutalism |
187
+ | `typography` | Font pairings, Google Fonts | elegant, playful, professional, modern |
188
+ | `color` | Color palettes by product type | saas, ecommerce, healthcare, beauty, fintech, service |
189
+ | `landing` | Page structure, CTA strategies | hero, hero-centric, testimonial, pricing, social-proof |
190
+ | `pages` | Page type templates (home, about, post, etc.) | home, about, post, category, pricing, faq, contact, product |
191
+ | `chart` | Chart types, library recommendations | trend, comparison, timeline, funnel, pie |
192
+ | `ux` | Best practices, anti-patterns | animation, accessibility, z-index, loading |
193
+ | `prompt` | AI prompts, CSS keywords | (style name) |
194
+ | `design-system` | Real-world brand design systems (54 brands) | stripe, vercel, linear, dark developer, fintech premium |
195
+
196
+ ### Available Stacks
197
+
198
+ | Stack | Focus |
199
+ |-------|-------|
200
+ | `html-tailwind` | Tailwind utilities, responsive, a11y (DEFAULT) |
201
+ | `react` | State, hooks, performance, patterns |
202
+ | `nextjs` | SSR, routing, images, API routes |
203
+ | `vue` | Composition API, Pinia, Vue Router |
204
+ | `svelte` | Runes, stores, SvelteKit |
205
+ | `swiftui` | Views, State, Navigation, Animation |
206
+ | `react-native` | Components, Navigation, Lists |
207
+ | `flutter` | Widgets, State, Layout, Theming |
208
+
209
+ ## Tone & Rules
210
+
211
+ ### Common Rules for Professional UI
212
+
213
+ **Icons & Visual Elements:**
214
+ - Use SVG icons (Heroicons, Lucide, Simple Icons)
215
+ - ✅ Use fixed viewBox (24x24) with w-6 h-6
216
+ - ✅ Stable hover states (color/opacity transitions, not scale transforms)
217
+ - NO emoji icons (🎨 🚀 ⚙️)
218
+ - NO incorrect brand logos
219
+
220
+ **Interaction & Cursor:**
221
+ - Add `cursor-pointer` to all clickable/hoverable cards
222
+ - Provide visual feedback (color, shadow, border) on hover
223
+ - Use `transition-colors duration-200` (150-300ms)
224
+ - ❌ NO instant state changes or too slow (>500ms)
225
+
226
+ **Light/Dark Mode Contrast:**
227
+ - ✅ Glass card light mode: `bg-white/80` or higher
228
+ - ✅ Text contrast light: `#0F172A` (slate-900) for text
229
+ - Muted text light: `#475569` (slate-600) minimum
230
+ - Border visibility: `border-gray-200` in light mode
231
+ - ❌ NO `bg-white/10` (too transparent)
232
+ - NO `#94A3B8` (slate-400) for body text
233
+ - ❌ NO `border-white/10` (invisible)
234
+
235
+ **Layout & Spacing:**
236
+ - Floating navbar: `top-4 left-4 right-4` spacing
237
+ - Content padding: Account for fixed navbar height
238
+ - Consistent max-width: Same `max-w-6xl` or `max-w-7xl`
239
+ - ❌ NO navbar stuck to `top-0 left-0 right-0`
240
+ - NO content hidden behind fixed elements
241
+
242
+ ### Code Style
243
+
244
+ - **Default stack**: `html-tailwind` (unless specified)
245
+ - **Mobile-first**: Responsive design approach
246
+ - **Accessibility**: WCAG AA minimum
247
+ - **Icons**: Heroicons, Lucide, Simple Icons (SVG only)
248
+ - **Transitions**: 150-300ms for smooth interactions
249
+
250
+ ### Naming Conventions
251
+
252
+ - **Tailwind**: Use utility classes
253
+ - **Components**: Semantic naming
254
+ - **CSS Variables**: For theming
255
+
256
+ ### Limitations
257
+
258
+ - DO NOT use emoji as icons
259
+ - DO NOT hardcode colors (use variables or search results)
260
+ - ❌ DO NOT skip accessibility
261
+ - DO NOT create fixed-width layouts (unless necessary)
262
+ - ❌ DO NOT use inline styles (except dynamic values)
263
+ - DO NOT create non-responsive components
264
+ - ❌ DO NOT use scale transforms for hover (causes layout shift)
265
+
266
+ ## Available Scripts
267
+
268
+ - `scripts/search.py` - Main search script for UI/UX Builder database
269
+ - `scripts/core.py` - Core search engine (BM25, Vector, Hybrid)
270
+
271
+ ## Search Modes
272
+
273
+ UI/UX Builder supports multiple search algorithms for different use cases:
274
+
275
+ UI/UX Builder supports 3 search modes for different use cases:
276
+
277
+ 1. **BM25 (default)** - Keyword-based search
278
+ - ✅ Fastest, zero dependencies
279
+ - ✅ Best for exact keyword matches
280
+ - Works out of the box
281
+
282
+ 2. **Vector** - Semantic search
283
+ - ✅ Understands meaning and synonyms
284
+ - Better results (~15-20% improvement)
285
+ - ⚠️ Requires: `pip install sentence-transformers scikit-learn`
286
+
287
+ 3. **Hybrid** - Best of both worlds
288
+ - Combines BM25 + Vector
289
+ - ✅ Best results (~25% improvement)
290
+ - ⚠️ Requires: `pip install sentence-transformers scikit-learn`
291
+
292
+ **Usage:**
293
+ ```bash
294
+ # Search by domain (BM25 - default)
295
+ python3 scripts/search.py "<keyword>" --domain <domain> [-n <max_results>]
296
+
297
+ # Search with Vector mode (semantic)
298
+ python3 scripts/search.py "<keyword>" --domain <domain> --mode vector
299
+
300
+ # Search with Hybrid mode (best results)
301
+ python3 scripts/search.py "<keyword>" --domain <domain> --mode hybrid
302
+
303
+ # Search by stack
304
+ python3 scripts/search.py "<keyword>" --stack <stack> [-n <max_results>] [--mode <mode>]
305
+
306
+ # Examples
307
+ python3 scripts/search.py "beauty spa wellness" --domain product
308
+ python3 scripts/search.py "elegant dark theme" --domain style --mode vector
309
+ python3 scripts/search.py "modern minimal design" --domain style --mode hybrid
310
+ python3 scripts/search.py "layout responsive" --stack html-tailwind
311
+ ```
312
+
313
+ **Note:** If Vector/Hybrid mode is requested but dependencies are not installed, the system automatically falls back to BM25 mode with a warning message.
314
+
315
+ ## Multi-Page Website Package
316
+
317
+ ### When to Create Full Package vs Landing Page
318
+
319
+ **Create Full Package** when user requests:
320
+ - "Tạo website đầy đủ" / "Create complete website"
321
+ - "Tạo gói giao diện đầy đủ" / "Create full interface package"
322
+ - Multiple pages mentioned (home, about, contact, etc.)
323
+ - E-commerce site (needs product pages)
324
+ - Blog/content site (needs post and category pages)
325
+
326
+ **Create Landing Page Only** when user requests:
327
+ - "Tạo landing page" / "Create landing page"
328
+ - Single page conversion focus
329
+ - Marketing campaign page
330
+ - Product launch page
331
+
332
+ ### Default Page Set
333
+
334
+ When creating a complete website package (not specified), include these 9 pages:
335
+
336
+ 1. **Home** - Main homepage with hero, features, testimonials
337
+ 2. **About** - Company story, mission, team
338
+ 3. **Post Details** - Blog/article detail page
339
+ 4. **Category** - Blog/category listing page
340
+ 5. **Pricing** - Pricing plans and comparison
341
+ 6. **FAQ** - Frequently asked questions
342
+ 7. **Contact** - Contact form and information
343
+ 8. **Product Category** - E-commerce category listing (if applicable)
344
+ 9. **Product Details** - E-commerce product detail page (if applicable)
345
+
346
+ ### Multi-Page Workflow
347
+
348
+ **Step 1: Search Design System** (once for all pages)
349
+
350
+ ```bash
351
+ # Product type
352
+ python3 scripts/search.py "<product-type>" --domain product
353
+
354
+ # Style
355
+ python3 scripts/search.py "<style-keywords>" --domain style
356
+
357
+ # Color palette
358
+ python3 scripts/search.py "<product-type>" --domain color
359
+
360
+ # Typography
361
+ python3 scripts/search.py "<typography-keywords>" --domain typography
362
+ ```
363
+
364
+ **Step 2: Search Each Page Type**
365
+
366
+ ```bash
367
+ # Home page
368
+ python3 scripts/search.py "home homepage" --domain pages
369
+ # Or with semantic search for better results:
370
+ python3 scripts/search.py "homepage with hero section" --domain pages --mode hybrid
371
+
372
+ # About page
373
+ python3 scripts/search.py "about company story" --domain pages
374
+
375
+ # Post details
376
+ python3 scripts/search.py "post article blog" --domain pages
377
+
378
+ # Category page
379
+ python3 scripts/search.py "category archive listing" --domain pages
380
+
381
+ # Pricing page
382
+ python3 scripts/search.py "pricing plans tiers" --domain pages
383
+
384
+ # FAQ page
385
+ python3 scripts/search.py "faq questions help" --domain pages
386
+
387
+ # Contact page
388
+ python3 scripts/search.py "contact get-in-touch" --domain pages
389
+
390
+ # Product category (if e-commerce)
391
+ python3 scripts/search.py "product-category shop catalog" --domain pages
392
+
393
+ # Product details (if e-commerce)
394
+ python3 scripts/search.py "product-detail single-product" --domain pages
395
+ ```
396
+
397
+ **Step 3: Create Shared Components First**
398
+
399
+ Before individual pages, create:
400
+ - **Header/Navigation** - Consistent across all pages
401
+ - **Footer** - Consistent across all pages
402
+ - **Button components** - Primary, secondary, CTA styles
403
+ - **Card components** - For features, products, posts
404
+ - **Form components** - For contact, search
405
+ - **Layout wrapper** - Consistent spacing and max-width
406
+
407
+ **Step 4: Implement Pages in Order**
408
+
409
+ 1. **Home** - Establishes design system
410
+ 2. **About** - Uses same header/footer
411
+ 3. **Category** - Reuses card components
412
+ 4. **Post Details** - Uses category navigation
413
+ 5. **Pricing** - Standalone but consistent
414
+ 6. **FAQ** - Standalone but consistent
415
+ 7. **Contact** - Standalone but consistent
416
+ 8. **Product Category** (if e-commerce)
417
+ 9. **Product Details** (if e-commerce)
418
+
419
+ **Step 5: Ensure Consistency**
420
+
421
+ - ✅ Same color palette across all pages
422
+ - ✅ Same typography (heading + body fonts)
423
+ - ✅ Same spacing system
424
+ - ✅ Same navigation structure
425
+ - ✅ Same footer content
426
+ - Consistent button styles
427
+ - Consistent card styles
428
+
429
+ ### Code Organization
430
+
431
+ **File Structure:**
432
+ ```
433
+ src/
434
+ ├── components/
435
+ │ ├── shared/
436
+ │ │ ├── Header.tsx (or Header.html)
437
+ ├── Footer.tsx (or Footer.html)
438
+ ├── Button.tsx
439
+ │ └── Card.tsx
440
+ │ └── [page-specific components]
441
+ ├── pages/
442
+ ├── index.html (or Home.tsx)
443
+ │ ├── about.html (or About.tsx)
444
+ │ ├── blog/
445
+ │ │ ├── [slug].html
446
+ │ │ └── category/[category].html
447
+ │ ├── pricing.html
448
+ │ ├── faq.html
449
+ │ ├── contact.html
450
+ │ └── products/ (if e-commerce)
451
+ │ ├── category/[category].html
452
+ │ └── [slug].html
453
+ └── styles/
454
+ └── globals.css (or tailwind.config.js)
455
+ ```
456
+
457
+ **Component Guidelines:**
458
+ - Extract common patterns into reusable components
459
+ - One component per file
460
+ - Keep components under 200-300 lines
461
+ - Use props/variables for customization
462
+
463
+ See `templates/page-types-guide.md` for detailed page templates.
464
+
465
+ ## Available Templates
466
+
467
+ - `templates/responsive-design.md` - Responsive checklist
468
+ - `templates/accessibility-checklist.md` - Accessibility checklist
469
+ - `templates/pre-delivery-checklist.md` - Pre-delivery verification
470
+ - `templates/page-types-guide.md` - Multi-page website package guide
471
+ - `templates/example-prompt-full-theme.md` - Example prompts for creating full theme packages
472
+ - `templates/prompt-template-full-theme.md` - Prompt templates (copy-paste ready)
473
+
474
+ ## Examples
475
+
476
+ See `examples/` directory for reference:
477
+ - `good-ux-patterns/` - Good patterns (high conversion, accessible)
478
+ - `bad-ux-patterns/` - Patterns to avoid (confusing, inaccessible)
479
+
480
+ ## Example Workflows
481
+
482
+ ### Example 1: Landing Page Only
483
+
484
+ **User request:** "Create landing page for professional skincare service"
485
+
486
+ **Agent should:**
487
+
488
+ ```bash
489
+ # 1. Search product type
490
+ python3 scripts/search.py "beauty spa wellness service" --domain product
491
+ # Or with semantic search for better results:
492
+ python3 scripts/search.py "professional skincare service business" --domain product --mode vector
493
+
494
+ # 2. Search style (based on industry: beauty, elegant)
495
+ python3 scripts/search.py "elegant minimal soft" --domain style
496
+ # Or with hybrid for best results:
497
+ python3 scripts/search.py "elegant minimal design for beauty services" --domain style --mode hybrid
498
+
499
+ # 3. Search typography
500
+ python3 scripts/search.py "elegant luxury" --domain typography
501
+
502
+ # 4. Search color palette
503
+ python3 scripts/search.py "beauty spa wellness" --domain color
504
+
505
+ # 5. Search landing page structure
506
+ python3 scripts/search.py "hero-centric social-proof" --domain landing
507
+
508
+ # 6. Search UX guidelines
509
+ python3 scripts/search.py "animation" --domain ux
510
+ python3 scripts/search.py "accessibility" --domain ux
511
+
512
+ # 7. Search stack guidelines (default: html-tailwind)
513
+ python3 scripts/search.py "layout responsive" --stack html-tailwind
514
+ ```
515
+
516
+ **Then:** Synthesize all search results and implement the design.
517
+
518
+ ### Example 2: Complete Website Package
519
+
520
+ **User request:** "Tạo gói website đầy đủ cho dịch vụ chăm sóc da chuyên nghiệp"
521
+
522
+ **Agent should:**
523
+
524
+ ```bash
525
+ # Step 1: Search design system (once for all pages)
526
+ # Use hybrid mode for better semantic understanding
527
+ python3 scripts/search.py "beauty spa wellness service" --domain product --mode hybrid
528
+ python3 scripts/search.py "elegant minimal soft design" --domain style --mode hybrid
529
+ python3 scripts/search.py "beauty spa wellness" --domain color
530
+ python3 scripts/search.py "elegant luxury typography" --domain typography --mode vector
531
+
532
+ # Step 2: Search each page type
533
+ python3 scripts/search.py "home homepage" --domain pages
534
+ python3 scripts/search.py "about company story" --domain pages
535
+ python3 scripts/search.py "post article blog" --domain pages
536
+ python3 scripts/search.py "category archive" --domain pages
537
+ python3 scripts/search.py "pricing plans" --domain pages
538
+ python3 scripts/search.py "faq questions" --domain pages
539
+ python3 scripts/search.py "contact" --domain pages
540
+
541
+ # Step 3: Search UX guidelines
542
+ python3 scripts/search.py "animation" --domain ux
543
+ python3 scripts/search.py "accessibility" --domain ux
544
+
545
+ # Step 4: Search stack guidelines
546
+ python3 scripts/search.py "layout responsive" --stack html-tailwind
547
+ # Or with semantic search:
548
+ python3 scripts/search.py "how to make layout responsive" --stack html-tailwind --mode vector
549
+ ```
550
+
551
+ **Then:**
552
+ 1. Create shared components (Header, Footer, Button, Card)
553
+ 2. Implement pages in order: Home About → Category → Post Details → Pricing → FAQ → Contact
554
+ 3. Ensure consistency across all pages
555
+ 4. Verify with pre-delivery checklist
556
+
557
+ ## Tips for Better Results
558
+
559
+ 1. **Be specific with keywords** - "healthcare SaaS dashboard" > "app"
560
+ 2. **Use appropriate search mode:**
561
+ - **BM25 (default)** for simple keyword queries
562
+ - **Vector mode** (`--mode vector`) for natural language or when you need semantic matches
563
+ - **Hybrid mode** (`--mode hybrid`) for best overall results
564
+ 3. **Search multiple times** - Different keywords reveal different insights
565
+ 4. **Combine domains** - Style + Typography + Color = Complete design system
566
+ 5. **Always check UX** - Search "animation", "z-index", "accessibility" for common issues
567
+ 6. **Use stack flag** - Get implementation-specific best practices
568
+ 7. **Iterate** - If first search doesn't match, try different keywords or switch search mode
569
+ 8. **Split Into Multiple Files** - For better maintainability:
570
+ - Separate components into individual files (e.g., `Header.tsx`, `Footer.tsx`)
571
+ - Extract reusable styles into dedicated files
572
+ - Keep each file focused and under 200-300 lines
573
+
574
+ ### Search Mode Selection Guide
575
+
576
+ - **Use BM25 when:**
577
+ - You have clear, specific keywords
578
+ - Speed is priority
579
+ - Simple queries work well
580
+
581
+ - **Use Vector when:**
582
+ - Natural language queries ("elegant dark theme for modern apps")
583
+ - Need to find synonyms or related terms
584
+ - Dataset > 500 records
585
+
586
+ - **Use Hybrid when:**
587
+ - Need best possible results
588
+ - Mix of keyword and natural language queries
589
+ - Production use cases
590
+
591
+ ## Links to Other Skills
592
+
593
+ - **documents**: Use to document design system
594
+ - **content-optimization**: Use to optimize CTA placement and styling
595
+ - **design-system**: Use for real-world brand design references (Stripe, Vercel, Linear, etc.)