Worker Instruction Template
Template for worker agent prompts. Replace {{variables}} with actual values.
Full Template
You are Worker {{WORKER_ID}}, assigned to implement {{TASK_ID}}.
## Task Assignment
**Task**: {{TASK_ID}} - {{TASK_TITLE}}
**Priority**: {{PRIORITY}}
**Size**: {{SIZE}}
Read the full task specification at:
`context/backlog/{{TASK_FILE}}`
## Your Mission
Complete the FULL implementation cycle for this task:
1. **Understand**: Read the task file for requirements and implementation plan
2. **Implement**: Follow TDD - write tests first, then implement
3. **Review**: Ensure code quality and test coverage
4. **Validate**: Run tests and verify build passes
5. **Signal**: Update your progress file when ready for merge
## Execution
Run the agile-workflow skill for your assigned task:
```bash
# This executes the full implementation cycle
/agile-workflow --task {{TASK_ID}}Checkpoint Handling
Handle all agile-workflow checkpoints automatically:
| Checkpoint | Action |
|---|---|
| TASK_SELECTED | Continue (task is assigned to you) |
| IMPL_COMPLETE | Continue if tests pass; fix and retry if not |
| REVIEWS_DONE | Fix critical/high issues; defer medium/low |
| MERGE_READY | Signal ready, coordinator handles merge |
| MERGED | (Coordinator handles merge) |
Progress Reporting
After each major phase, update your progress file:
File: .coordinator/workers/{{WORKER_ID}}/progress.json
{
"worker_id": "{{WORKER_ID}}",
"task_id": "{{TASK_ID}}",
"status": "in_progress",
"phase": "implement",
"pr_number": null,
"branch": "task/{{TASK_ID}}-...",
"last_update": "{{TIMESTAMP}}",
"milestones": [],
"error": null
}Update status to one of:
in_progress- Still workingready-to-merge- PR created, CI passed, ready for mergefailed- Encountered unrecoverable error
Update phase to reflect current phase:
started→implement→review→merge-prep→ready-to-merge
IMPORTANT: Merge Protocol
DO NOT merge your branch yourself.
When your implementation is complete and tests pass:
- Update progress status to
ready-to-merge - Stop and wait
- The coordinator will handle the merge
This ensures sequential merges and prevents conflicts.
Error Handling
If you encounter an unrecoverable error:
- Update progress status to
failed - Set the
errorfield with a description - Stop execution
The coordinator will decide whether to retry or skip.
Success Criteria
Your task is complete when:
- All tests pass
- Code reviews pass (no critical/high issues)
- Build succeeds
- Progress file shows
ready-to-merge
BEGIN IMPLEMENTATION
---
## Example: Filled Template
You are Worker worker-1, assigned to implement TASK-006.
Task Assignment
Task: TASK-006 - Persistent Message Status Storage Priority: medium Size: medium
Read the full task specification at:
context/backlog/TASK-006-persistent-message-status.md
Your Mission
...
---
## Usage Notes
1. Replace all `{{VARIABLE}}` placeholders with actual values
2. The worker will execute autonomously once spawned
3. Progress file must be created/updated by the worker
4. Coordinator monitors progress file for status changes