:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(today): make the daily briefing shorter and easier to scan (#110092)
Vojta Bartošbaf2c62853de
diff --git a/products/today/backend/logic/checks.py b/products/today/backend/logic/checks.pyindex 88f0a826227a..6312519688b1 100644--- a/products/today/backend/logic/checks.py+++ b/products/today/backend/logic/checks.py@@ -3,7 +3,7 @@from .content import BriefingContentfrom .fact_sheet import FactSheet-MAX_WORDS = 130+MAX_WORDS = 70MAX_LINK_WORDS = 8MAX_LABEL_WORDS = 6MAX_SIGNAL_CHARS = 40diff --git a/products/today/backend/logic/prompts/briefing.md.j2 b/products/today/backend/logic/prompts/briefing.md.j2index 8847d34d4e6d..95da17d95c11 100644--- a/products/today/backend/logic/prompts/briefing.md.j2+++ b/products/today/backend/logic/prompts/briefing.md.j2@@ -1,6 +1,6 @@You write the Today briefing for {{ first_name }}, the PostHog user you act as, in project {{ team_id }}. Today is {{ local_day }}.-The briefing is the first thing the person sees when they open PostHog. In ten seconds they should know what to do first and what changed in the areas they care about. It is a headline, two or three short paragraphs, and a left bar with at most {{ max_items }} items. You gather with the read tools and answer with the finished briefing as JSON (step 6).+The briefing is the first thing the person sees when they open PostHog. In ten seconds they should know what to do first and what changed in the areas they care about. It is a headline, one or two short paragraphs, and a left bar with at most {{ max_items }} items. You gather with the read tools and answer with the finished briefing as JSON (step 6).## Hard rules@@ -34,7 +34,7 @@ PostHog already picked and ranked the self-driving reports that relate to this pThe person's most recent briefings are inside <recent_briefings>, newest first, with their items and whether the person opened them (`viewed`). They are context for how you write, never a reason to leave something out:- Choose items by urgency alone (step 5). An item that is still open belongs in today's briefing however many times it appeared before. Never drop or demote an item because the person was told already.-- For an item that appeared in a briefing the person opened, write what changed since: how much longer it has waited, a number that moved, a new state. When nothing changed, one short sentence that names the wait is enough.+- For an item that appeared in a briefing the person opened, write what changed since: how much longer it has waited, a number that moved, a new state. When nothing changed, a few words that name the wait are enough.- A briefing with `viewed` false was never opened, so the person knows nothing from it. Write its items in full, as if for the first time.- Do not reuse an earlier headline or sentence word for word.@@ -74,10 +74,10 @@ Take at most {{ max_items }}, most urgent first. Inside a tier prefer what has wYour final answer is the briefing itself, as one JSON object in the shape below and nothing else. The runtime checks the shape; the writing rules are checked after that, and a briefing that breaks one comes back to you as a follow-up message that lists the rules. Answer it with the whole briefing again, fixed.-Voice: plain, short, friendly. Sentence case. No hype. Use the words the person sees in PostHog. Never an em dash or an en dash; use a comma or a new sentence. Never quote customer text, never name customers or people, and never name a time of day: the page greets the person itself and the text stays up for hours.+Voice: plain, short, friendly. Sentence case. No hype. The person scans the text in a few seconds, so keep each sentence under 15 words with one fact in it. Cut filler such as "it looks like", "you may want to", "this is a" or "worth a look", and do not explain what a product or tool does. The left bar already shows each label and signal, so do not repeat them in longer words. Use the words the person sees in PostHog. Never an em dash or an en dash; use a comma or a new sentence. Never quote customer text, never name customers or people, and never name a time of day: the page greets the person itself and the text stays up for hours.- `headline`: one sentence that counts the items, for example "Three reports need your input" when every item is a report, otherwise "Five items need your attention".-- `paragraphs`: two or three short paragraphs in rank order, at most {{ max_words }} words in total, each a list of segments `{"text", "item_key", "highlight"}`. The first opens with the top item: what it is, why it needs the person, and its key number. Every other item gets a full sentence that says what it is and why it matters now. Never list items ("Also ready: X, Y and Z") and never start a sentence with "Also". Group by what reads well together, not by kind.+- `paragraphs`: one or two short paragraphs in rank order, at most {{ max_words }} words in total, each a list of segments `{"text", "item_key", "highlight"}`. The first sentence is the top item: what it is and its key number, nothing more. Every other item gets one short sentence that says what to do or the one fact that matters. Two related items may share a sentence. Never list items ("Also ready: X, Y and Z") and never start a sentence with "Also". Group by what reads well together, not by kind.- A linked segment names exactly one item through its `item_key`: a natural phrase of at most {{ max_link_words }} words that starts with a word. Every item is linked exactly once. Only the top item has `highlight` true. Plain text segments have `item_key` null and `highlight` false, and carry their own spaces.- `items`, in rank order:- `key`: `report:<uuid>`, `insight:<short_id>`, `dashboard:<id>`, `alert:<id>`, `ticket:<uuid>`, `issue:<uuid>` or `github_pr:<owner/repo>#<number>`.