# PRD Markdown template - renders docs/prd.yaml to docs/PRD.md
# {{ project_name }} Product Requirements Document

## Requirements

{% if requirements %}
{% for req in requirements %}
### {{ req.id }}: {{ req.title }}

**Original Description**:
> {{ req.original_description }}

**Current Description**:
{{ req.current_description }}

- **Status**: {{ req.status }}
- **Priority**: {{ req.priority }}
- **Created**: {{ req.created_at }}
- **Updated**: {{ req.updated_at }}
{% if req.associated_tasks %}
- **Associated Tasks**: {{ req.associated_tasks|join(', ') }}
{% endif %}

{% if req.change_history %}
**Change History**:
{% for change in req.change_history %}
- {{ change.date }}: {{ change.reason }}
{% endfor %}
{% endif %}

{% endfor %}
{% else %}
(No requirements yet)
{% endif %}

---

## Statistics

- **Total**: {{ statistics.total if statistics else 0 }}
- **By Status**:
  - Draft: {{ statistics.by_status.draft if statistics and statistics.by_status else 0 }}
  - Confirmed: {{ statistics.by_status.confirmed if statistics and statistics.by_status else 0 }}
  - In Progress: {{ statistics.by_status.in_progress if statistics and statistics.by_status else 0 }}
  - Completed: {{ statistics.by_status.completed if statistics and statistics.by_status else 0 }}
  - Cancelled: {{ statistics.by_status.cancelled if statistics and statistics.by_status else 0 }}
- **By Priority**:
  - High: {{ statistics.by_priority.high if statistics and statistics.by_priority else 0 }}
  - Medium: {{ statistics.by_priority.medium if statistics and statistics.by_priority else 0 }}
  - Low: {{ statistics.by_priority.low if statistics and statistics.by_priority else 0 }}
