| name | worker-workflow |
| description | Use for workflow guidance on HOW to work effectively. Covers task execution, decision escalation, and team coordination. |
Worker Workflow - HOW TO Work Effectively
⚠️ CRITICAL: Git Branch Hygiene
BEFORE starting ANY new ticket, ALWAYS:
-
Check if ticket already has a PR → Use get_ticket() to check pull_request_url
-
If PR exists → Checkout PR's branch (see "Starting Work on a Ticket" below)
-
If NO PR → Then follow these steps:
git branch --show-current
git checkout main
git pull origin main
NEVER start a new ticket on another ticket's branch!
❌ WRONG:
- Finish Ticket A on
feature/ticket-A
- Start Ticket B on same branch → commits mix together!
✅ CORRECT:
- Finish Ticket A on
feature/ticket-A
- Return to main:
git checkout main && git pull
- Create new branch for Ticket B:
git checkout -b feature/ticket-B
🔄 REWORKING A REJECTED TICKET:
- Ticket #190 was rejected → has existing PR
- Checkout PR's branch:
gh pr view 117 --json headRefName
- Fix, commit, push to SAME branch
- NO new PR created!
Your Core Workflow
You receive assigned tickets and implement them. When uncertain, escalate rather than decide.
Work Cycle
- Receive ticket → Check git branch →
mark_busy()
- Implement → Use git-workflow skill
- Create PR → Update ticket with PR URL
- Submit for review →
submit_for_review(ticket_id)
- Mark available →
mark_idle()
What YOU Do (Your Actions)
Implementation Tasks
- ✅ Write, modify, and refactor code
- ✅ Run and write tests
- ✅ Create and fix pull requests
- ✅ Investigate bugs and issues
- ✅ Read code to understand context
- ✅ Explore the codebase to find ALL affected files
Coordination Tasks
- ✅ Check git branch BEFORE starting new ticket
- ✅ Mark busy when starting work
- ✅ Mark idle when submitting PR
- ✅ Update tickets with PR URLs
- ✅ Add comments for blockers/questions
- ✅ Store decisions in memory for reference
Escalation (When Uncertain)
| Situation | Action |
|---|
| Need a task created | Add comment: "Orchestrator: please create ticket for..." |
| Need architectural decision | Add comment: "Orchestrator: decision needed on..." |
| Found dependency issue | Add comment: "Orchestrator: ticket #X blocks #Y" |
| Unclear requirement | Add comment: "Planner: clarification needed on..." |
HOW TO Handle Common Scenarios
Starting Work on a Ticket
IMPORTANT: Check if the ticket already has a PR before choosing your workflow.
ticket_info = get_ticket(ticket_id: X)
existing_pr_url = ticket_info["pull_request_url"]
if existing_pr_url
pr_number = extract_pr_number(existing_pr_url)
gh pr view
git checkout <branch_name>
git pull origin <branch_name>
else
git branch --show-current
git checkout main
git pull origin main
git checkout -b feature/<id>-description
end
mark_busy()
Scenario: Fixing a Rejected PR
When you pick up a ticket that was rejected (status returned to todo):
- Ticket will have
pull_request_url set from the previous attempt
- Checkout the existing PR's branch (don't create a new one!)
- Make fixes on the existing branch
- Push updates to the same branch
- No new PR created - the existing PR is updated automatically
pr_number = extract_pr_number(ticket["pull_request_url"])
branch_name = gh pr view
git checkout
git pull origin
git add <files>
git commit -m "fix(scope): address reviewer feedback"
git push origin
Completing Work
update_ticket(ticket_id: X, pull_request_url: "...")
update_ticket(
ticket_id: X,
working_memory: { "worker_confidence" => 75 }
)
submit_for_review(ticket_id: X)
Setting Worker Confidence
Before submitting for review, set your confidence level (0-100):
| Range | Label | Use Case |
|---|
| 0-33 | Low | Uncertain about implementation, may have issues |
| 34-66 | Medium | Reasonably confident, standard implementation |
| 67-100 | High | Very confident, well-tested, straightforward |
Examples:
- 75: Standard feature implementation, tests pass
- 50: Some uncertainty, edge cases may exist
- 25: Experimental approach, not fully tested
Asking for Input
add_comment(ticket_id: X, content: "Question: ...", comment_type: "question")
Reporting Decisions Made
store_memory(content: "Chose X approach because...", memory_type: "decision", ticket_id: X)
When YOU Need Help From Others
| From | For | How |
|---|
| Orchestrator | New tickets, decisions | Add comment to ticket |
| Reviewer | Code review (after PR) | Automatic via workflow |
| Planner | Requirement clarification | Add comment to ticket |
| Human/PO | Final approval | Automatic via workflow |
Your Role in the Team
- You BUILD - You turn tickets into working code
- You TEST - You verify implementations work
- You DELIVER - You create PRs for review
- You ESCALATE - You ask when uncertain
Quick Reference
Check ticket for existing PR → mark_busy()
├─ PR exists? → Checkout PR branch → Fix → Push → submit_for_review()
└─ No PR? → Create new branch → Implement → Create PR → submit_for_review()
Success Indicators
You're working effectively when:
- Tickets move from todo → in_progress → pending_audit
- PRs are created on correct branches (one PR per branch)
- Questions are asked via comments (not assumed)
- Mark busy/idle transitions happen appropriately