/** * Codebase walker for the generate-adrs feature. * * Produces a structured text representation of the codebase that gets * concatenated into the GENERATE_ADRS_PROMPT as INPUT. The shape is * intentionally token-efficient — file paths + top-level symbols + * architectural-narrative-rich documents (README.md + DESIGN.md + * CLAUDE.md) verbatim. Source file content is NOT included verbatim * (would explode token budget on large codebases); the LLM reasons * about decisions from the structural inventory + narrative docs. * * v0.7 Step 2.2.a.2 scope. v0.8+ candidate refinements: * - Optionally include source-file content for small codebases * where the structural inventory under-specifies decisions * - Per-symbol JSDoc / docstring extraction for richer signal * - Atlas-based augmentation (use existing claims from prior * extraction to inform generation) */ import type { LanguageAdapter, LanguageCode } from "../types.js"; /** Files at the repo root that almost always contain architectural narrative. */ declare const ARCHITECTURAL_NARRATIVE_ROOT_FILES: readonly ["README.md", "DESIGN.md", "CLAUDE.md"]; export interface CodebaseInventoryOptions { /** Absolute path to the source root being analysed. */ sourceRoot: string; /** Language adapters keyed by language code. */ adapters: ReadonlyMap; /** Configured language list (drives which extensions to walk). */ languages: readonly LanguageCode[]; /** Optional file-walk exclude patterns from config. */ excludePatterns?: readonly string[]; } /** * Build a token-efficient text representation of the codebase for the * GENERATE_ADRS_PROMPT input. Output shape: * * ## Source files (TypeScript / Python / Go inventory) * * src/index.ts * - main * - resolveContextatlasCommitSha * src/cli-args.ts * - parseArgs * - USAGE * ... * * ## README.md * * * * ## DESIGN.md * * * * ## CLAUDE.md * * */ export declare function buildCodebaseInventory(options: CodebaseInventoryOptions): Promise; /** Exposed for tests + alternative-base composition. */ export declare function resolveNarrativeDocPath(sourceRoot: string, filename: string): string; /** Exported for test seam parity with other v0.7 modules. */ export { ARCHITECTURAL_NARRATIVE_ROOT_FILES }; //# sourceMappingURL=codebase-walker.d.ts.map