UNPKG

mcp-adr-analysis-server

Version:

MCP server for analyzing Architectural Decision Records and project architecture

125 lines 3.5 kB
/** * Memory-Centric Health Scoring System * * Evaluates system health based on memory quality, retrieval performance, * and entity relationship coherence rather than traditional task completion metrics. * * This replaces the deprecated ProjectHealthScoring with a memory-aware approach * that aligns with the memory-centric architecture. */ export interface MemoryHealthScore { overall: number; memoryQuality: number; retrievalPerformance: number; entityCoherence: number; contextUtilization: number; decisionAlignment: number; confidence: number; lastUpdated: string; breakdown: MemoryScoreBreakdown; } export interface MemoryScoreBreakdown { memoryQuality: { totalMemories: number; relevantMemories: number; staleMemories: number; averageRelevanceScore: number; lastUpdated: string; }; retrievalPerformance: { totalRetrievals: number; successfulRetrievals: number; averageRetrievalTime: number; precisionScore: number; recallScore: number; lastUpdated: string; }; entityCoherence: { totalEntities: number; connectedEntities: number; orphanedEntities: number; relationshipStrength: number; lastUpdated: string; }; contextUtilization: { averageContextSize: number; contextRelevance: number; contextCompleteness: number; lastUpdated: string; }; decisionAlignment: { totalDecisions: number; alignedDecisions: number; conflictingDecisions: number; alignmentScore: number; lastUpdated: string; }; } export interface MemoryScoringWeights { memoryQuality: number; retrievalPerformance: number; entityCoherence: number; contextUtilization: number; decisionAlignment: number; } export declare class MemoryHealthScoring { private weights; constructor(weights?: Partial<MemoryScoringWeights>); /** * Calculate overall memory health score */ calculateMemoryHealth(memories: any[], retrievalMetrics: any, entityGraph: any): Promise<MemoryHealthScore>; /** * Assess memory quality based on relevance and freshness */ private assessMemoryQuality; /** * Assess retrieval performance metrics */ private assessRetrievalPerformance; /** * Assess entity relationship coherence */ private assessEntityCoherence; /** * Assess context utilization */ private assessContextUtilization; /** * Assess alignment with architectural decisions */ private assessDecisionAlignment; /** * Calculate memory quality score */ private calculateMemoryQualityScore; /** * Calculate retrieval performance score */ private calculateRetrievalScore; /** * Calculate entity coherence score */ private calculateCoherenceScore; /** * Calculate context utilization score */ private calculateContextScore; /** * Calculate decision alignment score */ private calculateAlignmentScore; /** * Calculate confidence in the overall score */ private calculateConfidence; /** * Get emoji representation of score */ getScoreEmoji(score: number): string; } /** * Singleton instance for easy access */ export declare const memoryHealthScoring: MemoryHealthScoring; //# sourceMappingURL=memory-health-scoring.d.ts.map