van_mode
Analyze project complexity and initialize tasks for structured workflow management using the Memory Bank system, enabling efficient project planning and execution.
Instructions
Initialize project and determine complexity level. Entry point for the Memory Bank system.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| complexity | Yes | ||
| task_description | No |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"complexity": {
"type": "string"
},
"task_description": {
"type": "string"
}
},
"required": [
"complexity"
],
"type": "object"
}
Implementation Reference
- src/tools.ts:66-115 (handler)Core execution logic of the van_mode tool: initializes Memory Bank system by generating and storing project template and active context based on complexity level and task description, determines next mode, and returns success response.handler: async (input: VanModeInput): Promise<ToolResponse> => { const timestamp = new Date().toISOString(); const template = `# Memory Bank System ## Project Overview - **Complexity Level**: ${input.complexity} - **Task**: ${input.task_description || 'Task description pending'} - **Initialized**: ${timestamp} ## Status - [ ] VAN Mode: Project initialization - [ ] PLAN Mode: Implementation planning - [ ] CREATIVE Mode: Design decisions (if required) - [ ] IMPLEMENT Mode: Code implementation - [ ] REFLECT+ARCHIVE Mode: Completion and documentation ## Current Phase: VAN **Next Steps**: ${input.complexity === '1' ? 'Proceed directly to IMPLEMENT mode' : 'Move to PLAN mode for detailed planning'} ## Memory Bank Files - tasks.md: ✅ Initialized - activeContext.md: Pending - progress.md: Pending - implementation-plan.md: Pending `; this.storage.setTasks(template); const activeContext = `# Active Context ## Current Task ${input.task_description || 'Task description pending'} ## Complexity Level: ${input.complexity} ${this.getComplexityDescription(input.complexity)} ## Current Mode: VAN - Status: Completed - Next Mode: ${input.complexity === '1' ? 'IMPLEMENT' : 'PLAN'} `; this.storage.setActiveContext(activeContext); return { content: [{ type: 'text', text: `✅ VAN Mode initialized successfully!\n\n**Project Complexity**: Level ${input.complexity}\n**Next Mode**: ${input.complexity === '1' ? 'IMPLEMENT (direct implementation)' : 'PLAN (detailed planning required)'}\n\nMemory Bank files have been created and the project structure is ready.` }] }; }
- src/server.ts:22-37 (registration)MCP server registration of the 'van_mode' tool, providing Zod-validated input schema and delegating execution to the underlying tool handler.this.server.registerTool( 'van_mode', { title: 'VAN Mode', description: 'Initialize project and determine complexity level. Entry point for the Memory Bank system.', inputSchema: { complexity: z.string().refine(val => ['1', '2', '3', '4'].includes(val), { message: 'Complexity must be 1, 2, 3, or 4' }), task_description: z.string().optional() } }, async (args) => { return await (this.tools.vanModeTool.handler as any)(args); } );
- src/tools.ts:3-6 (schema)TypeScript type definition for van_mode input parameters.interface VanModeInput { complexity: '1' | '2' | '3' | '4'; task_description?: string; }
- src/tools.ts:51-65 (schema)JSON Schema definition for van_mode tool input validation, matching the TypeScript interface.inputSchema: { type: 'object', properties: { complexity: { type: 'string', enum: ['1', '2', '3', '4'], description: 'Level 1: Quick bug fix, Level 2: Simple enhancement, Level 3-4: Complex features' }, task_description: { type: 'string', description: 'Description of the task to be implemented' } }, required: ['complexity'] },