From 5068790df130da7e9e495fa2b05731fb2344622e Mon Sep 17 00:00:00 2001 From: Auto Date: Thu, 15 Jan 2026 14:43:16 +0200 Subject: [PATCH] fix(cli): use MCP tool for feature persistence in expand-project Replace JSON output approach with direct MCP tool call in the /expand-project CLI command to fix feature persistence issue. Changes: - Update expand-project.md to call feature_create_bulk MCP tool - Remove JSON tag output (not parsed in CLI) - Simplify confirmation message before feature creation Why: - CLI users running /expand-project had features displayed but never saved to database because nothing parsed the JSON output - Web UI is unaffected (uses expand_chat_session.py with its own parser) - This mirrors how initializer_prompt.template.md already works Co-Authored-By: Claude Opus 4.5 --- .claude/commands/expand-project.md | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.claude/commands/expand-project.md b/.claude/commands/expand-project.md index bd02731..e8005b2 100644 --- a/.claude/commands/expand-project.md +++ b/.claude/commands/expand-project.md @@ -130,23 +130,16 @@ For each new capability, estimate features: # FEATURE CREATION -Once the user approves, create features directly. +Once the user approves, create features using the MCP tool. **Signal that you're ready to create features by saying:** -> "Great! I'll create these N features now. Each feature will include: -> - Category -> - Name (what's being tested) -> - Description (how to verify it) -> - Test steps -> -> Creating features..." +> "Great! I'll create these N features now." -**Then output the features in this exact JSON format (the system will parse this):** +**Then call the `feature_create_bulk` tool to save them directly to the database:** -```json - -[ +``` +feature_create_bulk(features=[ { "category": "functional", "name": "Brief feature name", @@ -167,15 +160,15 @@ Once the user approves, create features directly. "Step 3: Verify styling" ] } -] - +]) ``` **CRITICAL:** -- Wrap the JSON array in `` tags exactly as shown +- Call the `feature_create_bulk` MCP tool with ALL features at once - Use valid JSON (double quotes, no trailing commas) - Include ALL features you promised to create - Each feature needs: category, name, description, steps (array of strings) +- The tool will return the count of created features - verify it matches your expected count ---