/** * Deepen Phase: Split large modules into sub-modules. */ import type { Command } from '@oclif/core'; import type { IndexDatabase } from '../../../db/database.js'; import type { LlmLogOptions } from '../../llm/_shared/llm-utils.js'; export interface DeepenPhaseContext { db: IndexDatabase; command: Command; model: string; threshold: number; maxDepth: number; dryRun: boolean; isJson: boolean; verbose: boolean; llmLogOptions: LlmLogOptions; maxModules: number; } /** * Phase 3: Deepen large modules by splitting them into sub-modules. * Step 1: Rebalance branch modules (has children + direct members) — no new modules created. * Step 2: Split leaf modules (largest first) — consumes module budget. */ export declare function runDeepenPhase(ctx: DeepenPhaseContext): Promise; export interface RebalanceContext { db: IndexDatabase; command: Command; model: string; deepenedModulePath: string; newSubModulePaths: string[]; isJson: boolean; verbose: boolean; llmLogOptions: LlmLogOptions; includeSelf?: boolean; } /** * Rebalance symbols from ancestor modules into newly created sub-modules. * Walks up from the deepened module collecting symbols from ancestors, * then asks the LLM if any should be moved into the new sub-structure. * Returns the number of symbols rebalanced. */ export declare function rebalanceAncestorSymbols(ctx: RebalanceContext): Promise; /** * Deterministic fallback: push direct members of branch modules to their children * using file/directory cohort voting. Loops until no more progress. */ export declare function pushdownBranchMembersFallback(db: IndexDatabase, command: Command, isJson: boolean, verbose: boolean): number; //# sourceMappingURL=deepen-phase.d.ts.map