← All findingssource · memory/project_wnba_sport_agents_playbook.md
WNBA sport-agents adapter is THE last gap between data-hydrator's
WNBA snapshot (verified live with FIX 1-5 firing on tonight's
GSV@NYL) and the automated blog_generator LLM pipeline. Without
it, python -m core.blog_generator --league wnba --date X fails at
adapter registration.
Why this isn't a quick mirror of NBA
NBAAdapter is ~539 lines + 429-line prompts + 37-line archetypes. Surface-level "copy and replace NBA → WNBA" misses three real dependencies on shared infrastructure:
Touchpoint 1: core/hydrator_client.py is NBA-hardcoded
Today (verified 2026-05-21):
HydratorClient.get_snapshot(game_id)builds URL as/api/v1/snapshot/{game_id}— no league prefix.HydratorClient.get_snapshots_for_date(date)same shape.
For WNBA, the URL must be /api/v1/wnba/snapshot/{game_id} etc.
(data-hydrator's multi-sport routes per project_sds_is_the_data_layer).
Two options:
- (a) Parameterize HydratorClient on optional
leaguearg, default None=NBA-historical-path. Touches NBA's currently-working pipeline. - (b) WNBAAdapter owns its own snapshot fetch path. Duplicates ~30 lines of HTTP/cache logic.
(a) is cleaner; (b) is safer. Either is bounded but needs care.
Touchpoint 2: extract_team_bundle / extract_player_bundles assume NBA snapshot shape
In core/hydrator_client.py:88-, both extractors read:
snapshot.get("stats")— typed for NBA, in raw_sections for WNBAsnapshot.get("game")— typed for NBA, in raw_sections.game.game (envelope!) for WNBAsnapshot.get("injuries")— typed for both (post my data-hydrator work)snapshot.get("lineups")— typed for both (post f114e9b/87befcc)snapshot.get("players", {}).get("players", {})— typed for both (post f114e9b/87befcc)
The first two will silently return None/empty for WNBA, producing empty bundles. Fix options:
- (a) Update the extractors to fall back to
raw_sections.game.gamefor WNBA. Touches NBA path (but the fallback is harmless if first lookup succeeds). - (b) Modify
assembleMultiSportin data-hydrator to populate typedsnap.Gamefor WNBA (parsed from raw_sections.game.game). Cleaner architecturally; requires another data-hydrator deploy.
(b) parallels what hydrateMultiSportPlayerBundles did for Players + Lineups — the same pattern applied to Game would close this gap once and for all.
Touchpoint 3: WNBAAdapter implementation (~150 lines)
Mirror NBAAdapter, swap:
__init__: pass league="wnba" to HydratorClient (after touchpoint 1)get_config(): WNBASportConfig(league_key="wnba", display_name="WNBA", odds_api_sport_key="[REDACTED]", season_months=[5,6,7,8,9,10], max_players_per_game=10, prop_types same as NBA — basketball)get_team_ids(): WNBA team_ids — sportlib has 15 WNBA teams atwnba.teamswith team_id field. Build the abbrev→id map from sportlib's registry instead of hardcoding._get_espn_team_id(): WNBA ESPN team IDs — sportlib likely doesn't have these. Either hardcode (look up from ESPN) or skip the ESPN fallback for WNBA (the snapshot covers it).get_odds_markets(): sportlibwnba.odds_api_marketshas 5 market keys (verified 2026-05-21).get_prop_stat_map(): identical to NBA (basketball stats).calc_combo_prop(): identical to NBA (pra/pr/pa/ra).build_game_slug(): identical to NBA.fetch_games_for_date(),fetch_team_bundle(),fetch_player_bundle(): identical pattern to NBA, just use WNBA team_ids map.
Reuse NBA's prompts (get_agent_prompts() returns NBA PROMPTS)
since basketball discipline is identical. The LOCKDOWN PRE-CHECK
already added (sport-agents fcd4e2e) works for WNBA the moment
WNBAAdapter forwards prop_diagnostic in summarize_player_data
— and since we'd inherit that method from NBAAdapter, it carries
through automatically.
Mirror NBA's archetypes.json (same positions).
Sequenced execution
- Pick HydratorClient strategy: (a) parameterize or (b) duplicate
- Pick extract_*_bundle strategy: (a) fallback or (b) typed-snap.Game in data-hydrator
- Build WNBAAdapter subclass / direct
- Build wnba/prompts.py (re-export NBA PROMPTS)
- Build wnba/archetypes.json (copy NBA)
- Verify
python -m core.blog_generator --league wnba --dry-runparses + runs without erroring (full pipeline smoke) - Backtest one WNBA final-game date to verify the LLM prop_picks output is sensible (FIX 1-5 gates fire correctly)
Estimated: 2-4 focused hours. NOT a 1am ship.
What's already done that makes this easier
- WNBA snapshot reachable end-to-end (commits b2dba69, f114e9b, 87befcc)
- WNBA snap.Players + snap.Lineups + snap.Injuries all typed
- LOCKDOWN PRE-CHECK added to player_agent prompt (fcd4e2e), works for both NBA and WNBA the moment a WNBA adapter forwards prop_diagnostic
- Health endpoint covers WNBA (4ba5d34) so a regression in the WNBA pipeline will fire before picks are attempted
See also: project_wnba_lockdown_live (the data layer this builds on), project_sds_is_the_data_layer (architectural anchor), feedback_verify_before_extend (why scope-checking matters).