refactor(insights): move the briefing read and generation out of their route

This commit is contained in:
Marc-André Bombeck committed 2026-10-23 15:44:04 +02:00
1 parent db623ef8bc
commit 1a5d79f24e
12 files changed
+1520 -1111

No files matched your search

@@ -41,7 +41,7 @@ const ADMITTED: Record<string, { jobs: string[]; why: string }> = {
jobs: ["daily_briefing"],
why: "The daily briefing's generation and its phrasing re-roll; the JSON and grounding repairs do not reason.",
},
"app/api/insights/generate/route.ts": {
"lib/insights/briefing-request/completion.ts": {
jobs: ["daily_briefing"],
why: "A briefing asked for by hand reasons like the scheduled one; its JSON and grounding repairs do not.",
},
@@ -506,7 +506,7 @@ const READER_UNIT_PRODUCERS = [
"lib/ai/prompts/weight.ts",
"lib/insights/features-units.ts",
"lib/insights/comprehensive-generate.ts",
"app/api/insights/generate/route.ts",
"lib/insights/briefing-request/features.ts",
"lib/insights/weight-status.ts",
"lib/insights/metric-status.ts",
"lib/insights/narrative/period-narrative.ts",