Files
Claude-Code-Workflow/.claude/commands/cli/mode/plan.md
catlog22 367040037a refactor: migrate prompt templates to standardized structure and enhance CLI command documentation
Template Migration:
- Move templates from .claude/prompt-templates/ to .claude/workflows/cli-templates/prompts/
- Rename and reorganize: bug-fix.md → development/bug-diagnosis.txt
- Rename and reorganize: code-analysis.md → analysis/code-execution-tracing.txt
- Rename and reorganize: plan.md → planning/architecture-planning.txt

CLI Command Enhancements:
- Add clear tool selection hierarchy (gemini primary, qwen fallback, codex alternative)
- Enhance analyze.md, chat.md with tool descriptions and agent context
- Enhance mode/code-analysis.md, mode/bug-diagnosis.md, mode/plan.md with Task() wrapper
- Add all necessary codex parameters (--skip-git-repo-check -s danger-full-access)
- Simplify descriptions while preserving core functionality

Agent Updates:
- Streamline cli-execution-agent.md (600→250 lines, -60%)
- Add complete templates reference for standalone usage
- Remove dependency on intelligent-tools-strategy.md

Reference Updates:
- Update test-task-generate.md template path references
- Delete duplicate bug-index.md
- All template paths now use ~/.claude/workflows/cli-templates/prompts/ format

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 10:26:35 +08:00

3.4 KiB

name, description, argument-hint, allowed-tools
name description argument-hint allowed-tools
plan Project planning and architecture analysis using CLI tools [--agent] [--tool codex|gemini|qwen] [--enhance] [--cd path] topic SlashCommand(*), Bash(*), Task(*)

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

Purpose

Strategic software architecture planning template (~/.claude/workflows/cli-templates/prompts/planning/architecture-planning.txt).

Tool Selection:

  • gemini (default) - Best for architecture planning
  • qwen - Fallback when Gemini unavailable
  • codex - Alternative for implementation planning

Parameters

  • --tool <gemini|qwen|codex> - Tool selection (default: gemini)
  • --agent - Use cli-execution-agent for automated context discovery
  • --enhance - Enhance task with /enhance-prompt
  • --cd "path" - Target directory for focused planning
  • <planning-task> (Required) - Architecture planning task or modification requirements

Tool Usage

Gemini (Primary):

--tool gemini  # or omit (default)

Qwen (Fallback):

--tool qwen

Codex (Alternative):

--tool codex

Execution Flow

Standard Mode

  1. Parse tool selection (default: gemini)
  2. Optional: enhance with /enhance-prompt
  3. Detect directory from --cd or auto-infer
  4. Build command with architecture-planning template
  5. Execute planning (read-only, no code generation)
  6. Save to .workflow/WFS-[id]/.chat/

Agent Mode (--agent)

Delegates to agent for intelligent planning:

Task(
  subagent_type="cli-execution-agent",
  description="Architecture modification planning",
  prompt=`
    Task: ${planning_task}
    Mode: architecture-planning
    Tool: ${tool_flag || 'auto-select'}  // gemini|qwen|codex
    Directory: ${cd_path || 'auto-detect'}
    Template: architecture-planning

    Agent responsibilities:
    1. Context Discovery:
       - Analyze current architecture
       - Identify affected components
       - Map dependencies and impacts

    2. CLI Command Generation:
       - Build Gemini/Qwen/Codex command
       - Include architecture context
       - Apply architecture-planning.txt template

    3. Execution & Output:
       - Execute strategic planning
       - Generate modification plan
       - Save to .workflow/.chat/
  `
)

Core Rules

  • Planning only: Creates modification plans, does NOT generate code
  • Template: Uses architecture-planning.txt for strategic planning
  • Output: Saves to .workflow/WFS-[id]/.chat/

CLI Command Templates

Gemini/Qwen (default, planning only):

cd [dir] && gemini -p "
PURPOSE: [goal]
TASK: Architecture planning
MODE: analysis
CONTEXT: @**/*
EXPECTED: Modification plan, impact analysis
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/planning/architecture-planning.txt)
"
# Qwen: Replace 'gemini' with 'qwen'

Codex (planning + implementation guidance):

codex -C [dir] --full-auto exec "
PURPOSE: [goal]
TASK: Architecture planning
MODE: analysis
CONTEXT: @**/*
EXPECTED: Plan, implementation roadmap
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/planning/architecture-planning.txt)
" -m gpt-5 --skip-git-repo-check -s danger-full-access

Output

  • With session: .workflow/WFS-[id]/.chat/plan-[timestamp].md
  • No session: .workflow/.scratchpad/plan-[desc]-[timestamp].md

Notes

  • Template: ~/.claude/workflows/cli-templates/prompts/planning/architecture-planning.txt
  • See intelligent-tools-strategy.md for detailed tool usage