/** * Init Module Types * ADR-025: Enhanced Init with Self-Configuration * * Types for project analysis, self-configuration, and initialization. */ /** * Detected test framework */ export interface DetectedFramework { name: string; version?: string; configFile?: string; confidence: number; } /** * Detected programming language */ export interface DetectedLanguage { name: string; percentage: number; fileCount: number; extensions: string[]; } /** * Existing test information */ export interface ExistingTests { totalCount: number; byFramework: Record; byType: { unit: number; integration: number; e2e: number; unknown: number; }; directories: string[]; } /** * Code complexity metrics */ export interface CodeComplexity { averageCyclomatic: number; maxCyclomatic: number; totalFiles: number; complexFiles: string[]; recommendation: 'simple' | 'medium' | 'complex'; } /** * Current coverage metrics */ export interface CoverageMetrics { lines: number; branches: number; functions: number; statements: number; hasReport: boolean; reportPath?: string; } /** * Complete project analysis result */ export interface ProjectAnalysis { projectName: string; projectRoot: string; projectType: 'monorepo' | 'single' | 'library' | 'unknown'; frameworks: DetectedFramework[]; languages: DetectedLanguage[]; existingTests: ExistingTests; codeComplexity: CodeComplexity; coverage: CoverageMetrics; packageManager: 'npm' | 'yarn' | 'pnpm' | 'bun' | 'unknown'; hasTypeScript: boolean; hasCIConfig: boolean; ciProvider?: 'github-actions' | 'gitlab-ci' | 'jenkins' | 'circleci' | 'other'; analysisTimestamp: Date; analysisDurationMs: number; } /** * HNSW configuration for vector search */ export interface HNSWConfig { M: number; efConstruction: number; efSearch: number; } /** * Learning system configuration */ export interface LearningConfig { enabled: boolean; pretrainedPatterns: boolean; patternsPath?: string; hnswConfig: HNSWConfig; promotionThreshold: number; qualityThreshold: number; embeddingModel: 'transformer' | 'hash' | 'auto'; } /** * Routing system configuration */ export interface RoutingConfig { mode: 'ml' | 'rules' | 'hybrid'; confidenceThreshold: number; feedbackEnabled: boolean; cacheEnabled: boolean; cacheTTLMs: number; } /** * Background workers configuration */ export interface WorkersConfig { enabled: string[]; intervals: Record; maxConcurrent: number; daemonAutoStart: boolean; } /** * Hooks configuration */ export interface HooksConfig { claudeCode: boolean; preCommit: boolean; ciIntegration: boolean; customHooksPath?: string; } /** * Skills configuration */ export interface SkillsConfig { /** Install skills during init (default: true) */ install: boolean; /** Install v2 methodology skills (default: true) */ installV2: boolean; /** Install v3 domain skills (default: true) */ installV3: boolean; /** Install platform-specific skills (default: true) */ installPlatform: boolean; /** Overwrite existing skills (default: false) */ overwrite: boolean; } /** * Auto-tuning configuration */ export interface AutoTuningConfig { enabled: boolean; parameters: string[]; tuningIntervalMs: number; evaluationPeriodMs: number; } /** * Complete AQE initialization configuration */ export interface AQEInitConfig { version: string; project: { name: string; root: string; type: 'monorepo' | 'single' | 'library'; }; learning: LearningConfig; routing: RoutingConfig; workers: WorkersConfig; hooks: HooksConfig; skills: SkillsConfig; autoTuning: AutoTuningConfig; domains: { enabled: string[]; disabled: string[]; }; agents: { maxConcurrent: number; defaultTimeout: number; }; } /** * Single initialization step result */ export interface InitStepResult { step: string; status: 'success' | 'warning' | 'error' | 'skipped'; message: string; details?: Record; durationMs: number; } /** * Complete initialization result */ export interface InitResult { success: boolean; config: AQEInitConfig; steps: InitStepResult[]; summary: { projectAnalyzed: boolean; configGenerated: boolean; patternsLoaded: number; skillsInstalled: number; agentsInstalled: number; hooksConfigured: boolean; mcpConfigured: boolean; claudeMdGenerated: boolean; workersStarted: number; }; totalDurationMs: number; timestamp: Date; } /** * Wizard step definition */ export interface WizardStep { id: string; title: string; description: string; type: 'info' | 'choice' | 'confirm' | 'input'; options?: WizardOption[]; default?: string | boolean; validation?: (value: unknown) => boolean; } /** * Wizard option for choice steps */ export interface WizardOption { value: string; label: string; description?: string; recommended?: boolean; } /** * Wizard state */ export interface WizardState { currentStep: number; totalSteps: number; answers: Record; analysis?: ProjectAnalysis; } /** * Pre-trained pattern for loading */ export interface PretrainedPattern { id: string; domain: string; type: string; content: string; metadata: { framework?: string; language?: string; confidence: number; usageCount: number; successRate: number; }; } /** * Pre-trained patterns library */ export interface PretrainedLibrary { version: string; exportedFrom: string; exportDate: string; patterns: PretrainedPattern[]; statistics: { totalPatterns: number; byDomain: Record; byLanguage: Record; averageConfidence: number; }; } export declare const DEFAULT_HNSW_CONFIG: HNSWConfig; export declare const DEFAULT_LEARNING_CONFIG: LearningConfig; export declare const DEFAULT_ROUTING_CONFIG: RoutingConfig; export declare const DEFAULT_WORKERS_CONFIG: WorkersConfig; export declare const DEFAULT_HOOKS_CONFIG: HooksConfig; export declare const DEFAULT_SKILLS_CONFIG: SkillsConfig; export declare const DEFAULT_AUTO_TUNING_CONFIG: AutoTuningConfig; export declare const ALL_DOMAINS: string[]; /** * Create default AQE init configuration */ export declare function createDefaultConfig(projectName: string, projectRoot: string): AQEInitConfig; //# sourceMappingURL=types.d.ts.map