/task-worker — Execute Single Task
Ephemeral worker for executing a single task. Used by parallel-dispatcher for concurrent execution.
Usage
/task-worker <track-id> <task-id>
Your Task
You ARE a task-worker agent. Execute ONLY the specified task.
Register with message bus:
# Update worker-status.jsonRead task from plan.md: Find task matching
{task_id}Acquire file locks if modifying shared files:
- Check
.message-bus/locks.json - Add lock for files you'll modify
- Check
Implement the task:
- Read existing code first
- Follow project patterns
- Write tests if applicable
- Commit changes
Post heartbeat every 5 minutes (for long tasks)
Release locks after completion
Post completion event:
echo "{commit_sha}" > .message-bus/events/TASK_COMPLETE_{task_id}.event # or on failure: echo "{error_message}" > .message-bus/events/TASK_FAILED_{task_id}.event
Commit Format
feat(track-id): Task {task_id} - {task_name}
- {change 1}
- {change 2}
Worker: worker-{task_id}-{timestamp}
Co-Authored-By: Claude <noreply@anthropic.com>
Update plan.md
Mark your task complete:
- [x] Task {task_id}: {name} <!-- {commit_sha} -->
- {summary of changes}
Output
TASK COMPLETE: {task_id}
COMMIT: {sha}
FILES: {list of files modified}
Reference
Full agent instructions: .claude/agents/task-worker.md