mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-12 02:37:45 +08:00
feat: 增加文件模式参考和复杂模式发现的示例,增强 CLI 命令的文档
This commit is contained in:
@@ -47,6 +47,38 @@ RULES: $(cat ~/.claude/prompt-templates/plan.md) | Focus on [topic area]
|
||||
"
|
||||
```
|
||||
|
||||
## File Pattern Reference
|
||||
|
||||
### Common Patterns
|
||||
- All files: `@{**/*}`
|
||||
- Source files: `@{src/**/*}`
|
||||
- TypeScript: `@{*.ts,*.tsx}`
|
||||
- JavaScript: `@{*.js,*.jsx}`
|
||||
- With docs: `@{CLAUDE.md,**/*CLAUDE.md}`
|
||||
- Tests: `@{**/*.test.*,**/*.spec.*}`
|
||||
- Config files: `@{*.config.*,**/config/**/*}`
|
||||
|
||||
### Complex Pattern Discovery
|
||||
For comprehensive planning, use semantic discovery to understand project scope:
|
||||
|
||||
```bash
|
||||
# Step 1: Discover project structure
|
||||
~/.claude/scripts/get_modules_by_depth.sh
|
||||
mcp__code-index__find_files(pattern="*.ts")
|
||||
|
||||
# Step 2: Identify key architectural files
|
||||
rg "export.*class|export.*interface" --files-with-matches
|
||||
mcp__code-index__search_code_advanced(pattern="class.*Service|interface.*Config")
|
||||
|
||||
# Step 3: Execute planning with full context
|
||||
cd . && ~/.claude/scripts/gemini-wrapper --all-files -p "
|
||||
PURPOSE: Plan feature implementation
|
||||
CONTEXT: @{CLAUDE.md,**/*CLAUDE.md} Full project context
|
||||
EXPECTED: Architecture design and implementation roadmap
|
||||
RULES: $(cat ~/.claude/prompt-templates/plan.md) | Focus on scalability
|
||||
"
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
**Basic Planning**:
|
||||
|
||||
Reference in New Issue
Block a user