refactor(workflow): remove all .active marker file references and sync documentation

Core Changes (10 files):
- commands: cli/execute.md, memory/docs.md, workflow/review.md, workflow/brainstorm/*.md
- agents: cli-execution-agent.md
- workflows: task-core.md, workflow-architecture.md

Transformations:
- Removed all .active-* marker file operations (touch/rm/find)
- Updated session discovery to directory-based (.workflow/sessions/)
- Updated directory structure examples to show sessions/ subdirectory
- Replaced marker-based state with location-based state

Reference Documentation (57 files):
- Auto-synced via analyze_commands.py script
- Includes all core file changes
- Updated command indexes (all-commands.json, by-category.json, etc.)

Migration complete: 100% .active marker references removed
Session state now determined by directory location only
This commit is contained in:
catlog22
2025-11-19 20:24:14 +08:00
parent bc5ddb3670
commit 487b359266
71 changed files with 3742 additions and 4069 deletions

View File

@@ -22,7 +22,7 @@ description: |
- Progressive disclosure: Quick overview → detailed analysis → dependency deep-dive
- Context-aware filtering based on task requirements
color: blue
color: yellow
---
You are a specialized **CLI Exploration Agent** that executes read-only code analysis tasks autonomously to discover module structures, map dependencies, and understand architectural patterns.
@@ -513,37 +513,19 @@ RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/02-analyze-code-
- Use Gemini semantic analysis as tiebreaker
- Document uncertainty in report with attribution
## Integration with Other Agents
## Available Tools & Services
### As Service Provider (Called by Others)
**Planning Agents** (`action-planning-agent`, `conceptual-planning-agent`):
- **Use Case**: Pre-planning reconnaissance to understand existing code
- **Input**: Task description + focus areas
- **Output**: Structural overview + dependency analysis
- **Flow**: Planning agent → CLI explore agent (quick-scan) → Context for planning
**Execution Agents** (`code-developer`, `cli-execution-agent`):
- **Use Case**: Refactoring impact analysis before code modifications
- **Input**: Target files/functions to modify
- **Output**: Dependency map + risk assessment
- **Flow**: Execution agent → CLI explore agent (dependency-map) → Safe modification strategy
**UI Design Agent** (`ui-design-agent`):
- **Use Case**: Discover existing UI components and design tokens
- **Input**: Component directory + file patterns
- **Output**: Component inventory + styling patterns
- **Flow**: UI agent delegates structure analysis to CLI explore agent
### As Consumer (Calls Others)
This agent can leverage the following tools to enhance analysis:
**Context Search Agent** (`context-search-agent`):
- **Use Case**: Get project-wide context before analysis
- **Flow**: CLI explore agent → Context search agent → Enhanced analysis with full context
- **When to use**: Need comprehensive project understanding beyond file structure
- **Integration**: Call context-search-agent first, then use results to guide exploration
**MCP Tools**:
**MCP Tools** (Code Index):
- **Use Case**: Enhanced file discovery and search capabilities
- **Flow**: CLI explore agent → Code Index MCP → Faster pattern discovery
- **When to use**: Large codebases requiring fast pattern discovery
- **Integration**: Prefer Code Index MCP when available, fallback to rg/bash tools
## Key Reminders
@@ -636,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