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(devex): clarify PR problem statements (#117963)

Adam Bowker0aaa4c8c2773
diff --git a/.agents/skills/writing-pr-descriptions/SKILL.md b/.agents/skills/writing-pr-descriptions/SKILL.md
index a3cea7c9baa8..a07bd29624de 100644
--- a/.agents/skills/writing-pr-descriptions/SKILL.md
+++ b/.agents/skills/writing-pr-descriptions/SKILL.md
@@ -3,8 +3,8 @@ 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.
- 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.
+ Captures the actor's underlying need in Problem without presupposing the solution, puts the visible effect first in Changes 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 the product intent behind the PR 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 over the title and the first lines of Problem and Changes.
Not for commit messages (see AGENTS.md, "Commit types") or user-facing product copy (see `/writing-user-facing-copy`).
---
@@ -37,16 +37,23 @@ gh pr edit <number> --body-file pr-body.md
Carry every image, video, link and ticked box into the new body, under the heading it belongs to, and add the heading when your draft has none.
Replace one only when the change made it wrong, and say in the body that you replaced it.
-## Pass 1: lead with the effect
+## Pass 1: lead with the product intent
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.
+You just spent an hour inside the mechanism, so the mechanism comes out first. Push it down and spend that line on the need that caused the work.
-- 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:
+Problem states the product intent, not the inverse of Changes.
+It names the actor who needs an outcome, the friction they face now, and why that friction matters.
+The actor can differ from the person who uses the new surface.
+The problem must stay true if the author chooses a different solution.
+
+- Line 1 of Problem says who needs a better outcome and what prevents it today. Name the affected workflow or surface. 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 feature: the actor's goal, the current friction, and its cost. Do not define the problem as a missing version of the chosen solution.
- 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.
+ - A follow-up or a layer in a stack: which need the earlier PR left unmet. Link that PR and assume nobody read it.
+- Negating the first Changes bullet does not produce a problem statement. Phrases such as "there is no way", "cannot use X through Y", and "lacks a Y" usually restate the solution.
+- Ask why the capability matters until the answer describes an outcome or cost. Stop before the answer becomes a broad company goal.
- 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.
@@ -55,10 +62,22 @@ You just spent an hour inside the mechanism, so the mechanism comes out first. P
- Say in one line which part of Changes is mechanical. A reviewer cannot otherwise tell a purely internal change from a visible one you described as internal.
- 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.
+Most of the time you already wrote the product intent 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.
+### Solution-shaped problems
+
+❌ The dashboard has no PDF export.
+
+✅ Account managers rebuild weekly dashboard summaries in slides, which delays customer updates.
+
+❌ Integrations cannot call the API through a typed TypeScript client.
+
+✅ Integration authors repeat endpoint discovery and request typing, which slows delivery and lets client behavior drift.
+
+Each good version leaves room for more than one solution. It also tells a reviewer why solving the problem has value.
+
### Worked example
❌ The first three bullets, as written:
@@ -246,9 +265,10 @@ Run both checks over the body you just wrote, before `gh pr create` or `gh pr ed
Read only the title, the first line of Problem, and the first bullet of Changes. Cover the rest.
-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?
+1. Do you know who needs an outcome, what friction they face, and why it matters?
+2. Would the problem stay true if the implementation changed?
+3. Do you know what this PR does about the problem?
+4. 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.
@@ -258,21 +278,22 @@ A "no" anywhere means the body is ordered for the writer, not the reader. Go bac
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 Changes alone. Can you say what a person will now see or do differently, or that nothing user-visible changed? If neither, go back to pass 1.
-6. Read each bullet and name the reader who needs it. Delete the ones you cannot.
-7. Read each bullet alone. Does it state one fact? If it states two, split it.
-8. Count the words in the longest sentence. Over 25, split it.
-9. Rewrite every passive sentence in active voice, unless the actor is genuinely unknown. Break every noun string longer than three words with a preposition.
-10. Does any sentence take its author as the subject? Rewrite it around the change. "I", "me" and "my" appear nowhere.
-11. Does the PR change anything a person sees? Include before-and-after screenshots, or say why nothing looks different.
-12. Did you rewrite an existing body? Every image, video, link and ticked box a person put there still appears.
-13. Does the PR change a flow or topology? Include branded before-and-after diagrams.
-14. Does prose compare several values across the same dimensions? Replace it with a table.
-15. Does every claim about what you ran, measured or saw link its evidence, or say it went unchecked? Descriptions of behavior need no link.
-16. Did a `<!-- -->` template comment survive anywhere? That section is unfilled. Fill it or delete it.
-17. Is the `## 🤖 Agent context` section filled, naming the exact model and listing the skills invoked?
-18. Does the body claim manual testing that did not happen? Delete it.
-19. Does the body name an internal customer, incident, Slack quote, or operational metric? This repo is public. Delete it.
+5. Could you write Problem by negating Changes? If yes, replace the missing capability with the underlying outcome, friction, or cost.
+6. Read Changes alone. Can you say what a person will now see or do differently, or that nothing user-visible changed? If neither, go back to pass 1.
+7. Read each bullet and name the reader who needs it. Delete the ones you cannot.
+8. Read each bullet alone. Does it state one fact? If it states two, split it.
+9. Count the words in the longest sentence. Over 25, split it.
+10. Rewrite every passive sentence in active voice, unless the actor is genuinely unknown. Break every noun string longer than three words with a preposition.
+11. Does any sentence take its author as the subject? Rewrite it around the change. "I", "me" and "my" appear nowhere.
+12. Does the PR change anything a person sees? Include before-and-after screenshots, or say why nothing looks different.
+13. Did you rewrite an existing body? Every image, video, link and ticked box a person put there still appears.
+14. Does the PR change a flow or topology? Include branded before-and-after diagrams.
+15. Does prose compare several values across the same dimensions? Replace it with a table.
+16. Does every claim about what you ran, measured or saw link its evidence, or say it went unchecked? Descriptions of behavior need no link.
+17. Did a `<!-- -->` template comment survive anywhere? That section is unfilled. Fill it or delete it.
+18. Is the `## 🤖 Agent context` section filled, naming the exact model and listing the skills invoked?
+19. Does the body claim manual testing that did not happen? Delete it.
+20. Does the body name an internal customer, incident, Slack quote, or operational metric? This repo is public. Delete it.
## Background
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index c76f97aef5a8..d11c011d0a90 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -2,8 +2,8 @@
## 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. -->
+<!-- State the product intent: who needs a better outcome, what friction they face today, and why it matters. The actor can differ from the person who uses the new surface. -->
+<!-- The problem must stay true if the implementation changes. Do not define it as the absence of the chosen solution, such as "there is no way" or "cannot use X through Y". Put the solution and code path under Changes. -->
<!-- Does this fix an issue? Uncomment the line below with the issue ID to automatically close it when merged -->
<!-- Closes #ISSUE_ID -->
@@ -94,5 +94,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: 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.
+- Shape and style: invoke the `/writing-pr-descriptions` skill before writing this body. In short: state the product intent independently of the chosen solution, then lead Changes 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.
-->