docs: Update workflow documentation and context search strategy

Updated workflow docs command and refined context search strategy guidelines.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-09-19 09:26:50 +08:00
parent 7a6d7b11a3
commit 39975c5f24
2 changed files with 12 additions and 2 deletions

View File

@@ -26,8 +26,8 @@ examples:
### Planning & Task Creation Process
The command performs structured planning and task creation:
**0. Pre-Planning Architecture Analysis** ⚠️ FIRST STEP
- **System Structure Analysis**: Run `bash(~/.claude/scripts/get_modules_by_depth.sh)` to discover project hierarchy
**0. Pre-Planning Architecture Analysis** ⚠️ MANDATORY FIRST STEP
- **System Structure Analysis**: MUST run `bash(~/.claude/scripts/get_modules_by_depth.sh)` for dynamic task decomposition
- **Module Boundary Identification**: Understand module organization and dependencies
- **Architecture Pattern Recognition**: Identify architectural styles and design patterns
- **Foundation for documentation**: Use structure analysis to guide task decomposition

View File

@@ -11,14 +11,20 @@ type: search-guideline
**rg (ripgrep)**: Fast content search with regex support
**find**: File/directory location by name patterns
**grep**: Built-in pattern matching in files
**get_modules_by_depth.sh**: Program architecture analysis and structural discovery
### Decision Principles
- **Use rg for content** - Fastest for searching within files
- **Use find for files** - Locate files/directories by name
- **Use grep sparingly** - Only when rg unavailable
- **Use get_modules_by_depth.sh first** - MANDATORY for program architecture analysis before planning
### Quick Command Reference
```bash
# Program Architecture Analysis (MANDATORY FIRST)
~/.claude/scripts/get_modules_by_depth.sh # Discover program architecture
bash(~/.claude/scripts/get_modules_by_depth.sh) # Analyze structural hierarchy
# Content Search (rg preferred)
rg "pattern" --type js # Search in JS files
rg -i "case-insensitive" # Ignore case
@@ -36,6 +42,10 @@ grep -n -i "pattern" file.txt # Line numbers, case-insensitive
### Workflow Integration Examples
```bash
# Program Architecture Analysis (MANDATORY BEFORE PLANNING)
~/.claude/scripts/get_modules_by_depth.sh # Discover program architecture
bash(~/.claude/scripts/get_modules_by_depth.sh) # Analyze structural hierarchy
# Search for task definitions
rg "IMPL-\d+" .workflow/ --type json # Find task IDs
find .workflow/ -name "*.json" -path "*/.task/*" # Locate task files