diff --git a/.claude/commands/workflow/plan.md b/.claude/commands/workflow/plan.md index 7dde9637..cbe57410 100644 --- a/.claude/commands/workflow/plan.md +++ b/.claude/commands/workflow/plan.md @@ -102,6 +102,31 @@ The command automatically detects input type: - Updates session state with task references - Runs project structure analysis to populate paths field +### Project Analysis Options + +Three analysis levels available: + +```bash +# Quick - Structure only (5 seconds) +/workflow:plan "requirements" + +# Standard - Structure + Gemini analysis (30 seconds) +/workflow:plan --analyze "requirements" + +# Deep - Structure + Parallel comprehensive analysis (1-2 minutes) +/workflow:plan --deep "requirements" +``` + +**Analysis Selection**: +- Default: Auto-selects based on project complexity +- Manual: Use flags to override automatic selection +- Strategy: See @~/.claude/workflows/intelligent-tools.md for tool selection principles + +**Execution**: +1. Always runs `get_modules_by_depth.sh` for structure +2. Applies selected analysis level +3. Populates task paths automatically + ### Task Saturation Assessment Evaluates whether to merge preparation and execution: diff --git a/.claude/workflows/intelligent-tools.md b/.claude/workflows/intelligent-tools.md new file mode 100644 index 00000000..c6583ae3 --- /dev/null +++ b/.claude/workflows/intelligent-tools.md @@ -0,0 +1,87 @@ +--- +name: intelligent-tools +description: Strategic tool selection guide - references unified tool documentation +type: strategic-guideline +--- + +# Intelligent Tools Selection Strategy + +## Overview +This document provides strategic guidance for selecting the appropriate analysis tool based on task characteristics and project requirements. + +## Tool Documentation References +- **Gemini CLI**: @~/.claude/workflows/gemini-unified.md +- **Codex CLI**: @~/.claude/workflows/codex-unified.md + +## Tool Characteristics Comparison + +### Gemini +- **Strengths**: + - Large context window for analyzing many files simultaneously + - Excellent pattern recognition across modules + - Superior for architectural and structural analysis +- **Optimal Use Cases**: + - Large codebase analysis (>50 files) + - Cross-module pattern detection + - Coding convention analysis + - Refactoring with broad dependencies + +### Codex +- **Strengths**: + - Superior mathematical and algorithmic reasoning + - Deeper technical knowledge base + - Better for focused, deep analysis +- **Optimal Use Cases**: + - Complex algorithm analysis + - Security vulnerability assessment + - Performance optimization + - Database schema design + - API protocol specifications + +## Strategic Selection Matrix + +| 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 | + +## Parallel Analysis Strategy + +For complex projects requiring both broad context and deep analysis: + +```bash +# Use Task agents to run both tools in parallel +Task(subagent_type="general-purpose", + prompt="Use Gemini (see @~/.claude/workflows/gemini-unified.md) for architectural analysis") ++ +Task(subagent_type="general-purpose", + prompt="Use Codex (see @~/.claude/workflows/codex-unified.md) for algorithmic analysis") +``` + +## Implementation Guidelines + +1. **Default Selection**: Let project characteristics drive tool choice +2. **Complexity Thresholds**: + - Simple projects (≤50 files): Either tool based on content type + - Medium projects (50-200 files): Gemini for overview, Codex for specifics + - Large projects (>200 files): Parallel analysis with both tools + +3. **Content-Based Selection**: + - Mathematical/algorithmic content → Codex + - Architectural/structural content → Gemini + - Mixed content → Both via Task agents + +## Usage in Commands + +Commands should reference this strategy guide for tool selection decisions. +Specific tool usage syntax and examples are documented in their respective unified guides. + +**See also**: +- Gemini detailed usage: @~/.claude/workflows/gemini-unified.md +- Codex detailed usage: @~/.claude/workflows/codex-unified.md \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md index 88eaac93..b02badbb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,8 @@ This document defines project-specific coding standards and development principl ### CLI Tool Context Protocols For all CLI tool usage, command syntax, and integration guidelines: - **Gemini (Analysis)**: @~/.claude/workflows/gemini-unified.md -- **Codex (Analysis)**: @~/.claude/workflows/codex-unified.md +- **Codex (Development)**: @~/.claude/workflows/codex-unified.md +- **Tool Selection Strategy**: @~/.claude/workflows/intelligent-tools.md ### Intelligent Context Acquisition @@ -25,7 +26,7 @@ Bash(codex --full-auto exec "analyze [scope] architecture") - Identify 3+ existing similar patterns before implementation - Map dependencies and integration points - Understand testing framework and coding conventions -- Use Task agents for parallel context gathering when needed + ## Philosophy