mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
feat: Add intelligent tool selection strategy and simplify plan.md analysis
- Create intelligent-tools.md as strategic guide for tool selection - Reference intelligent-tools.md from CLAUDE.md for global access - Add three analysis levels to plan.md (quick/standard/deep) - Separate tool selection strategy from plan command implementation - Maintain clear separation of concerns between strategy and execution 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -102,6 +102,31 @@ The command automatically detects input type:
|
|||||||
- Updates session state with task references
|
- Updates session state with task references
|
||||||
- Runs project structure analysis to populate paths field
|
- 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
|
### Task Saturation Assessment
|
||||||
Evaluates whether to merge preparation and execution:
|
Evaluates whether to merge preparation and execution:
|
||||||
|
|
||||||
|
|||||||
87
.claude/workflows/intelligent-tools.md
Normal file
87
.claude/workflows/intelligent-tools.md
Normal file
@@ -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
|
||||||
@@ -6,7 +6,8 @@ This document defines project-specific coding standards and development principl
|
|||||||
### CLI Tool Context Protocols
|
### CLI Tool Context Protocols
|
||||||
For all CLI tool usage, command syntax, and integration guidelines:
|
For all CLI tool usage, command syntax, and integration guidelines:
|
||||||
- **Gemini (Analysis)**: @~/.claude/workflows/gemini-unified.md
|
- **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
|
### Intelligent Context Acquisition
|
||||||
|
|
||||||
@@ -25,7 +26,7 @@ Bash(codex --full-auto exec "analyze [scope] architecture")
|
|||||||
- Identify 3+ existing similar patterns before implementation
|
- Identify 3+ existing similar patterns before implementation
|
||||||
- Map dependencies and integration points
|
- Map dependencies and integration points
|
||||||
- Understand testing framework and coding conventions
|
- Understand testing framework and coding conventions
|
||||||
- Use Task agents for parallel context gathering when needed
|
|
||||||
|
|
||||||
## Philosophy
|
## Philosophy
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user