mcp-adr-analysis-server
Version:
MCP server for analyzing Architectural Decision Records and project architecture
173 lines • 7.24 kB
TypeScript
/**
* Smart Score Tool - Central Coordination for Project Health Scoring
*
* Provides comprehensive scoring coordination across all MCP tools:
* - Cross-tool score synchronization
* - Manual score recalculation and rebalancing
* - Health score diagnostics and validation
* - Automated score updates and maintenance
*
* IMPORTANT FOR AI ASSISTANTS: This tool depends on cache infrastructure and
* works best when other tools have already populated data.
*
* Cache Dependencies:
* - Requires: .mcp-adr-cache/project-health-scores.json (main scoring data)
* - May read: .mcp-adr-cache/todo-data.json (for task completion scoring)
* - Updates: .mcp-adr-cache/project-health-scores.json (with new scores)
*
* Workflow Timing:
* - Run AFTER other tools have populated cache data
* - Use 'recalculate_scores' to refresh stale data
* - Use 'sync_scores' to synchronize across tools
* - Use 'optimize_weights' for score tuning
*/
import { z } from 'zod';
declare const SmartScoreSchema: z.ZodUnion<[z.ZodObject<{
operation: z.ZodLiteral<"recalculate_scores">;
projectPath: z.ZodString;
components: z.ZodDefault<z.ZodArray<z.ZodEnum<["task_completion", "deployment_readiness", "architecture_compliance", "security_posture", "code_quality", "all"]>, "many">>;
forceUpdate: z.ZodDefault<z.ZodBoolean>;
updateSources: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "recalculate_scores";
components: ("task_completion" | "deployment_readiness" | "architecture_compliance" | "security_posture" | "code_quality" | "all")[];
forceUpdate: boolean;
updateSources: boolean;
}, {
projectPath: string;
operation: "recalculate_scores";
components?: ("task_completion" | "deployment_readiness" | "architecture_compliance" | "security_posture" | "code_quality" | "all")[] | undefined;
forceUpdate?: boolean | undefined;
updateSources?: boolean | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"sync_scores">;
projectPath: z.ZodString;
todoPath: z.ZodDefault<z.ZodString>;
triggerTools: z.ZodOptional<z.ZodArray<z.ZodEnum<["manage_todo", "smart_git_push", "compare_adr_progress", "analyze_content_security", "validate_rules"]>, "many">>;
rebalanceWeights: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "sync_scores";
todoPath: string;
rebalanceWeights: boolean;
triggerTools?: ("manage_todo" | "smart_git_push" | "compare_adr_progress" | "analyze_content_security" | "validate_rules")[] | undefined;
}, {
projectPath: string;
operation: "sync_scores";
todoPath?: string | undefined;
triggerTools?: ("manage_todo" | "smart_git_push" | "compare_adr_progress" | "analyze_content_security" | "validate_rules")[] | undefined;
rebalanceWeights?: boolean | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"diagnose_scores">;
projectPath: z.ZodString;
includeHistory: z.ZodDefault<z.ZodBoolean>;
checkDataFreshness: z.ZodDefault<z.ZodBoolean>;
suggestImprovements: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "diagnose_scores";
includeHistory: boolean;
checkDataFreshness: boolean;
suggestImprovements: boolean;
}, {
projectPath: string;
operation: "diagnose_scores";
includeHistory?: boolean | undefined;
checkDataFreshness?: boolean | undefined;
suggestImprovements?: boolean | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"optimize_weights">;
projectPath: z.ZodString;
analysisMode: z.ZodDefault<z.ZodEnum<["current_state", "historical_data", "project_type"]>>;
customWeights: z.ZodOptional<z.ZodObject<{
taskCompletion: z.ZodOptional<z.ZodNumber>;
deploymentReadiness: z.ZodOptional<z.ZodNumber>;
architectureCompliance: z.ZodOptional<z.ZodNumber>;
securityPosture: z.ZodOptional<z.ZodNumber>;
codeQuality: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
taskCompletion?: number | undefined;
deploymentReadiness?: number | undefined;
architectureCompliance?: number | undefined;
securityPosture?: number | undefined;
codeQuality?: number | undefined;
}, {
taskCompletion?: number | undefined;
deploymentReadiness?: number | undefined;
architectureCompliance?: number | undefined;
securityPosture?: number | undefined;
codeQuality?: number | undefined;
}>>;
previewOnly: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "optimize_weights";
analysisMode: "project_type" | "current_state" | "historical_data";
previewOnly: boolean;
customWeights?: {
taskCompletion?: number | undefined;
deploymentReadiness?: number | undefined;
architectureCompliance?: number | undefined;
securityPosture?: number | undefined;
codeQuality?: number | undefined;
} | undefined;
}, {
projectPath: string;
operation: "optimize_weights";
analysisMode?: "project_type" | "current_state" | "historical_data" | undefined;
customWeights?: {
taskCompletion?: number | undefined;
deploymentReadiness?: number | undefined;
architectureCompliance?: number | undefined;
securityPosture?: number | undefined;
codeQuality?: number | undefined;
} | undefined;
previewOnly?: boolean | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"reset_scores">;
projectPath: z.ZodString;
component: z.ZodDefault<z.ZodEnum<["task_completion", "deployment_readiness", "architecture_compliance", "security_posture", "code_quality", "all"]>>;
preserveHistory: z.ZodDefault<z.ZodBoolean>;
recalculateAfterReset: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "reset_scores";
component: "task_completion" | "deployment_readiness" | "architecture_compliance" | "security_posture" | "code_quality" | "all";
preserveHistory: boolean;
recalculateAfterReset: boolean;
}, {
projectPath: string;
operation: "reset_scores";
component?: "task_completion" | "deployment_readiness" | "architecture_compliance" | "security_posture" | "code_quality" | "all" | undefined;
preserveHistory?: boolean | undefined;
recalculateAfterReset?: boolean | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"get_score_trends">;
projectPath: z.ZodString;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "get_score_trends";
}, {
projectPath: string;
operation: "get_score_trends";
}>, z.ZodObject<{
operation: z.ZodLiteral<"get_intent_scores">;
projectPath: z.ZodString;
intentId: z.ZodString;
}, "strip", z.ZodTypeAny, {
projectPath: string;
intentId: string;
operation: "get_intent_scores";
}, {
projectPath: string;
intentId: string;
operation: "get_intent_scores";
}>]>;
type SmartScoreArgs = z.infer<typeof SmartScoreSchema>;
/**
* Main smart score function
*/
export declare function smartScore(args: SmartScoreArgs): Promise<any>;
export {};
//# sourceMappingURL=smart-score-tool.d.ts.map