/** * Code Order — structural heuristics. * * Each heuristic scans the flat file/folder lists (and the tree) and emits * {@link Issue} entries. Issues are the actionable findings the final report * surfaces to the agent: oversized files, deep nesting, empty folders, etc. * * Thresholds live in `analyzer.ts` (HEURISTIC_LIMITS) and are intentionally * not user-configurable — tree-like structure is always better. */ import type { FileNode, FolderNode, Issue, ProjectMetrics } from "./types.js"; /** Detect source files exceeding the oversized threshold. Binary/media files are skipped. */ export declare function findOversizedFiles(files: FileNode[]): Issue[]; /** * Detect folders whose depth exceeds the nesting threshold. * `folderDepths` maps folder path → depth. */ export declare function findDeepNesting(folderDepths: Map): Issue[]; /** Detect folders that contain no files (directly or in any descendant). */ export declare function findEmptyFolders(tree: FolderNode): Issue[]; /** Detect zero-byte files. */ export declare function findEmptyFiles(files: FileNode[]): Issue[]; /** * Detect folders that contain exactly one child (file or folder). * Single-child folders are candidates for flattening into their parent. */ export declare function findSingleChildFolders(tree: FolderNode): Issue[]; /** * Detect sibling folders with duplicate names within the same parent. * Highlights accidental parallel structure (e.g. two `utils/` folders). */ export declare function findDuplicateFolderNames(tree: FolderNode): Issue[]; /** Map of folder path → depth, derived from the flat folder list. */ export declare function computeFolderDepths(allFolders: string[]): Map; /** Convenience: run every heuristic and return the combined, sorted issue list. */ export declare function runAllHeuristics(tree: FolderNode, allFiles: FileNode[], allFolders: string[], metrics: ProjectMetrics): Issue[]; //# sourceMappingURL=heuristics.d.ts.map