mcp-adr-analysis-server
Version:
MCP server for analyzing Architectural Decision Records and project architecture
368 lines • 14.5 kB
TypeScript
/**
* JSON-First TODO Management Tool
*
* Replaces markdown-based TODO management with structured JSON backend
* for consistent LLM interactions and automatic scoring integration.
*
* IMPORTANT FOR AI ASSISTANTS: This tool requires the .mcp-adr-cache infrastructure
* to be initialized first. Run `discover_existing_adrs` before using this tool.
*
* Cache Dependencies:
* - Requires: .mcp-adr-cache/todo-data.json (main TODO storage)
* - Requires: .mcp-adr-cache/knowledge-graph-snapshots.json (for intent tracking)
* - Updates: .mcp-adr-cache/project-health-scores.json (task completion metrics)
*
* Key Features:
* - JSON-first storage with automatic Markdown synchronization
* - Automatic project health scoring integration
* - Knowledge graph intent tracking
* - Bidirectional TODO.md compatibility
*/
import { z } from 'zod';
declare const TodoManagementV2Schema: z.ZodUnion<[z.ZodObject<{
operation: z.ZodLiteral<"create_task">;
projectPath: z.ZodString;
title: z.ZodString;
description: z.ZodOptional<z.ZodString>;
priority: z.ZodDefault<z.ZodEnum<["low", "medium", "high", "critical"]>>;
assignee: z.ZodOptional<z.ZodString>;
dueDate: z.ZodOptional<z.ZodString>;
category: z.ZodOptional<z.ZodString>;
tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
dependencies: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
intentId: z.ZodOptional<z.ZodString>;
linkedAdrs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
autoComplete: z.ZodDefault<z.ZodBoolean>;
completionCriteria: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
title: string;
tags: string[];
projectPath: string;
priority: "medium" | "low" | "high" | "critical";
dependencies: string[];
linkedAdrs: string[];
autoComplete: boolean;
operation: "create_task";
category?: string | undefined;
description?: string | undefined;
assignee?: string | undefined;
dueDate?: string | undefined;
intentId?: string | undefined;
completionCriteria?: string | undefined;
}, {
title: string;
projectPath: string;
operation: "create_task";
category?: string | undefined;
tags?: string[] | undefined;
description?: string | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
dueDate?: string | undefined;
dependencies?: string[] | undefined;
intentId?: string | undefined;
linkedAdrs?: string[] | undefined;
autoComplete?: boolean | undefined;
completionCriteria?: string | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"update_task">;
projectPath: z.ZodString;
taskId: z.ZodString;
updates: z.ZodObject<{
title: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
status: z.ZodOptional<z.ZodEnum<["pending", "in_progress", "completed", "blocked", "cancelled"]>>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
assignee: z.ZodOptional<z.ZodString>;
dueDate: z.ZodOptional<z.ZodString>;
progressPercentage: z.ZodOptional<z.ZodNumber>;
notes: z.ZodOptional<z.ZodString>;
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
title?: string | undefined;
tags?: string[] | undefined;
description?: string | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
dueDate?: string | undefined;
progressPercentage?: number | undefined;
notes?: string | undefined;
}, {
status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
title?: string | undefined;
tags?: string[] | undefined;
description?: string | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
dueDate?: string | undefined;
progressPercentage?: number | undefined;
notes?: string | undefined;
}>;
reason: z.ZodString;
}, "strip", z.ZodTypeAny, {
projectPath: string;
taskId: string;
operation: "update_task";
updates: {
status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
title?: string | undefined;
tags?: string[] | undefined;
description?: string | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
dueDate?: string | undefined;
progressPercentage?: number | undefined;
notes?: string | undefined;
};
reason: string;
}, {
projectPath: string;
taskId: string;
operation: "update_task";
updates: {
status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
title?: string | undefined;
tags?: string[] | undefined;
description?: string | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
dueDate?: string | undefined;
progressPercentage?: number | undefined;
notes?: string | undefined;
};
reason: string;
}>, z.ZodObject<{
operation: z.ZodLiteral<"bulk_update">;
projectPath: z.ZodString;
updates: z.ZodArray<z.ZodObject<{
taskId: z.ZodString;
status: z.ZodOptional<z.ZodEnum<["pending", "in_progress", "completed", "blocked", "cancelled"]>>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
assignee: z.ZodOptional<z.ZodString>;
notes: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
taskId: string;
status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
notes?: string | undefined;
}, {
taskId: string;
status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
notes?: string | undefined;
}>, "many">;
reason: z.ZodString;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "bulk_update";
updates: {
taskId: string;
status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
notes?: string | undefined;
}[];
reason: string;
}, {
projectPath: string;
operation: "bulk_update";
updates: {
taskId: string;
status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
notes?: string | undefined;
}[];
reason: string;
}>, z.ZodObject<{
operation: z.ZodLiteral<"get_tasks">;
projectPath: z.ZodString;
filters: z.ZodOptional<z.ZodObject<{
status: z.ZodOptional<z.ZodEnum<["pending", "in_progress", "completed", "blocked", "cancelled"]>>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
assignee: z.ZodOptional<z.ZodString>;
category: z.ZodOptional<z.ZodString>;
hasDeadline: z.ZodOptional<z.ZodBoolean>;
overdue: z.ZodOptional<z.ZodBoolean>;
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
category?: string | undefined;
status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
tags?: string[] | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
hasDeadline?: boolean | undefined;
overdue?: boolean | undefined;
}, {
category?: string | undefined;
status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
tags?: string[] | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
hasDeadline?: boolean | undefined;
overdue?: boolean | undefined;
}>>;
sortBy: z.ZodDefault<z.ZodEnum<["priority", "dueDate", "createdAt", "updatedAt"]>>;
sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
limit: z.ZodOptional<z.ZodNumber>;
showFullIds: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "get_tasks";
sortBy: "priority" | "dueDate" | "createdAt" | "updatedAt";
sortOrder: "asc" | "desc";
showFullIds: boolean;
filters?: {
category?: string | undefined;
status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
tags?: string[] | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
hasDeadline?: boolean | undefined;
overdue?: boolean | undefined;
} | undefined;
limit?: number | undefined;
}, {
projectPath: string;
operation: "get_tasks";
filters?: {
category?: string | undefined;
status?: "pending" | "completed" | "in_progress" | "blocked" | "cancelled" | undefined;
tags?: string[] | undefined;
priority?: "medium" | "low" | "high" | "critical" | undefined;
assignee?: string | undefined;
hasDeadline?: boolean | undefined;
overdue?: boolean | undefined;
} | undefined;
sortBy?: "priority" | "dueDate" | "createdAt" | "updatedAt" | undefined;
sortOrder?: "asc" | "desc" | undefined;
limit?: number | undefined;
showFullIds?: boolean | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"get_analytics">;
projectPath: z.ZodString;
timeframe: z.ZodDefault<z.ZodEnum<["day", "week", "month", "all"]>>;
includeVelocity: z.ZodDefault<z.ZodBoolean>;
includeScoring: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "get_analytics";
timeframe: "day" | "week" | "month" | "all";
includeVelocity: boolean;
includeScoring: boolean;
}, {
projectPath: string;
operation: "get_analytics";
timeframe?: "day" | "week" | "month" | "all" | undefined;
includeVelocity?: boolean | undefined;
includeScoring?: boolean | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"import_adr_tasks">;
projectPath: z.ZodString;
adrDirectory: z.ZodDefault<z.ZodString>;
intentId: z.ZodOptional<z.ZodString>;
preserveExisting: z.ZodDefault<z.ZodBoolean>;
autoLinkDependencies: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
adrDirectory: string;
operation: "import_adr_tasks";
preserveExisting: boolean;
autoLinkDependencies: boolean;
intentId?: string | undefined;
}, {
projectPath: string;
operation: "import_adr_tasks";
adrDirectory?: string | undefined;
intentId?: string | undefined;
preserveExisting?: boolean | undefined;
autoLinkDependencies?: boolean | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"sync_knowledge_graph">;
projectPath: z.ZodString;
direction: z.ZodDefault<z.ZodEnum<["to_kg", "from_kg", "bidirectional"]>>;
intentId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "sync_knowledge_graph";
direction: "to_kg" | "from_kg" | "bidirectional";
intentId?: string | undefined;
}, {
projectPath: string;
operation: "sync_knowledge_graph";
intentId?: string | undefined;
direction?: "to_kg" | "from_kg" | "bidirectional" | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"sync_to_markdown">;
projectPath: z.ZodString;
force: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "sync_to_markdown";
force: boolean;
}, {
projectPath: string;
operation: "sync_to_markdown";
force?: boolean | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"import_from_markdown">;
projectPath: z.ZodString;
mergeStrategy: z.ZodDefault<z.ZodEnum<["overwrite", "merge", "preserve_json"]>>;
backupExisting: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "import_from_markdown";
mergeStrategy: "merge" | "overwrite" | "preserve_json";
backupExisting: boolean;
}, {
projectPath: string;
operation: "import_from_markdown";
mergeStrategy?: "merge" | "overwrite" | "preserve_json" | undefined;
backupExisting?: boolean | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"find_task">;
projectPath: z.ZodString;
query: z.ZodString;
searchType: z.ZodDefault<z.ZodEnum<["id", "title", "description", "all"]>>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "find_task";
query: string;
searchType: "title" | "id" | "description" | "all";
}, {
projectPath: string;
operation: "find_task";
query: string;
searchType?: "title" | "id" | "description" | "all" | undefined;
}>, z.ZodObject<{
operation: z.ZodLiteral<"resume_todo_list">;
projectPath: z.ZodString;
analyzeRecent: z.ZodDefault<z.ZodBoolean>;
includeContext: z.ZodDefault<z.ZodBoolean>;
showNextActions: z.ZodDefault<z.ZodBoolean>;
checkDeploymentReadiness: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
operation: "resume_todo_list";
analyzeRecent: boolean;
includeContext: boolean;
showNextActions: boolean;
checkDeploymentReadiness: boolean;
}, {
projectPath: string;
operation: "resume_todo_list";
analyzeRecent?: boolean | undefined;
includeContext?: boolean | undefined;
showNextActions?: boolean | undefined;
checkDeploymentReadiness?: boolean | undefined;
}>]>;
type TodoManagementV2Args = z.infer<typeof TodoManagementV2Schema>;
/**
* Main TODO management function with JSON backend
*/
export declare function manageTodoV2(args: TodoManagementV2Args): Promise<any>;
export {};
//# sourceMappingURL=todo-management-tool-v2.d.ts.map