reflection
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReflection
复盘
Analyze the current session and improve Claude Code instructions. Operates in two modes based on user input.
分析当前会话并优化Claude Code指令。根据用户输入选择运行模式。
Mode Selection
模式选择
- Quick mode (default): Triggered by or
/reflection. Focuses on analyzing chat history to identify and implement improvements to CLAUDE.md instructions./reflection quick - Deep mode: Triggered by or
/reflection deep. Performs a full session analysis covering problems solved, patterns established, user preferences, system understanding, and knowledge gaps, then updates CLAUDE.md accordingly./reflection comprehensive
Determine the mode from the user's input. If no mode is specified, use Quick mode. If the user says "deep", "comprehensive", or "harder", use Deep mode.
- 快速模式(默认):通过或
/reflection触发。聚焦于分析聊天历史,识别并落实CLAUDE.md指令的改进点。/reflection quick - 深度模式:通过或
/reflection deep触发。执行全面的会话分析,涵盖解决的问题、确立的模式、用户偏好、系统理解以及知识缺口,随后相应更新CLAUDE.md。/reflection comprehensive
根据用户输入确定模式。若未指定模式,则使用快速模式。若用户提及“deep”“comprehensive”或“harder”,则使用深度模式。
Quick Mode: CLAUDE.md Improvement
快速模式:CLAUDE.md优化
1. Analysis Phase
1. 分析阶段
Review the chat history in the context window, then read the current CLAUDE.md file in the repository root.
Analyze both to identify areas for improvement:
- Inconsistencies in Claude's responses
- Misunderstandings of user requests
- Areas where Claude could provide more detailed or accurate information
- Opportunities to enhance handling of specific query types or tasks
- Missing instructions that would have prevented mistakes made during the session
回顾上下文窗口中的聊天历史,然后读取仓库根目录下当前的CLAUDE.md文件。
对两者进行分析,识别可改进的领域:
- Claude响应中的不一致之处
- 对用户请求的误解
- Claude可提供更详细或准确信息的领域
- 增强特定查询类型或任务处理能力的机会
- 可避免会话中出现错误的缺失指令
2. Analysis Documentation
2. 分析记录
Use TodoWrite to track each identified improvement area and create a structured approach for changes.
使用TodoWrite跟踪每个已识别的改进点,并制定结构化的修改方案。
3. Interaction Phase
3. 交互阶段
Present findings and improvement ideas to the user. For each suggestion:
- Explain the current issue identified
- Propose a specific change or addition to the instructions
- Describe how this change would improve Claude's performance
Wait for feedback on each suggestion before proceeding. If the user approves a change, move to implementation. If not, refine the suggestion or move on.
向用户展示发现的问题和改进思路。对于每个建议:
- 解释识别出的当前问题
- 提出对指令的具体修改或补充建议
- 说明此修改将如何提升Claude的性能
在继续前等待用户对每个建议的反馈。如果用户批准修改,则进入实施阶段;若不批准,则优化建议或跳过。
4. Implementation Phase
4. 实施阶段
For each approved change:
- Use the Edit tool to modify the CLAUDE.md file
- State the section being modified
- Present the new or modified text
- Explain how this change addresses the identified issue
对于每个获批的修改:
- 使用编辑工具修改CLAUDE.md文件
- 说明正在修改的章节
- 展示新的或修改后的文本
- 解释此修改如何解决识别出的问题
5. Output Format
5. 输出格式
Present the final output in this structure:
<analysis>
[Issues identified and potential improvements]
</analysis>
<improvements>
[For each approved improvement:
1. Section being modified
2. New or modified instruction text
3. Explanation of how this addresses the identified issue]
</improvements>
<final_instructions>
[Complete updated set of instructions incorporating all approved changes]
</final_instructions>Commit changes using git after successful implementation.
按照以下结构呈现最终输出:
<analysis>
[识别出的问题和潜在改进点]
</analysis>
<improvements>
[针对每个获批的改进:
1. 正在修改的章节
2. 新的或修改后的指令文本
3. 说明此修改如何解决识别出的问题]
</improvements>
<final_instructions>
[整合所有获批修改后的完整更新指令集]
</final_instructions>实施成功后,使用git提交更改。
Deep Mode: Comprehensive Session Analysis
深度模式:全面会话分析
1. Session Analysis Phase
1. 会话分析阶段
Review the entire conversation history and identify:
回顾整个对话历史,识别以下内容:
Problems and Solutions
问题与解决方案
- What problems were encountered?
- Initial symptoms reported by the user
- Root causes discovered
- Solutions implemented
- Key insights learned
- 遇到了哪些问题?
- 用户报告的初始症状
- 发现的根本原因
- 实施的解决方案
- 获得的关键见解
Code Patterns and Architecture
代码模式与架构
- Design decisions made
- Architecture choices
- Code relationships discovered
- Integration points identified
- 做出的设计决策
- 架构选择
- 发现的代码关联
- 识别出的集成点
User Preferences and Workflow
用户偏好与工作流程
- Communication style
- Decision-making patterns
- Quality standards
- Workflow preferences
- Direct quotes that reveal preferences
- 沟通风格
- 决策模式
- 质量标准
- 工作流程偏好
- 能体现偏好的直接引用
System Understanding
系统理解
- Component interactions
- Critical paths and dependencies
- Failure modes and recovery
- Performance considerations
- 组件交互
- 关键路径与依赖关系
- 故障模式与恢复机制
- 性能考量
Knowledge Gaps and Improvements
知识缺口与改进方向
- Misunderstandings that occurred
- Information that was missing
- Better approaches discovered
- Future considerations
- 出现的误解
- 缺失的信息
- 发现的更优方法
- 未来的注意事项
2. Reflection Output Phase
2. 复盘输出阶段
Present a structured summary covering:
- Session overview: High-level summary of what was accomplished
- Problems solved: Each problem with root cause and solution
- Patterns established: Design and code patterns worth remembering
- User preferences: Workflow and communication preferences observed
- System relationships: Component interactions and dependencies learned
- Knowledge updates: New understanding gained about the codebase or domain
- Commands and tools: Any tools or commands that were particularly useful or problematic
- Future improvements: Suggestions for next steps or optimizations
- Collaboration insights: What worked well and what could improve in the AI-human interaction
呈现结构化总结,涵盖:
- 会话概述:对所完成工作的高层总结
- 解决的问题:每个问题及其根本原因和解决方案
- 确立的模式:值得留存的设计与代码模式
- 用户偏好:观察到的工作流程与沟通偏好
- 系统关联:了解到的组件交互与依赖关系
- 知识更新:对代码库或领域获得的新理解
- 命令与工具:特别有用或存在问题的工具或命令
- 未来改进方向:对后续步骤或优化的建议
- 协作见解:AI与人类协作中哪些做法有效、哪些可以改进
3. Action Items
3. 行动项
After presenting the analysis, propose concrete actions:
- Update CLAUDE.md with specific sections reflecting learnings
- Add comments to specific files where understanding was gained
- Create documentation for specific topics if needed
- Test anything that needs verification
Use TodoWrite to track these action items. Wait for user approval before implementing changes.
在呈现分析结果后,提出具体行动:
- 更新CLAUDE.md,加入体现学习成果的特定章节
- 添加注释到获得新理解的特定文件中
- 创建文档(若需要)用于特定主题
- 测试任何需要验证的内容
使用TodoWrite跟踪这些行动项。在实施更改前等待用户批准。
4. Implementation
4. 实施
For each approved action, implement the change and commit using git.
对于每个获批的行动,实施更改并使用git提交。
Best Practices
最佳实践
- Always read the current CLAUDE.md file before proposing changes
- Use TodoWrite to track analysis progress and implementation tasks
- Test proposed changes by considering edge cases and common scenarios
- Ensure all modifications maintain consistency with existing patterns
- Be thorough in analysis, clear in explanations, and precise in implementations
- Commit changes using git after successful implementation
- 在提出更改前,务必先阅读当前的CLAUDE.md文件
- 使用TodoWrite跟踪分析进度和实施任务
- 通过考虑边缘情况和常见场景来测试提议的更改
- 确保所有修改与现有模式保持一致
- 分析要全面、解释要清晰、实施要精准
- 实施成功后,使用git提交更改
Your Task
你的任务
Reflect on the current session. Determine the mode from the user's input — default to Quick mode if no mode is specified.
对当前会话进行复盘。根据用户输入确定模式——若未指定模式,则默认使用快速模式。