diff options
| -rw-r--r-- | Omni/Agent/WORKER_AGENT_GUIDE.md | 61 | ||||
| -rwxr-xr-x | Omni/Agent/harvest-tasks.sh | 9 | ||||
| -rwxr-xr-x | Omni/Agent/setup-worker.sh | 7 |
3 files changed, 47 insertions, 30 deletions
diff --git a/Omni/Agent/WORKER_AGENT_GUIDE.md b/Omni/Agent/WORKER_AGENT_GUIDE.md index af81bb0..5bae08f 100644 --- a/Omni/Agent/WORKER_AGENT_GUIDE.md +++ b/Omni/Agent/WORKER_AGENT_GUIDE.md @@ -55,13 +55,10 @@ task update t-123 in-progress 2. **Check for Unmerged Work**: Look for dependencies that have existing branches (e.g., `task/t-parent-id`) which are NOT yet merged into `live`. 3. **Select Base**: * If you find an unmerged dependency branch, check it out: `git checkout task/t-parent-id`. - * Otherwise, start from fresh live code: `git checkout omni-worker-1` (which tracks `live`). + * Otherwise, start from fresh live code: `git fetch origin live && git checkout -b task/t-123 origin/live`. -4. **Create/Checkout Feature Branch**: - ```bash - # Try to switch to existing branch, otherwise create new one - git checkout task/t-123 || git checkout -b task/t-123 - ``` +4. **Implement**: + (Proceed to implementation) ### Step 4: Implement @@ -70,29 +67,35 @@ task update t-123 in-progress 3. **Run Tests**: `bild --test Omni/YourNamespace.hs` ### Step 5: Submit for Review - -1. **Commit Implementation**: - ```bash - git add . - git commit -m "feat: implement t-123" - ``` - -2. **Signal Review Readiness**: - The Planner checks the `omni-worker-X` branch for status updates. You must switch back and update the status there. - - ```bash - # Switch to base branch - git checkout omni-worker-1 - - # Sync to get latest state (and any manual merges) - ./Omni/Agent/sync-tasks.sh - - # Mark task for review - task update t-123 review - - # Commit this status change to the worker branch - ./Omni/Agent/sync-tasks.sh --commit - ``` + + 1. **Update Status and Commit**: + Bundle the task status update with your implementation to keep history clean. + + ```bash + # 1. Mark task for review (updates .tasks/tasks.jsonl) + task update t-123 review + + # 2. Commit changes + task update + git add . + git commit -m "feat: implement t-123" + ``` + + 2. **Signal Review Readiness**: + Update the worker branch to signal the planner. + + ```bash + # Switch to base branch + git checkout omni-worker-1 + + # Sync to get latest state + ./Omni/Agent/sync-tasks.sh + + # Ensure the task is marked review here too (for harvest visibility) + task update t-123 review + + # Commit this status change to the worker branch + ./Omni/Agent/sync-tasks.sh --commit + ``` *Note: The Planner will now see 't-123' in 'Review' when it runs `harvest-tasks.sh`.* diff --git a/Omni/Agent/harvest-tasks.sh b/Omni/Agent/harvest-tasks.sh index 282beab..44c2322 100755 --- a/Omni/Agent/harvest-tasks.sh +++ b/Omni/Agent/harvest-tasks.sh @@ -45,7 +45,14 @@ if [ "$UPDATED" -eq 1 ]; then # Commit if there are changes if [[ -n $(git status --porcelain .tasks/tasks.jsonl) ]]; then git add .tasks/tasks.jsonl - git commit -m "task: harvest updates from workers" + + LAST_MSG=$(git log -1 --pretty=%s) + if [[ "$LAST_MSG" == "task: harvest updates from workers" ]]; then + echo "Squashing with previous harvest commit..." + git commit --amend --no-edit + else + git commit -m "task: harvest updates from workers" + fi echo "Success: Task database updated and committed." else echo "No effective changes found." diff --git a/Omni/Agent/setup-worker.sh b/Omni/Agent/setup-worker.sh index 28c29b1..42b7fc9 100755 --- a/Omni/Agent/setup-worker.sh +++ b/Omni/Agent/setup-worker.sh @@ -22,3 +22,10 @@ if [ -f "$REPO_ROOT/.envrc.local" ]; then echo "Copying .envrc.local..." cp "$REPO_ROOT/.envrc.local" "$WORKTREE_PATH/" fi + +# Configure git identity for the worker +echo "Configuring git identity for worker..." +git -C "$WORKTREE_PATH" config user.name "Omni Worker" +git -C "$WORKTREE_PATH" config user.email "bot@omni.agent" + +echo "Worker setup complete at $WORKTREE_PATH" |
