complex-reasoning
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseComplex Reasoning Skill
复杂推理Skill
Structured reasoning frameworks for systematic problem solving, leveraging extended thinking capabilities for deep analysis.
用于系统性解决问题的结构化推理框架,借助深度思考能力进行深度分析。
When to Use
适用场景
- Debugging complex issues with multiple potential causes
- Architecture decisions requiring trade-off analysis
- Root cause analysis for production incidents
- Performance optimization with multiple variables
- Security vulnerability assessment
- Code refactoring with many dependencies
- 调试复杂问题:存在多个潜在原因的情况
- 架构决策:需要进行权衡分析的场景
- 生产事故根因分析
- 多变量性能优化
- 安全漏洞评估
- 多依赖代码重构
Reasoning Frameworks
推理框架
Chain-of-Thought (CoT)
Chain-of-Thought (CoT)
Linear step-by-step reasoning for sequential problems.
markdown
undefined适用于顺序问题的线性逐步推理方法。
markdown
undefinedChain-of-Thought Analysis
Chain-of-Thought Analysis
Problem: [State the problem clearly]
Step 1: Understand the Context
- What do we know?
- What are the constraints?
- What is the expected outcome?
Step 2: Identify Key Components
- Component A: [description]
- Component B: [description]
- Interactions: [how they relate]
Step 3: Analyze Each Component
- Component A analysis...
- Component B analysis...
Step 4: Synthesize Findings
- Key insight 1
- Key insight 2
Step 5: Formulate Solution
- Recommended approach
- Rationale
- Trade-offs
Conclusion: [Final recommendation with confidence level]
undefinedProblem: [清晰陈述问题]
Step 1: Understand the Context
- 我们已知什么?
- 约束条件有哪些?
- 预期结果是什么?
Step 2: Identify Key Components
- 组件A:[描述]
- 组件B:[描述]
- 交互关系:[组件间的关联方式]
Step 3: Analyze Each Component
- 组件A分析...
- 组件B分析...
Step 4: Synthesize Findings
- 关键洞察1
- 关键洞察2
Step 5: Formulate Solution
- 推荐方案
- 理由说明
- 权衡取舍
Conclusion: [带有置信度的最终建议]
undefinedTree-of-Thought (ToT)
Tree-of-Thought (ToT)
Branching exploration for problems with multiple solution paths.
markdown
undefined适用于存在多个解决方案路径的分支探索方法。
markdown
undefinedTree-of-Thought Exploration
Tree-of-Thought Exploration
Root Problem: [Problem statement]
Root Problem: [问题陈述]
Branch 1: Approach A
Branch 1: Approach A
├── Pros: [List advantages]
├── Cons: [List disadvantages]
├── Feasibility: [High/Medium/Low]
├── Sub-branch 1.1: [Variation]
│ └── Outcome: [Expected result]
└── Sub-branch 1.2: [Variation]
└── Outcome: [Expected result]
├── Pros: [列出优势]
├── Cons: [列出劣势]
├── Feasibility: [高/中/低]
├── Sub-branch 1.1: [变体方案]
│ └── Outcome: [预期结果]
└── Sub-branch 1.2: [变体方案]
└── Outcome: [预期结果]
Branch 2: Approach B
Branch 2: Approach B
├── Pros: [List advantages]
├── Cons: [List disadvantages]
├── Feasibility: [High/Medium/Low]
└── Sub-branches: [...]
├── Pros: [列出优势]
├── Cons: [列出劣势]
├── Feasibility: [高/中/低]
└── Sub-branches: [...]
Branch 3: Approach C
Branch 3: Approach C
├── Pros: [...]
├── Cons: [...]
└── Feasibility: [...]
├── Pros: [...]
├── Cons: [...]
└── Feasibility: [...]
Evaluation Matrix
Evaluation Matrix
| Approach | Feasibility | Impact | Risk | Score |
|---|---|---|---|---|
| A | High | Medium | Low | 8/10 |
| B | Medium | High | Med | 7/10 |
| C | Low | High | High | 5/10 |
Selected Path: Branch [X] because [reasoning]
undefined| Approach | Feasibility | Impact | Risk | Score |
|---|---|---|---|---|
| A | High | Medium | Low | 8/10 |
| B | Medium | High | Med | 7/10 |
| C | Low | High | High | 5/10 |
Selected Path: Branch [X] because [推理过程]
undefinedMECE Framework
MECE Framework
Mutually Exclusive, Collectively Exhaustive analysis.
markdown
undefined相互独立、完全穷尽(Mutually Exclusive, Collectively Exhaustive)分析方法。
markdown
undefinedMECE Analysis
MECE Analysis
Problem Space: [Define the complete problem]
Problem Space: [定义完整问题范围]
Category 1: [Mutually exclusive category]
Category 1: [相互独立的类别]
- Sub-element 1.1
- Sub-element 1.2
- Sub-element 1.3
- 子元素1.1
- 子元素1.2
- 子元素1.3
Category 2: [Mutually exclusive category]
Category 2: [相互独立的类别]
- Sub-element 2.1
- Sub-element 2.2
- 子元素2.1
- 子元素2.2
Category 3: [Mutually exclusive category]
Category 3: [相互独立的类别]
- Sub-element 3.1
- Sub-element 3.2
- Sub-element 3.3
Completeness Check:
- Categories are mutually exclusive (no overlap)
- Categories are collectively exhaustive (cover all cases)
- Each sub-element belongs to exactly one category
Priority Matrix:
| Category | Urgency | Impact | Action |
|---|---|---|---|
| 1 | High | High | Now |
| 2 | Medium | High | Next |
| 3 | Low | Medium | Later |
undefined- 子元素3.1
- 子元素3.2
- 子元素3.3
Completeness Check:
- 类别间相互独立(无重叠)
- 类别集合完全穷尽(覆盖所有情况)
- 每个子元素仅属于一个类别
Priority Matrix:
| Category | Urgency | Impact | Action |
|---|---|---|---|
| 1 | High | High | Now |
| 2 | Medium | High | Next |
| 3 | Low | Medium | Later |
undefinedHypothesis-Driven Debugging
Hypothesis-Driven Debugging
Systematic approach to debugging complex issues.
markdown
undefined用于调试复杂问题的系统性方法。
markdown
undefinedHypothesis-Driven Debug Session
Hypothesis-Driven Debug Session
Symptom: [Observed behavior]
Expected: [What should happen]
Environment: [Relevant context]
Symptom: [观察到的行为]
Expected: [预期行为]
Environment: [相关上下文]
Hypothesis 1: [Most likely cause]
Hypothesis 1: [最可能的原因]
Evidence For:
- [Supporting observation 1]
- [Supporting observation 2]
Evidence Against:
- [Contradicting observation]
Test: [How to validate]
Result: [Confirmed/Refuted]
Evidence For:
- [支持性观察1]
- [支持性观察2]
Evidence Against:
- [矛盾性观察]
Test: [验证方法]
Result: [已确认/已推翻]
Hypothesis 2: [Second most likely]
Hypothesis 2: [次可能的原因]
Evidence For:
- [...]
Evidence Against:
- [...]
Test: [...]
Result: [...]
Evidence For:
- [...]
Evidence Against:
- [...]
Test: [...]
Result: [...]
Root Cause Identified
Root Cause Identified
Cause: [Confirmed root cause]
Evidence Chain: [How we proved it]
Fix: [Remediation steps]
Prevention: [How to prevent recurrence]
undefinedCause: [已确认的根因]
Evidence Chain: [验证过程]
Fix: [修复步骤]
Prevention: [预防措施]
undefinedCode Analysis Patterns
代码分析模式
Dependency Analysis
依赖分析
markdown
undefinedmarkdown
undefinedDependency Analysis: [Component Name]
Dependency Analysis: [组件名称]
Direct Dependencies
Direct Dependencies
| Dependency | Version | Purpose | Risk Level |
|---|---|---|---|
| dep-a | 2.3.1 | Auth | Low |
| dep-b | 1.0.0 | Data | Medium |
| Dependency | Version | Purpose | Risk Level |
|---|---|---|---|
| dep-a | 2.3.1 | Auth | Low |
| dep-b | 1.0.0 | Data | Medium |
Transitive Dependencies
Transitive Dependencies
- Total: [N] packages
- Security vulnerabilities: [N]
- Outdated: [N]
- Total: [N] packages
- Security vulnerabilities: [N]
- Outdated: [N]
Dependency Graph
Dependency Graph
[component]
├── dep-a
│ ├── sub-dep-1
│ └── sub-dep-2
└── dep-b
└── sub-dep-3[component]
├── dep-a
│ ├── sub-dep-1
│ └── sub-dep-2
└── dep-b
└── sub-dep-3Risk Assessment
Risk Assessment
- High Risk: [Dependencies with known issues]
- Medium Risk: [Outdated or unmaintained]
- Low Risk: [Stable, well-maintained]
- High Risk: [存在已知问题的依赖]
- Medium Risk: [过时或无人维护的依赖]
- Low Risk: [稳定且维护良好的依赖]
Recommendations
Recommendations
- [Action item 1]
- [Action item 2]
undefined- [行动项1]
- [行动项2]
undefinedImpact Analysis
影响分析
markdown
undefinedmarkdown
undefinedImpact Analysis: [Proposed Change]
Impact Analysis: [拟议变更]
Affected Components
Affected Components
| Component | Impact Type | Severity | Test Required |
|---|---|---|---|
| Service A | Direct | High | Yes |
| Service B | Indirect | Medium | Yes |
| Client C | Downstream | Low | Optional |
| Component | Impact Type | Severity | Test Required |
|---|---|---|---|
| Service A | Direct | High | Yes |
| Service B | Indirect | Medium | Yes |
| Client C | Downstream | Low | Optional |
Risk Assessment
Risk Assessment
- Breaking Changes: [List any]
- Performance Impact: [Expected effect]
- Data Migration: [Required/Not required]
- Breaking Changes: [列出所有变更]
- Performance Impact: [预期影响]
- Data Migration: [需要/不需要]
Rollback Plan
Rollback Plan
- [Step 1]
- [Step 2]
- [Verification]
- [步骤1]
- [步骤2]
- [验证环节]
Recommendation
Recommendation
[Go/No-Go with reasoning]
undefined[执行/不执行,附推理过程]
undefinedIntegration with Extended Thinking
与深度思考的集成
When using these frameworks with extended thinking:
python
undefined在结合深度思考能力使用这些框架时:
python
undefinedEnable extended thinking for complex reasoning
Enable extended thinking for complex reasoning
response = client.messages.create(
model="claude-opus-4-5-20250514",
max_tokens=16000,
thinking={
"type": "enabled",
"budget_tokens": 15000 # Higher budget for complex reasoning
},
system="""You are a systematic problem solver. Use structured
reasoning frameworks like Chain-of-Thought, Tree-of-Thought,
or MECE analysis as appropriate for the problem.""",
messages=[{
"role": "user",
"content": "Analyze this architecture decision using ToT..."
}]
)
undefinedresponse = client.messages.create(
model="claude-opus-4-5-20250514",
max_tokens=16000,
thinking={
"type": "enabled",
"budget_tokens": 15000 # Higher budget for complex reasoning
},
system="""You are a systematic problem solver. Use structured
reasoning frameworks like Chain-of-Thought, Tree-of-Thought,
or MECE analysis as appropriate for the problem.""",
messages=[{
"role": "user",
"content": "Analyze this architecture decision using ToT..."
}]
)
undefinedBest Practices
最佳实践
- Choose the right framework: CoT for linear problems, ToT for branching decisions
- Document your reasoning: Makes it reviewable and repeatable
- Validate assumptions: Each step should build on verified facts
- Consider alternatives: Always explore at least 2-3 approaches
- Quantify when possible: Use metrics to compare options
- Time-box exploration: Set limits on analysis depth
- 选择合适的框架:线性问题选用CoT,分支决策选用ToT
- 记录推理过程:便于审核和重复执行
- 验证假设:每一步都应基于已验证的事实
- 考虑替代方案:始终探索至少2-3种不同方法
- 尽可能量化:使用指标对比不同选项
- 设定分析时限:限制分析的深度范围
See Also
相关链接
- [[extended-thinking]] - Enable deep reasoning capabilities
- [[deep-analysis]] - Analytical templates
- [[debugging]] - General debugging patterns
- [[testing]] - Validation strategies
- [[extended-thinking]] - 启用深度推理能力
- [[deep-analysis]] - 分析模板
- [[debugging]] - 通用调试模式
- [[testing]] - 验证策略