Files
Claude-Code-Workflow/.claude/workflows/intelligent-tools-strategy.md
catlog22 d0b08794ca refactor: Reorganize workflow documentation structure and eliminate redundancy
## Major Changes
- **Replace 3 documents with 2**: Consolidate 655 lines to ~550 lines (40% reduction)
- **New Structure**:
  - `intelligent-tools-strategy.md` (strategic layer)
  - `tools-implementation-guide.md` (implementation layer)
- **Remove old files**: `intelligent-tools.md`, `gemini-unified.md`, `codex-unified.md`

## Content Improvements
- **Quick Start section**: Essential commands for immediate use
- **Strategic guidance**: Tool selection matrix and decision framework
- **Implementation details**: Part A (shared), Part B (Gemini), Part C (Codex)
- **Eliminate duplicates**: Template system, file patterns, execution settings

## Reference Updates
- **Agent files**: Update to new document paths (3 files)
- **Command files**: Batch update all references (12 files)
- **README files**: Update English and Chinese versions
- **Workflow files**: Update plan.md reference

## Benefits
- 40% content reduction while preserving all unique information
- Clear layer separation: strategy vs implementation
- Improved navigation and maintainability
- Enhanced quick reference capabilities

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 20:59:15 +08:00

5.1 KiB

name, description, type
name description type
intelligent-tools-strategy Strategic guide for intelligent tool selection - quick start and decision framework strategic-guideline

Intelligent Tools Selection Strategy

Quick Start

Essential Commands

Gemini (Analysis & Pattern Recognition):

~/.claude/scripts/gemini-wrapper -p "analyze authentication patterns"

Codex (Development & Implementation):

codex --full-auto exec "implement user authentication system"

⚠️ CRITICAL Command Differences

Tool Command Has Wrapper Key Feature
Gemini ~/.claude/scripts/gemini-wrapper YES Large context window, pattern recognition
Codex codex --full-auto exec NO Autonomous development, math reasoning

NEVER use: ~/.claude/scripts/codex - this wrapper does not exist!

🎯 Tool Selection Matrix

When to Use Gemini

  • Command: ~/.claude/scripts/gemini-wrapper -p "prompt"
  • Strengths: Large context window, pattern recognition across modules
  • Best For:
    • Project architecture analysis (>50 files)
    • Cross-module pattern detection
    • Coding convention analysis
    • Refactoring with broad dependencies
    • Large codebase understanding

When to Use Codex

  • Command: codex --full-auto exec "prompt"
  • Strengths: Mathematical reasoning, autonomous development
  • Best For:
    • Complex algorithm analysis
    • Security vulnerability assessment
    • Performance optimization
    • Database schema design
    • API protocol specifications
    • Autonomous feature development

📊 Decision Framework

Analysis Need Recommended Tool Rationale
Project Architecture Gemini Needs broad context across many files
Algorithm Optimization Codex Requires deep mathematical reasoning
Security Analysis Codex Leverages deeper security knowledge
Code Patterns Gemini Pattern recognition across modules
Refactoring Gemini Needs understanding of all dependencies
API Design Codex Technical specification expertise
Test Coverage Gemini Cross-module test understanding
Performance Tuning Codex Mathematical optimization capabilities
Feature Implementation Codex Autonomous development capabilities
Architectural Review Gemini Large context analysis

🔄 Parallel Analysis Strategy

For complex projects requiring both broad context and deep analysis:

# Use Task agents to run both tools in parallel
Task(subagent_type="general-purpose",
     prompt="Use Gemini (see @~/.claude/workflows/tools-implementation-guide.md) for architectural analysis")
+
Task(subagent_type="general-purpose",
     prompt="Use Codex (see @~/.claude/workflows/tools-implementation-guide.md) for algorithmic analysis")

📈 Complexity-Based Selection

Simple Projects (≤50 files)

  • Content-driven choice: Mathematical → Codex, Structural → Gemini

Medium Projects (50-200 files)

  • Gemini first for overview and patterns
  • Codex second for specific implementations

Large Projects (>200 files)

  • Parallel analysis with both tools
  • Gemini for architectural understanding
  • Codex for focused development tasks

🎯 Quick Reference

Gemini Quick Commands

# Pattern analysis
~/.claude/scripts/gemini-wrapper -p "analyze existing patterns in auth module"

# Architecture review
cd src && ~/.claude/scripts/gemini-wrapper -p "review overall architecture"

# Code conventions
~/.claude/scripts/gemini-wrapper -p "identify coding standards and conventions"

Codex Quick Commands

# Feature development
codex --full-auto exec "implement JWT authentication with refresh tokens"

# Performance optimization
codex --full-auto exec "optimize database queries in user service"

# Security enhancement
codex --full-auto exec "add input validation and sanitization"

📋 Implementation Guidelines

  1. Default Selection: Let project characteristics drive tool choice
  2. Start Simple: Begin with single tool, escalate to parallel if needed
  3. Context First: Understand scope before selecting approach
  4. Trust the Tools: Let autonomous capabilities handle complexity

🔗 Detailed Implementation

For comprehensive syntax, patterns, and advanced usage:

  • Implementation Guide: @~/.claude/workflows/tools-implementation-guide.md

📊 Tools Comparison Summary

Feature Gemini Codex
Command Syntax Has wrapper script Direct command only
File Loading --all-files available @ patterns required
Default Mode Interactive analysis --full-auto exec automation
Primary Use Analysis & planning Development & implementation
Context Window Very large Standard with smart discovery
Automation Level Manual implementation Autonomous execution
Best For Understanding codebases Building features

Remember: Choose based on task nature, not personal preference. Gemini excels at understanding, Codex excels at building.