mcp-adr-analysis-server 2.0.9 → 2.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +1 -1
  2. package/dist/src/index.d.ts +8 -1
  3. package/dist/src/index.d.ts.map +1 -1
  4. package/dist/src/index.js +573 -348
  5. package/dist/src/index.js.map +1 -1
  6. package/dist/src/prompts/adr-suggestion-prompts.d.ts.map +1 -1
  7. package/dist/src/prompts/adr-suggestion-prompts.js +2 -0
  8. package/dist/src/prompts/adr-suggestion-prompts.js.map +1 -1
  9. package/dist/src/resources/index.d.ts.map +1 -1
  10. package/dist/src/resources/index.js +71 -1
  11. package/dist/src/resources/index.js.map +1 -1
  12. package/dist/src/tools/adr-suggestion-tool.d.ts +16 -0
  13. package/dist/src/tools/adr-suggestion-tool.d.ts.map +1 -1
  14. package/dist/src/tools/adr-suggestion-tool.js +55 -2
  15. package/dist/src/tools/adr-suggestion-tool.js.map +1 -1
  16. package/dist/src/tools/smart-git-push-tool.d.ts +21 -1
  17. package/dist/src/tools/smart-git-push-tool.d.ts.map +1 -1
  18. package/dist/src/tools/smart-git-push-tool.js +181 -28
  19. package/dist/src/tools/smart-git-push-tool.js.map +1 -1
  20. package/dist/src/tools/smart-score-tool.d.ts +173 -0
  21. package/dist/src/tools/smart-score-tool.d.ts.map +1 -0
  22. package/dist/src/tools/smart-score-tool.js +681 -0
  23. package/dist/src/tools/smart-score-tool.js.map +1 -0
  24. package/dist/src/tools/todo-management-tool-v2.d.ts +329 -0
  25. package/dist/src/tools/todo-management-tool-v2.d.ts.map +1 -0
  26. package/dist/src/tools/todo-management-tool-v2.js +644 -0
  27. package/dist/src/tools/todo-management-tool-v2.js.map +1 -0
  28. package/dist/src/tools/tool-chain-orchestrator.d.ts +126 -0
  29. package/dist/src/tools/tool-chain-orchestrator.d.ts.map +1 -0
  30. package/dist/src/tools/tool-chain-orchestrator.js +550 -0
  31. package/dist/src/tools/tool-chain-orchestrator.js.map +1 -0
  32. package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts +150 -0
  33. package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts.map +1 -0
  34. package/dist/src/tools/troubleshoot-guided-workflow-tool.js +520 -0
  35. package/dist/src/tools/troubleshoot-guided-workflow-tool.js.map +1 -0
  36. package/dist/src/types/conversation-context.d.ts +6 -0
  37. package/dist/src/types/conversation-context.d.ts.map +1 -1
  38. package/dist/src/types/conversation-context.js +9 -1
  39. package/dist/src/types/conversation-context.js.map +1 -1
  40. package/dist/src/types/knowledge-graph-schemas.d.ts +773 -0
  41. package/dist/src/types/knowledge-graph-schemas.d.ts.map +1 -0
  42. package/dist/src/types/knowledge-graph-schemas.js +87 -0
  43. package/dist/src/types/knowledge-graph-schemas.js.map +1 -0
  44. package/dist/src/types/todo-json-schemas.d.ts +663 -0
  45. package/dist/src/types/todo-json-schemas.d.ts.map +1 -0
  46. package/dist/src/types/todo-json-schemas.js +113 -0
  47. package/dist/src/types/todo-json-schemas.js.map +1 -0
  48. package/dist/src/utils/chain-of-thought-template.d.ts.map +1 -1
  49. package/dist/src/utils/chain-of-thought-template.js.map +1 -1
  50. package/dist/src/utils/json-safe.d.ts +38 -0
  51. package/dist/src/utils/json-safe.d.ts.map +1 -0
  52. package/dist/src/utils/json-safe.js +86 -0
  53. package/dist/src/utils/json-safe.js.map +1 -0
  54. package/dist/src/utils/knowledge-graph-manager.d.ts +65 -0
  55. package/dist/src/utils/knowledge-graph-manager.d.ts.map +1 -0
  56. package/dist/src/utils/knowledge-graph-manager.js +358 -0
  57. package/dist/src/utils/knowledge-graph-manager.js.map +1 -0
  58. package/dist/src/utils/mcp-response-validator.d.ts +30 -0
  59. package/dist/src/utils/mcp-response-validator.d.ts.map +1 -0
  60. package/dist/src/utils/mcp-response-validator.js +197 -0
  61. package/dist/src/utils/mcp-response-validator.js.map +1 -0
  62. package/dist/src/utils/project-health-scoring.d.ts +177 -0
  63. package/dist/src/utils/project-health-scoring.d.ts.map +1 -0
  64. package/dist/src/utils/project-health-scoring.js +370 -0
  65. package/dist/src/utils/project-health-scoring.js.map +1 -0
  66. package/dist/src/utils/release-readiness-detector.d.ts +2 -0
  67. package/dist/src/utils/release-readiness-detector.d.ts.map +1 -1
  68. package/dist/src/utils/release-readiness-detector.js +2 -0
  69. package/dist/src/utils/release-readiness-detector.js.map +1 -1
  70. package/dist/src/utils/todo-file-watcher.d.ts +26 -0
  71. package/dist/src/utils/todo-file-watcher.d.ts.map +1 -0
  72. package/dist/src/utils/todo-file-watcher.js +163 -0
  73. package/dist/src/utils/todo-file-watcher.js.map +1 -0
  74. package/dist/src/utils/todo-json-manager.d.ts +71 -0
  75. package/dist/src/utils/todo-json-manager.d.ts.map +1 -0
  76. package/dist/src/utils/todo-json-manager.js +394 -0
  77. package/dist/src/utils/todo-json-manager.js.map +1 -0
  78. package/dist/src/utils/todo-markdown-converter.d.ts +16 -0
  79. package/dist/src/utils/todo-markdown-converter.d.ts.map +1 -0
  80. package/dist/src/utils/todo-markdown-converter.js +362 -0
  81. package/dist/src/utils/todo-markdown-converter.js.map +1 -0
  82. package/dist/src/utils/todo-migration.d.ts +47 -0
  83. package/dist/src/utils/todo-migration.d.ts.map +1 -0
  84. package/dist/src/utils/todo-migration.js +261 -0
  85. package/dist/src/utils/todo-migration.js.map +1 -0
  86. package/package.json +1 -1
  87. package/dist/src/tools/todo-management-tool.d.ts +0 -166
  88. package/dist/src/tools/todo-management-tool.d.ts.map +0 -1
  89. package/dist/src/tools/todo-management-tool.js +0 -472
  90. package/dist/src/tools/todo-management-tool.js.map +0 -1
