# License Compliance Report

**Generated by:** license-comply v{{ result.tool_version }}
**Project:** {{ result.project_path }}
**Project type:** {{ result.project_type.value }}
**Date:** {{ formatted_date }}

---

## Summary

| Metric | Count |
|--------|-------|
| Total packages | {{ result.total_packages }} |
{% if result.transitive_count > 0 %}| Direct | {{ result.direct_count }} |
| Transitive | {{ result.transitive_count }} |
{% endif %}| Clean | {{ counts.get('clean', 0) }} |
| Notice | {{ counts.get('notice', 0) }} |
| Warnings | {{ counts.get('warning', 0) }} |
| Critical | {{ counts.get('critical', 0) }} |

{% if result.ai_summary %}
---

## AI Executive Summary

{{ result.ai_summary }}

> **Note:** This summary was generated by an AI language model. It is not legal advice and has not been reviewed by an attorney. Consult qualified legal counsel before making compliance decisions.

{% endif %}
{% if critical_findings %}
---

## Critical Issues

These are flagged as critical and typically need resolution before shipping.

{% for finding in critical_findings %}
### ✗ {{ finding.package_name }}{% if finding.license_info.is_transitive %} *(transitive)*{% endif %} ({{ finding.license_info.spdx_id or 'UNKNOWN' }})

**Risk:** CRITICAL — {{ finding.title }}

{{ finding.explanation }}

**Action:** {{ finding.recommendation }}
{% if finding.remediation_steps %}

**Next steps:**
{% for step in finding.remediation_steps %}
{{ loop.index }}. {{ step }}
{% endfor %}
{% endif %}
{% if finding.policy_violated %}*Policy: {{ finding.policy_violated }}*{% endif %}

{% endfor %}
{% endif %}
{% if warning_findings %}
---

## Warnings

These need attention and may require review.

{% for finding in warning_findings %}
### ⚠ {{ finding.package_name }}{% if finding.license_info.is_transitive %} *(transitive)*{% endif %} ({{ finding.license_info.spdx_id or 'UNKNOWN' }})

**Risk:** WARNING — {{ finding.title }}

{{ finding.explanation }}

**Action:** {{ finding.recommendation }}
{% if finding.remediation_steps %}

**Next steps:**
{% for step in finding.remediation_steps %}
{{ loop.index }}. {{ step }}
{% endfor %}
{% endif %}
{% if finding.policy_violated %}*Policy: {{ finding.policy_violated }}*{% endif %}

{% endfor %}
{% endif %}
{% if notice_findings %}
---

## Notices

Informational — be aware of these obligations.

{% for finding in notice_findings %}
### ℹ {{ finding.package_name }} ({{ finding.license_info.spdx_id or 'UNKNOWN' }})

{{ finding.explanation }}

{% endfor %}
{% endif %}
---

## All Dependencies

| Package | License | Category | Risk |
|---------|---------|----------|------|
{% for finding in result.findings %}| {{ finding.package_name | escape_pipe }}{% if finding.license_info.is_transitive %} *(transitive)*{% endif %} | {{ (finding.license_info.spdx_id or 'Unknown') | escape_pipe }} | {{ finding.license_info.category.value | replace('_', ' ') | title }} | {{ finding.risk_level.value | upper }} |
{% endfor %}

{% if result.obligation_rollup %}
---

## Your Obligations

{% for obligation in result.obligation_rollup %}
- **{{ obligation.obligation }}**
  Required by: {% for i in range(obligation.packages | length) %}{{ obligation.packages[i] }} ({{ obligation.license_ids[i] }}){% if not loop.last %}, {% endif %}{% endfor %}

{% endfor %}
{% endif %}
---

*This report was generated by [license-comply](https://github.com/admiral-cs/license-comply). It does not constitute legal advice.*
