Objective: Offer opportunities to continuously improve .clinerules based on user interactions and feedback.
Trigger: Before using the attempt_completion tool for any task that involved user feedback provided at any point during the conversation, or involved multiple non-trivial steps (e.g., multiple file edits, complex logic generation).
Process:
- Offer Reflection: Ask the user: "Before I complete the task, would you like me to reflect on our interaction and suggest potential improvements to the active
.clinerules?" - Await User Confirmation: Proceed to
attempt_completionimmediately if the user declines or doesn't respond affirmatively. - If User Confirms:
a. Review Interaction: Synthesize all feedback provided by the user throughout the entire conversation history for the task. Analyze how this feedback relates to the active
.clinerulesand identify areas where modified instructions could have improved the outcome or better aligned with user preferences. b. Identify Active Rules: List the specific global and workspace.clinerulesfiles active during the task. c. Formulate & Propose Improvements: Generate specific, actionable suggestions for improving the content of the relevant active rule files. Prioritize suggestions directly addressing user feedback. Usereplace_in_filediff blocks when practical, otherwise describe changes clearly. d. Await User Action on Suggestions: Ask the user if they agree with the proposed improvements and if they'd like me to apply them now using the appropriate tool (replace_in_fileorwrite_to_file). Apply changes if approved, then proceed toattempt_completion.
Constraint: Do not offer reflection if:
- No
.clineruleswere active. - The task was very simple and involved no feedback.