/** * Migration Guide Generator * * Auto-generates migration guides for breaking changes between baselines. * Provides step-by-step instructions, code examples, and effort estimates. */ import type { BehavioralBaseline, BehavioralDiff, ChangeSeverity } from './types.js'; import { type SchemaChangeDetail, type SchemaChangeType } from './change-impact-analyzer.js'; /** * Estimated effort level for migration. */ export type MigrationEffort = 'trivial' | 'minor' | 'moderate' | 'major'; /** * Type of migration step. */ export type MigrationStepType = 'add_parameter' | 'remove_parameter' | 'change_type' | 'update_constraint' | 'update_enum' | 'update_default' | 'deprecation' | 'tool_removal' | 'tool_addition'; /** * A single step in the migration process. */ export interface MigrationStep { /** Step number */ stepNumber: number; /** Type of migration action */ type: MigrationStepType; /** Tool affected */ toolName: string; /** Parameter path (if applicable) */ parameterPath?: string; /** Human-readable title */ title: string; /** Detailed description of what to do */ description: string; /** Whether this step is for a breaking change */ isBreaking: boolean; /** Code examples */ codeExamples: CodeExample[]; /** Related schema change */ schemaChange?: SchemaChangeDetail; } /** * Code example for a migration step. */ export interface CodeExample { /** Language (typescript, javascript, etc.) */ language: string; /** Title/description of the example */ title: string; /** Code before migration */ before: string; /** Code after migration */ after: string; } /** * A single breaking change with context. */ export interface BreakingChange { /** Tool name */ toolName: string; /** Type of change */ changeType: SchemaChangeType; /** Parameter affected */ parameterPath: string; /** Value before */ before: unknown; /** Value after */ after: unknown; /** Human-readable description */ description: string; /** Severity */ severity: ChangeSeverity; } /** * Complete migration guide between two versions. */ export interface MigrationGuide { /** Source version/identifier */ fromVersion: string; /** Target version/identifier */ toVersion: string; /** Date range of the migration */ dateRange: { from: Date; to: Date; }; /** All breaking changes */ breakingChanges: BreakingChange[]; /** Step-by-step migration instructions */ steps: MigrationStep[]; /** Code examples for common patterns */ codeExamples: CodeExample[]; /** Estimated effort level */ estimatedEffort: MigrationEffort; /** Summary statistics */ stats: MigrationStats; /** Human-readable summary */ summary: string; /** Tools that were removed */ removedTools: string[]; /** Tools that were added */ addedTools: string[]; /** Warnings or notes */ warnings: string[]; } /** * Statistics about the migration. */ export interface MigrationStats { /** Total breaking changes */ breakingChangesCount: number; /** Total tools affected */ toolsAffected: number; /** Total migration steps */ stepsCount: number; /** Breakdown by change type */ changesByType: Record; } /** * Generate a migration guide from two baselines. */ export declare function generateMigrationGuide(oldBaseline: BehavioralBaseline, newBaseline: BehavioralBaseline, diff?: BehavioralDiff): MigrationGuide; /** * Format migration guide as markdown. */ export declare function formatMigrationGuideMarkdown(guide: MigrationGuide): string; /** * Format migration guide for console output. */ export declare function formatMigrationGuideText(guide: MigrationGuide): string; /** * Check if a migration guide contains breaking changes that require action. */ export declare function hasBreakingMigrationChanges(guide: MigrationGuide): boolean; /** * Get breaking tools from guide. */ export declare function getBreakingTools(guide: MigrationGuide): string[]; //# sourceMappingURL=migration-generator.d.ts.map