@ericrisco/rsc 3.3.1 → 3.5.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 (61) hide show
  1. package/README.md +3 -3
  2. package/manifest.json +43 -22
  3. package/package.json +1 -1
  4. package/scripts/lib/default-skill-floor.js +5 -1
  5. package/scripts/lib/domains.js +2 -2
  6. package/scripts/lib/retired-skills.js +4 -0
  7. package/scripts/rsc.js +1 -1
  8. package/skills/design/SKILL.md +4 -3
  9. package/skills/design/evals/cases.yaml +2 -2
  10. package/skills/ftd/SKILL.md +1 -1
  11. package/skills/react/SKILL.md +2 -1
  12. package/skills/ux/SKILL.md +149 -0
  13. package/skills/ux/THIRD_PARTY.md +32 -0
  14. package/skills/ux/evals/cases.yaml +40 -0
  15. package/skills/ux/references/flows.md +124 -0
  16. package/skills/ux/upstream/UPSTREAM.json +59 -0
  17. package/skills/ux/upstream/ux-designer/GUIDE.md +180 -0
  18. package/skills/ux/upstream/ux-designer/LICENSE +21 -0
  19. package/skills/ux/upstream/ux-designer/references/01-core-principles.md +251 -0
  20. package/skills/ux/upstream/ux-designer/references/02-laws-of-ux.md +330 -0
  21. package/skills/ux/upstream/ux-designer/references/03-accessibility.md +411 -0
  22. package/skills/ux/upstream/ux-designer/references/04-visual-design.md +433 -0
  23. package/skills/ux/upstream/ux-designer/references/05-information-architecture.md +432 -0
  24. package/skills/ux/upstream/ux-designer/references/06-interaction-design.md +495 -0
  25. package/skills/ux/upstream/ux-designer/references/07-forms-and-inputs.md +491 -0
  26. package/skills/ux/upstream/ux-designer/references/08-mobile-ux.md +539 -0
  27. package/skills/ux/upstream/ux-designer/references/09-ux-writing.md +493 -0
  28. package/skills/ux/upstream/ux-designer/references/10-user-research.md +533 -0
  29. package/skills/ux/upstream/ux-designer/references/11-design-systems.md +618 -0
  30. package/skills/ux/upstream/ux-designer/references/12a-presence-awareness.md +395 -0
  31. package/skills/ux/upstream/ux-designer/references/12b-conflict-resolution-sync.md +420 -0
  32. package/skills/ux/upstream/ux-designer/references/13a-canvas-navigation.md +388 -0
  33. package/skills/ux/upstream/ux-designer/references/13b-canvas-objects-performance.md +559 -0
  34. package/skills/ux/upstream/ux-designer/references/14-ai-ux-patterns.md +511 -0
  35. package/skills/ux/upstream/ux-designer/references/15-ethical-design.md +419 -0
  36. package/skills/ux/upstream/ux-designer/references/16-onboarding.md +430 -0
  37. package/skills/ux/upstream/ux-designer/references/17-notifications.md +461 -0
  38. package/skills/ux/upstream/ux-designer/references/18-data-visualization.md +453 -0
  39. package/skills/ux/upstream/ux-designer/references/19-search-ux.md +479 -0
  40. package/skills/ux/upstream/ux-designer/references/20-emotional-design.md +382 -0
  41. package/skills/ux/upstream/ux-designer/references/21-data-tables.md +629 -0
  42. package/skills/ux/upstream/ux-designer/references/22-performance-ux.md +626 -0
  43. package/skills/ux/upstream/ux-designer/references/23-internationalization.md +347 -0
  44. package/skills/ux/upstream/ux-designer/references/24-voice-and-multimodal.md +308 -0
  45. package/skills/ux/upstream/ux-designer/references/25a-barcode-camera-scanning.md +342 -0
  46. package/skills/ux/upstream/ux-designer/references/25b-barcode-scanner-workflows.md +412 -0
  47. package/skills/ux/upstream/ux-designer/references/25c-barcode-display.md +277 -0
  48. package/skills/ux/upstream/ux-usability-foundations/GUIDE.md +285 -0
  49. package/skills/ux/upstream/ux-usability-foundations/LICENSE +21 -0
  50. package/skills/ux/upstream/ux-usability-foundations/references/anti-patterns.md +267 -0
  51. package/skills/ux/upstream/ux-usability-foundations/references/checklists.md +130 -0
  52. package/skills/ux/upstream/ux-usability-foundations/references/decision-prompts.md +340 -0
  53. package/skills/ux/upstream/ux-usability-foundations/references/principle-cards.md +449 -0
  54. package/skills/worktrees/SKILL.md +19 -5
  55. package/targets/branch-guard.mjs +59 -4
  56. package/targets/clone-bootstrap.mjs +1 -1
  57. package/targets/session-memory-adapter.mjs +2 -2
  58. package/targets/team-safe-start.mjs +1 -0
  59. package/targets/worktree-reaper.mjs +14 -1
  60. package/skills/ui-engineering/SKILL.md +0 -113
  61. package/skills/ui-engineering/evals/cases.yaml +0 -38
