# {{ project_name if project_name else "Workflow Documentation" }}

{% if project_path %}
**Path:** `{{ project_path }}`
{% endif %}
{% if main_workflow %}
**Main Workflow:** `{{ main_workflow }}`
{% endif %}

**Generated:** {{ collected_at }}

## Summary

- **Total Workflows:** {{ workflows|length }}
- **Total Activities:** {{ total_activities }}
- **Total Variables:** {{ total_variables }}
- **Total Arguments:** {{ total_arguments }}

## Workflows

| Workflow | Activities | Arguments | Variables | Edges |
| -------- | ---------- | --------- | --------- | ----- |
{% for wf in workflows %}
| [{{ wf.name }}](workflows/{{ wf.name|replace(' ', '_') }}.md) | {{ wf.activities|length }} | {{ wf.arguments|length }} | {{ wf.variables|length }} | {{ wf.edges|length }} |
{% endfor %}

## Call Graph

{% if has_invocations %}
{% for wf in workflows %}
{% if wf.invocations and wf.invocations|length > 0 %}
- **{{ wf.name }}**
  {% for inv in wf.invocations %}
  - → `{{ inv.callee_path }}`
  {% endfor %}
{% endif %}
{% endfor %}
{% else %}
*No workflow invocations detected*
{% endif %}

## Issues Summary

{% if has_issues %}
{% for wf in workflows %}
{% if wf.issues and wf.issues|length > 0 %}
### {{ wf.name }}

{% for issue in wf.issues %}
- **{{ issue.level|upper }}**: {{ issue.message }}
{% endfor %}
{% endif %}
{% endfor %}
{% else %}
*No issues detected across all workflows*
{% endif %}

---
*Generated by xaml-parser*
