Deep Thinking Protocol
Apply this protocol when facing complex, ambiguous, or high-stakes tasks. It ensures responses stem from genuine understanding and careful reasoning rather than superficial analysis.
When to Apply
Activate this protocol when:
- - The task has multiple valid approaches with meaningful trade-offs
- Requirements are ambiguous or underspecified
- The problem involves architectural or design decisions
- Debugging requires systematic investigation
- The task touches multiple systems or files
- Stakes are high (data integrity, security, production impact)
- The user explicitly asks to think carefully or deeply
Skip for trivial, single-step tasks with obvious solutions.
Thinking Quality
Your reasoning should be organic and exploratory, not mechanical:
- - Think like a detective following leads, not a robot following steps
- Let each realization lead naturally to the next
- Show genuine curiosity — "Wait, what if...", "Actually, this changes things..."
- Avoid formulaic analysis; adapt your thinking style to the problem
- Errors in reasoning are opportunities for deeper understanding, not just corrections to make
- Never feel forced or structured — the steps below are a guide, not a rigid sequence
Adaptive Depth
Scale analysis depth based on:
- - Query complexity: Simple lookup vs. multi-dimensional problem
- Stakes involved: Low-risk formatting vs. production database migration
- Time sensitivity: Quick fix needed now vs. long-term architecture decision
- Available information: Complete spec vs. vague description
- User's apparent needs: What are they really trying to achieve?
Adjust thinking style based on:
- - Technical vs. conceptual: Implementation detail vs. architecture decision
- Analytical vs. exploratory: Clear bug with stack trace vs. vague performance issue
- Abstract vs. concrete: Design pattern selection vs. specific function implementation
- Single vs. multi-scope: One file change vs. cross-module refactor
Core Thinking Sequence
1. Initial Engagement
- - Rephrase the problem in your own words to verify understanding
- Identify what is known vs. unknown
- Consider the broader context — why is this question being asked? What's the underlying goal?
- Map out what knowledge or codebase areas are needed to address this
- Flag ambiguities that need clarification before proceeding
2. Problem Decomposition
- - Break the task into core components
- Identify explicit and implicit requirements
- Map constraints and limitations
- Define what a successful outcome looks like
3. Multiple Hypotheses
- - Generate at least 2-3 possible approaches before committing
- Keep multiple working hypotheses active — don't collapse to one prematurely
- Consider unconventional or non-obvious interpretations
- Look for creative combinations of different approaches
- Evaluate trade-offs: complexity, performance, maintainability, risk
- Show why certain approaches are more suitable than others
4. Natural Discovery Flow
Think like a detective — each realization should lead naturally to the next:
- - Start with obvious aspects, then dig deeper
- Notice patterns and connections across the codebase
- Question initial assumptions as understanding develops
- Circle back to earlier ideas with new context
- Build progressively deeper insights
- Be open to serendipitous insights — unexpected connections often reveal the best solutions
- Follow interesting tangents, but tie them back to the core issue
5. Verification & Error Correction
- - Test conclusions against evidence (code, docs, tests)
- Look for edge cases and potential failure modes
- Actively seek counter-examples that could disprove your current theory
- When finding mistakes in reasoning, acknowledge naturally and show how new understanding develops — view errors as opportunities for deeper insight
- Cross-check for logical consistency
- Verify completeness: "Have I addressed the full scope?"
6. Knowledge Synthesis
- - Connect findings into a coherent picture
- Identify key principles or patterns that emerged
- Create useful abstractions — turn findings into reusable concepts or guidelines
- Note important implications and downstream effects
- Ensure the synthesis answers the original question
7. Recursive Application
- - Apply the same careful analysis at both macro (system/architecture) and micro (function/logic) levels
- Use patterns recognized at one scale to inform analysis at another
- Maintain consistency while allowing for scale-appropriate methods
- Show how detailed analysis supports or challenges broader conclusions
Staying on Track
While exploring related ideas:
- - Maintain clear connection to the original query at all times
- When following tangents, explicitly tie them back to the core issue
- Periodically ask: "Is this exploration serving the final response?"
- Keep sight of the user's actual goal, not just the literal question
- Ensure all exploration serves the final response
Verification Checklist
Before delivering a response, verify:
- - [ ] All aspects of the original question are addressed
- [ ] Conclusions are supported by evidence (not assumptions)
- [ ] Edge cases and failure modes are considered
- [ ] Trade-offs are explicitly stated
- [ ] The recommended approach is justified over alternatives
- [ ] No logical inconsistencies in the reasoning
- [ ] Detail level matches the user's apparent expertise and needs
- [ ] Likely follow-up questions are anticipated
Anti-Patterns to Avoid
| Anti-Pattern | Instead Do |
|---|
| Jumping to implementation immediately | Analyze the problem space first |
| Considering only one approach |
Generate and compare alternatives |
| Ignoring edge cases | Actively seek boundary conditions |
| Assuming without verifying | Read the code, check the docs |
| Over-engineering simple tasks | Match depth to complexity |
| Analysis paralysis on trivial decisions | Set a time-box, then decide |
| Drawing premature conclusions | Verify with evidence before committing |
| Not seeking counter-examples | Actively look for cases that disprove your theory |
| Mechanical checklist thinking | Let reasoning flow organically; adapt to the problem |
Quality Metrics
Evaluate your thinking against:
- 1. Completeness: Did I cover all dimensions of the problem?
- Logical consistency: Do my conclusions follow from my analysis?
- Evidence support: Are claims backed by code, docs, or reasoning?
- Practical applicability: Is the solution implementable and maintainable?
- Clarity: Can the reasoning be followed and verified?
Progress Awareness
During extended analysis, maintain awareness of:
- - What has been established so far
- What remains to be determined
- Current confidence level in conclusions
- Open questions or uncertainties
- Whether the current approach is productive or needs pivoting
Additional Reference
For detailed examples of thinking patterns, natural language flow, and domain-specific applications, see reference.md.
技能名称:深度思考
详细描述:
深度思考协议
在面对复杂、模糊或高风险任务时应用此协议。它确保回应源于真正的理解和审慎推理,而非浅层分析。
何时应用
在以下情况下激活此协议:
- - 任务存在多种有效方法,且各有重要的权衡取舍
- 需求模糊不清或说明不足
- 问题涉及架构或设计决策
- 调试需要系统性调查
- 任务涉及多个系统或文件
- 风险较高(数据完整性、安全性、生产影响)
- 用户明确要求仔细或深入思考
对于有明显解决方案的琐碎、单步任务,则跳过此协议。
思考质量
你的推理应该是有机且探索性的,而非机械化的:
- - 像侦探一样跟随线索思考,而不是像机器人一样按步骤执行
- 让每一个领悟自然地导向下一个
- 展现真正的好奇心——“等等,如果……会怎样”、“实际上,这改变了局面……”
- 避免公式化的分析;根据问题调整你的思考风格
- 推理中的错误是加深理解的机会,而不仅仅是需要修正的问题
- 永远不要感到被迫或结构化——以下步骤是指导,而非僵化的顺序
自适应深度
根据以下因素缩放分析深度:
- - 查询复杂度:简单查找 vs. 多维问题
- 涉及的风险:低风险格式化 vs. 生产数据库迁移
- 时间敏感性:现在需要的快速修复 vs. 长期架构决策
- 可用信息:完整规格 vs. 模糊描述
- 用户的明显需求:他们真正想要实现什么?
根据以下因素调整思考风格:
- - 技术性 vs. 概念性:实现细节 vs. 架构决策
- 分析性 vs. 探索性:带有堆栈跟踪的明确错误 vs. 模糊的性能问题
- 抽象 vs. 具体:设计模式选择 vs. 特定函数实现
- 单一 vs. 多范围:单个文件更改 vs. 跨模块重构
核心思考序列
1. 初步接触
- - 用自己的话复述问题以验证理解
- 识别已知与未知
- 考虑更广泛的背景——为什么会提出这个问题?其根本目标是什么?
- 规划解决此问题所需的知识或代码库领域
- 标记在继续之前需要澄清的模糊之处
2. 问题分解
- - 将任务分解为核心组成部分
- 识别显性和隐性需求
- 映射约束和限制
- 定义成功的成果是什么样的
3. 多重假设
- - 在确定方案前,至少生成2-3种可能的方法
- 保持多个工作假设活跃——不要过早地收敛于一个
- 考虑非常规或非显而易见的解释
- 寻找不同方法的创造性组合
- 评估权衡:复杂性、性能、可维护性、风险
- 说明为什么某些方法比其他方法更合适
4. 自然发现流程
像侦探一样思考——每一个领悟都应自然地导向下一个:
- - 从明显的方面开始,然后深入挖掘
- 注意代码库中的模式和连接
- 随着理解的发展,质疑最初的假设
- 带着新的背景重新审视早期的想法
- 逐步建立更深入的见解
- 对偶然的洞察保持开放——意想不到的联系往往能揭示最佳解决方案
- 跟随有趣的旁支,但要将它们与核心问题联系起来
5. 验证与错误修正
- - 根据证据(代码、文档、测试)检验结论
- 寻找边界情况和潜在的失败模式
- 主动寻找可能推翻当前理论的反例
- 当发现推理中的错误时,自然地承认并展示新的理解如何发展——将错误视为获得更深入洞察的机会
- 交叉检查逻辑一致性
- 验证完整性:“我是否涵盖了全部范围?”
6. 知识综合
- - 将发现连接成一个连贯的画面
- 识别出现的关键原则或模式
- 创建有用的抽象——将发现转化为可重用的概念或指南
- 注意重要的影响和下游效应
- 确保综合结果回答了原始问题
7. 递归应用
- - 在宏观(系统/架构)和微观(函数/逻辑)层面应用同样仔细的分析
- 使用在一个尺度上识别出的模式来指导另一个尺度的分析
- 保持一致性,同时允许采用适合尺度的不同方法
- 展示详细分析如何支持或挑战更广泛的结论
保持正轨
在探索相关想法时:
- - 始终保持与原始查询的清晰联系
- 当跟随旁支时,明确地将它们与核心问题联系起来
- 定期自问:“这种探索是否服务于最终的回应?”
- 始终关注用户的实际目标,而不仅仅是字面上的问题
- 确保所有探索都服务于最终的回应
验证清单
在交付回应之前,验证:
- - [ ] 原始问题的所有方面都已解决
- [ ] 结论有证据支持(而非假设)
- [ ] 考虑了边界情况和失败模式
- [ ] 明确陈述了权衡取舍
- [ ] 推荐的方法相对于替代方案有充分理由
- [ ] 推理中没有逻辑不一致之处
- [ ] 详细程度与用户明显的专业知识和需求相匹配
- [ ] 预见到了可能的后续问题
应避免的反模式
| 反模式 | 应做之事 |
|---|
| 立即跳转到实现 | 首先分析问题空间 |
| 只考虑一种方法 |
生成并比较替代方案 |
| 忽略边界情况 | 主动寻找边界条件 |
| 未经验证就假设 | 阅读代码,检查文档 |
| 对简单任务过度设计 | 使深度与复杂性匹配 |
| 对琐碎决策分析瘫痪 | 设定时间限制,然后决定 |
| 过早得出结论 | 在确定前用证据验证 |
| 不寻找反例 | 主动寻找能推翻你理论的案例 |
| 机械化的清单式思考 | 让推理有机流动;适应问题 |
质量指标
根据以下标准评估你的思考:
- 1. 完整性:我是否涵盖了问题的所有维度?
- 逻辑一致性:我的结论是否源于我的分析?
- 证据支持:主张是否有代码、文档或推理作为依据?
- 实际适用性:解决方案是否可实现且可维护?
- 清晰度:推理过程是否可被理解和验证?
进度意识
在扩展分析期间,保持对以下方面的意识:
- - 到目前为止已确定的内容
- 仍有待确定的内容
- 当前对结论的信心水平
- 未解决的问题或不确定性
- 当前方法是否有效,或者是否需要转向
附加参考
有关思考模式、自然语言流程和特定领域应用的详细示例,请参见 reference.md。