Skip to content

: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.

chore(agents): make PR descriptions stand on their own (#78277)

Raúl Negrón-Oteroaacd035c8a06
diff --git a/.agents/skills/writing-pr-descriptions/SKILL.md b/.agents/skills/writing-pr-descriptions/SKILL.md
index 4e77d0a0e0b0..c1a4f7fa5e5f 100644
--- a/.agents/skills/writing-pr-descriptions/SKILL.md
+++ b/.agents/skills/writing-pr-descriptions/SKILL.md
@@ -3,18 +3,61 @@ name: writing-pr-descriptions
description: >
Shapes a PR body into something a reviewer understands at a glance.
Use ALWAYS before writing or editing a PR description, before `gh pr create` or `gh pr edit --body`, and when asked to improve an existing description.
- Routes each fact to the form that carries it fastest (bullet, table, diagram, screenshot, collapsed block), cuts everything a reviewer does not need, then holds what survives to a checkable shape: one fact per bullet, sentences under 25 words, active voice, no idioms.
- Ends with a self-check the agent runs over its own draft, including the test that the rewrite got shorter.
+ Puts the effect a person sees in the first line and the mechanism under it, routes each remaining fact to the form that carries it fastest (bullet, table, diagram, screenshot, collapsed block), cuts everything a reviewer does not need, then holds what survives to a checkable shape: one fact per bullet, sentences under 25 words, active voice, no idioms.
+ Makes the body stand alone, so a reader who opens no files still knows why the PR is necessary and what it does, sizes the body to the change so a small PR reads as small, and makes every claim either linked to its evidence or labeled as unchecked.
+ Ends with a scan test the agent runs over its own draft, reading only the title and the first line of two sections.
Not for commit messages (see AGENTS.md, "Commit types") or user-facing product copy (see `/writing-user-facing-copy`).
---
# Writing PR descriptions
-A reviewer scans a description in seconds and decides where to spend attention. The body is a scanning surface, not an essay. Everything below serves one goal: a reviewer understands the change without reading twice.
+A reviewer scans a description in seconds and decides where to spend attention.
+The body is a scanning surface, not an essay, and it has to stand without the diff.
+A body that narrates the code, or that would fit any PR equally well, teaches its reader to skip the next one.
-Work in four passes: route, cut, shape, check. Run all four.
+Order decides whether they understand the change at all.
+Form and length only decide how fast.
+So get the order right first, and never buy shape at the cost of it.
-## Pass 1: route each fact to a form
+Work in five passes: lead, route, cut, shape, check. Run all five.
+
+## Pass 1: lead with the effect
+
+The first line is the one line you can count on being read.
+You just spent an hour inside the mechanism, so the mechanism comes out first. Push it down and spend that line on what a person experiences.
+
+- Line 1 of Problem says what is different for a person, and who that person is. Name the surface they were on. Four shapes cover almost every PR:
+ - A fix: what breaks, and for whom.
+ - A feature: what someone could not do, and now can. "The SQL editor lets users join tables, but there is no way to attach a computed field to a table."
+ - A refactor, a chore or an enabling change: who is blocked, what it costs them, or what class of failure it removes. Nobody sees it, but somebody is waiting.
+ - A follow-up or a layer in a stack: what the earlier PR left undone, and what this one adds. Link that PR and assume nobody read it.
+- If line 1 opens with a symbol, a file path, a class, or a setting, you led with the mechanism. Rewrite it.
+- Size the problem in one clause where you know it: how many teams, how often, since when.
+- The mechanism follows, in the order a reviewer has to check it.
+- The first bullet of Changes is the change itself. Renames, regenerated snapshots and comment fixes go last.
+- If one part of the diff is riskier than the rest, name that part and say the rest is mechanical.
+
+Most of the time you already wrote the effect and put it third. Move it up rather than writing a new sentence.
+
+Line 1 can be a bullet or a standalone sentence, whichever reads faster, but one sentence and never a paragraph.
+
+### Worked example
+
+❌ The first three bullets, as written:
+
+> - The canvas runtime posts to the host with `port?.postMessage(...)`, so messages sent before the port exists are silently dropped.
+> - The host delivers the MessagePort only after the artifact iframe's load event, which fires after the app's module scripts ran.
+> - A `ph.query` issued while the app mounts is dropped and rejects 30 s later with "Canvas request timed out".
+
+✅ The same three facts, reversed:
+
+> - A canvas app that queries while it mounts hangs for 30 seconds, then fails with "Canvas request timed out".
+> - The host delivers the MessagePort only after the iframe's load event, which fires after the app's module scripts ran.
+> - `port?.postMessage(...)` drops anything posted before that.
+
+Nothing was added and nothing was cut. The reviewer now knows the stakes before they reach the cause.
+
+## Pass 2: route each fact to a form
Prose is the slowest form on the page. Before writing a sentence, ask what carries the fact faster.
@@ -27,7 +70,7 @@ Prose is the slowest form on the page. Before writing a sentence, ask what carri
| Existing code a reviewer needs to see | A line-range permalink, which GitHub renders as a snippet |
| Test output, logs, long command transcripts | A `<details>` block |
| A behavior change or a risk a reviewer must not miss | `> [!WARNING]` or `> [!NOTE]` |
-| Anything else | Bullets, under the shape rule in pass 3 |
+| Anything else | Bullets, under the shape rule in pass 4 |
No PR needs every form. Reach for one because it makes review faster, never as decoration. An empty section gets one bullet or "None".
@@ -35,6 +78,8 @@ No PR needs every form. Reach for one because it makes review faster, never as d
Upload with `hogli pr:upload-image <file>` and paste the markdown it prints. The first run only warns; re-run with `--yes`. The assets are public forever, so never upload customer data, customer names, secrets, or internal info.
+Touching UI code without a visible change is common, and the mandate has to be dischargeable. When nothing looks different, say so in one line. A reviewer cannot tell that case from a missing screenshot, and silence reads as the second.
+
### Mermaid
Keep diagrams simple. A syntax error renders as an error block. Pick `TD` for tall pipelines, `LR` for wide paths. Mermaid cannot read CSS vars, so use the hex directly, and pair every `fill` with a text `color` so nodes stay legible in GitHub light and dark.
@@ -48,15 +93,27 @@ classDef phGray fill:#e5e7eb,stroke:#c7ccd1,color:#000;
Assign by role (`class NodeA,NodeB phBlue;`): `phBlue` agents and primary paths, `phRed` APIs and external systems, `phYellow` entry and exit, `phGray` data and artifacts. Shape by kind: `{{hexagon}}` agents, `[rect]` steps.
-## Pass 2: cut
+## Pass 3: cut
+
+The body has to stand on its own.
+Do not assume the reviewer reads the diff first, or at all, or in the order you wrote it.
+Many go straight to the code and come back only if the body earned it, so write for a reader who has opened no files.
+
+Keep:
+
+- Why the change is necessary.
+- What it does, at a level that needs no files open.
+- The alternative you rejected, the blast radius, what to watch after it ships, where to look first.
+- What someone arriving from `git blame` in six months needs. They cannot ask you, and the review thread will not tell them.
-One fact per bullet makes prose checkable. It does not make it shorter: a dense paragraph exploded into twelve bullets moves the reviewer's cost rather than removing it.
+Cut the detail the diff carries better: exact values, per-file narration, the mechanics of code a reviewer reads in context anyway.
+The test is not "is this in the diff", because a diff holds every detail and none of the point.
-So cut first, and shape only what survives. A fact earns a line when a reviewer needs it to judge the change, approve it, or know what to watch after it ships.
+One fact per bullet makes prose checkable. It does not make it shorter: a dense paragraph exploded into twelve bullets moves the reviewer's cost rather than removing it. Cut first, and shape only what survives.
Delete:
-- Anything reconstructable from the diff. The reviewer can read the code.
+- Narration of the diff, file by file or line by line.
- Rationale for a choice nobody would question. Keep the reason only where you rejected an obvious alternative.
- Restatements of the title, and summaries of the sections above.
- Process narration. "Then I ran X, then Y" is a fact about your session, not about the change.
@@ -64,26 +121,58 @@ Delete:
- The follow-up sentence in any "here is the reason, and here is why the reason matters" pair.
- Any bullet whose reader you cannot name.
-Budget, as a ceiling and not a target:
+### Size tracks the change
+
+A body that would fit any PR tells a reader nothing about this one. A reader who meets a few learns to skip them all.
+When the diff is six lines, the body has to read as the body of a six-line change.
- A one-file fix: 3 to 6 bullets across the whole body.
- A typical PR: Problem and Changes together fit in about 10 bullets.
+- One line or "None" under every heading that does not apply. That is a complete answer, not a gap.
- Numbers, file paths and identifiers survive cutting. Adjectives and second explanations do not.
-The test: **the body must come out shorter than your first draft.** Pass 4 checks it.
+Small does not mean partial. Three bullets still have to carry why the change is necessary and what it does.
+
+### Claims a reader can check
+
+The description is the only artifact in a PR that nothing validates. The code has CI. This has you, so make every claim cheap to disprove.
+
+This governs claims about the world: what you ran, measured, or saw in production.
+A statement about how the code behaves needs no link, because the reader checks it against the code.
+"The fallback never fires" is the second kind. "One source has failed every run since May" is the first.
+
+- Link the evidence: the failing run, the error tracking issue, a line-range permalink, the dashboard.
+- Delete the claims CI already makes. "24 passed" and "mypy clean" cost a line, cannot be checked from the body, and the checks carry more authority.
+- State what you did not check. "Not run: the database-backed suites, because this sandbox has no database" is the most credible line in most bodies and the cheapest to write.
+- Never claim testing you did not do. One of those found later costs the reader's trust in every description you write afterwards.
+
+### The sections under Changes
+
+Problem and Changes carry the review.
+Everything under them is evidence and provenance, and a reviewer reaches it last or never.
+When the lower half outgrows the upper half, cut the lower half.
+
+- Testing: name the regression each new test catches, under the claim rules above. Transcripts go in a `<details>` block.
+- Agent context: autonomy, tools, skills invoked, and what changed across the session.
+- The reason your design beats the obvious alternative belongs in Changes. A reviewer needs it to review, and nobody scrolls past the changelog checkbox to find it.
-## Pass 3: shape what survives
+The test: **the body must come out shorter than your first draft.** Pass 5 checks it.
+
+## Pass 4: shape what survives
The shape is checkable. Tone is not, which is why this skill does not ask for one.
1. One fact per bullet.
-2. Sentences under 25 words.
-3. Active voice, with a stated subject. Use the passive only where the actor is genuinely unknown or irrelevant.
-4. Simple tenses. No perfect or progressive forms: "the builder took entry 1", not "the builder has been taking entry 1".
-5. The same word for the same thing, every time. Never vary for style.
-6. Keep the articles. "The job downloads the artifact", not "job downloads artifact".
-7. Noun strings of at most three words. "The flag evaluation column codec" becomes "the codec on the flag evaluation column".
-8. No idioms, no figurative language, no jokes.
+2. Front-load the bullet. A scanner sees the first few words, so start with the subject that carries the fact, not the condition it holds under.
+3. Sentences under 25 words.
+4. Active voice, with a stated subject. Use the passive only where the actor is genuinely unknown or irrelevant.
+5. Simple tenses. No perfect or progressive forms: "the builder took entry 1", not "the builder has been taking entry 1".
+6. The same word for the same thing, every time. Never vary for style.
+7. Keep the articles. "The job downloads the artifact", not "job downloads artifact".
+8. Noun strings of at most three words. "The flag evaluation column codec" becomes "the codec on the flag evaluation column".
+9. No idioms, no figurative language, no jokes.
+
+Rule 2 orders the words inside a bullet. Pass 1 orders the bullets. They never conflict: the effect goes first, and the bullet that states it starts with the person it happened to.
A reviewer scans, stops, checks one claim, moves on. A sentence that packs four facts into three clauses makes them hold all four to check any one. Split it.
@@ -97,11 +186,11 @@ This governs prose only. A table cell is not a sentence, and a diagram is not pr
✅ Three bullets, each checkable on its own, 22 words:
-> - In selective mode, `download-artifact` extracts the files flat.
+> - `download-artifact` extracts the files flat in selective mode.
> - The span gets the job key `...:None`.
> - Re-run recovery cannot join on that key.
-The cut removed the glob matching one artifact, which is the mechanism behind "in selective mode" and reachable from the diff. It kept every identifier, and every link in the chain a reviewer has to check.
+The cut removed the glob matching one artifact. That is one level below what a reader needs, and "in selective mode" still names the condition. It kept every identifier, and every link in the chain a reviewer has to check.
Copy the second one. It is shorter, not just flatter.
@@ -113,30 +202,49 @@ Copy the second one. It is shorter, not just flatter.
- Do not hard-wrap at a column width and do not space-align tables. GitHub renders markdown and flows the text.
- Write in first person as the author. When an agent did the work, say so: "I (actually Claude) moved the derivation into one place."
-## Pass 4: check your own draft
+## Pass 5: check your own draft
+
+Run both checks over the body you just wrote, before `gh pr create` or `gh pr edit`. Fix what fails.
+
+### The scan test
-Run this over the body you just wrote, before `gh pr create` or `gh pr edit`. Fix what fails.
+Read only the title, the first line of Problem, and the first bullet of Changes. Cover the rest.
-1. Is the body shorter than your first draft? If it is longer, you split without cutting. Go back to pass 2.
-2. Read each bullet and name the reader who needs it. Delete the ones you cannot.
-3. Read each bullet alone. Does it state one fact? If it states two, split it.
-4. Count the words in the longest sentence. Over 25, split it.
-5. Find every passive sentence. Rewrite it in active voice, unless the actor is genuinely unknown.
-6. Find every noun string longer than three words. Break it with a preposition.
-7. Does the PR change anything a person sees? If yes, is a screenshot in the body?
-8. Does it change a flow or topology? If yes, are the before and after diagrams there?
-9. Is any comparison sitting in prose that belongs in a table?
-10. Is the `## 🤖 Agent context` section filled, listing the skills invoked?
-11. Does the body claim manual testing that did not happen? Delete it.
-12. Does the body name an internal customer, incident, Slack quote, or operational metric? This repo is public. Delete it.
-13. Read the first three bullets only. Do they tell a reviewer what changed and why? If not, reorder.
+1. Do you know what is different now, and for whom?
+2. Do you know what this PR does about it?
+3. Did you get there without a symbol, a file path, or a class name?
+
+A "no" anywhere means the body is ordered for the writer, not the reader. Go back to pass 1. Nothing in the line check can rescue a body that fails here.
+
+### The line check
+
+1. Is the body shorter than your first draft? If it is longer, you split without cutting. Go back to pass 3.
+2. Does the size of the body track the size of the diff? A six-line change under a full-length body reads as filler.
+3. Are Problem and Changes together longer than the sections under them? If not, cut the lower ones.
+4. Read the body with the diff closed. Can you say why the PR exists and what it does? If not, you cut something a reader needs.
+5. Read each bullet and name the reader who needs it. Delete the ones you cannot.
+6. Read each bullet alone. Does it state one fact? If it states two, split it.
+7. Count the words in the longest sentence. Over 25, split it.
+8. Rewrite every passive sentence in active voice, unless the actor is genuinely unknown. Break every noun string longer than three words with a preposition.
+9. Is any fact in the wrong form? A visual change needs a screenshot. A flow change needs before and after diagrams. A comparison needs a table.
+10. Does every claim about what you ran, measured or saw link its evidence, or say it went unchecked? Descriptions of behavior need no link.
+11. Did a `<!-- -->` template comment survive anywhere? That section is unfilled. Fill it or delete it.
+12. Is the `## 🤖 Agent context` section filled, listing the skills invoked?
+13. Does the body claim manual testing that did not happen? Delete it.
+14. Does the body name an internal customer, incident, Slack quote, or operational metric? This repo is public. Delete it.
## Background
-`references/examples.md` runs two merged PRs through all four passes, with a table of what each cut removed and why. Read it when you want the rule applied end to end rather than to one sentence.
+`references/examples.md` runs merged PRs through every pass, with a table of what each cut removed and why. Read it when you want the rules applied end to end rather than to one sentence.
+
+Pass 1 rests on three findings.
+Readers scan before they read: 15 of 19 participants in [NN/g's web writing study](https://www.nngroup.com/articles/concise-scannable-and-objective-how-to-write-for-the-web/) approached unfamiliar text by scanning, and a version that was concise, scannable and front-loaded measured 124% higher usability than the original.
+What a scanner sees is the start of each line, so [the first words](https://www.nngroup.com/articles/first-2-words-a-signal-for-scanning/) decide whether the rest gets read at all.
+And review time goes to understanding the change rather than to finding defects ([Bacchelli and Bird, ICSE 2013](https://sback.it/publications/icse2013.pdf)), which makes handing over that understanding the body's first job.
+[Google's CL description guidance](https://google.github.io/eng-practices/review/developer/cl-descriptions.html) says the same thing, and grounds pass 3 too: the description carries the problem and the reason for this approach, with enough context for a reader who is not in the code.
-Pass 3 adapts a subset of the 53 writing rules in [ASD-STE100 Simplified Technical English](https://www.asd-ste100.org/) (Issue 9, January 2025). The 25-word ceiling is the standard's limit for descriptive text; it caps procedural text at 20, which a PR body rarely contains. Rule 1 is our own: STE writes "one instruction per sentence" for procedures and "one topic per paragraph" for descriptions, and a bullet sits between the two.
+Pass 4 adapts a subset of the 53 writing rules in [ASD-STE100 Simplified Technical English](https://www.asd-ste100.org/) (Issue 9, January 2025). The 25-word ceiling is the standard's limit for descriptive text; it caps procedural text at 20, which a PR body rarely contains. Rules 1 and 2 are our own: STE writes "one instruction per sentence" for procedures and "one topic per paragraph" for descriptions, and a bullet sits between the two, while front-loading comes from the scanning research above.
The other half of the standard, a dictionary of roughly 900 approved words each carrying one meaning, is licensed and deliberately not part of this. Vocabulary stays a judgment call.
-Nothing here is enforced by a check. Pass 4 is the enforcement.
+Nothing here is enforced by a check. Pass 5 is the enforcement.
diff --git a/.agents/skills/writing-pr-descriptions/references/examples.md b/.agents/skills/writing-pr-descriptions/references/examples.md
index 7c5bd10630de..12bdead64440 100644
--- a/.agents/skills/writing-pr-descriptions/references/examples.md
+++ b/.agents/skills/writing-pr-descriptions/references/examples.md
@@ -1,12 +1,54 @@
# Worked examples
-Two merged PRs, as shipped and after all four passes. Read these when the rule in `SKILL.md` is clear but you want to see it applied end to end.
+Three merged PRs, as shipped and after all five passes. Read these when the rule in `SKILL.md` is clear but you want to see it applied end to end.
-Both examples are shorter after the rewrite. That is the point: bullets are how you cut to the facts that matter, not how you restate a paragraph at greater length.
+Example 1 is a reorder: the same facts, in the order a reviewer needs them.
+Examples 2 and 3 are cuts.
+All three come out shorter, because bullets are how you cut to the facts that matter, not how you restate a paragraph at greater length.
+
+The measurements behind these rules live in the PR that introduced them, reachable from `git log` on `SKILL.md`. They are provenance for whoever edits this skill, not instructions for writing a body.
---
-## Example 1: a long causal chain
+## Example 1: the effect was three bullets down
+
+[fix(dashboards): tolerate legacy keys in persisted dashboard filters](https://github.com/PostHog/posthog/pull/78235).
+
+### Problem as shipped, 82 words
+
+```markdown
+- `Dashboard.filters` persists opaquely, and readers rebuild the `extra="forbid"` `DashboardFilter` from it on every tile refresh.
+- One legacy key in the blob (`filter_test_accounts`, top-level `breakdown`) fails that validation and errors every tile on the dashboard.
+- The dashboard UI merges persisted filters into every save, so the app cannot repair a broken blob.
+- A support ticket hit exactly this: a REST client wrote the legacy insight-format key `filter_test_accounts`, and the dashboards stayed broken until the blob is rewritten by hand.
+```
+
+### After pass 1, 71 words
+
+```markdown
+- One legacy key in a dashboard's saved filters errors every tile on that dashboard.
+- The UI merges saved filters into every save, so nobody can repair the blob from the app. It stays broken until someone rewrites it by hand.
+- `Dashboard.filters` persists opaquely, and readers rebuild the `extra="forbid"` `DashboardFilter` from it on every tile refresh.
+- `filter_test_accounts` and a top-level `breakdown` are the keys that fail that validation.
+```
+
+Every fact survived. The reviewer now learns that tiles break and nobody can unbreak them before they learn which class validates what.
+
+### The lower half
+
+As shipped, the two sections a reviewer needs ran 190 words and the two under them ran 224. Three moves fix the ratio:
+
+| Text | From | To |
+| ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | -------------------------------------- |
+| "I considered returning a 400 for unknown keys on write and rejected it: the UI echoes persisted blobs into saves, so that would block saving" | Agent context, last bullet | Changes, as a bullet |
+| "Ran `pytest` on the two touched test files (52 passed), repo-wide `mypy` (clean), and `hogli ci:preflight --fix` (no failures)" | Testing | Deleted. The checks report all three |
+| "The existing PATCH round-trip test in `test_dashboard.py` guards the wiring" | Testing | Deleted. An existing test still passes |
+
+The rejected alternative is the one line a reviewer needs to judge the design. It sat below the changelog checkbox.
+
+---
+
+## Example 2: a long causal chain
[fix(data-warehouse): recognize Neon's pooler rejection of libpq options](https://github.com/PostHog/posthog/pull/77899). Problem and Changes only.
@@ -37,7 +79,7 @@ Match on the prefix `unsupported startup parameter in options` so any setting Ne
The stale comment on the CDC stream reader claimed CDC sources never sit behind a pooler that rejects `options`. They do. Neon's pooler serves the `pg_logical_slot_peek_binary_changes` calls the reader uses just fine, so dropping the two server-side timeouts is the difference between working change capture and none at all. Updated it to say so, and to note that the activity's start-to-close and heartbeat timeouts still bound a stalled peek once the server-side ceiling is gone.
```
-### After the four passes, 197 words
+### After the remaining passes, 197 words
````markdown
## Problem
@@ -73,23 +115,30 @@ ERROR: unsupported startup parameter in options: statement_timeout.
### What the passes did
-Pass 2 cut 100 words:
+Pass 3 cut 100 words:
-| Cut | Why |
-| ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
-| The second line of Neon's error, and the full quoted user-facing message | The reviewer needs the phrasing that breaks the match, not the whole string |
-| `statement_timeout=1800000 -c idle_in_transaction_session_timeout=0` | "Always sends `options`" is the fact. The values are in the diff |
-| "There is nothing they can do to make that message go away, because it isn't describing their problem" | Second half of a reason pair. The bullet above it already says the database is healthy |
-| "Neon's pooler serves the `pg_logical_slot_peek_binary_changes` calls the reader uses just fine" | Supports a claim nobody will dispute |
-| The start-to-close and heartbeat timeout note | Belongs in the code comment it describes, and is there |
+| Cut | Why |
+| ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
+| The second line of Neon's error, and the full quoted user-facing message | The reader needs the phrasing that breaks the match, not the whole string |
+| `statement_timeout=1800000 -c idle_in_transaction_session_timeout=0` | "Always sends `options`" is the fact. The values themselves change nothing for the reader |
+| "There is nothing they can do to make that message go away, because it isn't describing their problem" | Second half of a reason pair. The bullet above it already says the database is healthy |
+| "Neon's pooler serves the `pg_logical_slot_peek_binary_changes` calls the reader uses just fine" | Supports a claim nobody will dispute |
+| The start-to-close and heartbeat timeout note | Belongs in the code comment it describes, and is there |
-Pass 3 split the 76-word failure chain, which was the densest sentence in the description, into the five links a reviewer checks one at a time.
+Pass 4 split the 76-word failure chain, which was the densest sentence in the description, into the five links a reviewer checks one at a time.
-Both fenced blocks survived untouched. Pass 3 governs prose only.
+Both fenced blocks survived untouched. Pass 4 governs prose only.
+
+Pass 1 came later than this rewrite, and the rewrite fails it. The lead is a fact about libpq, while the effect sits in bullets 6 and 8. Cutting did not fix that, and no amount of it would. Open with them instead:
+
+> - Data warehouse syncs from a Neon pooled endpoint have never worked. One source has failed every extraction run since the day it was created.
+> - The user is told to check a database that is reachable and healthy, because the failure classifies as a retryable `connection_failed`.
+
+That first bullet is also the one claim here the claim rules in pass 3 reach. "Never worked" and "every run" are things the author saw, not behavior a reader can check against the code. The bullet owes a link to the run or the error tracking issue behind it. Every other bullet in this example describes behavior and needs none.
---
-## Example 2: two independent reasons in one paragraph
+## Example 3: two independent reasons in one paragraph
[fix(flags): drop custom codecs from flag_evaluations columns](https://github.com/PostHog/posthog/pull/77910). Problem and Changes only.
@@ -107,7 +156,7 @@ Migration 0293 sets the codecs 0292 declared and then removes them with `MODIFY
`posthog/models/flag_evaluations/sql.py` is the shared column template other DDL reads from, so the per-column `CODEC(...)` clauses are stripped there too. The HCL golden/SQL mirrors and the `test_schema.ambr` snapshot are regenerated to match.
```
-### After the four passes, 111 words
+### After the remaining passes, 111 words
```markdown
## Problem
@@ -126,15 +175,19 @@ Migration 0293 sets the codecs 0292 declared and then removes them with `MODIFY
### What the passes did
-Pass 2 cut 79 words:
+Pass 3 cut 79 words:
| Cut | Why |
| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
-| `ZSTD(1)` on Strings, `DoubleDelta, ZSTD(1)` on datetimes | The reviewer reads migration 0292 in the diff |
+| `ZSTD(1)` on Strings, `DoubleDelta, ZSTD(1)` on datetimes | Exact values. The bullet above already says what the codecs were for |
| "That's the wrong call here" | The next two bullets say why. The verdict adds nothing they don't reach on their own |
| "instead of improving anything", "so it isn't earning its keep there either" | Restate the claim already made in the same sentence |
| The three table names, listed in full | "All three tables" is enough. The migration names them |
-Pass 3 separated the two independent reasons the codecs were wrong. They were welded into one paragraph, so a reviewer who wanted to dispute the DoubleDelta argument had to disentangle it from the central-tuning argument first.
+Pass 4 separated the two independent reasons the codecs were wrong. They were welded into one paragraph, so a reviewer who wanted to dispute the DoubleDelta argument had to disentangle it from the central-tuning argument first.
+
+Nobody sees this change, which is the case pass 1 is easiest to skip on. There is still an effect, and it is not "migration 0292 did a thing":
+
+> - The codecs on `flag_evaluations` take those columns out of the cluster's central compression tuning and buy nothing back.
-Pass 4 item 1 is what makes this a rewrite rather than a reformat: the body has to come out shorter. Both examples do: 297 words to 197, and 190 to 111.
+The line check's first item is what makes this a rewrite rather than a reformat: the body has to come out shorter. Both cut examples do, 297 words to 197 and 190 to 111, and the reorder in example 1 came out shorter too.
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 958897fd9275..c7da2593b9a7 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,6 +1,9 @@
+<!-- This has to stand on its own: a reader who opens no files should still know why the PR is necessary and what it does. Length tracks the change, so a small diff gets a few bullets rather than a full-length body, and a section you have nothing for gets one line or "None". -->
+
## Problem
<!-- Who are we building for, what are their needs, why is this important? -->
+<!-- First line: what is different for a person, and who they are. A fix says what breaks; a feature says what someone can now do; a chore says who is blocked. The code path goes underneath. -->
<!-- Does this fix an issue? Uncomment the line below with the issue ID to automatically close it when merged -->
<!-- Closes #ISSUE_ID -->
@@ -18,6 +21,7 @@
<!-- Include automated tests if possible, otherwise describe the manual testing routine. -->
<!-- Agents: do NOT claim manual testing you haven't done. State what the agent wasn't able to do and list only the automated tests you (the agent) actually ran. -->
<!-- Added or changed tests? Name the regression each group catches that no existing test did — if you can't name it, it probably shouldn't be in this PR. https://posthog.com/handbook/engineering/conventions/backend-coding#testing -->
+<!-- Don't recite pass counts for suites CI runs; the checks report those with more authority. Link the evidence instead (run, permalink, error tracking issue), and say what you did not check. Long transcripts go in a <details> block. -->
👉 _Stay up-to-date with [PostHog coding conventions](https://posthog.com/docs/contribute/coding-conventions) for a smoother review._
@@ -46,7 +50,7 @@
<!-- Keep this short: 1-3 short paragraphs or a handful of bullets — not an exhaustive log. Include:
- tools/agent used and link to session. List the agent and tool names used, but do not include tool call results.
- skills invoked: always explicitly call out any repo-provided or public skills (e.g. /django-migrations, /improving-drf-endpoints) that were invoked while producing this PR. This helps reviewers judge where and how the code was shaped by an agent.
- - decisions made along the way (what was tried, rejected, chosen, and why)
+ - decisions made along the way: what changed across the session. The reason the shipped design beats the obvious alternative goes in Changes instead, where a reviewer will actually see it.
- anything else that helps reviewers
Write reviewer-facing prose. Do not paste user prompts verbatim — paraphrase the intent in your own words.
This is the ONLY section that should contain descriptions of what this PR might have looked like before its present final state.
@@ -70,5 +74,5 @@
- Do not add a human Co-authored-by just for the sake of attribution — if no human was involved in the changes, own it as agent-authored.
- Agent-authored PRs always require human review — do not self-merge or auto-approve.
- Do NOT claim manual testing you haven't done.
-- Shape and style: invoke the `/writing-pr-descriptions` skill before writing this body. In short: put each fact in the form that reads fastest (screenshot, diagram, table, bullet), cut what a reviewer doesn't need, then hold what's left to one fact per bullet in under 25 words. A body that got longer as bullets was not cut.
+- Shape and style: invoke the `/writing-pr-descriptions` skill before writing this body. In short: lead with the effect a person sees rather than the code path behind it, make the body stand alone for a reader who opens no files, size it to the change, link evidence rather than asserting what CI already reports, then hold what's left to one fact per bullet in under 25 words. A body that got longer as bullets was not cut.
-->
diff --git a/AGENTS.md b/AGENTS.md
index d5b2f165e07a..26e5492684bd 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -65,7 +65,7 @@ Examples:
**Required:** Before creating any PR, read `.github/pull_request_template.md` and use its exact section structure.
Do not invent a different format.
-**Shape:** invoke `/writing-pr-descriptions` before writing the body. Cut to the facts a reviewer needs, then one fact per bullet, sentences under 25 words, active voice, no idioms. A description that got longer as bullets was not cut.
+**Shape:** invoke `/writing-pr-descriptions` before writing the body. Lead with the effect a person sees rather than the code path behind it, make the body stand alone for a reader who opens no files, and let its size track the change. Then one fact per bullet, sentences under 25 words, active voice, no idioms. A description that got longer as bullets was not cut.
Always fill the `## 🤖 Agent context` section when creating PRs.
NEVER share sensitive information in a PR description. Users may share sensitive data in an agent session, but those should never surface to a PR description, or comments.