@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
Markdown
---
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