export type TrendDirection = 'rising' | 'stable' | 'declining' | 'exploding';
export interface CommunityPatternEntry {
    patternId: string;
    category: string;
    language: string;
    description: string;
    totalDevs: number;
    totalUses: number;
    totalSuccess: number;
    totalFailure: number;
    successRate: number;
    confidence: number;
    health: number;
    firstSeen: number;
    lastSeen: number;
    trend: TrendDirection;
    reputation: number;
}
export interface CommunityRanking {
    category: string;
    entries: Array<{
        patternId: string;
        score: number;
        rank: number;
        successRate: number;
        totalUses: number;
    }>;
}
export interface CommunityTrend {
    patternId: string;
    direction: TrendDirection;
    currentUsage: number;
    previousUsage: number;
    changePct: number;
    period: string;
}
export interface CommunityCluster {
    clusterId: string;
    label: string;
    size: number;
    commonLanguages: string[];
    commonCategories: string[];
    avgSuccessRate: number;
    topPatterns: string[];
}
export interface CommunityPlaybook {
    id: string;
    title: string;
    steps: string[];
    avgSuccessRate: number;
    sampleSize: number;
    commonArchitecture: string;
    commonLanguage: string;
}
export interface CommunityBenchmark {
    metric: string;
    developerValue: number;
    communityAvg: number;
    communityP50: number;
    communityP90: number;
    percentile: number;
    sampleSize: number;
}
export interface CommunityInsight {
    title: string;
    description: string;
    evidence: string[];
    sampleSize: number;
    impact: 'high' | 'medium' | 'low';
    category: string;
}
export interface CommunitySnapshot {
    snapshotId: string;
    timestamp: number;
    totalPatterns: number;
    totalDevs: number;
    totalOutcomes: number;
    rankings: CommunityRanking[];
    topTrends: CommunityTrend[];
    clusters: CommunityCluster[];
    playbooks: CommunityPlaybook[];
    insights: CommunityInsight[];
}
export interface CommunityStoreData {
    patterns: Record<string, CommunityPatternEntry>;
    devCount: number;
    outcomeCount: number;
    history: CommunitySnapshot[];
    lastSnapshot: number;
    version: number;
}
export declare const ALLOWED_FIELDS: Set<string>;
export declare function validatePrivacy(data: any): boolean;
export declare function sanitizePatternData(data: any): any;
export declare function registerCommunityPattern(patternId: string, category: string, language: string, description: string, successCount: number, failureCount: number, devId?: string): CommunityPatternEntry;
export declare function getCommunityPatterns(filters?: {
    category?: string;
    language?: string;
    minSuccessRate?: number;
    minDevs?: number;
    sortBy?: 'successRate' | 'totalUses' | 'reputation' | 'confidence';
    limit?: number;
}): CommunityPatternEntry[];
export declare function ingestCommunityOutcomes(outcomes: Array<{
    patternId: string;
    category: string;
    language: string;
    description: string;
    successCount: number;
    failureCount: number;
}>, devId?: string): {
    ingested: number;
    updated: number;
};
export declare function getCommunityStats(): {
    totalPatterns: number;
    totalDevs: number;
    totalOutcomes: number;
    avgSuccessRate: number;
    avgConfidence: number;
};
export declare function computeRankings(): CommunityRanking[];
export declare function computeTrends(): CommunityTrend[];
export declare function computeClusters(developerProfiles: Array<{
    languages: Record<string, number>;
    topCategories: string[];
    successRate: number;
    patternsUsed: number;
}>): CommunityCluster[];
export declare function generatePlaybooks(allPatterns: CommunityPatternEntry[], clusters: CommunityCluster[]): CommunityPlaybook[];
export declare function computeBenchmarks(developerStats: {
    successRate: number;
    confidence: number;
    health: number;
    patternsUsed: number;
}): CommunityBenchmark[];
export declare function takeSnapshot(): CommunitySnapshot;
export declare function getEvolution(lookbackDays?: number): CommunitySnapshot[];
export declare function getEvolutionTrend(patternId: string): Array<{
    timestamp: number;
    successRate: number;
    usage: number;
}>;
export declare function computeReputation(patternId: string): number;
export declare function getTopReputation(limit?: number): CommunityPatternEntry[];
export declare function generateInsights(): CommunityInsight[];
export declare function getCommunityRankings(limit?: number): CommunityRanking[];
export declare function getCommunityTrends(limit?: number): CommunityTrend[];
export declare function getCommunityPlaybooks(developerProfiles: Array<{
    languages: Record<string, number>;
    topCategories: string[];
    successRate: number;
    patternsUsed: number;
}>): CommunityPlaybook[];
export declare function getCommunityBenchmarks(developerStats: {
    successRate: number;
    confidence: number;
    health: number;
    patternsUsed: number;
}): CommunityBenchmark[];
export declare function getCommunityInsights(): CommunityInsight[];
export declare function getCommunityClusters(developerProfiles: Array<{
    languages: Record<string, number>;
    topCategories: string[];
    successRate: number;
    patternsUsed: number;
}>): CommunityCluster[];
export declare function resetCommunity(): void;
//# sourceMappingURL=community-intelligence.d.ts.map