From 39975c5f24633b30c1710c6a5c805c25ff756cb6 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Fri, 19 Sep 2025 09:26:50 +0800 Subject: [PATCH] docs: Update workflow documentation and context search strategy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated workflow docs command and refined context search strategy guidelines. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .claude/commands/workflow/docs.md | 4 ++-- .claude/workflows/context-search-strategy.md | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.claude/commands/workflow/docs.md b/.claude/commands/workflow/docs.md index a67168b0..07ee60f6 100644 --- a/.claude/commands/workflow/docs.md +++ b/.claude/commands/workflow/docs.md @@ -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 diff --git a/.claude/workflows/context-search-strategy.md b/.claude/workflows/context-search-strategy.md index ce15ed64..bd7a4cfa 100644 --- a/.claude/workflows/context-search-strategy.md +++ b/.claude/workflows/context-search-strategy.md @@ -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