Activate when changing shared or sport-specific sports data contracts, including API routes, controllers, resources, frontend game-page consumers, prediction payloads, team metrics, season or season_type handling, scheduler-driven sports pipelines, or sports-domain semantics. Use for backend/frontend changes that can break shared multi-sport behavior even when the code change looks local.
Use this skill before making changes to shared sports abstractions or any sport-specific feature that flows through those abstractions.
Start with the smallest relevant source of truth:
docs/codebase-reference.md for API contracts, shared abstractions, frontend consumers, and sport-domain caveatsdocs/calculations-reference.md for metrics, Elo, prediction, and rating logicSCHEDULER_REFERENCE.md for scheduled pipelines and operational expectationsroutes/api/sports.php and routes/console.php when the docs and code need to be reconciledIf a doc and code disagree, trust the code.
Use this skill when work touches any of these areas:
app/Http/Controllers/Api/{Sport} or app/Http/Controllers/Api/Sportsapp/Http/Resources/{Sport} or app/Http/Resources/Sportsroutes/api/sports.php or sport API route wiringresources/js/composables or game-page/prediction-page data loadingseason_type, or analytics query semanticsIdentify the contract surface. Determine whether the change affects API shape, resource fields, filtering behavior, calculations, scheduler behavior, or frontend expectations.
Identify shared abstractions first. Check whether the change passes through shared layers before editing sport-specific code. Priority locations:
routes/api/sports.phpapp/Http/Controllers/Api/Sportsapp/Http/Resources/Sportsapp/Actions/Sportsresources/js/composables/useDetailedGameData.tsCheck sport-specific exceptions. Do not assume every sport behaves the same. Common examples:
games/{game}/prediction can return either a single object or a one-item collectionTrace frontend consumers.
For any backend contract change, find the actual callers in resources/js/composables and relevant page components.
Confirm whether they expect:
Check calculations and pipeline assumptions.
If the change affects predictions, Elo, team metrics, betting value, or live updates, review docs/calculations-reference.md and the concrete action/service classes before changing formulas or inputs.
If the change affects sync or scheduled generation behavior, review SCHEDULER_REFERENCE.md and routes/console.php.
Verify with focused tests. Prefer the smallest tests that prove the contract still holds. Typical targets:
tests/Feature/Api/Sportstests/Feature/{Sport}Before finalizing, explicitly verify:
season_type filters still match the intended semanticsroutes/console.phproutes/console.phpWhen reporting findings or implementation notes, summarize impact in terms of:
Keep the review concrete and file-based rather than abstract.