@@ -0,0 +1,479 @@
1
+ # Search UX
2
+
3
+ Search is a critical navigation pattern that goes beyond basic text matching. This reference covers search input design, autocomplete, faceted filtering, results display, and emerging AI-powered search patterns.
4
+
5
+ ---
6
+
7
+ ## Contents
8
+
9
+ - Search Box Design
10
+ - Autocomplete
11
+ - Faceted Search & Filters
12
+ - Search Results
13
+ - Zero Results
14
+ - Advanced Search
15
+ - Voice Search
16
+ - AI-Powered Search
17
+ - Key Metrics
18
+ - Anti-Patterns
19
+ - Sources
20
+
21
+ ---
22
+
23
+ ## Search Box Design
24
+
25
+ ### Placement & Sizing
26
+
27
+ ```
28
+ Top navigation (most common):
29
+ ┌─────────────────────────────────────────────────────┐
30
+ │ Logo [🔍 Search... ] [User]│
31
+ └─────────────────────────────────────────────────────┘
32
+
33
+ Centered hero (landing pages / search-first apps):
34
+ ┌─────────────────────────────────────────────────────┐
35
+ │ │
36
+ │ What are you looking for? │
37
+ │ [🔍 Search products, brands, categories... ] │
38
+ │ │
39
+ └─────────────────────────────────────────────────────┘
40
+ ```
41
+
42
+ **Guidelines:**
43
+ - Minimum width: 300px (desktop), full-width on mobile
44
+ - Visible by default (not hidden behind an icon on desktop)
45
+ - Magnifying glass icon on the left (universal affordance)
46
+ - Clear/reset button (✕) appears when text is entered
47
+ - Search on Enter or with a submit button
48
+ - Consistent location across all pages
49
+
50
+ ### Input Behavior
51
+
52
+ ```html
53
+ <div class="search-container" role="search">
54
+ <label for="search" class="sr-only">Search</label>
55
+ <span class="search-icon" aria-hidden="true">🔍</span>
56
+ <input
57
+ id="search"
58
+ type="search"
59
+ placeholder="Search..."
60
+ autocomplete="off"
61
+ aria-expanded="false"
62
+ aria-controls="search-results"
63
+ aria-autocomplete="list"
64
+ />
65
+ <button class="clear-btn" aria-label="Clear search" hidden>✕</button>
66
+ </div>
67
+ ```
68
+
69
+ - `type="search"` for native clear button on some browsers
70
+ - `role="search"` on the container for screen readers
71
+ - Focus on keyboard shortcut (/ or Ctrl+K is common)
72
+ - Show shortcut hint in the placeholder: "Search... (⌘K)"
73
+ - Debounce input: 200-300ms before triggering search
74
+ - Preserve query on back navigation
75
+
76
+ ### Placeholder Text
77
+
78
+ ```
79
+ ❌ "Search..." (too vague)
80
+ ❌ "Type here to search for products, articles, help topics, and more..." (too long)
81
+
82
+ ✅ "Search products and articles..." (specific, concise)
83
+ ✅ "Search by name, email, or ID..." (tells user what's searchable)
84
+ ```
85
+
86
+ - Indicate what types of content are searchable
87
+ - Keep under 40 characters
88
+ - Don't rely on placeholder alone for labeling (accessibility)
89
+
90
+ ---
91
+
92
+ ## Autocomplete
93
+
94
+ ### Suggestion Types
95
+
96
+ ```
97
+ ┌─────────────────────────────────────────┐
98
+ │ 🔍 "react hook" [✕] │
99
+ ├─────────────────────────────────────────┤
100
+ │ Recent searches │
101
+ │ 🕐 react hooks tutorial │
102
+ │ 🕐 react context api │
103
+ ├─────────────────────────────────────────┤
104
+ │ Suggestions │
105
+ │ 🔍 react hooks best practices │
106
+ │ 🔍 react hook form │
107
+ │ 🔍 react hooks vs classes │
108
+ ├─────────────────────────────────────────┤
109
+ │ Products │
110
+ │ 📦 React Hook Form (library) 4.9★ │
111
+ │ 📦 useHooks (collection) 4.7★ │
112
+ └─────────────────────────────────────────┘
113
+ ```
114
+
115
+ **Suggestion categories:**
116
+ - **Recent searches**: User's own history (with clear history option)
117
+ - **Popular/trending**: Common searches from all users
118
+ - **Predictive**: Completions based on typing so far
119
+ - **Entity matches**: Direct links to specific results (products, people, pages)
120
+ - **Category suggestions**: "Search in Documentation" or "Search in Products"
121
+
122
+ ### Keyboard Navigation
123
+
124
+ ```
125
+ Tab / ↓ Move to suggestions dropdown
126
+ ↑ / ↓ Navigate between suggestions
127
+ Enter Select highlighted suggestion / submit search
128
+ Esc Close dropdown, keep query text
129
+ → Complete highlighted suggestion in input (Google-style)
130
+ ```
131
+
132
+ - Highlight active suggestion visually
133
+ - Arrow keys should not move cursor in input while dropdown is open
134
+ - First suggestion can be auto-highlighted (or not — be consistent)
135
+ - Screen reader announcement of current suggestion
136
+
137
+ ### Highlighting Matches
138
+
139
+ ```
140
+ Searching for "des"
141
+ ┌──────────────────────────┐
142
+ │ 🔍 **des**ign system │ ← Bold matching portion
143
+ │ 🔍 **des**ktop app │
144
+ │ 🔍 ui **des**ign patterns │
145
+ └──────────────────────────┘
146
+ ```
147
+
148
+ - Bold or highlight the matching text portion
149
+ - Works with mid-word and multi-word matches
150
+ - Match highlighting in both suggestion text and description
151
+
152
+ ### Performance
153
+
154
+ - Show suggestions after 1-2 characters minimum
155
+ - Debounce: 150-300ms after last keystroke
156
+ - Show loading indicator if search takes >300ms
157
+ - Cache recent suggestion results
158
+ - Maximum 7-10 suggestions visible (scroll for more)
159
+
160
+ ---
161
+
162
+ ## Faceted Search & Filters
163
+
164
+ ### Filter Panel Layout
165
+
166
+ ```
167
+ Desktop — Side panel: Mobile — Bottom sheet:
168
+ ┌──────────┬──────────────────┐ ┌──────────────────────┐
169
+ │ Filters │ Results │ │ Results (23) │
170
+ │ │ │ │ [🔽 Filter & Sort] │
171
+ │ Category │ │ └──────────────────────┘
172
+ │ ☑ Books │ 23 results │ ↓ (tap)
173
+ │ ☐ Video │ │ ┌──────────────────────┐
174
+ │ ☐ Audio │ ┌──────────────┐ │ │ ── Filters ── │
175
+ │ │ │ Result 1 │ │ │ Category ▾ │
176
+ │ Price │ │ Result 2 │ │ │ Price Range ▾ │
177
+ │ $0-$25 │ │ Result 3 │ │ │ Rating ▾ │
178
+ │ $25-$50 │ └──────────────┘ │ │ │
179
+ │ │ │ │ [Reset] [Apply (23)] │
180
+ └──────────┴──────────────────┘ └──────────────────────┘
181
+ ```
182
+
183
+ ### Active Filter Chips
184
+
185
+ ```
186
+ ┌─────────────────────────────────────────────────────┐
187
+ │ Active: [Category: Books ✕] [Price: $0-$25 ✕] │
188
+ │ [Rating: 4+ stars ✕] [Clear all filters] │
189
+ ├─────────────────────────────────────────────────────┤
190
+ │ 23 results for "design patterns" │
191
+ ```
192
+
193
+ - Show all active filters as removable chips above results
194
+ - Individual remove (✕) on each chip
195
+ - "Clear all filters" link when multiple are active
196
+ - Update result count in real-time as filters change
197
+ - Persist filter selections on back navigation
198
+
199
+ ### Filter UX Patterns
200
+
201
+ | Filter Type | UI Pattern | Best For |
202
+ |-------------|-----------|----------|
203
+ | **Single select** | Radio buttons / dropdown | Category, sort order |
204
+ | **Multi select** | Checkboxes | Tags, sizes, colors |
205
+ | **Range** | Slider or min/max inputs | Price, date range |
206
+ | **Boolean** | Toggle switch | "In stock", "Free shipping" |
207
+ | **Text** | Search within filter | Long category lists |
208
+ | **Color** | Color swatches | Product colors |
209
+ | **Rating** | Star row (clickable) | Minimum rating |
210
+
211
+ ### Filter Counts
212
+
213
+ ```
214
+ Category
215
+ ☐ Books (156)
216
+ ☐ Video (43)
217
+ ☐ Audio (12)
218
+ ☐ Courses (0) ← Gray out or hide zero-count options
219
+ ```
220
+
221
+ - Show result count per filter option
222
+ - Update counts as other filters are applied
223
+ - Gray out (don't hide) zero-count options to prevent layout shift
224
+ - Option: hide zero-count in secondary/collapsed filters
225
+
226
+ ---
227
+
228
+ ## Search Results
229
+
230
+ ### Result Layout
231
+
232
+ ```
233
+ ┌─────────────────────────────────────────────────────┐
234
+ │ About 23 results for "design patterns" (0.12s) │
235
+ │ Showing results from: [All ▾] │
236
+ ├─────────────────────────────────────────────────────┤
237
+ │ │
238
+ │ 📄 Design Patterns: Elements of Reusable Software │
239
+ │ www.example.com/books/design-patterns │
240
+ │ The definitive guide to **design** **patterns** │
241
+ │ in object-oriented programming. Covers 23 │
242
+ │ fundamental **patterns**... │
243
+ │ ⭐⭐⭐⭐⭐ (2,341 reviews) • Books • $45.99 │
244
+ │ │
245
+ │ 📄 UI Design Patterns — Best Practices │
246
+ │ www.example.com/articles/ui-patterns │
247
+ │ A collection of common UI **design** **patterns** │
248
+ │ for web and mobile applications... │
249
+ │ Articles • Free • Updated 2 days ago │
250
+ │ │
251
+ └─────────────────────────────────────────────────────┘
252
+ ```
253
+
254
+ **Result item components:**
255
+ - Title (linked, keyword-highlighted)
256
+ - URL/breadcrumb path
257
+ - Snippet with highlighted matching terms
258
+ - Metadata (rating, category, date, price)
259
+ - Thumbnail image (when available)
260
+
261
+ ### Result Sorting
262
+
263
+ ```
264
+ Sort by: [Relevance ▾]
265
+ • Relevance (default)
266
+ • Newest first
267
+ • Oldest first
268
+ • Price: Low to High
269
+ • Price: High to Low
270
+ • Rating: High to Low
271
+ • Most Popular
272
+ ```
273
+
274
+ - Default to relevance for text searches
275
+ - Default to newest for browsing/feed contexts
276
+ - Show current sort prominently
277
+ - Changing sort should not clear filters
278
+
279
+ ### Result Grouping
280
+
281
+ ```
282
+ All (23) | Articles (12) | Products (8) | People (3)
283
+
284
+ ─── Articles ───────────────────
285
+ 📄 UI Design Patterns...
286
+ 📄 Design Thinking...
287
+
288
+ ─── Products ──────────────────
289
+ 📦 Design Patterns Book...
290
+ 📦 Pattern Library Tool...
291
+ ```
292
+
293
+ - Group by content type when searching across multiple types
294
+ - Tab navigation between groups
295
+ - Show count per group
296
+ - "All" tab shows mixed results with type indicators
297
+
298
+ ---
299
+
300
+ ## Zero Results
301
+
302
+ ### Helpful Messaging
303
+
304
+ ```
305
+ ┌─────────────────────────────────────────┐
306
+ │ No results for "dezign paterns" │
307
+ │ │
308
+ │ Did you mean: design patterns? │
309
+ │ │
310
+ │ Suggestions: │
311
+ │ • Check your spelling │
312
+ │ • Try more general keywords │
313
+ │ • Try fewer keywords │
314
+ │ │
315
+ │ Popular searches: │
316
+ │ [UX design] [Typography] [Color theory]│
317
+ │ │
318
+ │ Or browse categories: │
319
+ │ [Books] [Articles] [Courses] │
320
+ └─────────────────────────────────────────┘
321
+ ```
322
+
323
+ **Zero results checklist:**
324
+ - [ ] Spelling suggestion ("Did you mean...?")
325
+ - [ ] Actionable tips (fewer keywords, check spelling)
326
+ - [ ] Alternative queries or popular searches
327
+ - [ ] Category browsing links
328
+ - [ ] Contact support or request option
329
+ - [ ] Never show a completely blank page
330
+
331
+ ---
332
+
333
+ ## Advanced Search
334
+
335
+ ### Query Syntax
336
+
337
+ ```
338
+ Common query operators (if supported, document them):
339
+ "exact phrase" — Match exact phrase
340
+ term1 AND term2 — Both terms required
341
+ term1 OR term2 — Either term
342
+ -excluded — Exclude term
343
+ field:value — Search specific field
344
+ type:article — Filter by content type
345
+ ```
346
+
347
+ - Don't require advanced syntax — it should enhance, not replace basic search
348
+ - Show syntax guide as a help tooltip or link
349
+ - Parse common natural language queries intelligently
350
+
351
+ ### Saved Searches
352
+
353
+ ```
354
+ ┌─ Saved Searches ────────────────────────┐
355
+ │ 🔖 "react hooks" in:docs │
356
+ │ 🔖 "bugs" type:issue status:open │
357
+ │ 🔖 author:me modified:last-week │
358
+ │ │
359
+ │ [+ Save current search] │
360
+ └──────────────────────────────────────────┘
361
+ ```
362
+
363
+ - Allow saving complex filter + query combinations
364
+ - Accessible from search interface
365
+ - Named searches with optional notifications (alert on new results)
366
+ - Shareable search links
367
+
368
+ ---
369
+
370
+ ## Voice Search
371
+
372
+ ### Microphone Button
373
+
374
+ ```
375
+ ┌─────────────────────────────────────────┐
376
+ │ 🔍 Search... [🎤] │
377
+ └─────────────────────────────────────────┘
378
+ ↓ (tap microphone)
379
+ ┌─────────────────────────────────────────┐
380
+ │ 🎤 Listening... │
381
+ │ 🔴 ∿∿∿∿∿∿∿∿∿∿ │
382
+ │ [Cancel] │
383
+ └─────────────────────────────────────────┘
384
+ ↓ (speech detected)
385
+ ┌─────────────────────────────────────────┐
386
+ │ 🔍 "best design patterns for" [✕] │
387
+ │ Transcribing... │
388
+ └─────────────────────────────────────────┘
389
+ ```
390
+
391
+ - Show waveform or animation during listening
392
+ - Display transcription in real-time
393
+ - Allow editing before submitting
394
+ - "Cancel" to stop without searching
395
+ - Handle no-speech-detected timeout gracefully
396
+
397
+ ---
398
+
399
+ ## AI-Powered Search
400
+
401
+ ### Natural Language Queries
402
+
403
+ ```
404
+ Traditional search: "return policy days limit"
405
+ AI-powered search: "How many days do I have to return an item?"
406
+ ↓
407
+ ┌─────────────────────────────────────────┐
408
+ │ 📍 Quick Answer │
409
+ │ You have 30 days from purchase to │
410
+ │ return most items for a full refund. │
411
+ │ Exceptions apply for electronics (15 │
412
+ │ days) and final sale items. │
413
+ │ │
414
+ │ Source: Return Policy FAQ │
415
+ │ [View full policy] │
416
+ ├─────────────────────────────────────────┤
417
+ │ Related results: │
418
+ │ 📄 Return Policy... │
419
+ │ 📄 How to Start a Return... │
420
+ │ 📄 Refund Processing Times... │
421
+ └─────────────────────────────────────────┘
422
+ ```
423
+
424
+ ### AI Search Patterns
425
+
426
+ - **Direct answer**: Synthesized answer at top, traditional results below
427
+ - **Source attribution**: Every AI answer links to source documents
428
+ - **Confidence**: Only show direct answer when confidence is high
429
+ - **Follow-up**: "Ask a follow-up question" for conversational refinement
430
+ - **Fallback**: If AI can't answer, show traditional search results gracefully
431
+ - **Transparency**: "AI-generated answer" label clearly visible
432
+
433
+ ### Semantic Search UX
434
+
435
+ - Understand synonyms and related concepts automatically
436
+ - "Showing results for X" when query is reinterpreted
437
+ - Allow explicit override: "Search instead for [exact query]"
438
+ - Explain why results are relevant when not keyword-obvious
439
+
440
+ ---
441
+
442
+ ## Key Metrics
443
+
444
+ | Metric | Target | Context |
445
+ |--------|--------|---------|
446
+ | Search success rate | > 70% | Users who find what they need |
447
+ | Zero results rate | < 10% | Queries returning nothing |
448
+ | Click-through rate | > 40% | Clicks on search results |
449
+ | Time to first click | < 10s | Speed of finding relevant result |
450
+ | Search exit rate | < 30% | Users who leave after searching |
451
+ | Refinement rate | < 30% | Users who modify their query |
452
+ | Autocomplete usage | > 30% | Suggestions selected |
453
+ | Queries per session | < 2 | Finding it on first try |
454
+
455
+ ---
456
+
457
+ ## Anti-Patterns
458
+
459
+ 1. **Hidden search** — Search behind an icon on content-heavy sites
460
+ 2. **No autocomplete** — Missing the most basic search enhancement
461
+ 3. **Search that ignores typos** — No fuzzy matching or spell correction
462
+ 4. **Results with no snippets** — Just titles with no context
463
+ 5. **No empty state guidance** — "No results" with no help
464
+ 6. **Filter clearing on new search** — Losing filter context on new query
465
+ 7. **Slow autocomplete** — Suggestions that appear after the user finishes typing
466
+ 8. **Non-persistent queries** — Search term cleared on back navigation
467
+ 9. **Search that only matches titles** — Missing full-text search
468
+ 10. **No result count** — Users can't gauge if their query is too broad or narrow
469
+
470
+ ---
471
+
472
+ ## Sources
473
+
474
+ - [Nielsen Norman Group: Search UX](https://www.nngroup.com/topic/search/) — Usability research
475
+ - [Baymard Institute: Search UX](https://baymard.com/blog/categories/search) — E-commerce search patterns
476
+ - [Algolia: Search UX Best Practices](https://www.algolia.com/blog/) — Search implementation
477
+ - [Google Search Central: Search Guidelines](https://developers.google.com/search) — Search quality
478
+ - [WAI-ARIA: Combobox Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/) — Accessible autocomplete
479
+ - [Elasticsearch: Search UI](https://www.elastic.co/search-labs) — Search technology patterns