/** * Nexus wiki index generator - community-grouped symbol listings. * * Generates wiki structure: * - One markdown file per community listing its symbols * - Overview.md linking all communities * - Simple tables with symbol metadata (name, kind, file path, call counts) * - Optional LOOM LLM narrative summaries per community * * Supports: * - `--community ` filtering: generate a single community's doc only * - `--incremental` mode: skip communities unchanged since last run via * git diff + `.cleo/wiki-state.json` state tracking * - LOOM provider injection: graceful fallback to scaffold mode when absent * * @task T1060 * @task T1109 * @epic T1042 */ import type { GenerateNexusWikiOptions, NexusWikiResult } from '@cleocode/contracts'; import { type EngineResult } from '../engine-result.js'; /** * Generate a community-grouped wiki index from nexus.db. * * Queries all nexus nodes grouped by community_id, then generates: * - `/community-.md` per community (or a single community * when `options.communityFilter` is set) * - `/overview.md` linking all communities (skipped in single-community mode) * * LOOM integration: when `options.loomProvider` is supplied, each community * doc includes a narrative summary generated via the provider. Graceful * fallback to scaffold mode when LOOM is unavailable (no error thrown). * * Incremental mode: when `options.incremental` is `true`, reads * `.cleo/wiki-state.json` for the last-run SHA, runs `git diff` to find * changed files, maps changed files to their communities, and skips * communities with no changes. * * @param outputDir - Output directory for wiki files * @param projectRoot - Project root for relative path calculation * @param options - Optional generation options * @returns Generation result with file counts and community stats * * @example * ```ts * // Full generation with LOOM provider * const result = await generateNexusWikiIndex('.cleo/wiki', '/path/to/project', { * loomProvider: async (prompt) => myLlm.complete(prompt), * }); * * // Single-community generation * const result = await generateNexusWikiIndex('.cleo/wiki', '/path/to/project', { * communityFilter: 'community:3', * }); * * // Incremental mode * const result = await generateNexusWikiIndex('.cleo/wiki', '/path/to/project', { * incremental: true, * }); * ``` * * @task T1060 * @task T1109 */ export declare function generateNexusWikiIndex(outputDir: string, projectRoot?: string, options?: GenerateNexusWikiOptions): Promise; export declare function nexusWiki(outputDir: string, projectRoot: string, options?: { communityFilter?: string; incremental?: boolean; }): Promise>; //# sourceMappingURL=wiki-index.d.ts.map