refactor: 重组CLI模板系统,采用优先级前缀命名

主要变更:
- 模板重命名:采用优先级前缀(01-通用, 02-专用, 03-领域特定)
- 目录调整:bug-diagnosis从development移至analysis
- 引用更新:5个命令文件中21处模板引用更新为新路径
- 路径统一:所有引用统一使用完整路径格式

模板变更详情:
- analysis/:8个模板(01-trace-code-execution, 01-diagnose-bug-root-cause等)
- development/:5个模板(02-implement-feature, 02-refactor-codebase等)
- planning/:5个模板(01-plan-architecture-design, 02-breakdown-task-steps等)
- memory/:1个模板(02-document-module-structure)

命令文件更新:
- cli/mode/bug-diagnosis.md(6处引用)
- cli/mode/code-analysis.md(6处引用)
- cli/mode/plan.md(6处引用)
- task/execute.md(1处引用)
- workflow/tools/test-task-generate.md(2处引用)

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-11-06 10:57:17 +08:00
parent afed67cd3a
commit 854464b221
26 changed files with 105 additions and 158 deletions

View File

@@ -9,7 +9,7 @@ allowed-tools: SlashCommand(*), Bash(*), Task(*)
## Purpose
Systematic code analysis with execution path tracing template (`~/.claude/workflows/cli-templates/prompts/analysis/code-execution-tracing.txt`).
Systematic code analysis with execution path tracing template (`~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt`).
**Tool Selection**:
- **gemini** (default) - Best for code analysis and tracing
@@ -52,7 +52,7 @@ Systematic code analysis with execution path tracing template (`~/.claude/workfl
1. Parse tool selection (default: gemini)
2. Optional: enhance analysis target with `/enhance-prompt`
3. Detect target directory from `--cd` or auto-infer
4. Build command with execution-tracing template
4. Build command with template
5. Execute analysis (read-only)
6. Save to `.workflow/WFS-[id]/.chat/code-analysis-[timestamp].md`
@@ -63,7 +63,7 @@ Delegates to `cli-execution-agent` for intelligent context discovery and analysi
## Core Rules
- **Read-only**: Analyzes code, does NOT modify files
- **Template**: Uses `code-execution-tracing.txt` for systematic analysis
- **Template**: Uses `~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt` for systematic analysis
- **Output**: Saves to `.workflow/WFS-[id]/.chat/`
## CLI Command Templates
@@ -76,7 +76,7 @@ TASK: Execution path tracing
MODE: analysis
CONTEXT: @**/*
EXPECTED: Trace, call diagram
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/code-execution-tracing.txt)
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt)
"
# Qwen: Replace 'gemini' with 'qwen'
```
@@ -89,7 +89,7 @@ TASK: Path analysis
MODE: analysis
CONTEXT: @**/*
EXPECTED: Trace, optimization
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/code-execution-tracing.txt)
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt)
" -m gpt-5 --skip-git-repo-check -s danger-full-access
```
@@ -106,7 +106,7 @@ Task(
Mode: code-analysis
Tool: ${tool_flag || 'auto-select'} // gemini|qwen|codex
Directory: ${cd_path || 'auto-detect'}
Template: code-execution-tracing
Template: ~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt
Agent responsibilities:
1. Context Discovery:
@@ -117,7 +117,7 @@ Task(
2. CLI Command Generation:
- Build Gemini/Qwen/Codex command
- Include discovered context
- Apply code-execution-tracing.txt template
- Apply ~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt template
3. Execution & Output:
- Execute analysis with selected tool
@@ -133,5 +133,5 @@ Task(
## Notes
- Template: `~/.claude/workflows/cli-templates/prompts/analysis/code-execution-tracing.txt`
- Template: `~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt`
- See `intelligent-tools-strategy.md` for detailed tool usage