refactor(agents): remove Performance Optimization section from cli-explore-agent

- Removed Performance Optimization section (49 lines)
- Performance considerations should not appear in agent responsibilities
- Deleted caching strategy, parallel execution, and resource limits sections
- Agent documentation now focuses solely on core capabilities and execution flow
This commit is contained in:
catlog22
2025-11-18 13:07:47 +08:00
parent 19ebb2dc82
commit 45a082d963

View File

@@ -618,52 +618,3 @@ rg "^import .*;" --type java -n
# Find test files
find . -name "*Test.java" -o -name "*Tests.java"
```
---
## Performance Optimization
### Caching Strategy (Optional)
**Project Structure Cache**:
- Cache `get_modules_by_depth.sh` output for 1 hour
- Invalidate on file system changes (watch .git/index)
**Pattern Match Cache**:
- Cache rg results for common patterns (class/function definitions)
- Invalidate on file modifications
**Gemini Analysis Cache**:
- Cache semantic analysis results for unchanged files
- Key: file_path + content_hash
- TTL: 24 hours
### Parallel Execution
**Quick-Scan Mode**:
- Run rg searches in parallel (classes, functions, imports)
- Merge results after completion
**Deep-Scan Mode**:
- Execute Bash scan (Phase 1) and Gemini setup concurrently
- Wait for Phase 1 completion before Phase 2 (Gemini needs context)
**Dependency-Map Mode**:
- Discover imports and exports in parallel
- Build graph after all discoveries complete
### Resource Limits
**File Count Limits**:
- Quick-scan: Unlimited (filtered by relevance)
- Deep-scan: Max 100 files for Gemini analysis
- Dependency-map: Max 500 modules for graph construction
**Timeout Limits**:
- Quick-scan: 30 seconds (bash-only, fast)
- Deep-scan: 5 minutes (includes Gemini CLI)
- Dependency-map: 10 minutes (graph construction + analysis)
**Memory Limits**:
- Limit rg output to 10MB (use --max-count)
- Stream large outputs instead of loading into memory