UNPKG

@endgame-build/claude-workflows

Version:

Claude Code workflow system with commands, agents, and templates for AI-native development

344 lines (285 loc) โ€ข 11.6 kB
--- description: Display comprehensive status of all active workflow instances with visual progress argument-hint: [instance-name] --- # /eg:status Shows all active workflow instances and their current status with enhanced visual progress tracking. Input: `$ARGUMENTS` ## Step 1: Parse Arguments Check if specific instance requested: ``` # Parse arguments to extract instance name (optional) # If provided, show detailed status for that instance only ``` ## Step 2: Check for Workflow Directory Check if workflow directory exists: ``` !if [ -d ".eg" ]; then echo "๐Ÿ” Scanning workflows..." else echo "โŒ No workflows found. Start a workflow with:" echo " โ€ข /eg:define <name> <requirements>" echo " โ€ข /eg:architect <name> <description>" echo " โ€ข /eg:debug <name> <issue>" exit 0 fi ``` ## Step 3: Display Visual Progress Overview Create enhanced visual summary with Unicode progress bars: ``` !echo " โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•‘ ๐Ÿš€ EG Workflow Status Dashboard โ•‘ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•" # Count active workflows !active_count=$(ls -d .eg/*/ 2>/dev/null | wc -l | tr -d ' ') !echo " Active Workflows: $active_count โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•" ``` ## Step 4: Display Feature Development Workflows Show feature workflows with detailed progress: ``` !echo "" !echo "๐Ÿ“ฆ FEATURE DEVELOPMENT" !echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" !for dir in .eg/*/; do if [ -f "$dir/feature-definition.md" ]; then instance=$(basename "$dir") # Calculate phase progress def_done=0; arch_done=0; plan_done=0; impl_done=0; test_done=0 [ -f "$dir/feature-definition.md" ] && def_done=1 [ -f "$dir/architecture.md" ] && arch_done=1 [ -f "$dir/plan.md" ] && plan_done=1 # Calculate implementation progress from plan.md if [ -f "$dir/plan.md" ]; then total_tasks=$(grep -c "^- \[ \]" "$dir/plan.md" 2>/dev/null || echo 0) completed_tasks=$(grep -c "^- \[x\]" "$dir/plan.md" 2>/dev/null || echo 0) if [ $((total_tasks + completed_tasks)) -gt 0 ]; then impl_progress=$((completed_tasks * 100 / (total_tasks + completed_tasks))) impl_done=$((impl_progress / 25)) # Convert to 0-4 scale fi fi [ -f "$dir/test-results.md" ] && test_done=1 # Generate progress bars echo "" echo "๐Ÿ“‚ $instance" # Definition phase if [ $def_done -eq 1 ]; then echo " ๐Ÿ“‹ Definition โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% โœ…" else echo " ๐Ÿ“‹ Definition โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0% โณ" fi # Architecture phase if [ $arch_done -eq 1 ]; then echo " ๐Ÿ—๏ธ Architecture โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% โœ…" else echo " ๐Ÿ—๏ธ Architecture โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0% โณ" fi # Planning phase if [ $plan_done -eq 1 ]; then echo " ๐Ÿ“ Planning โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% โœ…" else echo " ๐Ÿ“ Planning โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0% โณ" fi # Implementation phase with detailed progress if [ $plan_done -eq 1 ]; then # Create progress bar based on completion bar="" for i in $(seq 1 12); do if [ $i -le $((impl_progress * 12 / 100)) ]; then bar="${bar}โ–ˆ" else bar="${bar}โ–‘" fi done if [ $impl_progress -eq 100 ]; then echo " โš™๏ธ Implementation $bar 100% โœ…" else echo " โš™๏ธ Implementation $bar ${impl_progress}% ๐Ÿ”„" fi # Show task details echo " Tasks: $completed_tasks/$((total_tasks + completed_tasks)) complete" else echo " โš™๏ธ Implementation โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0% โณ" fi # Testing phase if [ $test_done -eq 1 ]; then echo " ๐Ÿงช Testing โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% โœ…" else echo " ๐Ÿงช Testing โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0% โณ" fi # Get last activity latest=$(find "$dir" -type f -name "*.md" -o -name "*.json" | xargs ls -t 2>/dev/null | head -1) if [ -n "$latest" ]; then last_update=$(stat -f "%Sm" -t "%Y-%m-%d %H:%M" "$latest" 2>/dev/null || date) echo " Last activity: $last_update" fi fi done # If no feature workflows !feature_count=$(find .eg -name "feature-definition.md" 2>/dev/null | wc -l | tr -d ' ') ![ "$feature_count" -eq 0 ] && echo " (No active feature workflows)" ``` ## Step 5: Display Bug Fix Workflows Show bug fix workflows: ``` !echo "" !echo "๐Ÿ› BUG FIXES" !echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" !for dir in .eg/*/; do if [ -f "$dir/debug-analysis.md" ]; then instance=$(basename "$dir") # Calculate progress analysis_done=0; solution_done=0; test_done=0 [ -f "$dir/debug-analysis.md" ] && analysis_done=1 [ -f "$dir/solution.md" ] && solution_done=1 [ -f "$dir/test-results.md" ] && test_done=1 echo "" echo "๐Ÿ”ง $instance" # Analysis phase if [ $analysis_done -eq 1 ]; then echo " ๐Ÿ” Analysis โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% โœ…" else echo " ๐Ÿ” Analysis โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0% โณ" fi # Solution phase if [ $solution_done -eq 1 ]; then echo " ๐Ÿ’ก Solution โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% โœ…" else echo " ๐Ÿ’ก Solution โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0% โณ" fi # Testing phase if [ $test_done -eq 1 ]; then echo " ๐Ÿงช Verification โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% โœ…" else echo " ๐Ÿงช Verification โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0% โณ" fi fi done # If no bug workflows !bug_count=$(find .eg -name "debug-analysis.md" 2>/dev/null | wc -l | tr -d ' ') ![ "$bug_count" -eq 0 ] && echo " (No active bug fixes)" ``` ## Step 6: Display Improvement Workflows Show improvement workflows: ``` !echo "" !echo "โœจ IMPROVEMENTS" !echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" !for dir in .eg/*/; do if [ -f "$dir/architecture.md" ] && [ ! -f "$dir/feature-definition.md" ]; then instance=$(basename "$dir") # Calculate progress arch_done=0; impl_done=0; test_done=0 [ -f "$dir/architecture.md" ] && arch_done=1 [ -f "$dir/progress.json" ] && impl_done=1 [ -f "$dir/test-results.md" ] && test_done=1 echo "" echo "๐Ÿ”จ $instance" # Architecture phase if [ $arch_done -eq 1 ]; then echo " ๐Ÿ—๏ธ Design โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% โœ…" else echo " ๐Ÿ—๏ธ Design โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0% โณ" fi # Implementation phase if [ $impl_done -eq 1 ]; then echo " โš™๏ธ Implementation โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% โœ…" else echo " โš™๏ธ Implementation โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0% โณ" fi # Testing phase if [ $test_done -eq 1 ]; then echo " ๐Ÿงช Testing โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% โœ…" else echo " ๐Ÿงช Testing โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0% โณ" fi fi done # If no improvement workflows !improvement_count=$(find .eg -type f -name "architecture.md" 2>/dev/null | while read f; do dirname "$f"; done | while read d; do [ ! -f "$d/feature-definition.md" ] && echo 1; done | wc -l | tr -d ' ') ![ "$improvement_count" -eq 0 ] && echo " (No active improvements)" ``` ## Step 7: Suggest Next Actions Provide intelligent next action suggestions: ``` !echo "" !echo "๐Ÿ’ก NEXT ACTIONS" !echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" # Check for stalled workflows (>3 days inactive) !stalled_found=0 !for dir in .eg/*/; do if [ -d "$dir" ]; then instance=$(basename "$dir") latest=$(find "$dir" -type f -name "*.md" -o -name "*.json" | xargs ls -t 2>/dev/null | head -1) if [ -n "$latest" ]; then age=$(( ($(date +%s) - $(stat -f %m "$latest" 2>/dev/null || echo 0)) / 86400 )) if [ $age -gt 3 ]; then [ $stalled_found -eq 0 ] && echo "" && echo "โš ๏ธ Stalled Workflows (>3 days inactive):" stalled_found=1 echo " โ€ข $instance ($age days)" fi fi fi done # Suggest next commands for active workflows !echo "" !echo "โ–ถ๏ธ Ready for Next Step:" !suggested=0 !for dir in .eg/*/; do if [ -d "$dir" ]; then instance=$(basename "$dir") # Feature workflow suggestions if [ -f "$dir/feature-definition.md" ]; then if [ ! -f "$dir/architecture.md" ]; then echo " โ†’ /eg:architect $instance" suggested=1 elif [ ! -f "$dir/plan.md" ]; then echo " โ†’ /eg:plan $instance" suggested=1 elif [ -f "$dir/plan.md" ]; then # Check if there are uncompleted tasks uncompleted=$(grep -c "^- \[ \]" "$dir/plan.md" 2>/dev/null || echo 0) if [ $uncompleted -gt 0 ]; then echo " โ†’ /eg:implement $instance" suggested=1 elif [ ! -f "$dir/test-results.md" ]; then echo " โ†’ /eg:test $instance" suggested=1 fi fi fi # Bug fix workflow suggestions if [ -f "$dir/debug-analysis.md" ] && [ ! -f "$dir/solution.md" ]; then echo " โ†’ /eg:fix $instance" suggested=1 fi # Test suggestions if [ -f "$dir/solution.md" ] && [ ! -f "$dir/test-results.md" ]; then echo " โ†’ /eg:test $instance" suggested=1 fi fi done ![ $suggested -eq 0 ] && echo " (All workflows are up to date)" !echo "" !echo "โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•" ``` ## Step 8: Show Detailed Status for Specific Instance If an instance name was provided, show detailed information: ``` # If specific instance requested, show detailed view # This would include: # - Full file listing # - Detailed task breakdown if plan exists # - Recent commits related to the instance # - Any validation results ``` The enhanced status command now provides: - Visual progress bars for each phase - Percentage completion for implementations - Task completion counts - Intelligent next action suggestions - Stalled workflow detection - Clear categorization by workflow type