Skip to content
Development
Command

/epic

Orchestrates large-scale, cross-repository architectural epics with parallel coordination and dependency management

From plugin
claude-cmd
313180 skills180 commands

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/epic

Context preview

What this command does when you run it.

Orchestrates large-scale, cross-repository architectural epics with parallel coordination and dependency management

Command definition

epic.md
allowed-tools: Task, Read, Write, Edit, MultiEdit, Bash(git:*), Bash(gh:*), Bash(fd:*), Bash(rg:*), Bash(eza:*), Bash(jq:*), Bash(gdate:*), Bash(docker:*), Bash(kubectl:*)
name: "Epic"
description: "Orchestrates large-scale, cross-repository architectural epics with parallel coordination and dependency management"
author: "wcygan"
tags: ["workflow","create"]
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)"`
  • Epic target: $ARGUMENTS
  • Current directory: !`pwd`
  • Git repository info: !`git remote get-url origin 2>/dev/null || echo "No remote origin"`
  • Branch status: !`git branch --show-current 2>/dev/null || echo "Not a git repository"`
  • Worktree list: !`git worktree list 2>/dev/null | head -5 || echo "No worktrees found"`
  • Organization repositories: !`gh repo list --limit 10 --json name,description 2>/dev/null | jq -r '.[] | "\(.name): \(.description // \"No description\")"' | head -5 || echo "GitHub CLI not configured"`
  • Docker containers: !`docker ps --format "table {{.Names}}\t{{.Image}}\t{{.Status}}" 2>/dev/null | head -3 || echo "Docker not available"`
  • Kubernetes context: !`kubectl config current-context 2>/dev/null || echo "No kubernetes context"`

Your Task

STEP 1: Initialize epic orchestration session and analyze scope

  • CREATE epic session state: `/tmp/epic-session-$SESSION_ID.json`
  • ANALYZE target scope from $ARGUMENTS
  • DETERMINE epic type: migration, refactoring, feature-rollout, infrastructure
  • IDENTIFY affected repositories and services from Context section
# Initialize epic orchestration session
echo '{
  "sessionId": "'$SESSION_ID'",
  "epicTarget": "'$ARGUMENTS'",
  "epicType": "auto-detect",
  "affectedRepositories": [],
  "estimatedComplexity": "unknown",
  "coordinationStrategy": "parallel"
}' > /tmp/epic-session-$SESSION_ID.json

STEP 2: Comprehensive epic scope analysis with parallel sub-agent coordination

TRY:

IF epic_complexity == "enterprise" OR affected_repositories > 5:

LAUNCH parallel sub-agents for comprehensive scope analysis:

  • **Agent 1: Repository Discovery**: Scan and catalog all affected repositories
  • Focus: Monorepo subdirectories, organization repositories, dependency relationships
  • Tools: gh repo list, fd for service discovery, git submodule analysis
  • Output: Complete repository manifest with metadata and dependencies
  • **Agent 2: Service Architecture Analysis**: Map service interactions and dependencies
  • Focus: API dependencies, database relationships, shared libraries, communication patterns
  • Tools: rg for import analysis, configuration file examination, API endpoint discovery
  • Output: Service dependency graph and impact assessment
  • **Agent 3: Infrastructure Impact Assessment**: Evaluate infrastructure and deployment requirements
  • Focus: Kubernetes manifests, Docker configurations, CI/CD pipelines, deployment patterns
  • Tools: kubectl for cluster analysis, docker for container assessment
  • Output: Infrastructure change requirements and deployment strategy
  • **Agent 4: Timeline & Resource Estimation**: Calculate effort and resource requirements
  • Focus: Code complexity analysis, team capacity, historical velocity, risk assessment
  • Tools: git log for velocity analysis, code metrics, team availability
  • Output: Realistic timeline with phases and resource allocation

ELSE:

EXECUTE streamlined scope analysis for focused epics:

**Repository Discovery:**

# Scan current repository structure
echo "๐Ÿ“ Analyzing repository structure..."
fd . -t d -d 2 | head -10

# Check for monorepo services
if fd "(package\.json|Cargo\.toml|go\.mod|pom\.xml)" . -d 3 | wc -l | grep -v "^[01]$" >/dev/null; then
  echo "๐Ÿ” Monorepo structure detected - multiple services found"
else
  echo "๐Ÿ“ฆ Single repository detected"
fi

**Epic Impact Assessment:**

# Generate comprehensive impact analysis
echo "๐Ÿ“Š Epic Impact Analysis:"
echo "Repositories affected: $(jq '.affectedRepositories | length' /tmp/epic-session-$SESSION_ID.json)"
echo "Epic type: $(jq -r '.epicType' /tmp/epic-session-$SESSION_ID.json)"
echo "Estimated complexity: $(jq -r '.estimatedComplexity' /tmp/epic-session-$SESSION_ID.json)"
echo "Coordination strategy: $(jq -r '.coordinationStrategy' /tmp/epic-session-$SESSION_ID.json)"

# Technology stack analysis
echo "๐Ÿ”ง Technology stack:"
fd "(package\.json|Cargo\.toml|go\.mod|pom\.xml|deno\.json)" . | \
  rg -o "(package\.json|Cargo\.toml|go\.mod|pom\.xml|deno\.json)" | \
  sort | uniq -c

STEP 3: Master epic plan generation with programmatic structure

CASE epic_type: WHEN "migration":

**Technology Migration Epic Template:**

# Epic: $ARGUMENTS

## Overview

**Session ID**: $SESSION_ID
**Epic Type**: Technology Migration
**Initiated**: $(gdate -Iseconds 2>/dev/null || date -Iseconds)
**Coordinator**: $(git config user.name 2>/dev/null || echo "Unknown")

**Goal**: $ARGUMENTS

**Scope Analysis**:

- Affected repositories: $(jq '.affectedRepositories | length' /tmp/epic-session-$SESSION_ID.json)
- Technology stack: Multi-language ($(fd "(package\.json|Cargo\.toml|go\.mod)" . | wc -l | tr -d ' ') services)
- Deployment target: $(kubectl config current-context 2>/dev/null || echo "Traditional deployment")

**Estimated Timeline**: $(jq -r '.estimatedComplexity' /tmp/epic-session-$SESSION_ID.json) complexity
**Risk Level**: High (involves production services)

Success Criteria

  • [ ] Epic target achieved: $ARGUMENTS
  • [ ] Zero production incidents during implementation
  • [ ] All affected services successfully migrated
  • [ ] Performance metrics meet or exceed baseline
  • [ ] Complete documentation and team training
  • [ ] Rollback procedures tested and documented
  • [ ] Post-epic monitoring and alerting operational

Epic

Read more
Ships withclaude-cmd

A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.

Get the whole plugin