fix: restore correct JSON format for backlog plan prompt

The backlog plan system prompt was using an incorrect JSON format that didn't
match the BacklogPlanResult interface. This caused the plan generation to
complete but produce no visible results.

Issue:
- Prompt specified: { "plan": { "add": [...], "update": [...], "delete": [...] } }
- Code expected: { "changes": [...], "summary": "...", "dependencyUpdates": [...] }

Fix:
- Restored original working format with "changes" array
- Each change has: type ("add"|"update"|"delete"), feature, reason
- Matches BacklogPlanResult and BacklogChange interfaces exactly

Impact:
- Plan button on Kanban board will now generate and display plans correctly
- AI responses will be properly parsed and shown in review dialog

Testing:
- All 845 tests passing
- Verified format matches original hardcoded prompt from upstream

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Stephan Rieche
2025-12-30 15:09:18 +01:00
parent c5ae9ad262
commit 968d889346

View File

@@ -331,40 +331,44 @@ Your task is to analyze the request and produce a structured JSON plan with:
5. Any dependency updates needed (removed dependencies due to deletions, new dependencies for new features)
Respond with ONLY a JSON object in this exact format:
\`\`\`json
{
"plan": {
"add": [
{
"title": "string",
"description": "string",
"changes": [
{
"type": "add",
"feature": {
"title": "Feature title",
"description": "Feature description",
"category": "feature" | "bug" | "enhancement" | "refactor",
"dependencies": ["featureId1", "featureId2"]
}
],
"update": [
{
"featureId": "string",
"updates": {
"title"?: "string",
"description"?: "string",
"category"?: "feature" | "bug" | "enhancement" | "refactor",
"priority"?: number,
"dependencies"?: ["featureId1"]
}
}
],
"delete": ["featureId1", "featureId2"],
"summary": "Brief summary of all changes",
"dependencyUpdates": [
{
"featureId": "string",
"action": "remove_dependency" | "add_dependency",
"dependencyId": "string",
"reason": "string"
}
]
}
"dependencies": ["existing-feature-id"],
"priority": 1
},
"reason": "Why this feature should be added"
},
{
"type": "update",
"featureId": "existing-feature-id",
"feature": {
"title": "Updated title"
},
"reason": "Why this feature should be updated"
},
{
"type": "delete",
"featureId": "feature-id-to-delete",
"reason": "Why this feature should be deleted"
}
],
"summary": "Brief overview of all proposed changes",
"dependencyUpdates": [
{
"featureId": "feature-that-depended-on-deleted",
"removedDependencies": ["deleted-feature-id"],
"addedDependencies": []
}
]
}
\`\`\`
Important rules:
- Only include fields that need to change in updates