---
name: step-05-report
description: Generate consolidated audit report with all findings
---

# Step 5: Consolidated Report

## YOUR TASK:
Compile all findings from previous steps into a structured, actionable report.

---

## REPORT FORMAT:

Display the following report to the user:

```
============================================================
       APEX VERIFICATION REPORT
============================================================

Project: {project_name}
Scope:   {scope}
Date:    {current_date}

------------------------------------------------------------
  SUMMARY
------------------------------------------------------------

| Category     | BLOCKING | CRITICAL | WARNING | PASS |
|-------------|----------|----------|---------|------|
| Navigation  | {count}  | {count}  | {count} | {Y/N}|
| CRUD        | {count}  | {count}  | {count} | {Y/N}|
| Permissions | {count}  | {count}  | {count} | {Y/N}|
| Routes      | {count}  | {count}  | {count} | {Y/N}|
| **TOTAL**   | {total}  | {total}  | {total} |      |

Result: {PASS / FAIL (N blocking issues)}

------------------------------------------------------------
  BLOCKING FINDINGS (must fix)
------------------------------------------------------------

[{ID}] {message}
  File: {file_path}:{line}
  Fix:  {fix_description}

... (repeat for each blocking finding)

------------------------------------------------------------
  CRITICAL FINDINGS (should fix)
------------------------------------------------------------

[{ID}] {message}
  File: {file_path}:{line}
  Fix:  {fix_description}

... (repeat for each critical finding)

------------------------------------------------------------
  WARNINGS (nice to fix)
------------------------------------------------------------

[{ID}] {message}
  File: {file_path}:{line}
  Fix:  {fix_description}

... (repeat for each warning)

============================================================
```

## ADDITIONAL SECTIONS (if --fix):

When {fix_mode} is true, add a "FIX COMMANDS" section after the findings:

```
------------------------------------------------------------
  FIX COMMANDS
------------------------------------------------------------

# NAV-001: Remove reserved section 'detail' from menu
# File: src/.../EmployeesNavigationSeedData.cs
# Action: Remove the section entry with code "detail" from Sections[] array

# CRUD-004: Add Create button to EmployeeListPage
# File: web/.../EmployeeListPage.tsx
# Action: Add in the page header:
#   <button onClick={() => navigate('create')} className="...">
#     New Employee
#   </button>

... (repeat for each finding with specific fix instructions)
```

## RULES FOR REPORT GENERATION:

1. **Sort by severity**: BLOCKING first, then CRITICAL, then WARNING
2. **Within same severity**: Sort by category (NAV, CRUD, PERM, ROUTE)
3. **No false positives**: Only include findings with concrete evidence (file:line)
4. **No duplicates**: Merge findings that point to the same root cause
5. **Actionable fixes**: Every finding must have a clear, specific fix instruction
6. **If no findings in a category**: Display "PASS — No issues found" for that category

## SUCCESS CRITERIA:
- Report is complete and properly formatted
- All findings from steps 1-4 are included
- Pass/fail status is correct
- Fix commands are included if --fix was specified
- Report is immediately actionable by the developer
