plan-feature
Use this tool to map out feature implementation with a structured, step-by-step approach. Specify tasks, requirements, and planning scope to streamline development processes with AI-driven guidance.
Instructions
Plan feature implementation with step-by-step approach
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| provider | No | AI provider to use | gemini |
| requirements | No | Specific requirements or constraints | |
| scope | No | Planning scope | standard |
| task | Yes | What to plan (e.g., 'add user profiles', 'implement payment system') |
Implementation Reference
- src/handlers/ai-tools.ts:450-501 (handler)Core handler function that implements the plan-feature tool logic: selects AI provider, constructs scope-aware system prompt, generates planning response via provider.generateText, and returns formatted output.async handlePlanFeature(params: z.infer<typeof PlanFeatureSchema>) { // Use provided provider or get the preferred one (Azure if configured) const providerName = params.provider || (await this.providerManager.getPreferredProvider(['openai', 'gemini', 'azure', 'grok'])); const provider = await this.providerManager.getProvider(providerName); const scopePrompts = { minimal: "Provide a basic implementation plan with essential components only", standard: "Provide a detailed implementation plan with proper architecture and considerations", comprehensive: "Provide an extensive implementation plan with full architecture, testing, documentation, and deployment considerations" }; const systemPrompt = `You are an expert software architect and project planner. Create detailed implementation plans for features. ${scopePrompts[params.scope]} Include in your plan: - Feature breakdown and components - Implementation steps and timeline - Technical considerations and dependencies - Testing and validation approach - Potential challenges and mitigation strategies Be practical and actionable in your planning.`; let prompt = `Plan the following feature: ${params.task}`; if (params.requirements) { prompt += `\n\nRequirements: ${params.requirements}`; } const response = await provider.generateText({ prompt, systemPrompt, temperature: 0.6, // Moderate temperature for creative planning reasoningEffort: providerName === "openai" || providerName === "azure" ? "medium" : undefined, useSearchGrounding: providerName === "gemini", }); return { content: [ { type: "text", text: response.text, }, ], metadata: { provider: providerName, model: response.model, scope: params.scope, usage: response.usage, ...response.metadata, }, }; }
- src/server.ts:55-60 (schema)Zod input schema for plan-feature tool used in server registration, defining parameters: task (required), requirements (optional), scope (minimal/standard/comprehensive, default standard), provider (openai/gemini/azure/grok, default gemini).const PlanFeatureSchema = z.object({ task: z.string().describe("What to plan (e.g., 'add user profiles', 'implement payment system')"), requirements: z.string().optional().describe("Specific requirements or constraints"), scope: z.enum(["minimal", "standard", "comprehensive"]).default("standard").describe("Planning scope"), provider: z.enum(["openai", "gemini", "azure", "grok"]).optional().default("gemini").describe("AI provider to use"), });
- src/server.ts:314-322 (registration)MCP server tool registration for 'plan-feature': sets title, description, inputSchema from PlanFeatureSchema, and async handler that loads AIToolHandlers and calls handlePlanFeature.// Register plan-feature tool server.registerTool("plan-feature", { title: "Plan Feature", description: "Plan feature implementation with step-by-step approach", inputSchema: PlanFeatureSchema.shape, }, async (args) => { const aiHandlers = await getHandlers(); return await aiHandlers.handlePlanFeature(args); });
- src/handlers/ai-tools.ts:56-61 (schema)Duplicate Zod schema for PlanFeatureSchema used internally by the AIToolHandlers class for type inference in handlePlanFeature method.const PlanFeatureSchema = z.object({ task: z.string().describe("What to plan (e.g., 'add user profiles', 'implement payment system')"), requirements: z.string().optional().describe("Specific requirements or constraints"), scope: z.enum(["minimal", "standard", "comprehensive"]).default("standard").describe("Planning scope"), provider: z.enum(["openai", "gemini", "azure", "grok"]).optional().default("gemini").describe("AI provider to use"), });