UNPKG

mcp-chain-of-draft-server

Version:

A Model Context Protocol server which provides Chain of Draft style thinking

146 lines (145 loc) 11.5 kB
import { z } from "zod"; export declare const TOOL_NAME = "implementation-strategy-planner"; export declare const TOOL_PARAM_DESCRIPTIONS: { strategy_id: string; feature_name: string; feature_description: string; implementation_approaches: string; selected_approach: string; dependencies: string; constraints: string; success_criteria: string; draft_number: string; total_drafts: string; is_critique: string; critique_focus: string; revision_instructions: string; next_step_needed: string; is_final_draft: string; }; export declare const TOOL_SCHEMA: { strategy_id: z.ZodString; feature_name: z.ZodString; feature_description: z.ZodString; implementation_approaches: z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; phases: z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; tasks: z.ZodArray<z.ZodString, "many">; estimated_effort: z.ZodNumber; risks: z.ZodArray<z.ZodObject<{ description: z.ZodString; mitigation: z.ZodString; impact: z.ZodEnum<["low", "medium", "high"]>; }, "strip", z.ZodTypeAny, { description: string; mitigation: string; impact: "low" | "medium" | "high"; }, { description: string; mitigation: string; impact: "low" | "medium" | "high"; }>, "many">; dependencies: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { name: string; description: string; tasks: string[]; estimated_effort: number; risks: { description: string; mitigation: string; impact: "low" | "medium" | "high"; }[]; dependencies: string[]; }, { name: string; description: string; tasks: string[]; estimated_effort: number; risks: { description: string; mitigation: string; impact: "low" | "medium" | "high"; }[]; dependencies: string[]; }>, "many">; pros: z.ZodArray<z.ZodString, "many">; cons: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { name: string; description: string; pros: string[]; cons: string[]; phases: { name: string; description: string; tasks: string[]; estimated_effort: number; risks: { description: string; mitigation: string; impact: "low" | "medium" | "high"; }[]; dependencies: string[]; }[]; }, { name: string; description: string; pros: string[]; cons: string[]; phases: { name: string; description: string; tasks: string[]; estimated_effort: number; risks: { description: string; mitigation: string; impact: "low" | "medium" | "high"; }[]; dependencies: string[]; }[]; }>, "many">; selected_approach: z.ZodOptional<z.ZodString>; dependencies: z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; type: z.ZodEnum<["feature", "component", "system", "external", "other"]>; status: z.ZodEnum<["not_started", "in_progress", "completed", "blocked"]>; }, "strip", z.ZodTypeAny, { type: "feature" | "component" | "system" | "external" | "other"; status: "not_started" | "in_progress" | "completed" | "blocked"; name: string; description: string; }, { type: "feature" | "component" | "system" | "external" | "other"; status: "not_started" | "in_progress" | "completed" | "blocked"; name: string; description: string; }>, "many">; constraints: z.ZodArray<z.ZodObject<{ category: z.ZodEnum<["time", "resource", "technical", "organizational", "other"]>; description: z.ZodString; impact: z.ZodEnum<["low", "medium", "high"]>; }, "strip", z.ZodTypeAny, { description: string; impact: "low" | "medium" | "high"; category: "resource" | "other" | "time" | "technical" | "organizational"; }, { description: string; impact: "low" | "medium" | "high"; category: "resource" | "other" | "time" | "technical" | "organizational"; }>, "many">; success_criteria: z.ZodArray<z.ZodString, "many">; draft_number: z.ZodNumber; total_drafts: z.ZodNumber; is_critique: z.ZodOptional<z.ZodBoolean>; critique_focus: z.ZodOptional<z.ZodString>; revision_instructions: z.ZodOptional<z.ZodString>; next_step_needed: z.ZodBoolean; is_final_draft: z.ZodOptional<z.ZodBoolean>; }; export declare const TOOL_DESCRIPTION = "\n # Implementation Strategy Planner: Structured Development Roadmapping\n\n A tool that facilitates planning, critiquing, and refining implementation approaches for features or components.\n\n ## When to Use This Tool:\n - **Feature Planning:** Breaking down complex features into implementation steps\n - **Refactoring Planning:** Mapping out staged approaches to code improvement\n - **Risk Mitigation:** Identifying and addressing implementation risks\n - **Resource Allocation:** Planning how to distribute development effort\n - **Technical Spike Planning:** Designing exploratory implementation investigations\n - **Legacy System Modernization:** Planning phased replacement strategies\n\n ## Key Capabilities:\n - **Task Breakdown:** Segments implementation into discrete, manageable tasks\n - **Dependency Mapping:** Identifies dependencies between implementation steps\n - **Risk Assessment:** Highlights potential implementation challenges and contingencies\n - **Phasing Strategy:** Organizes implementation into logical phases or iterations\n - **Test Strategy Integration:** Plans testing approaches for each implementation stage\n - **Effort Estimation:** Provides structured approach to implementation sizing\n - **Alternative Evaluation:** Compares different implementation approaches\n\n ## Parameters Explained:\n - **strategy_id:** Unique identifier for the implementation strategy.\n \n - **feature_name:** Clear, descriptive name for the feature or component being implemented.\n \n - **feature_description:** Comprehensive explanation of what is being implemented and why.\n \n - **implementation_approaches:** Array of potential implementation strategies, each containing:\n * \"name\": Descriptive name for the approach\n * \"description\": Overview of the implementation approach\n * \"phases\": Array of implementation phases, each with tasks, risks, and dependencies\n * \"pros\": Benefits of this implementation approach\n * \"cons\": Drawbacks or challenges of this implementation approach\n \n - **selected_approach:** Name of the chosen implementation approach (once decided).\n \n - **dependencies:** Array of external dependencies required for implementation:\n * \"name\": Name of the dependency\n * \"description\": What the dependency provides\n * \"type\": Category of dependency (feature, component, system, external, other)\n * \"status\": Current state of the dependency\n \n - **constraints:** Array of limitations that impact implementation:\n * \"category\": Type of constraint (time, resource, technical, organizational, other)\n * \"description\": Details about the constraint\n * \"impact\": How severely this constraint affects implementation\n \n - **success_criteria:** Array of measurable conditions that define successful implementation.\n \n - **draft_number:** Current draft number in the iteration sequence (starting from 1).\n \n - **total_drafts:** Estimated total number of drafts needed to reach a complete implementation strategy.\n \n - **is_critique:** Boolean indicating the current mode:\n * true = Evaluating the current implementation strategy\n * false = Implementing revisions\n \n - **critique_focus:** (Required when is_critique=true) Specific aspect being evaluated, such as:\n * \"feasibility\": Assessing whether the approach is technically viable\n * \"risk_assessment\": Evaluating identified risks and mitigations\n * \"resource_allocation\": Analyzing how resources are distributed\n * \"timeline\": Evaluating the proposed implementation schedule\n * \"dependency_management\": Assessing how dependencies are handled\n \n - **revision_instructions:** (Required when is_critique=false) Detailed guidance for improving the implementation strategy based on the preceding critique.\n \n - **next_step_needed:** Boolean flag indicating whether another critique or revision cycle is needed.\n \n - **is_final_draft:** (Optional) Boolean indicating whether this is the final iteration of the implementation strategy.\n\n ## Best Practice Workflow:\n 1. **Start with Initial Draft:** Begin with a basic implementation strategy that outlines the feature and potential approaches.\n \n 2. **Alternate Critique and Revision:** Use is_critique=true to evaluate the strategy, then is_critique=false to implement improvements.\n \n 3. **Focus Each Critique:** Choose a specific critique_focus for each evaluation cycle rather than attempting to address everything at once.\n \n 4. **Provide Detailed Revision Guidance:** Include specific, actionable revision_instructions based on each critique.\n \n 5. **Refine Phase Decomposition:** Ensure implementation phases are logical, manageable, and properly sequenced.\n \n 6. **Develop Comprehensive Risk Management:** Identify risks and provide specific mitigation strategies.\n \n 7. **Clarify Decision Criteria:** When comparing approaches, provide clear criteria for selection.\n \n 8. **Define Concrete Success Criteria:** Ensure success measures are specific and measurable.\n\n ## Example Application:\n - **Initial Draft:** Basic strategy outlining feature and possible implementation approaches\n - **Critique #1:** Focus on approach completeness to identify missing steps or considerations\n - **Revision #1:** Expand approaches with more detailed phases and tasks\n - **Critique #2:** Focus on risk assessment to ensure potential issues are addressed\n - **Revision #2:** Enhance risk identification and mitigation strategies\n - **Critique #3:** Focus on resource allocation and timeline feasibility\n - **Revision #3:** Adjust effort estimates and phase dependencies\n - **Final Review:** Holistic evaluation to ensure readiness for implementation\n - **Final Revision:** Select final approach and refine implementation details\n\n Implementation Strategy Planner is particularly valuable for complex features that require careful planning and risk management, providing a structured framework for breaking down implementation into manageable components with clear dependencies and success criteria.\n";