-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorchestrate.sh
More file actions
executable file
·85 lines (70 loc) · 2.28 KB
/
orchestrate.sh
File metadata and controls
executable file
·85 lines (70 loc) · 2.28 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
#!/bin/bash
# Orchestrate agent roles in sequence
# Usage: ./orchestrate.sh [project-name] [build-task]
PROJECT_NAME="${1:-todo-app}"
BUILD_TASK="${2:-Build a TODO app with React, Vite, TypeScript, and Tailwind CSS}"
echo "🚀 Starting Agent Orchestration"
echo " Project: $PROJECT_NAME"
echo " Task: ${BUILD_TASK:0:50}..."
echo ""
# Function to run a role
run_role() {
local role=$1
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🎭 Running: ${role^^}"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
AGENT_ROLE=$role \
PROJECT_NAME=$PROJECT_NAME \
BUILD_TASK="$BUILD_TASK" \
docker compose up --build
# Clear BUILD_TASK after first run (it's now in .knowledge/)
BUILD_TASK=""
echo ""
echo "✅ ${role^^} completed"
echo ""
}
# Full cycle: initiator → planner → developer → reviewer → developer → deployer
echo "📋 Cycle: initiator → planner → developer → reviewer → developer → deployer"
echo ""
echo "🌿 Branch workflow:"
echo " release/dev (agent) → release/stage (deployer) → release/prod (human)"
echo ""
read -p "Start with INITIATOR? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
run_role "initiator"
fi
read -p "Run PLANNER? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
run_role "planner"
fi
read -p "Run DEVELOPER? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
run_role "developer"
fi
read -p "Run REVIEWER? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
run_role "reviewer"
fi
read -p "Run DEVELOPER again (fixes)? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
run_role "developer"
fi
read -p "Run DEPLOYER (setup Vercel, promote to staging)? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
run_role "deployer"
fi
echo ""
echo "🎉 Orchestration complete!"
echo " Check: https://github.com/$(gh api user --jq .login)/agent-$PROJECT_NAME"
echo ""
echo "📋 Next steps:"
echo " 1. Review staging deployment at Vercel"
echo " 2. If ready for production, merge the PR created by deployer"
echo " 3. Or run another developer cycle if more work needed"