export interface TestCase {
  id: string;
  name: string;
  description: string;
  type: 'unit' | 'integration' | 'e2e';
  status: 'pending' | 'passing' | 'failing' | 'skipped';
  code?: string;
  expectedBehavior: string;
  actualBehavior?: string;
  createdAt: Date;
  updatedAt: Date;
}

export interface Feature {
  id: string;
  name: string;
  description: string;
  testCases: TestCase[];
  implementationStatus: 'not-started' | 'in-progress' | 'completed';
  testCoverage: number;
  createdAt: Date;
  updatedAt: Date;
}

export interface TDDSession {
  id: string;
  feature: Feature;
  currentPhase: 'red' | 'green' | 'refactor';
  history: TDDPhaseTransition[];
  startedAt: Date;
  completedAt?: Date;
}

export interface TDDPhaseTransition {
  from: 'red' | 'green' | 'refactor';
  to: 'red' | 'green' | 'refactor';
  timestamp: Date;
  message: string;
}

export interface DevelopmentStore {
  features: Record<string, Feature>;
  sessions: Record<string, TDDSession>;
  config: TDDConfig;
}

export interface TDDConfig {
  enforceTestFirst: boolean;
  minimumTestCoverage: number;
  requireTestsBeforeImplementation: boolean;
  autoGenerateTestTemplates: boolean;
}