---
template_id: epic
template_name: Epic
version: 1.0
variables:
  - name: id
    type: string
    required: true
    prompt: "Epic ID (e.g., EPIC-S3):"
  - name: title
    type: string
    required: true
    prompt: "Epic title:"
  - name: status
    type: choice
    required: true
    choices: [Planning, In Progress, Completed, On Hold, Cancelled]
    default: Planning
  - name: owner
    type: string
    required: true
    prompt: "Epic owner:"
  - name: objective
    type: text
    required: true
    prompt: "What is the epic's main objective?"
---

# {{id}}: {{title}}

**Status:** {{#ifEqual status "Planning"}}📋{{/ifEqual}}{{#ifEqual status "In Progress"}}🔄{{/ifEqual}}{{#ifEqual status "Completed"}}✅{{/ifEqual}}{{#ifEqual status "On Hold"}}⏸️{{/ifEqual}}{{#ifEqual status "Cancelled"}}❌{{/ifEqual}} {{status}}
**Owner:** {{owner}}
**Created:** {{formatDate now "YYYY-MM-DD"}}
{{#if updated}}**Updated:** {{updated}}{{/if}}

---

## Objective

{{objective}}

{{#if businessValue}}
## Business Value

{{businessValue}}
{{/if}}

---

{{#if stakeholders}}
## Stakeholders

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

---

## Scope

{{#if scope}}
### In Scope
{{#each scope.inScope}}
- {{this}}
{{/each}}

{{#if scope.outOfScope}}
### Out of Scope
{{#each scope.outOfScope}}
- {{this}}
{{/each}}
{{/if}}
{{else}}
_Scope to be defined._
{{/if}}

---

## Stories

{{#if stories}}
| ID | Title | Points | Priority | Status |
|----|-------|--------|----------|--------|
{{#each stories}}
| [{{this.id}}](./stories/story-{{this.id}}.md) | {{this.title}} | {{default this.points "-"}} | {{default this.priority "Medium"}} | {{default this.status "Draft"}} |
{{/each}}

**Total Points:** {{#if progress}}{{progress.totalPoints}}{{else}}_TBD_{{/if}}
{{else}}
_Stories to be defined._
{{/if}}

---

{{#if sprints}}
## Sprint Planning

{{#each sprints}}
### Sprint {{this.number}}
{{#if this.goal}}**Goal:** {{this.goal}}{{/if}}

{{#if this.stories}}
**Stories:**
{{#each this.stories}}
- {{this}}
{{/each}}
{{/if}}

{{/each}}
{{/if}}

---

## Success Criteria

{{#if successCriteria}}
{{#each successCriteria}}
- [ ] {{this.criteria}}{{#if this.metric}} ({{this.metric}}: {{this.target}}){{/if}}
{{/each}}
{{else}}
_Success criteria to be defined._
{{/if}}

---

## Technical Requirements

{{#if technicalRequirements}}
{{#each technicalRequirements}}
- {{this}}
{{/each}}
{{else}}
_Technical requirements to be defined._
{{/if}}

---

## Risks

{{#if risks}}
| Risk | Impact | Mitigation |
|------|--------|------------|
{{#each risks}}
| {{this.risk}} | {{default this.impact "Medium"}} | {{default this.mitigation "TBD"}} |
{{/each}}
{{else}}
_No risks identified._
{{/if}}

---

## Dependencies

{{#if dependencies}}
**Depends on:**
{{#each dependencies.dependsOn}}
- {{this}}
{{/each}}

{{#if dependencies.blocks}}
**Blocks:**
{{#each dependencies.blocks}}
- {{this}}
{{/each}}
{{/if}}
{{else}}
_No dependencies._
{{/if}}

---

## Documentation

{{#if documentation}}
| Type | Location | Status |
|------|----------|--------|
{{#each documentation}}
| {{this.type}} | {{this.location}} | {{default this.status "Pending"}} |
{{/each}}
{{else}}
_Documentation requirements to be defined._
{{/if}}

---

## Progress

{{#if progress}}
- **Total Points:** {{progress.totalPoints}}
- **Completed Points:** {{progress.completedPoints}}
- **Progress:** {{progress.percentComplete}}%

```
[{{#times 10}}{{#if (lt @index (divide ../progress.percentComplete 10))}}█{{else}}░{{/if}}{{/times}}] {{progress.percentComplete}}%
```
{{else}}
_Progress tracking to be updated._
{{/if}}

---

## Change Log

| Date | Version | Description | Author |
|------|---------|-------------|--------|
| {{formatDate now "YYYY-MM-DD"}} | 1.0 | Epic created | AIOX Template Engine |

---

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