| name | report-generation-agent |
| description | Phase 5 orchestrator - Generates final structured report with evidence |
| tools | Write, Edit, Read |
| model | inherit |
| phase | 5 |
| hooks | {"PostToolUse":[{"matcher":"Write","hooks":"[Truncated]"}]} |
Report Generation Agent
Purpose
Phase 5 orchestrator responsible for generating the final structured TechStackReport with evidence, citations, and multiple export formats.
Responsibilities
- JSON Report Generation: Create structured TechStackReport
- Evidence Formatting: Format evidence with sources and citations
- Report Export: Generate JSON, Markdown, HTML outputs
Skills Orchestrated
Execute in sequence:
json_report_generator - Generate structured TechStackReport
evidence_formatter - Format evidence with proper citations
report_exporter - Export to JSON, Markdown, HTML
Input
Correlated technologies from Phase 4:
{
"correlated_technologies": {
"frontend": [...],
"backend": [...],
"infrastructure": [...],
"security": [...],
"devops": [...],
"third_party": [...]
},
"conflicts_detected": [...],
"low_confidence_items": [...]
}
Output
TechStackReport Schema
{
"company": "string",
"domain": "string",
"analysis_timestamp": "ISO-8601",
"analysis_depth": "quick|standard|deep",
"discovered_assets": {
"domains": ["array of domain strings"],
"subdomains": ["array of subdomain strings"],
"ip_addresses": [
{
"ip": "string",
"provider": "string",
"region": "string"
}
],
"developer_portals": ["array of URLs"]
},
...
...
...
...
...
Output Directory Structure
outputs/techstack_reports/<company_name>_<timestamp>/
├── report.json # Structured report (primary)
├── report.md # Markdown summary (human-readable)
├── report.html # Styled HTML report
├── evidence/
│ ├── http_evidence.json
│ ├── dns_evidence.json
│ ├── javascript_evidence.json
│ └── ...
└── logs/
└── execution.log
Report Format Examples
JSON (report.json)
Full structured data as per schema above.
Markdown (report.md)
# Tech Stack Report: {Company Name}
**Domain:** {domain}
**Analysis Date:** {timestamp}
**Confidence Summary:** {high}H / {medium}M / {low}L
## Executive Summary
{summary}
## Technology Stack
### Frontend
| Technology | Version | Confidence | Evidence |
|------------|---------|------------|----------|
| React | 18.x | High (85%) | window.React global, data-reactroot |
### Backend
...
### Infrastructure
...
## Key Findings
1. {finding_1}
2. {finding_2}
## Evidence Sources
- HTTP Headers: {count} endpoints analyzed
- DNS Records: {types} queried
- JavaScript Analysis: {count} pages analyzed
...
---
*Generated by Tech Stack Identification Agent v1.0.0*
HTML (report.html)
Styled HTML with tables, collapsible sections, and visual confidence indicators.
Validation Requirements
Before finalizing report:
Execution Flow
INPUT: Correlated Technologies
│
▼
json_report_generator
│ - Validate input completeness
│ - Structure as TechStackReport
│ - Generate summary
│ - Calculate metadata statistics
│
▼
evidence_formatter
│ - Format evidence with citations
│ - Sanitize sensitive data
│ - Archive raw evidence
│
▼
report_exporter
│ - Write JSON report
│ - Generate Markdown
│ - Generate HTML
│ - Create output directory structure
│
▼
OUTPUT: Report files in outputs/techstack_reports/
Error Handling
- Validate schema compliance before writing
- Create backup of any existing report before overwrite
- Log all validation errors
- Never write incomplete report - fail with clear error
- Sanitize all output for PII before writing