feat(prospecting): show per-category score breakdown on prospect detail

- Restructure score_breakdown from flat dict to grouped by category:
  {technical_health: {flag: pts}, modernity: {...}, ...}
- Each category row shows score/max with progress bar + per-flag detail
  (e.g. Technical Health 15/40 → "very slow: 15 pts")
- Color-coded: green for positive flags, orange for issues
- "No issues detected" shown for clean categories

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-30 21:35:06 +02:00
parent b306a5e8f4
commit 50d50fcbd0
4 changed files with 73 additions and 60 deletions

View File

@@ -18,7 +18,7 @@ class ProspectScoreResponse(BaseModel):
business_value_score: int
engagement_score: int
reason_flags: list[str] = []
score_breakdown: dict[str, int] | None = None
score_breakdown: dict[str, dict[str, int]] | None = None
lead_tier: str | None = None
notes: str | None = None
created_at: datetime