Skip to content

fix(engine): R8 preferredColors fallback + score spreading#62

Open
lucavandee wants to merge 1 commit into
mainfrom
claude/eager-gould-a9361d
Open

fix(engine): R8 preferredColors fallback + score spreading#62
lucavandee wants to merge 1 commit into
mainfrom
claude/eager-gould-a9361d

Conversation

@lucavandee

Copy link
Copy Markdown
Owner

Summary

  • buildColorPreference now derives a non-empty preferredColors palette from multiple sources (colorAnalysis → neutrals → temperature → lightness), so donker/koel profiles like Sem's avant-garde no longer end up with an empty palette.
  • Match percentage formula widened from 30 + raw * 65 to 20 + raw * 75 (clamped 20-95) for more spread between weak and strong outfits.
  • coherence.evaluateCoherence now exposes primaryArchetypeFit; coherenceMultiplier drops to 0.6 when fit < 0.40 (and 0.85 when < 0.55), so off-archetype outfits (e.g. preppy for avant-garde) fall further behind the best matches.
  • Brand scoring: introduced NEGATIVE_BRANDS (shein/temu/wish/romwe/zaful) at 0.15; non-preferred brand drops from 0.7 → 0.45 when the user has ≥3 preferred brands.

Test plan

  • npx vitest run — 55 passing, 1 pre-existing failure in productClassifier.test.ts (also fails on main, unrelated)
  • Manual smoke: generate outfits for an avant-garde donker/koel profile — preferredColors should be populated, and off-archetype outfits should score noticeably lower.

🤖 Generated with Claude Code

- buildProfile: derivePreferredColors fills palette from colorAnalysis,
  neutrals, temperature, lightness so donker/koel profiles never end up
  with an empty palette.
- engine: match formula widened from 30+raw*65 to 20+raw*75 for more
  spread between weak and strong outfits.
- coherence: evaluateCoherence now exposes primaryArchetypeFit;
  multiplier drops to 0.6 when fit < 0.40, 0.85 when < 0.55.
- brand scoring: NEGATIVE_BRANDS (shein/temu/wish/romwe/zaful) score
  0.15; non-preferred brands score 0.45 when user has >=3 preferred
  brands, otherwise 0.7.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@netlify

netlify Bot commented Apr 18, 2026

Copy link
Copy Markdown

Deploy Preview for fitfiai ready!

Name Link
🔨 Latest commit bd39003
🔍 Latest deploy log https://app.netlify.com/projects/fitfiai/deploys/69e3965eab58220008ade33b
😎 Deploy Preview https://deploy-preview-62--fitfiai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@supabase

supabase Bot commented Apr 18, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project wojexzgjyhijuxzperhq because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant