/** * Architecture Writer * * Shared logic for building a high-level architecture overview from cached * static analysis artifacts (dependency-graph.json + llm-context.json). * * Used by: * - MCP tool `get_architecture_overview` (mcp.ts) * - `openlore analyze` — writes ARCHITECTURE.md into .openlore/analysis/ */ import type { DependencyGraphResult } from './dependency-graph.js'; import type { LLMContext } from './artifact-generator.js'; export interface ClusterSummary { id: string; name: string; fileCount: number; role: string; entryPointCount: number; hubCount: number; dependsOn: string[]; keyFiles: string[]; } export interface ArchitectureOverview { generatedAt: string; summary: { totalFiles: number; totalClusters: number; totalEdges: number; cycles: number; layerViolations: number; }; clusters: ClusterSummary[]; globalEntryPoints: Array<{ name: string; file: string; language: string; }>; criticalHubs: Array<{ name: string; file: string; fanIn: number; fanOut: number; }>; } /** * Infer a module cluster's architectural role from aggregate metrics. */ export declare function inferClusterRole(entryCount: number, hubCount: number, fileCount: number): string; /** * Build an ArchitectureOverview from pre-loaded dependency graph and LLM context. * Both can be null if one artifact is missing; at least one must be non-null. * * @param depGraph Parsed dependency-graph.json (or null) * @param ctx Parsed llm-context.json (or null) * @param absDir Absolute project root path — used to normalize cluster file paths */ export declare function buildArchitectureOverview(depGraph: DependencyGraphResult | null, ctx: LLMContext | null, absDir: string): ArchitectureOverview; /** * Render an ArchitectureOverview as a Markdown document (ARCHITECTURE.md). */ export declare function renderArchitectureMarkdown(overview: ArchitectureOverview): string; /** * Write ARCHITECTURE.md into the given output directory (the analysis dir, * `.openlore/analysis/`), alongside CODEBASE.md and the other generated * artifacts, so nothing churns at the repo root (Spec 26 B3). * Returns the path written. */ export declare function writeArchitectureMd(outputDir: string, overview: ArchitectureOverview): Promise; //# sourceMappingURL=architecture-writer.d.ts.map