Two ranking bugs were silently sending mobile food/wellness/fintech briefs to a desktop landing-page palette: 1. Substring tag inference. /red|red/ matched 'Featured', /health/ matched 'Healthy' (a category in the food brief), so a food prompt picked up a spurious 'wellness' tag and a desktop wellness guide jumped above the mobile food guide via tag-overlap math. Added \b word boundaries to every English keyword in inferTagsFromPrompt; CJK rules unchanged because \b doesn't apply. 2. Industry vs style tag weighting + platform mismatch penalty. Each matched tag was worth +10 regardless of meaning, and a platform mismatch was a tiny -3 vs +0. So a desktop ecommerce-modern guide beating mobile warm-food on the same brief was just `clean+modern+ rounded` overlapping more than `warm-tones+friendly+rounded` while the platform penalty was negligible. Now: industry tags (warm-tones / wellness / fintech / developer / monospace) score 30, generic style tags 10, platform mismatch -30. Empirically pushes warm-food-mobile-light to the top of the food brief shortlist (verified with the actual expanded prompt that the user's MiniMax-M2.7 run logged). Same fix applies to every brief that was getting "wrong palette" results because the planner snippets only contain the top-4 ranked guides — if the right answer falls past 4, the planner literally never sees it and the model invents its own (default-blue) palette. Also: jsonl-format-simplified.md (basic-tier sub-agent prompt) now mirrors jsonl-format.md's design-system-tokens teaching — basic-tier models like MiniMax-M2.7 currently emit 0% typography refs because the simplified prompt doesn't mention $type-* refs at all. The expanded simplified prompt is 3981 chars, well under the bumped budget=1700 (=6800 char cap). CRITICAL contract moved to top-of-file as the same defense-in-depth pattern applied earlier to jsonl-format.md. |
||
|---|---|---|
| .. | ||
| public | ||
| server | ||
| src | ||
| CLAUDE.md | ||
| components.json | ||
| dev.ts | ||
| package.json | ||
| tsconfig.json | ||
| vite.config.ts | ||