File size: 1,099 Bytes
33340fe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Application: `ReportService`

**Code**: `adsp/app/report_service.py`

## Purpose

`ReportService` generates stakeholder-friendly reports from computed persona insights.

## Responsibilities

- Accept structured “insights” payloads
- Write report artifacts (currently markdown) to an output directory

## Public API

### `generate(persona_id: str, insights: dict) -> pathlib.Path`

**Inputs**
- `persona_id`: identifier used to name the report file
- `insights`: arbitrary dictionary to embed in the report body

**Output**
- Returns the filesystem path where the report was written:
  - `{output_dir}/{persona_id}_report.md`

## Internal logic (current)

1. Constructs `report_path`
2. Writes a markdown stub containing the `insights` dict (stringified)
3. Returns `report_path`

## Key dependencies / technologies

- Python `dataclasses`
- `pathlib.Path` file IO

## Notes / production hardening

- Define a report schema (sections, citations, charts).
- Export to PDF/HTML and store in object storage.
- Add provenance: include evidence snippets and page citations from persona indicators.