From 968d889346c4658c04aec6a8c5370cea3127a9e7 Mon Sep 17 00:00:00 2001 From: Stephan Rieche Date: Tue, 30 Dec 2025 15:09:18 +0100 Subject: [PATCH] fix: restore correct JSON format for backlog plan prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- libs/prompts/src/defaults.ts | 66 +++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/libs/prompts/src/defaults.ts b/libs/prompts/src/defaults.ts index 97193f2c7..09e4f6444 100644 --- a/libs/prompts/src/defaults.ts +++ b/libs/prompts/src/defaults.ts @@ -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