文敏華 6a6167691a Rename motion domain to gsap to avoid collision with PR #296
PR #296 (feat/emil-motion-principles) independently registers a "motion"
domain key in CSV_CONFIG/detect_domain for motion-principles.csv (37
design-principle rows). Both PRs adding the same dict key would cause
one to silently overwrite the other's domain registration if merged
independently, per the automated review on this PR.

The two domains are complementary, not duplicate (design principles vs.
ready-to-use GSAP code snippets), so this renames this PR's domain from
"motion" to "gsap" - a more precise name given every row is GSAP-specific
implementation code. The --motion CLI dial and its "Subtle/Standard/
Complex" tiers are unaffected (unrelated to the domain key; only the
`--domain gsap` search endpoint and its internal lookup changed). No
regressions: --design-system output with no dials set remains
byte-identical to before this feature.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-02 23:36:44 +08:00

4.5 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

UI UX Pro Max is an AI-powered design intelligence toolkit providing searchable databases of UI styles, color palettes, font pairings, chart types, and UX guidelines. It works as a skill/workflow for AI coding assistants (Claude Code, Windsurf, Cursor, etc.).

Search Command

python3 src/ui-ux-pro-max/scripts/search.py "<query>" --domain <domain> [-n <max_results>]

Domain search:

  • product - Product type recommendations (SaaS, e-commerce, portfolio)
  • style - UI styles (glassmorphism, minimalism, brutalism) + AI prompts and CSS keywords
  • typography - Font pairings with Google Fonts imports
  • color - Color palettes by product type
  • landing - Page structure and CTA strategies
  • chart - Chart types and library recommendations
  • ux - Best practices and anti-patterns
  • gsap - GSAP animation skeletons by intensity tier (hover, scroll reveal, stagger, page transition, parallax, loading)

Design dials (optional, only with --design-system):

python3 src/ui-ux-pro-max/scripts/search.py "<query>" --design-system --variance <1-10> --motion <1-10> --density <1-10>

--variance biases style selection (centered/minimal → bold/asymmetric), --motion attaches a matching GSAP snippet from motion.csv, --density overrides the spacing-scale tokens (spacious → dense/dashboard). Any dial left unset behaves exactly as before.

Stack search:

python3 src/ui-ux-pro-max/scripts/search.py "<query>" --stack <stack>

Available stacks: html-tailwind (default), react, nextjs, astro, vue, nuxtjs, nuxt-ui, svelte, swiftui, react-native, flutter, shadcn, jetpack-compose, angular, laravel, javafx

Architecture

src/ui-ux-pro-max/                # Source of Truth
├── data/                         # Canonical CSV databases
│   ├── products.csv, styles.csv, colors.csv, typography.csv, ...
│   └── stacks/                   # Stack-specific guidelines
├── scripts/
│   ├── search.py                 # CLI entry point
│   ├── core.py                   # BM25 + regex hybrid search engine
│   └── design_system.py          # Design system generation
└── templates/
    ├── base/                     # Base templates (skill-content.md, quick-reference.md)
    └── platforms/                # Platform configs (claude.json, cursor.json, ...)

cli/                              # CLI installer (ui-ux-pro-max-cli on npm)
├── src/
│   ├── commands/init.ts          # Install command with template generation
│   └── utils/template.ts         # Template rendering engine
└── assets/                       # Bundled assets (~564KB)
    ├── data/                     # Copy of src/ui-ux-pro-max/data/
    ├── scripts/                  # Copy of src/ui-ux-pro-max/scripts/
    └── templates/                # Copy of src/ui-ux-pro-max/templates/

.claude/skills/ui-ux-pro-max/     # Claude Code skill (symlinks to src/)
.factory/skills/ui-ux-pro-max/   # Droid (Factory) skill (symlinks to src/)
.shared/ui-ux-pro-max/            # Symlink to src/ui-ux-pro-max/
.claude-plugin/                   # Claude Marketplace publishing

The search engine uses BM25 ranking combined with regex matching. Domain auto-detection is available when --domain is omitted.

Sync Rules

Source of Truth: src/ui-ux-pro-max/

When modifying files:

  1. Data & Scripts - Edit in src/ui-ux-pro-max/:

    • data/*.csv and data/stacks/*.csv
    • scripts/*.py
    • Changes automatically available via symlinks in .claude/, .factory/, .shared/
  2. Templates - Edit in src/ui-ux-pro-max/templates/:

    • base/skill-content.md - Common SKILL.md content
    • base/quick-reference.md - Quick reference section (Claude only)
    • platforms/*.json - Platform-specific configs
  3. CLI Assets - Run sync before publishing:

    cd cli
    npm run sync:assets
    npm run check:assets
    
  4. Reference Folders - No manual sync needed. The CLI generates these from templates during uipro init.

Prerequisites

Python 3.x (no external dependencies required)

Note: On Windows, use python instead of python3 to run the scripts.

Git Workflow

Never push directly to main. Always:

  1. Create a new branch: git checkout -b feat/... or fix/...
  2. Commit changes
  3. Push branch: git push -u origin <branch>
  4. Create PR: gh pr create