summaryrefslogtreecommitdiff
path: root/Omni/Agent/WORKER_AGENT_GUIDE.md
diff options
context:
space:
mode:
Diffstat (limited to 'Omni/Agent/WORKER_AGENT_GUIDE.md')
-rw-r--r--Omni/Agent/WORKER_AGENT_GUIDE.md68
1 files changed, 40 insertions, 28 deletions
diff --git a/Omni/Agent/WORKER_AGENT_GUIDE.md b/Omni/Agent/WORKER_AGENT_GUIDE.md
index f1f6f60..782d4d5 100644
--- a/Omni/Agent/WORKER_AGENT_GUIDE.md
+++ b/Omni/Agent/WORKER_AGENT_GUIDE.md
@@ -22,6 +22,10 @@ The Worker Agent should run the following loop continuously:
# Go to worker directory
cd ../omni-worker-1
+# Update base branch with latest live code
+# We merge the local 'live' branch directly since we share the git dir
+git merge live --no-edit
+
# Sync tasks from the live branch
./Omni/Agent/sync-tasks.sh
@@ -51,9 +55,10 @@ task update t-123 in-progress
* 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`).
-4. **Create Feature Branch**:
+4. **Create/Checkout Feature Branch**:
```bash
- git checkout -b task/t-123
+ # Try to switch to existing branch, otherwise create new one
+ git checkout task/t-123 || git checkout -b task/t-123
```
### Step 4: Implement
@@ -64,38 +69,45 @@ task update t-123 in-progress
### Step 5: Submit for Review
-```bash
-# 1. Mark for review
-task update t-123 review
+1. **Commit Implementation**:
+ ```bash
+ git add .
+ git commit -m "feat: implement t-123"
+ ```
-# 2. Commit implementation
-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.
-# 3. Switch back to worker base branch to prepare for next loop
-# This detaches the worker from the task branch so the Planner can check it out
-git checkout omni-worker-1
-./Omni/Agent/sync-tasks.sh
-```
+ ```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
+ ```
+
+ *Note: The Planner will now see 't-123' in 'Review' when it runs `harvest-tasks.sh`.*
## 3. Planner (Reviewer) Workflow
The Planner Agent (running in the main repo) will:
-1. See tasks in `Review` status (after checking out the worker's branch or waiting for them to be merged).
- * *Note: Since workers commit to local branches, you verify work by checking out their branch.*
-2. Check out the worker's branch: `git checkout task/t-123`.
-3. Review code and tests.
-4. Merge to `live`:
- ```bash
- git checkout live
- git merge task/t-123
- # Conflicts in tasks.jsonl are handled automatically by .gitattributes driver
- ```
-5. Mark Done:
- ```bash
- task update t-123 done
- git commit -am "task: t-123 done"
- ```
+1. **Harvest Updates**: Run `./Omni/Agent/harvest-tasks.sh` to pull "In Progress" and "Review" statuses from workers.
+2. **Find Reviews**: Run `task list --status=review`.
+3. **Review Code**:
+ * Check out the feature branch: `git checkout task/t-123`.
+ * Run tests and review code.
+4. **Merge**:
+ * `git checkout live`
+ * `git merge task/t-123`
+5. **Complete**:
+ * `task update t-123 done`
+ * `git commit -am "task: t-123 done"`
## Troubleshooting