createProjectStructure
Generate standardized 8-folder project structures following v6 conventions for microservices architecture, including META directories for organized development workflows.
Instructions
Create v6 standard 8-folder project structure (includes 07_META)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectName | No | Name of the new project | new-project |
| version | No | Convention version (v5 or v6) | v6 |
Implementation Reference
- src/tools/index.js:530-589 (handler)The primary handler function for the 'createProjectStructure' tool. It generates a standard project structure with 7 folders (00_DOCS to 06_LOGS), sample files with AI permission headers, mkdir commands, and structure metadata.
export async function createProjectStructure({ projectName = 'new-project' }) { const msg = getMessages(); const rules = namingRules(); const structure = { projectName, folders: [], files: [], commands: [] }; // 7개 표준 폴더 생성 명령 for (const [folderName, folderInfo] of Object.entries(rules.standardFolders)) { structure.folders.push({ name: folderName, path: `${projectName}/${folderName}`, description: folderInfo.description, aiPermission: folderInfo.aiPermission }); structure.commands.push(`mkdir ${projectName}/${folderName}`); } // 기본 파일 추가 (ChatGPT Enhancement: AI 권한 헤더 포함) structure.files = [ { path: `${projectName}/00_DOCS/README.md`, content: `<!-- ⚠️ AI PERMISSION: NO-MODIFY -->\n<!-- This file is protected from AI modifications -->\n# ${projectName}\n\nBuilt with AI Naming Convention v5.0.1 (ChatGPT Enhanced)` }, { path: `${projectName}/01_CONFIG/.env.example`, content: '# ⚠️ AI PERMISSION: NO-MODIFY - CRITICAL\n# Environment variables\n# Manual changes only - contains sensitive data\n' }, { path: `${projectName}/01_CONFIG/config.dev.yml`, content: '# ⚠️ AI PERMISSION: NO-MODIFY\nenv: development\n' }, { path: `${projectName}/01_CONFIG/.gitignore`, content: '.env\nnode_modules/\n05_BUILD/\n06_LOGS/' }, { path: `${projectName}/02_STATIC/ASSET_placeholder.txt`, content: '# Use ASSET_ prefix for all asset files' }, { path: `${projectName}/02_STATIC/TEMPLATE_base.html`, content: '<!-- TEMPLATE_ prefix for templates -->' }, { path: `${projectName}/02_STATIC/CONFIG_theme.json`, content: '{"theme":"default"}' }, { path: `${projectName}/03_ACTIVE/.gitkeep`, content: '' }, { path: `${projectName}/04_TEST/001_TEST_Main_Unit_COMMON.test.js`, content: '// Test file with indexed naming\n// [Deps]: 001\n' }, { path: `${projectName}/.ai_instructions.md`, content: `# AI Development Instructions (v5.0.1 ChatGPT Enhanced)\n\n## ⚠️ Folder Permissions\n- 00_DOCS: NO-MODIFY\n- 01_CONFIG: NO-MODIFY - CRITICAL\n- 02_STATIC: Use ASSET_, TEMPLATE_, CONFIG_ prefixes\n- 03_ACTIVE: Full access (primary workspace)\n- 04_TEST: Use indexed naming (001_TEST_*)\n\n## [Deps] Dependency Markers\n- Sequential: 001-1, 001-2\n- Parallel: 001a, 001b\n- Subordinate: 001s1, 001s2\n- None: Entry point` } ]; // 전체 생성 명령 (Windows/Unix) structure.createCommand = { windows: structure.commands.join(' && '), unix: structure.commands.join(' && ') }; return { ...structure, message: msg.v5?.projectCreated || 'Project structure created with 7 standard folders' }; } - src/index.js:234-252 (schema)The input schema definition for the tool, specifying parameters like projectName (default 'new-project') and optional version (v5/v6). Part of the TOOLS array used for MCP tool registration.
name: 'createProjectStructure', description: 'Create v6 standard 8-folder project structure (includes 07_META)', inputSchema: { type: 'object', properties: { projectName: { type: 'string', description: 'Name of the new project', default: 'new-project' }, version: { type: 'string', description: 'Convention version (v5 or v6)', enum: ['v5', 'v6'], default: 'v6' } } } }, - src/index.js:624-625 (registration)Registration and dispatch of the tool in the MCP CallToolRequestSchema handler's switch statement, where tool calls are routed to the handler function.
case 'createProjectStructure': result = await createProjectStructure(args); - src/index.js:584-586 (registration)MCP server registration for listing tools, which includes the createProjectStructure tool via the TOOLS() function.
server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: TOOLS() }; }); - src/index.js:20-20 (helper)Import statement for the createProjectStructure handler from src/tools/index.js.
createProjectStructure,