/** * route-extractor.ts * * Extracts business-level "page flows" from FE component directories. * * Design principle: the **frontend nav/sidebar is the source of truth** for * user-visible page names. The component directory structure is used to group * files into flows, but the *name* of each flow is taken from the nav menu * `title="..."` attribute whenever a match can be found. * * Strategy * -------- * 1. Parse nav/sidebar files to extract UI labels (e.g. "Remote Authorizations"). * 2. Walk every FE parsed file and identify its *leaf* component directory. * 3. For each directory, check the nav-label override map first; fall back to * deriving a name from the directory name. * 4. Filter out infra/utility dirs. * 5. For each surviving dir, find matching BE files by snake_case name matching. * 6. Return SeedFlow[] used by flow-detector. */ import type { ParsedFile } from "./tree-sitter.js"; import type { IgnoreConfig } from "../config/ignore.js"; export interface SeedFlow { /** Human-readable page/feature name, e.g. "Remote Authorizations" */ name: string; /** All file paths (FE + BE) that belong to this flow */ files: string[]; /** Repos represented */ repos: string[]; } /** * Extract seed flows from a mixed set of parsed files covering multiple repos. * * @param discoveredPages - Optional list of page names discovered by the LLM * (from `discoverFrontendPages`). When provided, nav labels are filtered to * only those that match a known page — replacing the old hardcoded * NAV_SKIP_LABELS approach with a project-agnostic LLM-driven one. */ export declare function extractSeedFlows(parsedFiles: ParsedFile[], feRepoNames: string[], discoveredPages?: string[], ignoreConfig?: IgnoreConfig): SeedFlow[]; //# sourceMappingURL=route-extractor.d.ts.map