/plan
Comprehensive project analysis and hierarchical planning orchestrator with integrated task management
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/plan
Context preview
What this command does when you run it.
Comprehensive project analysis and hierarchical planning orchestrator with integrated task management
Command definition
plan.mdallowed-tools: Task, Read, Write, Bash(fd:*), Bash(rg:*), Bash(eza:*), Bash(bat:*), Bash(jq:*), Bash(gdate:*), Bash(git:*), Bash(gh:*), Bash(wc:*)
name: "Plan"
description: "Comprehensive project analysis and hierarchical planning orchestrator with integrated task management"
author: "wcygan"
tags: ["workflow","manage"]
version: "1.0.0"
created_at: "2025-07-14T00:00:00Z"
updated_at: "2025-07-14T00:00:00Z"
Context
- Session ID: !`gdate +%s%N 2>/dev/null || date +%s%N 2>/dev/null || echo "$(date +%s)$(jot -r 1 100000 999999 2>/dev/null || shuf -i 100000-999999 -n 1 2>/dev/null || echo $RANDOM$RANDOM)"`
- Target project: $ARGUMENTS
- Current directory: !`pwd`
- Project structure: !`eza -la --tree --level=2 2>/dev/null | head -15 || fd . -t d -d 2 | head -10`
- Build files detected: !`fd "(package\.json|Cargo\.toml|go\.mod|pom\.xml|build\.gradle|deno\.json|Makefile|CMakeLists\.txt)" . -d 3 | head -10 || echo "No build files detected"`
- Documentation files: !`fd "(README|CONTRIBUTING|CHANGELOG|LICENSE)" . -d 2 -t f | head -5 || echo "No documentation files found"`
- Recent activity: !`git log --oneline -5 2>/dev/null | head -5 || echo "No git repository or commits found"`
- Repository status: !`git status --porcelain 2>/dev/null | wc -l | tr -d ' ' || echo "0"` uncommitted changes
- Codebase size: !`fd "\.(js|ts|jsx|tsx|rs|go|java|py|rb|php|c|cpp|h|hpp|cs|kt|swift|scala)" . | wc -l | tr -d ' '` source files
- Test coverage: !`fd "(test|spec)" . -t d | wc -l | tr -d ' '` test directories
Your Task
STEP 1: Initialize comprehensive planning session with intelligent project analysis
- CREATE session state file: `/tmp/plan-session-$SESSION_ID.json`
- ANALYZE project complexity and technology stack from Context section
- DETERMINE planning strategy based on codebase size and structure
- VALIDATE project requirements and constraints
# Initialize planning session state
echo '{
"sessionId": "'$SESSION_ID'",
"targetProject": "'$ARGUMENTS'",
"detectedTechnologies": [],
"planningStrategy": "auto-detect",
"complexityLevel": "medium",
"taskCategories": []
}' > /tmp/plan-session-$SESSION_ID.jsonSTEP 2: Parallel codebase analysis using sub-agent coordination
TRY:
IF codebase_size > 100 files OR technology_stack == "polyglot":
LAUNCH parallel sub-agents for comprehensive project discovery:
- **Agent 1: Architecture & Structure Analysis**: Analyze overall project organization and design patterns
- Focus: Directory structure, module organization, architectural patterns, design principles
- Tools: fd for structure discovery, rg for pattern searches, eza for hierarchy visualization
- Output: Architectural overview with component relationships and design patterns
- **Agent 2: Technology Stack & Dependencies**: Map all technologies, frameworks, and dependencies
- Focus: Build files, package managers, runtime requirements, version constraints
- Tools: rg for dependency searches, analysis of configuration files
- Output: Technology manifest with build requirements and compatibility matrix
- **Agent 3: Documentation & Standards Assessment**: Evaluate existing documentation and coding standards
- Focus: README quality, API docs, code comments, style guides, conventions
- Tools: fd for documentation discovery, rg for comment patterns, quality assessment
- Output: Documentation audit with gaps and improvement recommendations
- **Agent 4: Test Coverage & Quality Metrics**: Analyze testing strategy and code quality indicators
- Focus: Test structure, coverage patterns, quality gates, CI/CD configuration
- Tools: fd for test discovery, rg for test patterns, coverage analysis
- Output: Quality assessment with testing strategy and improvement areas
- **Agent 5: Development Workflow & Operations**: Examine development practices and operational setup
- Focus: Git workflows, CI/CD pipelines, deployment processes, monitoring
- Tools: git log analysis, CI configuration review, operational tooling
- Output: Workflow analysis with operational readiness and automation opportunities
ELSE:
EXECUTE streamlined single-agent analysis for smaller projects:
# Streamlined analysis for smaller codebases
echo "๐ Analyzing project structure and requirements..."
STEP 3: Intelligent task categorization and dependency mapping
CASE project_complexity: WHEN "enterprise":
**Enterprise-Scale Task Categories:**
- **Foundation Tasks** (Sequential, High Priority):
- Infrastructure setup and configuration
- Security framework implementation
- Core architecture establishment
- Database schema and migrations
- **Parallel Development Streams** (Independent Execution):
- Feature module development (multiple teams)
- UI/UX implementation (design system)
- API development (microservices)
- Testing automation (quality assurance)
- **Integration Phases** (Coordination Required):
- System integration testing
- Performance optimization
- Security auditing and compliance
- Production deployment preparation
WHEN "startup":
**Startup-Scale Task Categories:**
- **MVP Foundation** (Sequential):
- Core functionality implementation
- Basic user authentication
- Essential API endpoints
- Minimal viable interface
- **Parallel Enhancement** (Independent):
- Feature extensions
- UI/UX improvements
- Documentation creation
- Testing implementation
- **Launch Preparation** (Coordination):
- Integration testing
- Deployment automation
- Monitoring setup
- Performance validation
STEP 4: Hierarchical plan generation with programmatic task management
**Dynamic Plan Creation Process:**
# Create main plan with detected project context
project_name="$ARGUMENTS"
plan_id="plan-$(echo "$project_name" | tr ' ' '-' | tr '[:upper:]' '[:lower:]')"
echo "๐ Creating hierarchical plan: $plan_id"
echo "๐ฏ Target: $project_name"
echo "โฑ๏ธ Session: $SESSION_ID"
CASE planning_strategy: WHEN "comprehensive":
**Comprehensive
Read more
allowed-tools: Task, Read, Write, Bash(fd:*), Bash(rg:*), Bash(eza:*), Bash(bat:*), Bash(jq:*), Bash(gdate:*), Bash(git:*), Bash(gh:*), Bash(wc:*) name: "Plan" description: "Comprehensive project analysis and hierarchical planning orchestrator with integrated task management" author: "wcygan" tags: ["workflow","manage"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
Context
- Session ID: !`gdate +%s%N 2>/dev/null || date +%s%N 2>/dev/null || echo "$(date +%s)$(jot -r 1 100000 999999 2>/dev/null || shuf -i 100000-999999 -n 1 2>/dev/null || echo $RANDOM$RANDOM)"`
- Target project: $ARGUMENTS
- Current directory: !`pwd`
- Project structure: !`eza -la --tree --level=2 2>/dev/null | head -15 || fd . -t d -d 2 | head -10`
- Build files detected: !`fd "(package\.json|Cargo\.toml|go\.mod|pom\.xml|build\.gradle|deno\.json|Makefile|CMakeLists\.txt)" . -d 3 | head -10 || echo "No build files detected"`
- Documentation files: !`fd "(README|CONTRIBUTING|CHANGELOG|LICENSE)" . -d 2 -t f | head -5 || echo "No documentation files found"`
- Recent activity: !`git log --oneline -5 2>/dev/null | head -5 || echo "No git repository or commits found"`
- Repository status: !`git status --porcelain 2>/dev/null | wc -l | tr -d ' ' || echo "0"` uncommitted changes
- Codebase size: !`fd "\.(js|ts|jsx|tsx|rs|go|java|py|rb|php|c|cpp|h|hpp|cs|kt|swift|scala)" . | wc -l | tr -d ' '` source files
- Test coverage: !`fd "(test|spec)" . -t d | wc -l | tr -d ' '` test directories
Your Task
STEP 1: Initialize comprehensive planning session with intelligent project analysis
- CREATE session state file: `/tmp/plan-session-$SESSION_ID.json`
- ANALYZE project complexity and technology stack from Context section
- DETERMINE planning strategy based on codebase size and structure
- VALIDATE project requirements and constraints
# Initialize planning session state
echo '{
"sessionId": "'$SESSION_ID'",
"targetProject": "'$ARGUMENTS'",
"detectedTechnologies": [],
"planningStrategy": "auto-detect",
"complexityLevel": "medium",
"taskCategories": []
}' > /tmp/plan-session-$SESSION_ID.jsonSTEP 2: Parallel codebase analysis using sub-agent coordination
TRY:
IF codebase_size > 100 files OR technology_stack == "polyglot":
LAUNCH parallel sub-agents for comprehensive project discovery:
- **Agent 1: Architecture & Structure Analysis**: Analyze overall project organization and design patterns
- Focus: Directory structure, module organization, architectural patterns, design principles
- Tools: fd for structure discovery, rg for pattern searches, eza for hierarchy visualization
- Output: Architectural overview with component relationships and design patterns
- **Agent 2: Technology Stack & Dependencies**: Map all technologies, frameworks, and dependencies
- Focus: Build files, package managers, runtime requirements, version constraints
- Tools: rg for dependency searches, analysis of configuration files
- Output: Technology manifest with build requirements and compatibility matrix
- **Agent 3: Documentation & Standards Assessment**: Evaluate existing documentation and coding standards
- Focus: README quality, API docs, code comments, style guides, conventions
- Tools: fd for documentation discovery, rg for comment patterns, quality assessment
- Output: Documentation audit with gaps and improvement recommendations
- **Agent 4: Test Coverage & Quality Metrics**: Analyze testing strategy and code quality indicators
- Focus: Test structure, coverage patterns, quality gates, CI/CD configuration
- Tools: fd for test discovery, rg for test patterns, coverage analysis
- Output: Quality assessment with testing strategy and improvement areas
- **Agent 5: Development Workflow & Operations**: Examine development practices and operational setup
- Focus: Git workflows, CI/CD pipelines, deployment processes, monitoring
- Tools: git log analysis, CI configuration review, operational tooling
- Output: Workflow analysis with operational readiness and automation opportunities
ELSE:
EXECUTE streamlined single-agent analysis for smaller projects:
# Streamlined analysis for smaller codebases echo "๐ Analyzing project structure and requirements..."
STEP 3: Intelligent task categorization and dependency mapping
CASE project_complexity: WHEN "enterprise":
**Enterprise-Scale Task Categories:**
- **Foundation Tasks** (Sequential, High Priority):
- Infrastructure setup and configuration
- Security framework implementation
- Core architecture establishment
- Database schema and migrations
- **Parallel Development Streams** (Independent Execution):
- Feature module development (multiple teams)
- UI/UX implementation (design system)
- API development (microservices)
- Testing automation (quality assurance)
- **Integration Phases** (Coordination Required):
- System integration testing
- Performance optimization
- Security auditing and compliance
- Production deployment preparation
WHEN "startup":
**Startup-Scale Task Categories:**
- **MVP Foundation** (Sequential):
- Core functionality implementation
- Basic user authentication
- Essential API endpoints
- Minimal viable interface
- **Parallel Enhancement** (Independent):
- Feature extensions
- UI/UX improvements
- Documentation creation
- Testing implementation
- **Launch Preparation** (Coordination):
- Integration testing
- Deployment automation
- Monitoring setup
- Performance validation
STEP 4: Hierarchical plan generation with programmatic task management
**Dynamic Plan Creation Process:**
# Create main plan with detected project context project_name="$ARGUMENTS" plan_id="plan-$(echo "$project_name" | tr ' ' '-' | tr '[:upper:]' '[:lower:]')" echo "๐ Creating hierarchical plan: $plan_id" echo "๐ฏ Target: $project_name" echo "โฑ๏ธ Session: $SESSION_ID"
CASE planning_strategy: WHEN "comprehensive":
**Comprehensive
A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.
Repo: kiliczsh/claude-cmd
Other commands on claude-cmd.
- /agent-browser-automation
Automate browser interactions for development testing using Puppeteer MCP
Open command - /agent-prep-merge
Prepare branches for merging across multiple worktrees and coordinate integration
Open command - /agent-persona-accessibility-expert
Transform into accessibility expert for WCAG compliance and inclusive design
Open command - /agent-persona-api-designer
Transform into an API design specialist who creates well-structured, developer-friendly APIs
Open command - /agent-persona-backend-specialist
Transform into backend specialist for scalable API and system design
Open command - /agent-persona-cloud-architect
Cloud architect persona for designing scalable, secure cloud infrastructure using modern cloud-native technologies
Open command

