Files
Claude-Code-Workflow/.claude/commands/cli/mode/plan.md
catlog22 bc959b1a0f refactor(cli): remove --agent flag and enhance agent execution context
- Remove --agent parameter from all CLI commands (now default behavior)
- Restore and enhance Task() invocation context for cli-execution-agent
- Add detailed execution phases and context discovery strategies
- Simplify documentation by removing redundant CLI command templates
- Consolidate output documentation to unified format

Modified commands:
- /cli:analyze, /cli:chat, /cli:execute
- /cli:mode:plan, /cli:mode:code-analysis, /cli:mode:bug-diagnosis

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 16:12:04 +08:00

2.9 KiB

name, description, argument-hint, allowed-tools
name description argument-hint allowed-tools
plan Read-only architecture planning using Gemini/Qwen/Codex with strategic planning template for modification plans and impact analysis [--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/01-plan-architecture-design.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)
  • --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

Uses cli-execution-agent (default) for automated planning:

Task(
  subagent_type="cli-execution-agent",
  description="Architecture planning with impact analysis",
  prompt=`
    Task: ${planning_task}
    Mode: plan
    Tool: ${tool_flag || 'gemini'}
    Directory: ${cd_path || '.'}
    Enhance: ${enhance_flag}
    Template: ~/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt

    Execute strategic architecture planning:

    1. Context Discovery:
       - Analyze current architecture structure
       - Identify affected components and modules
       - Map dependencies and integration points
       - Assess modification impacts (scope, complexity, risks)

    2. Planning Analysis:
       - Apply strategic planning template
       - Generate modification plan with phases
       - Document architectural decisions and rationale
       - Identify potential conflicts and mitigation strategies

    3. CLI Command Construction:
       - Tool: ${tool_flag || 'gemini'} (qwen fallback, codex for implementation guidance)
       - Directory: cd ${cd_path || '.'} &&
       - Context: @**/* (full architecture context)
       - Mode: analysis (read-only, no code generation)
       - Template: planning/01-plan-architecture-design.txt

    4. Output Generation:
       - Strategic modification plan
       - Impact analysis and risk assessment
       - Implementation roadmap
       - Save to .workflow/WFS-[id]/.chat/plan-[timestamp].md (or .scratchpad/)
  `
)

Core Rules

  • Read-only: Creates modification plans, does NOT generate code
  • Template: ~/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt
  • Output: .workflow/WFS-[id]/.chat/plan-[timestamp].md (or .scratchpad/ if no session)