mcp-adr-analysis-server 2.0.10 → 2.0.12

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 (73) hide show
  1. package/README.md +1 -1
  2. package/dist/src/index.d.ts +1 -2
  3. package/dist/src/index.d.ts.map +1 -1
  4. package/dist/src/index.js +340 -492
  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/tools/adr-suggestion-tool.d.ts +16 -0
  10. package/dist/src/tools/adr-suggestion-tool.d.ts.map +1 -1
  11. package/dist/src/tools/adr-suggestion-tool.js +55 -2
  12. package/dist/src/tools/adr-suggestion-tool.js.map +1 -1
  13. package/dist/src/tools/smart-git-push-tool-v2.d.ts +55 -0
  14. package/dist/src/tools/smart-git-push-tool-v2.d.ts.map +1 -0
  15. package/dist/src/tools/smart-git-push-tool-v2.js +527 -0
  16. package/dist/src/tools/smart-git-push-tool-v2.js.map +1 -0
  17. package/dist/src/tools/smart-git-push-tool.d.ts +27 -3
  18. package/dist/src/tools/smart-git-push-tool.d.ts.map +1 -1
  19. package/dist/src/tools/smart-git-push-tool.js +490 -10
  20. package/dist/src/tools/smart-git-push-tool.js.map +1 -1
  21. package/dist/src/tools/smart-score-tool.d.ts +39 -4
  22. package/dist/src/tools/smart-score-tool.d.ts.map +1 -1
  23. package/dist/src/tools/smart-score-tool.js +94 -15
  24. package/dist/src/tools/smart-score-tool.js.map +1 -1
  25. package/dist/src/tools/todo-management-tool-v2.d.ts +329 -0
  26. package/dist/src/tools/todo-management-tool-v2.d.ts.map +1 -0
  27. package/dist/src/tools/todo-management-tool-v2.js +644 -0
  28. package/dist/src/tools/todo-management-tool-v2.js.map +1 -0
  29. package/dist/src/tools/tool-chain-orchestrator.d.ts +3 -41
  30. package/dist/src/tools/tool-chain-orchestrator.d.ts.map +1 -1
  31. package/dist/src/tools/tool-chain-orchestrator.js +10 -198
  32. package/dist/src/tools/tool-chain-orchestrator.js.map +1 -1
  33. package/dist/src/types/conversation-context.d.ts +6 -0
  34. package/dist/src/types/conversation-context.d.ts.map +1 -1
  35. package/dist/src/types/conversation-context.js +9 -1
  36. package/dist/src/types/conversation-context.js.map +1 -1
  37. package/dist/src/types/knowledge-graph-schemas.d.ts +298 -6
  38. package/dist/src/types/knowledge-graph-schemas.d.ts.map +1 -1
  39. package/dist/src/types/knowledge-graph-schemas.js +31 -3
  40. package/dist/src/types/knowledge-graph-schemas.js.map +1 -1
  41. package/dist/src/types/todo-json-schemas.d.ts +663 -0
  42. package/dist/src/types/todo-json-schemas.d.ts.map +1 -0
  43. package/dist/src/types/todo-json-schemas.js +113 -0
  44. package/dist/src/types/todo-json-schemas.js.map +1 -0
  45. package/dist/src/utils/chain-of-thought-template.d.ts.map +1 -1
  46. package/dist/src/utils/chain-of-thought-template.js.map +1 -1
  47. package/dist/src/utils/knowledge-graph-manager.d.ts +50 -0
  48. package/dist/src/utils/knowledge-graph-manager.d.ts.map +1 -1
  49. package/dist/src/utils/knowledge-graph-manager.js +209 -3
  50. package/dist/src/utils/knowledge-graph-manager.js.map +1 -1
  51. package/dist/src/utils/project-health-scoring.js +5 -5
  52. package/dist/src/utils/project-health-scoring.js.map +1 -1
  53. package/dist/src/utils/todo-json-manager.d.ts +71 -0
  54. package/dist/src/utils/todo-json-manager.d.ts.map +1 -0
  55. package/dist/src/utils/todo-json-manager.js +394 -0
  56. package/dist/src/utils/todo-json-manager.js.map +1 -0
  57. package/dist/src/utils/todo-markdown-converter.d.ts +16 -0
  58. package/dist/src/utils/todo-markdown-converter.d.ts.map +1 -0
  59. package/dist/src/utils/todo-markdown-converter.js +362 -0
  60. package/dist/src/utils/todo-markdown-converter.js.map +1 -0
  61. package/dist/src/utils/todo-migration.d.ts +47 -0
  62. package/dist/src/utils/todo-migration.d.ts.map +1 -0
  63. package/dist/src/utils/todo-migration.js +261 -0
  64. package/dist/src/utils/todo-migration.js.map +1 -0
  65. package/package.json +1 -1
  66. package/dist/src/tools/human-override-tool.d.ts +0 -42
  67. package/dist/src/tools/human-override-tool.d.ts.map +0 -1
  68. package/dist/src/tools/human-override-tool.js +0 -431
  69. package/dist/src/tools/human-override-tool.js.map +0 -1
  70. package/dist/src/tools/todo-management-tool.d.ts +0 -344
  71. package/dist/src/tools/todo-management-tool.d.ts.map +0 -1
  72. package/dist/src/tools/todo-management-tool.js +0 -1249
  73. package/dist/src/tools/todo-management-tool.js.map +0 -1
