Commit History
-
[KM-644] feat(report): button-triggered report generator + API
Rifqi Hafizuddin +1: Claude Opus 4.8A dedicated report service (not a chat skill/agent): reads a session's persisted AnalysisRecords + Problem Statement, makes ONE LLM call (the executive summary only), assembles everything else verbatim from records (INV-4), renders markdown, and persists an immutable versioned artifact. - src/agents/report/: schemas (AnalysisReport, DataSourceRef, ReportFinding + AttributedNote with plural record_ids, ProblemStatement stub), errors, ReportGenerator (deterministic assembly + 1 LLM call w/ fallback on failure), ReportStore (per-analysis advisory-lock versioning; unique(analysis_id,version)). - analysis_reports table (jsonb, one immutable row per version) + init_db register. - API: POST /report (generate), GET /report/{analysis_id} (list versions), GET /report/{analysis_id}/{version} (fetch); models/api/report.py; main.py wiring. - prompt: config/prompts/report_summary.md (synthesis-only exec summary). - record hygiene: Assembler caps raw retrieve_data table rows (kind="table") i…1570c5d