Commit Graph

4 Commits

Author SHA1 Message Date
Thanh Nguyen 7f22b57363
fix: add UTF-8 encoding wrapper for Windows compatibility (#61)
Fixes UnicodeEncodeError when running search.py on Windows systems
with cp1252 encoding (default Windows terminal encoding).

The CSV data files contain Unicode symbols (✓, , ⚠, etc.) that
cannot be encoded in cp1252, causing the script to crash.

Closes #22
2026-01-12 23:16:23 +07:00
Viet Tran c5ccff1a17
refactor: simplify search engine and remove redundant code (#2)
## Changes

### Code Simplification (-30% code size)
- Refactored core.py from 338 to 236 lines
- Removed regex_search() - BM25 alone provides sufficient accuracy
- Unified search logic into single _search_csv() function
- Eliminated duplicated merge logic (4 occurrences → 0)
- Simplified STACK_CONFIG to only store file paths

### Removed Redundant Data
- Deleted quick-ref.csv (duplicate of styles.csv with less info)
- Removed "quick" domain from search options

### Configuration
- Reduced default MAX_RESULTS from 5 to 3 for token optimization

## Testing Results (3 prompts, 4 domains each)
- Search quality: Unchanged (same top results)
- Token consumption: ~1,555 tokens avg (unchanged)
- Execution time: 45ms avg (unchanged)
- Code maintainability: Improved

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-01 10:24:53 +07:00
Viet Tran 98b57e270c
feat: reduce default max search results from 5 to 3 (#1)
- Optimizes token usage by ~28% while maintaining result quality
- BM25 ranking ensures best matches are in top results
- Updated core.py MAX_RESULTS constant
- Synced changes to .shared/ui-ux-pro-max/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-30 23:26:45 +07:00
Viet Tran ce4372c624 feat: introduce UI/UX Pro Max skill with comprehensive guidelines, data, and search functionality across various tech stacks. 2025-11-30 18:46:26 +07:00