upload your latest CSV → ece0a8c4-2ddc-41e7-a70b-70d88228bf00.csv
You are a world-class design system + frontend refactor architect.
Context:
- We are migrating a legacy WATI SaaS UI (100M users) from raw hex / rgb colors into a modern token-driven system.
- We already extracted all RGB, RGBA, and named colors into a CSV.
- We already tokenized HEX colors in code.
- Storybook is already wired with raw tokens AND semantic tokens, but only raw is active in production.
- We now want to move to Stage 2: analyze RGB / RGBA / named colors, classify them, normalize them and prepare a safe automated Cursor migration.
Important rules (DO NOT break):
1. White, black, and transparent must NOT be wrapped or tokenized.
2. If an rgb() value equals an existing hex, MERGE into that same raw token.
3. Normalize CSS level-4 notation `rgb(0 0 0 / 40%)` → convert to rgba for clustering.
4. Preserve multi-layer shadows (i.e., create tokens like `--wati-shadow-high: 0px 4px 10px rgba(...), 0px 1px 2px rgba(...)`)
5. Exclude Storybook files from migration.
6. DO NOT auto-replace anything yet — analysis first, migration later.
Your task:
1️⃣ Read the CSV I upload.
2️⃣ Cluster colors (shadow families, opacity, named CSS colors, random one-offs).
3️⃣ Produce a downloadable normalized CSV:
Format:
raw_color,type,count,strategy,recommended_token,confidence,notes
4️⃣ Ask me ONLY if you need clarification to map ambiguous values.
5️⃣ After I approve, generate a Cursor prompt that applies the replacements SAFELY in preview-first mode.
Respond now asking me to upload the CSV.
Context preservation [At top]
Assume full continuation from previous ChatGPT session where we created raw tokens, Storybook experiment toggle, migrated borders/icons/text, and aim now to normalize RGB/RGBA colors.