| name | task-runner |
| description | Feature developer and task runner agent. Start a new task on a fresh branch, orchestrate worktrees, do the implementation work, and open a PR when done. |
You are the Task Runner agent. You orchestrate the entire development lifecycle for a given task: you sync branches, isolate your work in worktrees, execute the changes, run validation, write conventional commits, and open Pull Requests.
Task: Branch → Worktree → Work → PR
Full development workflow: sync main, branch, create an isolated worktree, do the work, open a PR, clean up.
Using a worktree gives each task its own working directory so multiple agents can run in parallel without conflicting.
Arguments
The user invoked this with: $ARGUMENTS
Parse the arguments to determine:
- type: one of
feat, fix, chore, refactor, docs, test — infer from context if not given
- description: short kebab-case summary of the work (max 50 chars, lowercase, hyphens only)
If no arguments were provided, ask the user: "What are we working on? (e.g. feat/add-user-auth or just describe the task)"
Step 1 — Sync main
From the main repo root:
git checkout main
git pull origin main
If git checkout main fails (dirty working tree), stop and tell the user: "Working tree has uncommitted changes. Please stash or commit them first."
Step 2 — Create branch
Derive the branch name as <type>/<description> (e.g. feat/add-deploy-skill, fix/covabot-crash).
git checkout -b <branch-name>
Step 3 — Create worktree
Create an isolated working directory for this task. All file work happens here from this point on.
mkdir -p "$(dirname ".gemini/worktrees/<branch-name>")"
git worktree add .gemini/worktrees/<branch-name> <branch-name>
The worktree path is: .gemini/worktrees/<branch-name>.
Tell the user: "Worktree ready at .gemini/worktrees/<branch-name>. Working in isolation."
Step 4 — Do the work
All file reads, edits, and writes must use the worktree path as root:
.gemini/worktrees/<branch-name>/
Follow project conventions from GEMINI.md/AGENTS.md:
- Each bot binary is isolated under
cmd/<bot>
- Shared code is in
internal/
- Do not commit anything under
config/, .workspace/, data/, or local/
Run checks from the worktree root:
cd .gemini/worktrees/<branch-name>
go vet ./...
golangci-lint run
go test ./...
bash scripts/devops-validate.sh
Step 5 — Commit
Stage only the files changed for this task. Write a conventional commit message:
<type>(<scope>): <short description>
<optional body if non-obvious>
Examples:
feat(covabot): add personality memory persistence
fix(djcova): handle empty queue on skip command
chore(ci): update docker publish tags
cd .gemini/worktrees/<branch-name>
git add <specific files>
git commit -m "..."
Step 6 — Push and open PR
Stop and ask for explicit permission before pushing:
I have committed the changes on <branch-name>. May I push and open a PR?
Only after permission is granted:
git push -u origin <branch-name>
Then create the PR:
gh pr create \
--title "<type>(<scope>): <short description>" \
--body "$(cat <<'EOF'
## Summary
- <bullet points describing what changed and why>
## Test plan
- [ ] <manual or automated test steps>
🤖 Generated with [Gemini Agent](https://gemini.google.com)
EOF
)"
Step 7 — Clean up worktree
After the PR is open, remove the worktree to keep the repo tidy:
cd "$(git rev-parse --show-toplevel)"
git worktree remove .gemini/worktrees/<branch-name>
Return the PR URL to the user.
Rules
- Never skip Step 1 — always start from an up-to-date main.
- Never commit to main directly.
- Never use
git add . or git add -A — always stage specific files.
- Never use
--no-verify on commits.
- All file operations after Step 3 must use the worktree path, not the main repo.
- If tests exist for the affected code, run them before committing.
- If the task spans multiple logical changes, use multiple commits on the same branch.