-
-
Notifications
You must be signed in to change notification settings - Fork 929
Expand file tree
/
Copy pathdashboard-parallel-phase4.sh
More file actions
executable file
·130 lines (110 loc) · 5.69 KB
/
Copy pathdashboard-parallel-phase4.sh
File metadata and controls
executable file
·130 lines (110 loc) · 5.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/bash
# =============================================================================
# AIOX Dashboard Parallel Dev - Phase 4 (5 workers - MAX)
# =============================================================================
# Prerequisites: Phase 3 complete
# =============================================================================
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
SESSION_NAME="aiox-dash-p4"
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
RED='\033[0;31m'
CYAN='\033[0;36m'
NC='\033[0m'
# =============================================================================
# STORY CONFIGURATION - Phase 4
# =============================================================================
declare -a STORIES=(
"1.3|Drag & Drop|docs/stories/aiox-dashboard/epic-1-story-board.md|apps/dashboard/src/components/kanban/|Add @dnd-kit to KanbanBoard, enable drag between columns, persist order"
"2.1|Terminal|docs/prd/aiox-dashboard.md|apps/dashboard/src/components/terminal/|Create Terminal.tsx read-only output with ANSI colors"
"3.1|Roadmap|docs/prd/aiox-dashboard.md|apps/dashboard/src/app/(dashboard)/roadmap/|Create timeline view showing epics and milestones"
"3.2|Context|docs/prd/aiox-dashboard.md|apps/dashboard/src/app/(dashboard)/context/|Create file browser for project context files"
"4.1|GitHub|docs/prd/aiox-dashboard.md|apps/dashboard/src/app/(dashboard)/github/|Create GitHub view listing issues and PRs"
)
NUM_WORKERS=${#STORIES[@]}
# Check dependencies
if ! command -v tmux &> /dev/null; then
echo -e "${RED}❌ tmux not found${NC}"
exit 1
fi
if ! command -v claude &> /dev/null; then
echo -e "${RED}❌ claude CLI not found${NC}"
exit 1
fi
tmux kill-session -t "$SESSION_NAME" 2>/dev/null || true
echo ""
echo -e "${CYAN}╔═══════════════════════════════════════════════════════════╗${NC}"
echo -e "${CYAN}║ ${YELLOW}AIOX Dashboard Phase 4 (MAX PARALLELISM)${NC} ${CYAN}║${NC}"
echo -e "${CYAN}╠═══════════════════════════════════════════════════════════╣${NC}"
echo -e "${CYAN}║${NC} Phase: ${GREEN}4 - Advanced Features${NC} ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} Workers: ${GREEN}$NUM_WORKERS${NC} ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} Prereq: Phase 3 complete ${CYAN}║${NC}"
echo -e "${CYAN}╚═══════════════════════════════════════════════════════════╝${NC}"
echo ""
echo -e "${YELLOW}Stories to implement:${NC}"
for story in "${STORIES[@]}"; do
IFS='|' read -ra PARTS <<< "$story"
echo -e " ${BLUE}Story ${PARTS[0]}:${NC} ${PARTS[1]}"
done
echo ""
# Phase 0: Create panes
echo -e "${YELLOW}[0/3]${NC} Creating $NUM_WORKERS panes..."
tmux new-session -d -s "$SESSION_NAME" -c "$PROJECT_DIR"
for ((i=1; i<NUM_WORKERS; i++)); do
tmux split-window -t "$SESSION_NAME" -c "$PROJECT_DIR"
tmux select-layout -t "$SESSION_NAME" tiled
done
tmux select-layout -t "$SESSION_NAME" tiled
echo -e " ${GREEN}✓${NC} $NUM_WORKERS panes created"
# Phase 1: Start Claude
echo -e "${YELLOW}[1/3]${NC} Starting Claude Code in all panes..."
for ((i=0; i<NUM_WORKERS; i++)); do
IFS='|' read -ra PARTS <<< "${STORIES[$i]}"
tmux send-keys -t "$SESSION_NAME:0.$i" "cd $PROJECT_DIR && clear" Enter
tmux send-keys -t "$SESSION_NAME:0.$i" "echo '🏗️ Worker $((i+1)): Story ${PARTS[0]} - ${PARTS[1]}'" Enter
tmux send-keys -t "$SESSION_NAME:0.$i" "claude --dangerously-skip-permissions" Enter
sleep 2
done
echo -e " ${GREEN}✓${NC} Claude launched"
echo -e " ${YELLOW}⏳${NC} Waiting for Claude to initialize (10s)..."
sleep 10
# Phase 2: Activate @dev
echo -e "${YELLOW}[2/3]${NC} Activating @dev agent..."
for ((i=0; i<NUM_WORKERS; i++)); do
tmux send-keys -t "$SESSION_NAME:0.$i" "/dev" Enter
sleep 2
done
echo -e " ${GREEN}✓${NC} @dev activation sent"
echo -e " ${YELLOW}⏳${NC} Waiting for agent to load (15s)..."
sleep 15
# Phase 3: Send commands
echo -e "${YELLOW}[3/3]${NC} Sending story implementation commands..."
for ((i=0; i<NUM_WORKERS; i++)); do
IFS='|' read -ra PARTS <<< "${STORIES[$i]}"
WORKER_CMD="Implement Story ${PARTS[0]} (${PARTS[1]}) from ${PARTS[2]}
Focus directory: ${PARTS[3]}
Instructions: ${PARTS[4]}
Read the story/PRD file first to understand requirements, then implement."
tmux send-keys -t "$SESSION_NAME:0.$i" "$WORKER_CMD" Enter
echo -e " ${BLUE}Worker $((i+1)):${NC} Story ${PARTS[0]} - ${PARTS[1]}"
sleep 1
done
echo -e " ${GREEN}✓${NC} All workers started!"
echo ""
echo -e "${GREEN}╔═══════════════════════════════════════════════════════════╗${NC}"
echo -e "${GREEN}║ ✅ MAX SWARM! $NUM_WORKERS workers on Phase 4 ║${NC}"
echo -e "${GREEN}╚═══════════════════════════════════════════════════════════╝${NC}"
echo ""
echo -e "${CYAN}Commands:${NC}"
echo " tmux attach -t $SESSION_NAME"
echo " tmux kill-session -t $SESSION_NAME"
echo ""
read -p "Attach to session now? [Y/n] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]] || [[ -z $REPLY ]]; then
tmux attach -t "$SESSION_NAME"
fi