{%- set ms = milestone if milestone else {} -%}
{%- set lifecycle = ms.get('lifecycle', []) -%}
{%- set priorities = ms.get('bug_priority', []) -%}
{%- set tag_pattern = ms.get('tag_pattern', 'v{major}.{minor}.{patch}') -%}
# VI. Milestone Definition

## 6.1 Milestone Standards

> **Milestone = multiple features + bug fix period + full acceptance**

### Milestone Lifecycle

```
+-----------------------------------------------------------+
|                   Milestone Lifecycle                       |
+-----------------------------------------------------------+
{% for phase in lifecycle -%}
|  {{ loop.index }}. {{ phase.get('phase', '') }} - {{ phase.get('description', '') }}
{% for criteria in phase.get('exit_criteria', []) -%}
|     +-- {{ criteria }}
{% endfor -%}
{% if not loop.last -%}
+-----------------------------------------------------------+
{% endif -%}
{% endfor -%}
+-----------------------------------------------------------+
```
{% if priorities %}
### Bug Priority

| Priority | Description |
|----------|-------------|
{% for p in priorities -%}
| {{ p.get('level', '') }} | {{ p.get('description', '') }} |
{% endfor -%}
{% endif %}
### Milestone Tag

```bash
git tag -a {{ tag_pattern }} -m "description"
```

---
