chore: remove scraper, add docs, add marketing-videos gitignore
- Remove Scripts/ directory (scraper no longer needed) - Add themed background documentation to CLAUDE.md - Add .gitignore for marketing-videos to prevent node_modules tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
import Foundation
|
||||
|
||||
/// Protocol that all scenario planners must implement.
|
||||
/// Each scenario (A, B, C, D) has its own isolated implementation.
|
||||
/// Each scenario (A, B, C, D, E) has its own isolated implementation.
|
||||
///
|
||||
/// - Invariants:
|
||||
/// - Always returns either success or explicit failure, never throws
|
||||
@@ -25,28 +25,39 @@ protocol ScenarioPlanner {
|
||||
/// Factory for creating the appropriate scenario planner.
|
||||
///
|
||||
/// - Expected Behavior:
|
||||
/// - planningMode == .teamFirst with >= 2 teams → ScenarioEPlanner
|
||||
/// - followTeamId != nil → ScenarioDPlanner
|
||||
/// - selectedGames not empty → ScenarioBPlanner
|
||||
/// - startLocation AND endLocation != nil → ScenarioCPlanner
|
||||
/// - Otherwise → ScenarioAPlanner (default)
|
||||
///
|
||||
/// Priority order: D > B > C > A (first matching wins)
|
||||
/// Priority order: E > D > B > C > A (first matching wins)
|
||||
enum ScenarioPlannerFactory {
|
||||
|
||||
/// Creates the appropriate planner based on the request inputs.
|
||||
///
|
||||
/// - Expected Behavior:
|
||||
/// - planningMode == .teamFirst with >= 2 teams → ScenarioEPlanner
|
||||
/// - followTeamId set → ScenarioDPlanner
|
||||
/// - selectedGames not empty → ScenarioBPlanner
|
||||
/// - Both start and end locations → ScenarioCPlanner
|
||||
/// - Otherwise → ScenarioAPlanner
|
||||
static func planner(for request: PlanningRequest) -> ScenarioPlanner {
|
||||
print("🔍 ScenarioPlannerFactory: Selecting planner...")
|
||||
print(" - planningMode: \(request.preferences.planningMode)")
|
||||
print(" - selectedTeamIds.count: \(request.preferences.selectedTeamIds.count)")
|
||||
print(" - followTeamId: \(request.preferences.followTeamId ?? "nil")")
|
||||
print(" - selectedGames.count: \(request.selectedGames.count)")
|
||||
print(" - startLocation: \(request.startLocation?.name ?? "nil")")
|
||||
print(" - endLocation: \(request.endLocation?.name ?? "nil")")
|
||||
|
||||
// Scenario E: Team-First mode - user selects teams, finds optimal trip windows
|
||||
if request.preferences.planningMode == .teamFirst &&
|
||||
request.preferences.selectedTeamIds.count >= 2 {
|
||||
print("🔍 ScenarioPlannerFactory: → ScenarioEPlanner (team-first)")
|
||||
return ScenarioEPlanner()
|
||||
}
|
||||
|
||||
// Scenario D: User wants to follow a specific team
|
||||
if request.preferences.followTeamId != nil {
|
||||
print("🔍 ScenarioPlannerFactory: → ScenarioDPlanner (follow team)")
|
||||
@@ -73,11 +84,16 @@ enum ScenarioPlannerFactory {
|
||||
/// Classifies which scenario applies to this request.
|
||||
///
|
||||
/// - Expected Behavior:
|
||||
/// - planningMode == .teamFirst with >= 2 teams → .scenarioE
|
||||
/// - followTeamId set → .scenarioD
|
||||
/// - selectedGames not empty → .scenarioB
|
||||
/// - Both start and end locations → .scenarioC
|
||||
/// - Otherwise → .scenarioA
|
||||
static func classify(_ request: PlanningRequest) -> PlanningScenario {
|
||||
if request.preferences.planningMode == .teamFirst &&
|
||||
request.preferences.selectedTeamIds.count >= 2 {
|
||||
return .scenarioE
|
||||
}
|
||||
if request.preferences.followTeamId != nil {
|
||||
return .scenarioD
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user