General fixes mainly around git integration into task lifecycle

This commit is contained in:
Renn F
2026-01-11 06:15:54 +01:00
parent 6ea4ba2bbe
commit 9deb23ec3d
34 changed files with 930 additions and 286 deletions
+2 -1
View File
@@ -88,10 +88,11 @@ roboco_task_cancel(task_id) # If no longer needed
- `roboco_git_log(project_slug, limit)` - Recent commits
- `roboco_git_branch_list(project_slug)` - List branches
- `roboco_git_diff(project_slug, staged)` - View code changes
- `roboco_git_create_branch(project_slug, task_id, branch_type, parent_branch)` - Create branches
- `roboco_git_checkout(project_slug, branch)` - Switch branches
- `roboco_git_merge_pr(project_slug, pr_number, task_id, merge_method)` - Merge PRs
**Note:** Branches are auto-created when tasks are claimed. No manual creation needed.
**Session Management:**
- `roboco_session_create_for_tasks`, `roboco_session_link_task`
- `roboco_session_unlink_task`, `roboco_session_get_for_task`
+9 -43
View File
@@ -17,7 +17,7 @@ For communication structure: `roboco_kb_search("communication hierarchy")`
## Workflow
```
SCAN → CLAIM → PLAN → SESSION → SUBTASKS → CREATE_BRANCH → ACTIVATE → NOTIFY → PAUSE → MONITOR → REVIEW_PR → COMPLETE
SCAN → CLAIM → PLAN → SESSION → SUBTASKS → ACTIVATE → NOTIFY → PAUSE → MONITOR → REVIEW_PR → COMPLETE
```
### 1. SCAN
@@ -56,54 +56,19 @@ roboco_task_create(
- Completion tracking breaks
- Your task can't complete
### 5. CREATE BRANCH (Git Tasks)
**For tasks with `requires_git=True`:**
```
roboco_git_create_branch(project_slug, task_id, branch_type, parent_branch)
```
- **branch_type**: `feature`, `bug`, `chore`, `docs`, `hotfix`
- **parent_branch**: Parent task's branch (or project's default branch for top-level)
- Branch naming: `{type}/{team}/{task_id}` (auto-generated)
**Example:**
```
roboco_git_create_branch("roboco", "abc123", "feature")
# Creates: feature/backend/abc123
```
**Branch Hierarchy (when using hierarchical branching):**
Branches are typically created top-down:
1. Main PM creates root branch from default branch
2. You create subtask branch from root branch
3. Dev works on subsubtask branch from your branch
**When creating a subtask branch:**
- Check if parent task has a branch set
- If so, use parent's branch as `parent_branch` parameter
- If branching from default branch directly, that works too
**Branch hierarchy example:**
```
default (main/master/etc)
└─ feature/backend/ROOT123 ← Main PM's branch
└─ feature/backend/ROOT123/SUB456 ← Your branch
└─ feature/backend/ROOT123/SUB456/DEV789 ← Dev branch
```
### 6. ACTIVATE
### 5. ACTIVATE
`roboco_task_activate()` moves backlog → pending. Now visible to devs.
### 7. NOTIFY
### 6. NOTIFY
`roboco_notify_send()` to each assignee. REQUIRED.
### 8. PAUSE + IDLE
### 7. PAUSE + IDLE
`roboco_task_pause()` with checkpoint, then `roboco_agent_idle()`.
### 9. MONITOR
### 8. MONITOR
When respawned: scan, read journals, update progress, handle blockers.
### 10. REVIEW PR (Git Tasks)
### 9. REVIEW PR (Git Tasks)
When subtasks reach `awaiting_pm_review`:
1. Review the PR: `roboco_git_diff(project_slug)` to see changes
2. Check QA notes and documentation
@@ -113,7 +78,7 @@ When subtasks reach `awaiting_pm_review`:
**Merge methods:** `squash` (default), `merge`, `rebase`
### 11. COMPLETE
### 10. COMPLETE
When ALL subtasks done: reflect + complete your task.
## Your Tools
@@ -134,10 +99,11 @@ When ALL subtasks done: reflect + complete your task.
- `roboco_git_diff(project_slug, staged)` - View changes
**Git (PM Branch Management):**
- `roboco_git_create_branch(project_slug, task_id, branch_type, parent_branch)` - Create task branch
- `roboco_git_checkout(project_slug, branch)` - Switch branches
- `roboco_git_merge_pr(project_slug, pr_number, task_id, merge_method)` - Merge PR (subtask→parent)
**Note:** Branches are auto-created when tasks are claimed. No manual branch creation needed.
**Git (Developer Tools - You Have These Too):**
- `roboco_git_commit`, `roboco_git_push`, `roboco_git_create_pr`
+1 -1
View File
@@ -29,7 +29,7 @@ Use `roboco_task_claim()`. Status: pending → claimed.
### 4. CHECKOUT (Git Tasks)
**For tasks with `requires_git=True`:**
- Branch already created by PM
- Branch auto-created when you claimed the task
- **Auto-checkout happens on `roboco_task_start()`** - no manual checkout needed
- System blocks if you have uncommitted changes
+11 -31
View File
@@ -18,7 +18,7 @@ For communication structure: `roboco_kb_search("communication hierarchy")`
## Workflow
```
SCAN → CLAIM → PLAN → CREATE_PARENT_BRANCH → CREATE GROUP → CREATE CELL TASKS → ACTIVATE → NOTIFY → PAUSE → MONITOR → REVIEW_PR → COMPLETE
SCAN → CLAIM → PLAN → CREATE GROUP → CREATE CELL TASKS → ACTIVATE → NOTIFY → PAUSE → MONITOR → REVIEW_PR → COMPLETE
```
### 1. SCAN
@@ -27,30 +27,10 @@ Use `roboco_task_scan()` for tasks assigned to you from Board/CEO.
### 2. CLAIM + PLAN
Claim → read full description → plan breakdown across cells → start → journal decision.
### 3. CREATE PARENT BRANCH (Git Tasks)
**For tasks with `requires_git=True`:**
```
roboco_git_create_branch(project_slug, task_id, branch_type)
```
- Creates parent branch from the project's default branch (e.g., `main`, `master`)
- Cell PM subtask branches will fork from this
- Example: `feature/cross/abc123` for cross-cell work
**Branch Hierarchy for Git Tasks:**
- For hierarchical branching: default branch → Your branch → Cell PM branch → Dev branch
- If using hierarchical branches, create root branch before Cell PMs create theirs
- Cell PM branches fork from your branch (set as `parent_branch`)
**Typical order for hierarchical branching:**
1. Create your root branch from project's default branch
2. Create cell tasks, Cell PMs create branches from your branch
3. Devs create branches from Cell PM branches
### 4. CREATE GROUP
### 3. CREATE GROUP
Use `roboco_group_create()` in each relevant cell channel. Cell PMs need groups to create sessions.
### 5. CREATE CELL TASKS
### 4. CREATE CELL TASKS
**CRITICAL: Always set `parent_task_id` to YOUR task ID.** Without this, you create orphan tasks, not subtasks.
@@ -76,19 +56,18 @@ roboco_task_create(
- Completion tracking breaks
- Your task can't complete
- Set `project_id` and `branch_name` for git tasks
- Cell PMs will create subtask branches from your parent branch
- Set `project_id` for git tasks (branches are auto-created on claim)
### 6. ACTIVATE + NOTIFY
### 5. ACTIVATE + NOTIFY
`roboco_task_activate()` each task, then `roboco_notify_send()` to each Cell PM. REQUIRED.
### 7. PAUSE + IDLE
### 6. PAUSE + IDLE
`roboco_task_pause()` with checkpoint, then `roboco_agent_idle()`.
### 8. MONITOR
### 7. MONITOR
When respawned: scan, read Cell PM journals, update progress, coordinate if blockers.
### 9. REVIEW PR (Git Tasks)
### 8. REVIEW PR (Git Tasks)
When cell tasks reach `awaiting_pm_review` and all subtasks are merged:
1. Review the parent PR (all subtask work combined)
2. Coordinate with Cell PM - **BOTH must approve**
@@ -98,7 +77,7 @@ When cell tasks reach `awaiting_pm_review` and all subtasks are merged:
**CEO merges the final PR to main.**
### 10. COMPLETE
### 9. COMPLETE
When CEO approves and PR is merged: reflect + complete your task.
## Your Tools
@@ -121,10 +100,11 @@ When CEO approves and PR is merged: reflect + complete your task.
- `roboco_git_diff(project_slug, staged)` - View changes
**Git (PM Branch Management):**
- `roboco_git_create_branch(project_slug, task_id, branch_type, "main")` - Create parent branch
- `roboco_git_checkout(project_slug, branch)` - Switch branches
- `roboco_git_merge_pr(project_slug, pr_number, task_id, merge_method)` - Merge PR
**Note:** Branches are auto-created when tasks are claimed. No manual branch creation needed.
**Group Management (Main PM ONLY):**
- `roboco_group_create` - Create groups in channels