Files
Claude-Code-Workflow/.claude/commands/cli/mode/plan.md
catlog22 369bfa8a08 Refactor command YAML headers: replace examples with argument-hint
**Summary:**
Updated all 62 command files in `.claude/commands` directory to improve parameter documentation clarity by replacing `examples` field with descriptive `argument-hint` field.

**Changes:**
- Added/improved `argument-hint` for all commands based on usage patterns
- Removed `examples` field and all example items from YAML headers
- Maintained all other YAML fields (name, description, usage, allowed-tools)
- Deleted obsolete commands: workflow/issue/*, workflow/session/pause.md, workflow/session/switch.md
- Cleaned up temporary analysis files

**Rationale:**
The `argument-hint` field provides clearer, more concise parameter documentation than example lists, improving command discoverability and usability in the Claude Code interface.

**Files Modified:** 62 command files
**Lines Changed:** -1570 insertions, +192 deletions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 23:45:55 +08:00

4.2 KiB

name, description, usage, argument-hint, allowed-tools
name description usage argument-hint allowed-tools
plan Project planning and architecture analysis using CLI tools /cli:mode:plan [--tool <codex|gemini|qwen>] [--enhance] [--cd "path"] "topic" [--tool codex|gemini|qwen] [--enhance] [--cd path] topic SlashCommand(*), Bash(*)

CLI Mode: Plan (/cli:mode:plan)

Purpose

Comprehensive planning and architecture analysis with strategic planning template (~/.claude/prompt-templates/plan.md).

Supported Tools: codex, gemini (default), qwen Key Feature: --cd flag for directory-scoped planning

Parameters

  • --tool <codex|gemini|qwen> - Tool selection (default: gemini)
  • --enhance - Enhance topic with /enhance-prompt first
  • --cd "path" - Target directory for focused planning
  • <topic> (Required) - Planning topic or architectural question

Execution Flow

  1. Parse tool selection: Extract --tool flag (default: gemini)
  2. If --enhance flag present: Execute /enhance-prompt "[topic]" first
  3. Parse topic (original or enhanced)
  4. Detect target directory (from --cd or auto-infer)
  5. Build command for selected tool with planning template
  6. Execute analysis (read-only, no code modification)
  7. Save to .workflow/WFS-[id]/.chat/plan-[timestamp].md

Core Rules

  1. Analysis Only: This command provides planning recommendations and insights - it does NOT modify code
  2. Enhance First (if flagged): Execute /enhance-prompt before planning
  3. Directory Context: Use cd when --cd provided or auto-detected
  4. Template Required: Always use planning template
  5. Session Output: Save analysis results to session chat

Planning Capabilities (via Template)

  • Strategic architecture insights and recommendations
  • Implementation roadmaps and suggestions
  • Key technical decisions analysis
  • Risk assessment
  • Resource planning

Command Template

cd [directory] && ~/.claude/scripts/gemini-wrapper --all-files -p "
PURPOSE: [planning goal from topic]
TASK: Comprehensive planning and architecture analysis
MODE: analysis
CONTEXT: @{CLAUDE.md,**/*CLAUDE.md} [entire codebase in directory]
EXPECTED: Strategic insights, implementation recommendations, key decisions
RULES: $(cat ~/.claude/prompt-templates/plan.md) | Focus on [topic area]
"

Examples

Basic Planning Analysis:

cd . && ~/.claude/scripts/gemini-wrapper --all-files -p "
PURPOSE: Design user dashboard architecture
TASK: Plan dashboard component structure and data flow
MODE: analysis
CONTEXT: @{CLAUDE.md,**/*CLAUDE.md}
EXPECTED: Architecture recommendations, component design, data flow diagram
RULES: $(cat ~/.claude/prompt-templates/plan.md) | Focus on scalability
"

Directory-Specific Planning:

cd src/api && ~/.claude/scripts/gemini-wrapper --all-files -p "
PURPOSE: Plan API refactoring strategy
TASK: Analyze current API structure and recommend improvements
MODE: analysis
CONTEXT: @{CLAUDE.md,**/*CLAUDE.md}
EXPECTED: Refactoring roadmap, breaking change analysis, migration plan
RULES: $(cat ~/.claude/prompt-templates/plan.md) | Maintain backward compatibility
"

Planning Workflow

# 1. Discover project structure
~/.claude/scripts/get_modules_by_depth.sh
mcp__code-index__find_files(pattern="*.ts")

# 2. Gather existing architecture info
rg "architecture|design" --files-with-matches

# 3. Execute planning analysis (analysis only, no code changes)
/cli:mode:plan "topic for strategic planning"

Output Routing

Output Destination Logic:

  • Active session exists AND planning is session-relevant:
    • Save to .workflow/WFS-[id]/.chat/plan-[timestamp].md
  • No active session OR exploratory planning:
    • Save to .workflow/.scratchpad/plan-[description]-[timestamp].md

Examples:

  • During active session WFS-dashboard, planning dashboard architecture → .chat/plan-20250105-143022.md
  • No session, exploring new feature idea → .scratchpad/plan-feature-idea-20250105-143045.md

Notes

  • Command templates and file patterns: see intelligent-tools-strategy.md (loaded in memory)
  • Scratchpad directory details: see workflow-architecture.md
  • Template path: ~/.claude/prompt-templates/plan.md
  • Always uses --all-files for comprehensive project context