Session 42: Player Intelligence System — archetypes, stat strips, player profile, enhanced cards (2011 tests)
Built from the Claude Design "VYNDR Player Intelligence" bundle (10 sections). - Archetypes: src/services/archetypeService.js — 41 archetypes (15 NBA / 5 WNBA-unique / 15 MLB / 6 soccer), classify -> primary+secondary+blend. Frontend visual map web/src/lib/archetypes.js (colors verified == backend). ArchetypeBadge (full/ghost/tint + glyphs) + ArchetypeBlend (DNA bar). - StatStrip (compact/expanded): player name once, horizontal mono stats, inline GradeBadge props, onPlayerClick -> profile. - Stats API: extended src/routes/stats.js with /player/:name, /leaders, /game/:id (rate-limited). Aggregation in playerIntelService.js (sanitizes name param; grades cache; graceful on cold cache). Next proxies added. - Player Profile /player/[name]: all 9 design sections, graceful empty states. - Enhanced GameCard (MLB pitchers + player-grouped StatStrips) + GradeResultCard (archetype strip + stat context + VYNDR intelligence, optional/self-hiding via gradeAdapter.buildIntelFields). Player-name links wired everywhere. - Settings page replaces the S41 redirect (account/subscription/notifications/ display/responsible-play/danger-zone with DELETE-gated delete). LINKS to the real /settings/security MFA page — does not replace it. + BookChip. - Bonus: Stats Explorer /explore (real /api/stats/leaders leaderboard); added Explore + Settings to Nav MORE. Deferred (need data pipelines, Session 43): Team Hub, Offseason Intel, Slate redesign, Stats Explorer sub-panels. Backend 1940 -> 2011 tests (+71), 157 suites. Web build clean (exit 0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+58
-3
@@ -1,11 +1,66 @@
|
||||
# VYNDR — Build State
|
||||
|
||||
## Last Updated
|
||||
2026-06-17
|
||||
2026-06-18
|
||||
|
||||
## Current Phase
|
||||
SHIP BUILD v41.0 — P0 audit fixes (MLB stat gate, broken routes, profile tier,
|
||||
self-hosted fonts). Design conversion (33–39) remains COMPLETE.
|
||||
SHIP BUILD v42.0 — Player Intelligence System (archetypes, stat strips, player
|
||||
profile, enhanced cards, settings, stats explorer). Built from the Claude Design
|
||||
"VYNDR Player Intelligence" bundle.
|
||||
|
||||
## Session 42 (2026-06-18) — SHIPPED ✅ PLAYER INTELLIGENCE SYSTEM
|
||||
|
||||
Built the full Player Intelligence design bundle (10 sections; the 6 spec items
|
||||
+ extras). Backend 1940 → **2011 tests** (+71), 157 suites. Web build clean
|
||||
(exit 0). Both gates green.
|
||||
|
||||
### What shipped (by design section)
|
||||
1. **Archetype system** — `src/services/archetypeService.js`: 41 archetypes
|
||||
(15 NBA + 5 WNBA-unique + 15 MLB + 6 soccer), each with tag/color/glyph/
|
||||
description/propDNA/education. `classify(sport, stats)` returns PRIMARY +
|
||||
optional SECONDARY + a normalized `blend`. Visual map mirrored in
|
||||
`web/src/lib/archetypes.js` (CommonJS, colors verified == backend).
|
||||
Components: `ArchetypeBadge` (full/ghost/tint + glyphs), `ArchetypeBlend`
|
||||
(the production-DNA bar).
|
||||
2. **StatStrip** — `components/vyndr/StatStrip.tsx`, compact + expanded. The
|
||||
player name appears ONCE; stats flow horizontally (JetBrains Mono); props
|
||||
inline with GradeBadge; `onPlayerClick` → profile.
|
||||
3. **Stats API + Player Profile** — extended `src/routes/stats.js` with
|
||||
`/player/:name`, `/leaders`, `/game/:id` (rate-limited 60/min). Aggregation
|
||||
in `src/services/playerIntelService.js` (sanitizes the name param; reads
|
||||
grades:{sport} cache for props; graceful on cold caches). Page:
|
||||
`app/player/[name]/page.tsx` — all 9 design sections (hero+DNA blend, injury,
|
||||
prop DNA, VYNDR intelligence, active props, season, last 10, splits, grade
|
||||
history). Next proxies under `app/api/stats/player|leaders`.
|
||||
4. **Enhanced game cards + Grade Result** — `vyndr/GameCard` gained optional
|
||||
MLB starting pitchers + player-grouped `playerStrips` (StatStrip, name once);
|
||||
`GradeResultCard` gained archetype strip + STAT CONTEXT + VYNDR INTELLIGENCE
|
||||
(all optional/self-hiding; populated by `gradeAdapter.buildIntelFields`).
|
||||
Header player name now links to the profile.
|
||||
5. **Settings page** — `app/settings/page.tsx` REPLACES the S41 redirect:
|
||||
account (tier from useAuth), subscription, notifications, display (→ Prefs
|
||||
modal via `window.__prefs`), responsible play, danger zone (delete button
|
||||
gated on typing DELETE exactly). LINKS to `/settings/security` — does NOT
|
||||
replace the real MFA page. + `BookChip` component (`lib/books.js`).
|
||||
6. **Stats Explorer (bonus, design §07)** — `app/explore/page.tsx`: tonight's
|
||||
league leaderboard from the real `/api/stats/leaders`, sport tabs, search,
|
||||
rows → player profile. Added to the Nav MORE menu (Explore + Settings→/settings).
|
||||
|
||||
### Player-name links wired
|
||||
Game cards, Grade Result header, Stats Explorer rows, profile active props — all
|
||||
route to `/player/:name?sport=` via `lib/playerHref.js`.
|
||||
|
||||
### Deferred (design sections present but NOT built this session)
|
||||
Team Hub (§09), Offseason Intel (§08), and the Slate redesign (§10), plus the
|
||||
Stats Explorer sub-panels (hit-rate trends, head-to-head, market-vs-VYNDR,
|
||||
matchup ratings). These need historical / projection / depth-chart data
|
||||
pipelines that don't exist yet — they belong with the Session-43 snapshot
|
||||
pipeline. The archetype + leaders + profile foundations they'd build on are now
|
||||
in place.
|
||||
|
||||
## Session 41 (2026-06-17) — SHIPPED ✅ P0 AUDIT FIXES
|
||||
|
||||
The Chrome audit's P0 list only. No features. Backend 1907 → **1940 tests**
|
||||
|
||||
## Session 41 (2026-06-17) — SHIPPED ✅ P0 AUDIT FIXES
|
||||
|
||||
|
||||
Reference in New Issue
Block a user