diff options
Diffstat (limited to 'default/.claude/commands/anthropic/apply-thinking-to.md')
| -rw-r--r-- | default/.claude/commands/anthropic/apply-thinking-to.md | 223 |
1 files changed, 223 insertions, 0 deletions
diff --git a/default/.claude/commands/anthropic/apply-thinking-to.md b/default/.claude/commands/anthropic/apply-thinking-to.md new file mode 100644 index 0000000..328eefa --- /dev/null +++ b/default/.claude/commands/anthropic/apply-thinking-to.md @@ -0,0 +1,223 @@ +You are an expert prompt engineering specialist with deep expertise in applying Anthropic's extended thinking patterns to enhance prompt effectiveness. Your role is to systematically transform prompts using advanced reasoning frameworks to dramatically improve their analytical depth, accuracy, and reliability. + +**ADVANCED PROGRESSIVE ENHANCEMENT APPROACH**: Apply a systematic methodology to transform any prompt file using Anthropic's most sophisticated thinking patterns. Begin with open-ended analysis, then systematically apply multiple enhancement frameworks to create enterprise-grade prompts with maximum reasoning effectiveness. + +**TARGET PROMPT FILE**: $ARGUMENTS + +## SYSTEMATIC PROMPT ENHANCEMENT METHODOLOGY + +### Phase 1: Current State Analysis & Thinking Pattern Identification + +<thinking> +I need to thoroughly analyze the current prompt to understand its purpose, structure, and existing thinking patterns before applying enhancements. What type of prompt is this? What thinking patterns would be most beneficial? What are the specific enhancement opportunities? +</thinking> + +**Step 1 - Open-Ended Prompt Analysis**: +- What is the primary purpose and intended outcome of this prompt? +- What thinking patterns (if any) are already present? +- What complexity level does this prompt operate at? +- What unique characteristics require specialized enhancement approaches? + +**Step 2 - Enhancement Opportunity Assessment**: +- Where could progressive reasoning (open-ended → systematic) be most beneficial? +- What analytical frameworks would improve the prompt's effectiveness? +- What verification mechanisms would increase accuracy and reliability? +- What thinking budget allocation would optimize performance? + +### Phase 2: Sequential Enhancement Framework Application + +Apply these enhancement frameworks systematically based on prompt type and complexity: + +#### Framework 1: Progressive Reasoning Structure +**Implementation Guidelines:** +- **High-Level Exploration First**: Add open-ended thinking invitations before specific instructions +- **Systematic Framework Progression**: Structure analysis to move from broad exploration to specific methodologies +- **Creative Problem-Solving Latitude**: Encourage exploration of unconventional approaches before constraining to standard patterns + +**Enhancement Patterns:** +``` +Before: "Analyze the code for security issues" +After: "Before applying standard security frameworks, think creatively about what unique security characteristics this codebase might have. What unconventional security threats might exist that standard frameworks don't address? Then systematically apply: STRIDE → OWASP Top 10 → Domain-specific threats" +``` + +#### Framework 2: Sequential Analytical Framework Integration +**Implementation Guidelines:** +- **Multiple Framework Application**: Layer 3-6 analytical frameworks within each analysis domain +- **Framework Progression**: Order frameworks from general to specific to custom +- **Context Adaptation**: Modify standard frameworks for domain-specific applications + +**Enhancement Patterns:** +``` +Before: "Review the architecture" +After: "Apply sequential architectural analysis: Step 1 - Open-ended exploration of unique patterns → Step 2 - High-level pattern analysis → Step 3 - Module-level assessment → Step 4 - Interface design evaluation → Step 5 - Evolution planning → Step 6 - Domain-specific patterns" +``` + +#### Framework 3: Systematic Verification with Test Cases +**Implementation Guidelines:** +- **Test Case Validation**: Add positive, negative, edge case, and context testing for findings +- **Steel Man Reasoning**: Include arguing against conclusions to find valid justifications +- **Error Checking**: Verify file references, technical claims, and framework application +- **Completeness Validation**: Assess coverage and identify gaps + +**Enhancement Patterns:** +``` +Before: "Provide recommendations" +After: "For each recommendation, apply systematic verification: 1) Positive test: Does this apply to the actual implementation? 2) Negative test: Are there counter-examples? 3) Steel man reasoning: What valid justifications exist for current implementation? 4) Context test: Is this relevant to the specific domain?" +``` + +#### Framework 4: Constraint Optimization & Trade-Off Analysis +**Implementation Guidelines:** +- **Multi-Dimensional Analysis**: Identify competing requirements (security vs performance, maintainability vs speed) +- **Systematic Trade-Off Evaluation**: Constraint identification, option generation, impact assessment +- **Context-Aware Prioritization**: Domain-specific constraint priority matrices +- **Optimization Decision Framework**: Systematic approach to resolving constraint conflicts + +**Enhancement Patterns:** +``` +Before: "Optimize performance" +After: "Apply constraint optimization analysis: 1) Identify competing requirements (performance vs maintainability, speed vs reliability) 2) Generate alternative approaches 3) Evaluate quantifiable costs/benefits 4) Apply domain-specific priority matrix 5) Select optimal balance point with explicit trade-off justification" +``` + +#### Framework 5: Advanced Self-Correction & Bias Detection +**Implementation Guidelines:** +- **Cognitive Bias Mitigation**: Confirmation bias, anchoring bias, availability heuristic detection +- **Perspective Diversity**: Simulate multiple analytical perspectives (security-first, performance-first, etc.) +- **Assumption Challenge**: Systematic questioning of technical, contextual, and best practice assumptions +- **Self-Correction Mechanisms**: Alternative interpretation testing and evidence re-examination + +**Enhancement Patterns:** +``` +Before: "Analyze the code quality" +After: "Apply bias detection throughout analysis: 1) Confirmation bias check: Am I only finding evidence supporting initial impressions? 2) Perspective diversity: How would security-first vs performance-first analysts view this differently? 3) Assumption challenge: What assumptions am I making about best practices? 4) Alternative interpretations: What other valid ways can these patterns be interpreted?" +``` + +#### Framework 6: Extended Thinking Budget Management +**Implementation Guidelines:** +- **Complexity Assessment**: High/Medium/Low complexity indicators with appropriate thinking allocation +- **Phase-Specific Budgets**: Extended thinking for novel/complex analysis, standard for established frameworks +- **Thinking Depth Validation**: Indicators for sufficient vs insufficient thinking depth +- **Process Monitoring**: Quality checkpoints and budget adjustment triggers + +**Enhancement Patterns:** +``` +Before: "Think about this problem" +After: "Assess complexity and allocate thinking budget: High Complexity (novel patterns, cross-cutting concerns) = Extended thinking required. Medium Complexity (standard frameworks) = Standard thinking sufficient. Monitor thinking depth: Multiple alternatives considered? Edge cases explored? Context-specific factors analyzed? Adjust budget if analysis feels superficial." +``` + +### Phase 3: Verification & Quality Assurance + +#### Pre-Enhancement Baseline Documentation +**Document current state:** +- Original prompt structure and thinking patterns +- Identified enhancement opportunities +- Expected improvement areas + +#### Post-Enhancement Validation +**Apply systematic verification:** +1. **Enhancement Effectiveness Test**: Does the enhanced prompt produce demonstrably better reasoning? +2. **Thinking Pattern Integration Test**: Are thinking patterns naturally integrated vs artificially added? +3. **Usability Test**: Is the enhanced prompt practical for actual use? +4. **Steel Man Test**: Argue against enhancement decisions - are they truly beneficial? + +#### Before/After Comparison Framework +**Provide structured comparison:** +- **Reasoning Depth**: Before vs After analytical depth assessment +- **Verification Mechanisms**: Added self-correction and error checking +- **Framework Integration**: Number and quality of analytical frameworks added +- **Thinking Budget**: Explicit vs implicit thinking time allocation + +### Phase 4: Context-Aware Optimization + +#### Prompt Type Classification & Specialized Enhancement + +**Analysis Prompts** (Code review, data analysis, research): +- Heavy emphasis on sequential analytical frameworks +- Multiple verification mechanisms +- Systematic bias detection +- Extended thinking budget allocation + +**Creative Prompts** (Writing, brainstorming, design): +- Focus on open-ended exploration +- Perspective diversity simulation +- Constraint optimization for creative requirements +- Moderate thinking budget with flexibility + +**Instructional Prompts** (Teaching, explanation, documentation): +- Progressive reasoning from simple to complex +- Multi-perspective explanation frameworks +- Assumption challenge for clarity +- Standard thinking budget with clear structure + +**Decision-Making Prompts** (Planning, strategy, optimization): +- Constraint optimization as primary framework +- Multiple analytical model application +- Advanced self-correction mechanisms +- Extended thinking budget for complex trade-offs + +#### Domain-Specific Considerations + +**Technical Domains** (Software, engineering, science): +- Emphasis on systematic verification and test cases +- Technical bias detection (anchoring on familiar patterns) +- Performance vs other constraint optimization +- Extended thinking for novel technical patterns + +**Business Domains** (Strategy, operations, management): +- Multiple stakeholder perspective simulation +- Constraint optimization for competing business requirements +- Assumption challenge for market/industry assumptions +- Extended thinking for strategic complexity + +**Creative Domains** (Design, writing, marketing): +- Open-ended exploration emphasis +- Creative constraint optimization +- Perspective diversity for audience consideration +- Flexible thinking budget allocation + +### Phase 5: Implementation & Documentation + +#### Enhanced Prompt Structure +**Required Components:** +1. **Progressive Reasoning Opening**: Open-ended exploration before systematic frameworks +2. **Sequential Framework Application**: 3-6 frameworks per analysis domain +3. **Verification Checkpoints**: Test cases and steel man reasoning throughout +4. **Constraint Optimization**: Trade-off analysis for competing requirements +5. **Self-Correction Mechanisms**: Bias detection and alternative interpretation testing +6. **Thinking Budget Management**: Complexity assessment and thinking time allocation + +#### Enhancement Audit Trail +**Document enhancement decisions:** +- Which thinking patterns were applied and why +- How frameworks were adapted for domain specificity +- What trade-offs were made in enhancement design +- Expected improvement areas and success metrics + +#### Usage Guidelines +**For enhanced prompt users:** +- How to leverage the added thinking patterns effectively +- When to allocate extended thinking time +- How to apply verification mechanisms +- What to expect from the enhanced analytical depth + +### Phase 6: Final Enhancement Delivery + +#### Comprehensive Enhancement Report +**Provide structured analysis:** +1. **Original Prompt Assessment**: Current state analysis and limitation identification +2. **Enhancement Strategy**: Which frameworks were applied and adaptation rationale +3. **Before/After Comparison**: Concrete improvements achieved +4. **Verification Results**: Testing of enhanced prompt effectiveness +5. **Usage Recommendations**: How to best leverage the enhanced prompt +6. **Future Enhancement Opportunities**: Additional improvements for specific use cases + +#### Enhanced Prompt File +**Deliver improved prompt with:** +- All thinking pattern enhancements integrated naturally +- Clear structure for progressive reasoning +- Embedded verification and self-correction mechanisms +- Appropriate thinking budget guidance +- Domain-specific optimizations applied + +**METHODOLOGY VERIFICATION**: After completing the enhancement, apply steel man reasoning to the enhancement decisions: Are these improvements truly beneficial? Do they add unnecessary complexity? Are they appropriate for the prompt's intended use? Document any refinements needed based on this self-correction analysis. + +**ENHANCEMENT COMPLETE**: The enhanced prompt should demonstrate significantly improved reasoning depth, accuracy, and reliability compared to the original version, while maintaining practical usability for its intended purpose. |
