From 4298c5d96f2f17f3479246136e067b41469be138 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Wed, 24 Sep 2025 19:01:37 +0800 Subject: [PATCH] feat: Add CLI tool analysis guidelines to workflow plan MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add CLI tool usage guideline to Context Accumulation Guidelines - Include example pre_analysis step showing Gemini CLI integration - Emphasize appropriate usage "when needed" to prevent overuse - Demonstrate proper variable passing and error handling in CLI commands 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .claude/commands/workflow/plan.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.claude/commands/workflow/plan.md b/.claude/commands/workflow/plan.md index 559c4b25..0e78fd30 100644 --- a/.claude/commands/workflow/plan.md +++ b/.claude/commands/workflow/plan.md @@ -83,6 +83,13 @@ The following pre_analysis steps are generated for agent execution: "action": "Retrieve relevant documentation based on task scope and requirements", "command": "bash(cat .workflow/docs/README.md $(if [[ \"$TASK_TYPE\" == *\"architecture\"* ]]; then echo .workflow/docs/architecture/*.md; fi) $(if [[ \"$TASK_MODULES\" ]]; then for module in $TASK_MODULES; do echo .workflow/docs/modules/$module/*.md; done; fi) $(if [[ \"$TASK_TYPE\" == *\"api\"* ]]; then echo .workflow/docs/api/*.md; fi) CLAUDE.md README.md 2>/dev/null || echo 'documentation not found')", "output_to": "doc_context" + }, + { + "step": "analyze_patterns", + "action": "Analyze codebase patterns and architecture using CLI tools", + "command": "bash(~/.claude/scripts/gemini-wrapper -p \"PURPOSE: Analyze existing patterns TASK: Identify implementation patterns for [task_type] CONTEXT: [planning_context] [dependency_context] EXPECTED: Pattern analysis and recommendations RULES: Focus on architectural consistency\")", + "output_to": "pattern_analysis", + "on_error": "skip_optional" } ] } @@ -93,6 +100,7 @@ Flow_control design should follow these principles: 1. **Structure Analysis**: Project hierarchy and patterns 2. **Dependency Mapping**: Previous task summaries → inheritance context 3. **Task Context Generation**: Combined analysis → task.context fields +4. **CLI Tool Analysis**: Use Gemini/Codex appropriately for pattern analysis when needed **Content Sources**: - Task summaries: `.workflow/WFS-[session]/.summaries/`