import type { Spec, SpecMigrationResult, SpecMigrationDeps } from '../types/index.js';
/**
 * Detect specs stored under a legacy location (docs/sdd/specs/).
 * Caller provides the list of specs (from storage layer).
 */
export declare function filterLegacySpecs(specs: Spec[]): Spec[];
/**
 * Migrate legacy specs to planu/specs/ with modern file naming.
 * Moves files on disk and calls the provided updateSpec for each migrated spec.
 * Also rewrites planu.json.
 */
export declare function migrateSpecs(projectPath: string, legacySpecs: Spec[], deps: SpecMigrationDeps): Promise<SpecMigrationResult>;
/**
 * Detect specs whose folder name lacks the SPEC-XXX- prefix.
 * E.g., folder is `planu/specs/login-form/` but should be `planu/specs/SPEC-012-login-form/`.
 */
export declare function filterUnprefixedSpecs(specs: Spec[]): Spec[];
/**
 * Rename spec folders on disk and update storage paths to include the SPEC-XXX- prefix.
 */
export declare function migrateSpecFolderNames(projectPath: string, specs: Spec[], deps: SpecMigrationDeps): Promise<SpecMigrationResult>;
/**
 * Discover specs buried in subcategory folders and flatten them to planu/specs/{slug}/.
 * Also converts old blockquote metadata to YAML frontmatter.
 * This runs on init_project to fix specs created by older Planu versions.
 */
export declare function discoverAndFlattenSpecs(projectPath: string): Promise<{
    flattenedCount: number;
    convertedCount: number;
    renamedCount: number;
    errors: string[];
}>;
/**
 * Reconcile specs.json paths with actual filesystem locations.
 * After discoverAndFlattenSpecs() renames/moves folders, specs.json may still
 * reference old paths. This function detects broken paths and fixes them by
 * scanning planu/specs/ for the matching SPEC-XXX folder.
 */
export declare function reconcileSpecPaths(projectPath: string, deps: SpecMigrationDeps, projectId: string): Promise<{
    reconciledCount: number;
    errors: string[];
}>;
/**
 * Check if a project path has a planu.json with legacy specLocation.
 */
export declare function hasLegacyConfig(projectPath: string): Promise<boolean>;
//# sourceMappingURL=spec-migrator.d.ts.map