mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-30 06:12:06 +00:00
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 <features_to_create> 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 <noreply@anthropic.com>
This commit is contained in:
@@ -130,23 +130,16 @@ For each new capability, estimate features:
|
|||||||
|
|
||||||
# FEATURE CREATION
|
# 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:**
|
**Signal that you're ready to create features by saying:**
|
||||||
|
|
||||||
> "Great! I'll create these N features now. Each feature will include:
|
> "Great! I'll create these N features now."
|
||||||
> - Category
|
|
||||||
> - Name (what's being tested)
|
|
||||||
> - Description (how to verify it)
|
|
||||||
> - Test steps
|
|
||||||
>
|
|
||||||
> Creating features..."
|
|
||||||
|
|
||||||
**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
|
```
|
||||||
<features_to_create>
|
feature_create_bulk(features=[
|
||||||
[
|
|
||||||
{
|
{
|
||||||
"category": "functional",
|
"category": "functional",
|
||||||
"name": "Brief feature name",
|
"name": "Brief feature name",
|
||||||
@@ -167,15 +160,15 @@ Once the user approves, create features directly.
|
|||||||
"Step 3: Verify styling"
|
"Step 3: Verify styling"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
])
|
||||||
</features_to_create>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**CRITICAL:**
|
**CRITICAL:**
|
||||||
- Wrap the JSON array in `<features_to_create>` tags exactly as shown
|
- Call the `feature_create_bulk` MCP tool with ALL features at once
|
||||||
- Use valid JSON (double quotes, no trailing commas)
|
- Use valid JSON (double quotes, no trailing commas)
|
||||||
- Include ALL features you promised to create
|
- Include ALL features you promised to create
|
||||||
- Each feature needs: category, name, description, steps (array of strings)
|
- 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
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user