---
template_id: task
template_name: Task
version: 1.0
variables:
  - name: id
    type: string
    required: true
    prompt: "Task ID:"
  - name: name
    type: string
    required: true
    prompt: "Task name:"
  - name: description
    type: text
    required: true
    prompt: "Task description:"
  - name: status
    type: choice
    required: true
    choices: [Pending, In Progress, Completed, Blocked, Cancelled]
    default: Pending
  - name: type
    type: choice
    required: false
    choices: [Development, Design, Testing, Documentation, Research, Bugfix, Refactor]
    default: Development
  - name: priority
    type: choice
    required: false
    choices: [P0, P1, P2, P3]
    default: P1
---

# Task: {{name}}

**ID:** {{id}}
**Status:** {{#ifEqual status "Pending"}}⏳{{/ifEqual}}{{#ifEqual status "In Progress"}}🔄{{/ifEqual}}{{#ifEqual status "Completed"}}✅{{/ifEqual}}{{#ifEqual status "Blocked"}}🚫{{/ifEqual}}{{#ifEqual status "Cancelled"}}❌{{/ifEqual}} {{status}}
**Type:** {{default type "Development"}}
**Priority:** {{default priority "P1"}}
{{#if estimate}}**Estimate:** {{estimate}}{{/if}}
{{#if assignee}}**Assignee:** {{assignee}}{{/if}}
{{#if storyRef}}**Story:** {{storyRef}}{{/if}}
**Created:** {{formatDate now "YYYY-MM-DD"}}

---

## Description

{{description}}

---

{{#if inputs}}
## Inputs

{{#each inputs}}
- {{this}}
{{/each}}
{{/if}}

---

{{#if outputs}}
## Expected Outputs

{{#each outputs}}
- {{this}}
{{/each}}
{{/if}}

---

## Steps

{{#if steps}}
{{#each steps}}
{{add @index 1}}. [{{#if this.completed}}x{{else}} {{/if}}] {{this.step}}
{{#if this.notes}}   _Note: {{this.notes}}_{{/if}}
{{/each}}
{{else}}
_Steps to be defined._
{{/if}}

---

{{#if validation}}
## Validation

### Criteria
{{#each validation.criteria}}
- [ ] {{this}}
{{/each}}

{{#if validation.commands}}
### Commands
```bash
{{#each validation.commands}}
{{this}}
{{/each}}
```
{{/if}}
{{/if}}

---

{{#if dependencies}}
## Dependencies

{{#each dependencies}}
- {{this}}
{{/each}}
{{/if}}

{{#if blockedBy}}
## Blocked By

{{blockedBy}}
{{/if}}

---

{{#if files}}
## Files Affected

| Path | Action |
|------|--------|
{{#each files}}
| `{{this.path}}` | {{this.action}} |
{{/each}}
{{/if}}

---

{{#if elicitation}}
{{#if elicitation.enabled}}
## Elicitation

{{#each elicitation.questions}}
### {{add @index 1}}. {{this.question}}
{{#ifEqual this.type "choice"}}
Options:
{{#each this.options}}
- {{this}}
{{/each}}
{{/ifEqual}}
{{/each}}
{{/if}}
{{/if}}

---

{{#if notes}}
## Notes

{{notes}}
{{/if}}

---

{{#if completedAt}}
## Completion

**Completed At:** {{completedAt}}
{{/if}}

---

**Generated by:** AIOX Template Engine v2.0
**Template Version:** task-1.0
