summaryrefslogtreecommitdiff
path: root/Omni/Agent/start-worker.sh
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2025-11-20 16:23:29 -0500
committerBen Sima <ben@bsima.me>2025-11-20 16:23:29 -0500
commitb6334da771d764b7c29b33522db06b6cc716c6cb (patch)
tree644805fb7f3276ea6a5a8af022f4b1f67c316a6f /Omni/Agent/start-worker.sh
parent9ab85c33379f98229235a30dbf5108ad31a01d1f (diff)
feat: implement multi-agent workflow infrastructure
- Add 'Review' status to Task tool - Add Omni/Agent/ directory with setup and sync scripts - Add WORKER_AGENT_GUIDE.md - Configure custom merge driver for tasks.jsonl
Diffstat (limited to 'Omni/Agent/start-worker.sh')
-rwxr-xr-xOmni/Agent/start-worker.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/Omni/Agent/start-worker.sh b/Omni/Agent/start-worker.sh
new file mode 100755
index 0000000..2c5eee4
--- /dev/null
+++ b/Omni/Agent/start-worker.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+set -e
+
+# Omni/Agent/start-worker.sh
+# Launches an Amp worker agent in the specified worktree.
+# Usage: ./Omni/Agent/start-worker.sh [worker-directory-name]
+# Example: ./Omni/Agent/start-worker.sh omni-worker-1
+
+WORKER_NAME="${1:-omni-worker-1}"
+REPO_ROOT="$(git rev-parse --show-toplevel)"
+WORKER_PATH="$REPO_ROOT/../$WORKER_NAME"
+AMP_BIN="$REPO_ROOT/node_modules/.bin/amp"
+
+if [ ! -d "$WORKER_PATH" ]; then
+ echo "Error: Worker directory '$WORKER_PATH' does not exist."
+ echo "Please run './Omni/Agent/setup-worker.sh $WORKER_NAME' first."
+ exit 1
+fi
+
+if [ ! -x "$AMP_BIN" ]; then
+ echo "Error: Amp binary not found at '$AMP_BIN'."
+ echo "Please ensure npm dependencies are installed in the main repository."
+ exit 1
+fi
+
+echo "Starting Worker Agent in '$WORKER_PATH'..."
+echo "Using Amp binary: $AMP_BIN"
+
+cd "$WORKER_PATH"
+
+# Launch Amp with the worker persona and instructions
+"$AMP_BIN" -- "You are a Worker Agent. Your goal is to process tasks from the task manager.
+Please read Omni/Agent/WORKER_AGENT_GUIDE.md and follow the 'Worker Loop' instructions exactly.
+Start by syncing tasks and checking for ready work."