export interface ComponentSuggestion {
    /** Heuristic name based on dominant entity prefix or shared substring; "Component-N" if no clear name emerges. */
    suggestedName: string;
    /** Member entity names (may be empty for structural-only suggestions where the LLM needs to read source). */
    entities: string[];
    /** Cross-edges to OTHER communities — these are the candidate event boundaries. */
    crossEdges: Array<{
        to: string;
        targetCommunity: number;
        type: string;
    }>;
    /** Internal edges (within the community). For diagnostic visibility. */
    internalEdgeCount: number;
    /**
     * Provenance: when this suggestion came from structural-detector (sub-package.json
     * walk or conventional-directory grouping) rather than entity-graph Louvain,
     * record the source path and signal type. The LLM uses this to scope its source
     * reading to the candidate's directory.
     */
    structural?: {
        type: 'package' | 'directory';
        sourceDir: string;
        relPath: string;
    };
}
export interface SuggestOptions {
    /** Resolution param for Louvain — higher = more, smaller communities. Default 1.0. */
    resolution?: number;
    /** Random seed for deterministic clustering. Default 42. */
    seed?: number;
    /** Min community size to emit; smaller communities are kept but flagged. Default 2. */
    minSize?: number;
}
interface MinimalEntity {
    name: string;
}
interface MinimalRelationship {
    from: string;
    to: string;
    type: string;
}
/**
 * Run Louvain community detection on the model graph.
 *
 * Treats the relationship list as undirected (an edge between A and B regardless
 * of direction). This matches the diagnostic methodology and produces stable
 * communities — directed Louvain doesn't add value at this granularity since
 * a `belongsTo` relationship co-domains its `hasMany` counterpart.
 */
export declare function detectModelCommunities(entities: MinimalEntity[], relationships: MinimalRelationship[], opts?: SuggestOptions): ComponentSuggestion[];
/**
 * Format ComponentSuggestions as a markdown block to splice into facts.md.
 * The LLM consumes this section to learn proposed component boundaries.
 */
export declare function formatSuggestionsAsMarkdown(suggestions: ComponentSuggestion[]): string;
export {};
//# sourceMappingURL=community-detection.d.ts.map