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 -
[NOTICKET] feat(slow-path): persist AnalysisRecord via PostgresAnalysisStore
Rifqi Hafizuddin +1: Claude Opus 4.8Groundwork for generate_report - the slow path now persists a real, citable record that the report (next) renders from. Contract gaps (schemas.py): - stage: CrispStage added to TaskResult + TaskSummary, populated at all 3 TaskResult build sites (task_runner) + copied in assembler._build_record, so the report can group its method appendix by CRISP-DM phase. - AnalysisRecord gained identity: record_id (auto uuid), analysis_id/user_id (optional; stamped at persist time). Persistence: - PostgresAnalysisStore (store.py): save() never-throw idempotent upsert + list_for_analysis() oldest-first (the report render order). NullAnalysisStore kept for tests. AnalysisStore Protocol gained list_for_analysis. - analysis_records jsonb table (models.py), indexed by analysis_id + user_id; registered in init_db, created by create_all on startup (no migration). - chat_handler default store -> PostgresAnalysisStore; user_id stamped at save. Open: analysis_id is NULL until the Analysis State …09f8451
-
feat/Planner Agent (#2)
- [KM-567][AI] Planner agent: contracts, schemas, inputs, registry (be96601ad46c00e8e789768dd6e89c2db827bde4) - [KM-567][AI] Planner agent: prompt + few-shot examples (83ba6b1743370145454d9315224eeb7b2d12ac18) - [KM-567][AI] Planner agent: validator + service (72306d0ce92c76d60117a20c701c7f8185bcfeef) - [KM-567] docs: record Phase 3 Planner agent in PROGRESS.md (ba2fa8892392028c8d13646c09d1155bbf34e703) - [KM-567][AI] Planner agent: fix PII leak + placeholder/retry robustness (6b3637dda097f16cd98d4b9ad6094fdaed6d1346) - [KM-624] Implement Compute Functions Tools (78c598c22d2f2a14229a83c3f43fa98c5d520ae7) - [KM-624][AI] Planner: realign stub registry + examples to composite analyze_* tools (93a24dabf48d8121e981cc470c835cb10badb62a) - [KM-624] docs: record tool taxonomy + ownership revision in PROGRESS (f3461142542f6216aff23b30a1321dfb4654afdc) - [KM-626][AI] Slow-path agent: seam contracts + TaskRunner (ac310de551d0888ccfef31e981e22d88f54c6a38) - [KM-626][AI] Slow-path agent: Assembler…81e5fe7