@@ -0,0 +1,173 @@
1
+ /**
2
+ * Smart Score Tool - Central Coordination for Project Health Scoring
3
+ *
4
+ * Provides comprehensive scoring coordination across all MCP tools:
5
+ * - Cross-tool score synchronization
6
+ * - Manual score recalculation and rebalancing
7
+ * - Health score diagnostics and validation
8
+ * - Automated score updates and maintenance
9
+ *
10
+ * IMPORTANT FOR AI ASSISTANTS: This tool depends on cache infrastructure and
11
+ * works best when other tools have already populated data.
12
+ *
13
+ * Cache Dependencies:
14
+ * - Requires: .mcp-adr-cache/project-health-scores.json (main scoring data)
15
+ * - May read: .mcp-adr-cache/todo-data.json (for task completion scoring)
16
+ * - Updates: .mcp-adr-cache/project-health-scores.json (with new scores)
17
+ *
18
+ * Workflow Timing:
19
+ * - Run AFTER other tools have populated cache data
20
+ * - Use 'recalculate_scores' to refresh stale data
21
+ * - Use 'sync_scores' to synchronize across tools
22
+ * - Use 'optimize_weights' for score tuning
23
+ */
24
+ import { z } from 'zod';
25
+ declare const SmartScoreSchema: z.ZodUnion<[z.ZodObject<{
26
+ operation: z.ZodLiteral<"recalculate_scores">;
27
+ projectPath: z.ZodString;
28
+ components: z.ZodDefault<z.ZodArray<z.ZodEnum<["task_completion", "deployment_readiness", "architecture_compliance", "security_posture", "code_quality", "all"]>, "many">>;
29
+ forceUpdate: z.ZodDefault<z.ZodBoolean>;
30
+ updateSources: z.ZodDefault<z.ZodBoolean>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ projectPath: string;
33
+ operation: "recalculate_scores";
34
+ components: ("task_completion" | "deployment_readiness" | "architecture_compliance" | "security_posture" | "code_quality" | "all")[];
35
+ forceUpdate: boolean;
36
+ updateSources: boolean;
37
+ }, {
38
+ projectPath: string;
39
+ operation: "recalculate_scores";
40
+ components?: ("task_completion" | "deployment_readiness" | "architecture_compliance" | "security_posture" | "code_quality" | "all")[] | undefined;
41
+ forceUpdate?: boolean | undefined;
42
+ updateSources?: boolean | undefined;
43
+ }>, z.ZodObject<{
44
+ operation: z.ZodLiteral<"sync_scores">;
45
+ projectPath: z.ZodString;
46
+ todoPath: z.ZodDefault<z.ZodString>;
47
+ triggerTools: z.ZodOptional<z.ZodArray<z.ZodEnum<["manage_todo", "smart_git_push", "compare_adr_progress", "analyze_content_security", "validate_rules"]>, "many">>;
48
+ rebalanceWeights: z.ZodDefault<z.ZodBoolean>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ projectPath: string;
51
+ operation: "sync_scores";
52
+ todoPath: string;
53
+ rebalanceWeights: boolean;
54
+ triggerTools?: ("manage_todo" | "smart_git_push" | "compare_adr_progress" | "analyze_content_security" | "validate_rules")[] | undefined;
55
+ }, {
56
+ projectPath: string;
57
+ operation: "sync_scores";
58
+ todoPath?: string | undefined;
59
+ triggerTools?: ("manage_todo" | "smart_git_push" | "compare_adr_progress" | "analyze_content_security" | "validate_rules")[] | undefined;
60
+ rebalanceWeights?: boolean | undefined;
61
+ }>, z.ZodObject<{
62
+ operation: z.ZodLiteral<"diagnose_scores">;
63
+ projectPath: z.ZodString;
64
+ includeHistory: z.ZodDefault<z.ZodBoolean>;
65
+ checkDataFreshness: z.ZodDefault<z.ZodBoolean>;
66
+ suggestImprovements: z.ZodDefault<z.ZodBoolean>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ projectPath: string;
69
+ operation: "diagnose_scores";
70
+ includeHistory: boolean;
71
+ checkDataFreshness: boolean;
72
+ suggestImprovements: boolean;
73
+ }, {
74
+ projectPath: string;
75
+ operation: "diagnose_scores";
76
+ includeHistory?: boolean | undefined;
77
+ checkDataFreshness?: boolean | undefined;
78
+ suggestImprovements?: boolean | undefined;
79
+ }>, z.ZodObject<{
80
+ operation: z.ZodLiteral<"optimize_weights">;
81
+ projectPath: z.ZodString;
82
+ analysisMode: z.ZodDefault<z.ZodEnum<["current_state", "historical_data", "project_type"]>>;
83
+ customWeights: z.ZodOptional<z.ZodObject<{
84
+ taskCompletion: z.ZodOptional<z.ZodNumber>;
85
+ deploymentReadiness: z.ZodOptional<z.ZodNumber>;
86
+ architectureCompliance: z.ZodOptional<z.ZodNumber>;
87
+ securityPosture: z.ZodOptional<z.ZodNumber>;
88
+ codeQuality: z.ZodOptional<z.ZodNumber>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ taskCompletion?: number | undefined;
91
+ deploymentReadiness?: number | undefined;
92
+ architectureCompliance?: number | undefined;
93
+ securityPosture?: number | undefined;
94
+ codeQuality?: number | undefined;
95
+ }, {
96
+ taskCompletion?: number | undefined;
97
+ deploymentReadiness?: number | undefined;
98
+ architectureCompliance?: number | undefined;
99
+ securityPosture?: number | undefined;
100
+ codeQuality?: number | undefined;
101
+ }>>;
102
+ previewOnly: z.ZodDefault<z.ZodBoolean>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ projectPath: string;
105
+ operation: "optimize_weights";
106
+ analysisMode: "project_type" | "current_state" | "historical_data";
107
+ previewOnly: boolean;
108
+ customWeights?: {
109
+ taskCompletion?: number | undefined;
110
+ deploymentReadiness?: number | undefined;
111
+ architectureCompliance?: number | undefined;
112
+ securityPosture?: number | undefined;
113
+ codeQuality?: number | undefined;
114
+ } | undefined;
115
+ }, {
116
+ projectPath: string;
117
+ operation: "optimize_weights";
118
+ analysisMode?: "project_type" | "current_state" | "historical_data" | undefined;
119
+ customWeights?: {
120
+ taskCompletion?: number | undefined;
121
+ deploymentReadiness?: number | undefined;
122
+ architectureCompliance?: number | undefined;
123
+ securityPosture?: number | undefined;
124
+ codeQuality?: number | undefined;
125
+ } | undefined;
126
+ previewOnly?: boolean | undefined;
127
+ }>, z.ZodObject<{
128
+ operation: z.ZodLiteral<"reset_scores">;
129
+ projectPath: z.ZodString;
130
+ component: z.ZodDefault<z.ZodEnum<["task_completion", "deployment_readiness", "architecture_compliance", "security_posture", "code_quality", "all"]>>;
131
+ preserveHistory: z.ZodDefault<z.ZodBoolean>;
132
+ recalculateAfterReset: z.ZodDefault<z.ZodBoolean>;
133
+ }, "strip", z.ZodTypeAny, {
134
+ projectPath: string;
135
+ operation: "reset_scores";
136
+ component: "task_completion" | "deployment_readiness" | "architecture_compliance" | "security_posture" | "code_quality" | "all";
137
+ preserveHistory: boolean;
138
+ recalculateAfterReset: boolean;
139
+ }, {
140
+ projectPath: string;
141
+ operation: "reset_scores";
142
+ component?: "task_completion" | "deployment_readiness" | "architecture_compliance" | "security_posture" | "code_quality" | "all" | undefined;
143
+ preserveHistory?: boolean | undefined;
144
+ recalculateAfterReset?: boolean | undefined;
145
+ }>, z.ZodObject<{
146
+ operation: z.ZodLiteral<"get_score_trends">;
147
+ projectPath: z.ZodString;
148
+ }, "strip", z.ZodTypeAny, {
149
+ projectPath: string;
150
+ operation: "get_score_trends";
151
+ }, {
152
+ projectPath: string;
153
+ operation: "get_score_trends";
154
+ }>, z.ZodObject<{
155
+ operation: z.ZodLiteral<"get_intent_scores">;
156
+ projectPath: z.ZodString;
157
+ intentId: z.ZodString;
158
+ }, "strip", z.ZodTypeAny, {
159
+ projectPath: string;
160
+ intentId: string;
161
+ operation: "get_intent_scores";
162
+ }, {
163
+ projectPath: string;
164
+ intentId: string;
165
+ operation: "get_intent_scores";
166
+ }>]>;
167
+ type SmartScoreArgs = z.infer<typeof SmartScoreSchema>;
168
+ /**
169
+ * Main smart score function
170
+ */
171
+ export declare function smartScore(args: SmartScoreArgs): Promise<any>;
172
+ export {};
173
+ //# sourceMappingURL=smart-score-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smart-score-tool.d.ts","sourceRoot":"","sources":["../../../src/tools/smart-score-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8DxB,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQpB,CAAC;AAEH,KAAK,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AA0MvD;;GAEG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,CAydnE"}