mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
feat: Add context optimization principle for directory navigation
- Added context optimization to decision principles - Include guidance for using cd [directory] to reduce irrelevant context - Added examples showing focused vs multi-scope analysis patterns 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ type: strategic-guideline
|
||||
- **When in doubt, use both** - Parallel usage provides comprehensive coverage
|
||||
- **Default to tools** - Use specialized tools for most coding tasks, no matter how small
|
||||
- **Lower barriers** - Engage tools immediately when encountering any complexity
|
||||
- **Context optimization** - Based on user intent, determine whether to use `cd [directory]` for focused analysis to reduce irrelevant context import
|
||||
|
||||
### Quick Decision Rules
|
||||
1. **Exploring/Understanding?** → Start with Gemini
|
||||
@@ -187,4 +188,21 @@ For every development task:
|
||||
- **Be specific** - Clear PURPOSE, TASK, and EXPECTED fields
|
||||
- **Include constraints** - File patterns, scope, requirements in RULES
|
||||
- **Test patterns first** - Validate file patterns with `ls`
|
||||
- **Document context** - Always reference CLAUDE.md for context
|
||||
- **Document context** - Always reference CLAUDE.md for context
|
||||
|
||||
### Context Optimization Strategy
|
||||
**Directory Navigation**: Use `cd [directory]` when analyzing specific areas to reduce irrelevant context
|
||||
|
||||
**When to use `cd`**:
|
||||
- Specific directory mentioned → Navigate first
|
||||
- Focused analysis needed → Change to target directory
|
||||
- Multi-directory scope → Stay in root, use explicit paths
|
||||
|
||||
**Example**:
|
||||
```bash
|
||||
# Focused (preferred)
|
||||
cd src/auth && ~/.claude/scripts/gemini-wrapper -p "analyze auth patterns"
|
||||
|
||||
# Multi-scope
|
||||
~/.claude/scripts/gemini-wrapper -p "CONTEXT: @{src/auth/**/*,src/api/**/*}"
|
||||
```
|
||||
Reference in New Issue
Block a user