refactor: Update model references and improve feature summary handling

- Changed model references from `bareModel` to `effectiveBareModel` in multiple locations to ensure consistency.
- Removed redundant event emission for `auto_mode_summary` after saving feature summaries.
- Added checks to prevent resuming features that are already running, enhancing error handling.
- Introduced a new useEffect in various dialogs to clear `requirePlanApproval` when planning mode is set to 'skip' or 'lite'.
- Updated prompt templates to enforce a structured summary output format, ensuring critical information is captured after task completion.
This commit is contained in:
Shirone
2026-01-24 23:11:37 +01:00
parent 076ab14a5e
commit 4f07948712
5 changed files with 138 additions and 15 deletions

View File

@@ -115,6 +115,23 @@ When approved, execute tasks SEQUENTIALLY in order. For each task:
3. AFTER completing, output: "[TASK_COMPLETE] T###: Brief summary"
This allows real-time progress tracking during implementation.
**CRITICAL: After completing ALL tasks, you MUST output a final summary using this EXACT format:**
<summary>
## Summary: [Feature Title]
### Changes Implemented
- [List all changes made across all tasks]
### Files Modified
- [List all files that were created or modified]
### Notes for Developer
- [Any important notes or considerations]
</summary>
The <summary> and </summary> tags MUST be on their own lines. This summary is REQUIRED for the system to properly track completion.
`;
export const DEFAULT_AUTO_MODE_PLANNING_FULL = `## Full Specification Phase (Full SDD Mode)
@@ -188,6 +205,23 @@ After completing all tasks in a phase, output:
"[PHASE_COMPLETE] Phase N complete"
This allows real-time progress tracking during implementation.
**CRITICAL: After completing ALL phases and ALL tasks, you MUST output a final summary using this EXACT format:**
<summary>
## Summary: [Feature Title]
### Changes Implemented
- [List all changes made across all phases and tasks]
### Files Modified
- [List all files that were created or modified]
### Notes for Developer
- [Any important notes or considerations]
</summary>
The <summary> and </summary> tags MUST be on their own lines. This summary is REQUIRED for the system to properly track completion.
`;
export const DEFAULT_AUTO_MODE_FEATURE_PROMPT_TEMPLATE = `## Feature Implementation Task
@@ -808,7 +842,26 @@ You are executing a specific task as part of a larger feature implementation.
1. Focus ONLY on completing task {{taskId}}: "{{taskDescription}}"
2. Do not work on other tasks
3. Use the existing codebase patterns
4. When done, summarize what you implemented
4. When done, output "[TASK_COMPLETE] {{taskId}}: Brief summary of what you did"
{{#unless remainingTasks}}
**IMPORTANT - THIS IS THE FINAL TASK**: After completing this task, you MUST output a complete feature summary using this EXACT format:
<summary>
## Summary: [Feature Title]
### Changes Implemented
- [List ALL changes made across ALL tasks in this feature]
### Files Modified
- [List ALL files created or modified]
### Notes for Developer
- [Any important notes]
</summary>
The <summary> and </summary> tags MUST be on their own lines. This is REQUIRED.
{{/unless}}
Begin implementing task {{taskId}} now.`;
@@ -820,7 +873,11 @@ Implement this feature by:
3. Write the necessary code changes
4. Ensure the code follows existing patterns and conventions
When done, wrap your final summary in <summary> tags like this:
## CRITICAL: Summary Output Requirement
**IMPORTANT**: After completing ALL implementation work, you MUST output a final summary using the EXACT format below. This is REQUIRED for the system to track your work properly.
**You MUST wrap your summary in <summary> tags like this:**
<summary>
## Summary: [Feature Title]
@@ -835,7 +892,14 @@ When done, wrap your final summary in <summary> tags like this:
- [Any important notes]
</summary>
This helps parse your summary correctly in the output logs.`;
**Rules for summary output:**
- The <summary> opening tag MUST be on its own line
- The </summary> closing tag MUST be on its own line
- Include ALL changes you made during implementation
- Output this summary as the FINAL thing before stopping
- Do NOT skip the summary even if you think the feature is simple
This is not optional - the system parses this to update the feature status.`;
export const DEFAULT_PLAYWRIGHT_VERIFICATION_INSTRUCTIONS = `## Verification with Playwright (REQUIRED)
@@ -918,7 +982,24 @@ export const DEFAULT_CONTINUATION_AFTER_APPROVAL_TEMPLATE = `The plan/specificat
## Instructions
Implement all the changes described in the plan above.`;
Implement all the changes described in the plan above.
**CRITICAL: After completing ALL implementation work, you MUST output a final summary using this EXACT format:**
<summary>
## Summary: [Feature Title]
### Changes Implemented
- [List ALL changes made during implementation]
### Files Modified
- [List ALL files created or modified]
### Notes for Developer
- [Any important notes]
</summary>
The <summary> and </summary> tags MUST be on their own lines. This summary is REQUIRED for the system to track your work.`;
export const DEFAULT_RESUME_FEATURE_TEMPLATE = `## Continuing Feature Implementation
@@ -930,7 +1011,24 @@ The following is the output from a previous implementation attempt. Continue fro
{{previousContext}}
## Instructions
Review the previous work and continue the implementation. If the feature appears complete, verify it works correctly.`;
Review the previous work and continue the implementation. If the feature appears complete, verify it works correctly.
**CRITICAL: When the feature is complete, you MUST output a final summary using this EXACT format:**
<summary>
## Summary: [Feature Title]
### Changes Implemented
- [List ALL changes made, including from previous context]
### Files Modified
- [List ALL files created or modified]
### Notes for Developer
- [Any important notes]
</summary>
The <summary> and </summary> tags MUST be on their own lines. This summary is REQUIRED.`;
export const DEFAULT_PROJECT_ANALYSIS_PROMPT = `Analyze this project and provide a summary of:
1. Project structure and architecture