export interface ProjectMethodology {
  type: 'agile' | 'kanban';
  lockedAt?: Date;
  lockedBy?: string;
  allowedTools: string[];
  disallowedTools: string[];
  configuration: MethodologyConfig;
  migrationHistory: MethodologyMigration[];
}

export interface MethodologyConfig {
  // Agile-specific config
  sprintDuration?: number;
  velocityTracking?: boolean;
  storyPointScale?: number[];
  retrospectiveFrequency?: string;
  
  // Kanban-specific config
  wip_limits?: Record<string, number>;
  cycleTimeTracking?: boolean;
  leadTimeTracking?: boolean;
  
  // Common config
  customColumns?: string[];
  automationRules?: AutomationRule[];
  defaultPriorities?: string[];
  requiredFields?: string[];
}

export interface MethodologyMigration {
  id: string;
  fromType: 'agile' | 'kanban';
  toType: 'agile' | 'kanban';
  migratedAt: Date;
  migratedBy: string;
  itemsMigrated: number;
  dataLost?: string[];
  notes?: string;
}

export interface AutomationRule {
  id: string;
  name: string;
  trigger: {
    event: string;
    conditions?: Record<string, any>;
  };
  actions: {
    type: string;
    parameters: Record<string, any>;
  }[];
  enabled: boolean;
}

export const AGILE_TOOLS = [
  'create_sprint',
  'plan_sprint',
  'start_sprint',
  'end_sprint',
  'create_story',
  'estimate_story',
  'create_epic',
  'sprint_retrospective',
  'generate_burndown',
  'calculate_velocity',
  'backlog_refinement'
];

export const KANBAN_TOOLS = [
  'create_board',
  'create_board_interactive',
  'add_task',
  'move_task',
  'update_task',
  'set_wip_limit',
  'track_cycle_time',
  'generate_cumulative_flow',
  'list_boards',
  'get_board_status'
];

export const COMMON_TOOLS = [
  'list_tasks',
  'get_task_details',
  'update_priority',
  'assign_task',
  'add_comment',
  'add_attachment',
  'create_subtask',
  'track_time',
  'generate_report'
];

export interface MethodologyStore {
  currentMethodology?: ProjectMethodology;
  lastWarningShown?: Date;
}