@@ -0,0 +1,329 @@
1
+ /**
2
+ * JSON-First TODO Management Tool
3
+ *
4
+ * Replaces markdown-based TODO management with structured JSON backend
5
+ * for consistent LLM interactions and automatic scoring integration.
6
+ *
7
+ * IMPORTANT FOR AI ASSISTANTS: This tool requires the .mcp-adr-cache infrastructure
8
+ * to be initialized first. Run `discover_existing_adrs` before using this tool.
9
+ *
10
+ * Cache Dependencies:
11
+ * - Requires: .mcp-adr-cache/todo-data.json (main TODO storage)
12
+ * - Requires: .mcp-adr-cache/knowledge-graph-snapshots.json (for intent tracking)
13
+ * - Updates: .mcp-adr-cache/project-health-scores.json (task completion metrics)
14
+ *
15
+ * Key Features:
16
+ * - JSON-first storage with automatic Markdown synchronization
17
+ * - Automatic project health scoring integration
18
+ * - Knowledge graph intent tracking
19
+ * - Bidirectional TODO.md compatibility
20
+ */
21
+ import { z } from 'zod';
22
+ declare const TodoManagementV2Schema: z.ZodUnion<[z.ZodObject<{
23
+ operation: z.ZodLiteral<"create_task">;
24
+ projectPath: z.ZodString;
25
+ title: z.ZodString;
26
+ description: z.ZodOptional<z.ZodString>;
27
+ priority: z.ZodDefault<z.ZodEnum<["low", "medium", "high", "critical"]>>;
28
+ assignee: z.ZodOptional<z.ZodString>;
29
+ dueDate: z.ZodOptional<z.ZodString>;
30
+ category: z.ZodOptional<z.ZodString>;
31
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
32
+ dependencies: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
33
+ intentId: z.ZodOptional<z.ZodString>;
34
+ linkedAdrs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
35
+ autoComplete: z.ZodDefault<z.ZodBoolean>;
36
+ completionCriteria: z.ZodOptional<z.ZodString>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ title: string;
39
+ tags: string[];
40
+ projectPath: string;
41
+ priority: "medium" | "low" | "high" | "critical";
42
+ dependencies: string[];
43
+ linkedAdrs: string[];
44
+ autoComplete: boolean;
45
+ operation: "create_task";
46
+ category?: string | undefined;
47
+ description?: string | undefined;
48
+ assignee?: string | undefined;
49
+ dueDate?: string | undefined;
50
+ intentId?: string | undefined;
51
+ completionCriteria?: string | undefined;
52
+ }, {
53
+ title: string;
54
+ projectPath: string;
55
+ operation: "create_task";
56
+ category?: string | undefined;
57
+ tags?: string[] | undefined;
58
+ description?: string | undefined;
59
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
60
+ assignee?: string | undefined;
61
+ dueDate?: string | undefined;
62
+ dependencies?: string[] | undefined;
63
+ intentId?: string | undefined;
64
+ linkedAdrs?: string[] | undefined;
65
+ autoComplete?: boolean | undefined;
66
+ completionCriteria?: string | undefined;
67
+ }>, z.ZodObject<{
68
+ operation: z.ZodLiteral<"update_task">;
69
+ projectPath: z.ZodString;
70
+ taskId: z.ZodString;
71
+ updates: z.ZodObject<{
72
+ title: z.ZodOptional<z.ZodString>;
73
+ description: z.ZodOptional<z.ZodString>;
74
+ status: z.ZodOptional<z.ZodEnum<["pending", "in_progress", "completed", "blocked", "cancelled"]>>;
75
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
76
+ assignee: z.ZodOptional<z.ZodString>;
77
+ dueDate: z.ZodOptional<z.ZodString>;
78
+ progressPercentage: z.ZodOptional<z.ZodNumber>;
79
+ notes: z.ZodOptional<z.ZodString>;
80
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
81
+ }, "strip", z.ZodTypeAny, {
82
+ status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
83
+ title?: string | undefined;
84
+ tags?: string[] | undefined;
85
+ description?: string | undefined;
86
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
87
+ assignee?: string | undefined;
88
+ dueDate?: string | undefined;
89
+ progressPercentage?: number | undefined;
90
+ notes?: string | undefined;
91
+ }, {
92
+ status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
93
+ title?: string | undefined;
94
+ tags?: string[] | undefined;
95
+ description?: string | undefined;
96
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
97
+ assignee?: string | undefined;
98
+ dueDate?: string | undefined;
99
+ progressPercentage?: number | undefined;
100
+ notes?: string | undefined;
101
+ }>;
102
+ reason: z.ZodString;
103
+ }, "strip", z.ZodTypeAny, {
104
+ projectPath: string;
105
+ taskId: string;
106
+ operation: "update_task";
107
+ updates: {
108
+ status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
109
+ title?: string | undefined;
110
+ tags?: string[] | undefined;
111
+ description?: string | undefined;
112
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
113
+ assignee?: string | undefined;
114
+ dueDate?: string | undefined;
115
+ progressPercentage?: number | undefined;
116
+ notes?: string | undefined;
117
+ };
118
+ reason: string;
119
+ }, {
120
+ projectPath: string;
121
+ taskId: string;
122
+ operation: "update_task";
123
+ updates: {
124
+ status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
125
+ title?: string | undefined;
126
+ tags?: string[] | undefined;
127
+ description?: string | undefined;
128
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
129
+ assignee?: string | undefined;
130
+ dueDate?: string | undefined;
131
+ progressPercentage?: number | undefined;
132
+ notes?: string | undefined;
133
+ };
134
+ reason: string;
135
+ }>, z.ZodObject<{
136
+ operation: z.ZodLiteral<"bulk_update">;
137
+ projectPath: z.ZodString;
138
+ updates: z.ZodArray<z.ZodObject<{
139
+ taskId: z.ZodString;
140
+ status: z.ZodOptional<z.ZodEnum<["pending", "in_progress", "completed", "blocked", "cancelled"]>>;
141
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
142
+ assignee: z.ZodOptional<z.ZodString>;
143
+ notes: z.ZodOptional<z.ZodString>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ taskId: string;
146
+ status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
147
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
148
+ assignee?: string | undefined;
149
+ notes?: string | undefined;
150
+ }, {
151
+ taskId: string;
152
+ status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
153
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
154
+ assignee?: string | undefined;
155
+ notes?: string | undefined;
156
+ }>, "many">;
157
+ reason: z.ZodString;
158
+ }, "strip", z.ZodTypeAny, {
159
+ projectPath: string;
160
+ operation: "bulk_update";
161
+ updates: {
162
+ taskId: string;
163
+ status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
164
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
165
+ assignee?: string | undefined;
166
+ notes?: string | undefined;
167
+ }[];
168
+ reason: string;
169
+ }, {
170
+ projectPath: string;
171
+ operation: "bulk_update";
172
+ updates: {
173
+ taskId: string;
174
+ status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
175
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
176
+ assignee?: string | undefined;
177
+ notes?: string | undefined;
178
+ }[];
179
+ reason: string;
180
+ }>, z.ZodObject<{
181
+ operation: z.ZodLiteral<"get_tasks">;
182
+ projectPath: z.ZodString;
183
+ filters: z.ZodOptional<z.ZodObject<{
184
+ status: z.ZodOptional<z.ZodEnum<["pending", "in_progress", "completed", "blocked", "cancelled"]>>;
185
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
186
+ assignee: z.ZodOptional<z.ZodString>;
187
+ category: z.ZodOptional<z.ZodString>;
188
+ hasDeadline: z.ZodOptional<z.ZodBoolean>;
189
+ overdue: z.ZodOptional<z.ZodBoolean>;
190
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
191
+ }, "strip", z.ZodTypeAny, {
192
+ category?: string | undefined;
193
+ status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
194
+ tags?: string[] | undefined;
195
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
196
+ assignee?: string | undefined;
197
+ hasDeadline?: boolean | undefined;
198
+ overdue?: boolean | undefined;
199
+ }, {
200
+ category?: string | undefined;
201
+ status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
202
+ tags?: string[] | undefined;
203
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
204
+ assignee?: string | undefined;
205
+ hasDeadline?: boolean | undefined;
206
+ overdue?: boolean | undefined;
207
+ }>>;
208
+ sortBy: z.ZodDefault<z.ZodEnum<["priority", "dueDate", "createdAt", "updatedAt"]>>;
209
+ sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
210
+ limit: z.ZodOptional<z.ZodNumber>;
211
+ }, "strip", z.ZodTypeAny, {
212
+ projectPath: string;
213
+ operation: "get_tasks";
214
+ sortBy: "priority" | "dueDate" | "createdAt" | "updatedAt";
215
+ sortOrder: "asc" | "desc";
216
+ filters?: {
217
+ category?: string | undefined;
218
+ status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
219
+ tags?: string[] | undefined;
220
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
221
+ assignee?: string | undefined;
222
+ hasDeadline?: boolean | undefined;
223
+ overdue?: boolean | undefined;
224
+ } | undefined;
225
+ limit?: number | undefined;
226
+ }, {
227
+ projectPath: string;
228
+ operation: "get_tasks";
229
+ filters?: {
230
+ category?: string | undefined;
231
+ status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
232
+ tags?: string[] | undefined;
233
+ priority?: "medium" | "low" | "high" | "critical" | undefined;
234
+ assignee?: string | undefined;
235
+ hasDeadline?: boolean | undefined;
236
+ overdue?: boolean | undefined;
237
+ } | undefined;
238
+ sortBy?: "priority" | "dueDate" | "createdAt" | "updatedAt" | undefined;
239
+ sortOrder?: "asc" | "desc" | undefined;
240
+ limit?: number | undefined;
241
+ }>, z.ZodObject<{
242
+ operation: z.ZodLiteral<"get_analytics">;
243
+ projectPath: z.ZodString;
244
+ timeframe: z.ZodDefault<z.ZodEnum<["day", "week", "month", "all"]>>;
245
+ includeVelocity: z.ZodDefault<z.ZodBoolean>;
246
+ includeScoring: z.ZodDefault<z.ZodBoolean>;
247
+ }, "strip", z.ZodTypeAny, {
248
+ projectPath: string;
249
+ operation: "get_analytics";
250
+ timeframe: "day" | "week" | "month" | "all";
251
+ includeVelocity: boolean;
252
+ includeScoring: boolean;
253
+ }, {
254
+ projectPath: string;
255
+ operation: "get_analytics";
256
+ timeframe?: "day" | "week" | "month" | "all" | undefined;
257
+ includeVelocity?: boolean | undefined;
258
+ includeScoring?: boolean | undefined;
259
+ }>, z.ZodObject<{
260
+ operation: z.ZodLiteral<"import_adr_tasks">;
261
+ projectPath: z.ZodString;
262
+ adrDirectory: z.ZodDefault<z.ZodString>;
263
+ intentId: z.ZodOptional<z.ZodString>;
264
+ preserveExisting: z.ZodDefault<z.ZodBoolean>;
265
+ autoLinkDependencies: z.ZodDefault<z.ZodBoolean>;
266
+ }, "strip", z.ZodTypeAny, {
267
+ projectPath: string;
268
+ adrDirectory: string;
269
+ operation: "import_adr_tasks";
270
+ preserveExisting: boolean;
271
+ autoLinkDependencies: boolean;
272
+ intentId?: string | undefined;
273
+ }, {
274
+ projectPath: string;
275
+ operation: "import_adr_tasks";
276
+ adrDirectory?: string | undefined;
277
+ intentId?: string | undefined;
278
+ preserveExisting?: boolean | undefined;
279
+ autoLinkDependencies?: boolean | undefined;
280
+ }>, z.ZodObject<{
281
+ operation: z.ZodLiteral<"sync_knowledge_graph">;
282
+ projectPath: z.ZodString;
283
+ direction: z.ZodDefault<z.ZodEnum<["to_kg", "from_kg", "bidirectional"]>>;
284
+ intentId: z.ZodOptional<z.ZodString>;
285
+ }, "strip", z.ZodTypeAny, {
286
+ projectPath: string;
287
+ operation: "sync_knowledge_graph";
288
+ direction: "to_kg" | "from_kg" | "bidirectional";
289
+ intentId?: string | undefined;
290
+ }, {
291
+ projectPath: string;
292
+ operation: "sync_knowledge_graph";
293
+ intentId?: string | undefined;
294
+ direction?: "to_kg" | "from_kg" | "bidirectional" | undefined;
295
+ }>, z.ZodObject<{
296
+ operation: z.ZodLiteral<"sync_to_markdown">;
297
+ projectPath: z.ZodString;
298
+ force: z.ZodDefault<z.ZodBoolean>;
299
+ }, "strip", z.ZodTypeAny, {
300
+ projectPath: string;
301
+ operation: "sync_to_markdown";
302
+ force: boolean;
303
+ }, {
304
+ projectPath: string;
305
+ operation: "sync_to_markdown";
306
+ force?: boolean | undefined;
307
+ }>, z.ZodObject<{
308
+ operation: z.ZodLiteral<"import_from_markdown">;
309
+ projectPath: z.ZodString;
310
+ mergeStrategy: z.ZodDefault<z.ZodEnum<["overwrite", "merge", "preserve_json"]>>;
311
+ backupExisting: z.ZodDefault<z.ZodBoolean>;
312
+ }, "strip", z.ZodTypeAny, {
313
+ projectPath: string;
314
+ operation: "import_from_markdown";
315
+ mergeStrategy: "merge" | "overwrite" | "preserve_json";
316
+ backupExisting: boolean;
317
+ }, {
318
+ projectPath: string;
319
+ operation: "import_from_markdown";
320
+ mergeStrategy?: "merge" | "overwrite" | "preserve_json" | undefined;
321
+ backupExisting?: boolean | undefined;
322
+ }>]>;
323
+ type TodoManagementV2Args = z.infer<typeof TodoManagementV2Schema>;
324
+ /**
325
+ * Main TODO management function with JSON backend
326
+ */
327
+ export declare function manageTodoV2(args: TodoManagementV2Args): Promise<any>;
328
+ export {};
329
+ //# sourceMappingURL=todo-management-tool-v2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todo-management-tool-v2.d.ts","sourceRoot":"","sources":["../../../src/tools/todo-management-tool-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8GxB,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAU1B,CAAC;AAEH,KAAK,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEnE;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC,CAwY3E"}