Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 200 additions & 0 deletions contents/blog/10k-prs-in-a-month.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
---
date: "2026-07-22"
title: "10k PRs in a month? easy!"
author:
- paul-dambra
rootPage: /blog
sidebar: Blog
showTitle: true
hideAnchor: true
category: Engineering
tags:
- AI
- Engineering
---

The north star for internal developer experience at PostHog is "10,000 PRs in a month is easy". As agent workflows accelerate what is possible. We're sharing what we're changing and how we've been able to increase the volume of engineering work and keep delivering reliable systems

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think a "why" here would help, like "we're building for 10K/month so we can support our dev team at any scale" or w/e

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100%... this goes directly to the most likely response from negative folks: "10,000 slop PRs is a meaningless metric". and I agree we should not chase it for chasing's sake

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The north star for internal developer experience at PostHog is "10,000 PRs in a month is easy". As agent workflows accelerate what is possible. We're sharing what we're changing and how we've been able to increase the volume of engineering work and keep delivering reliable systems
The north star for internal developer experience at PostHog is "10,000 PRs in a month is easy". As agent workflows accelerate what is possible. We're sharing what we're changing and how we've been able to increase the volume of engineering work and keep delivering reliable systems. That's not because we think that more PRs is a good thing in and of itself, but because we hire talented, driven people and we're investing in agentic automation. That means that the number of PRs will climb.
If it doesn't... well, then we've made local dev, CI, and validation faster and better. That's a great outcome whatever the reason driving it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about that?


## AI pilled
Comment thread
pauldambra marked this conversation as resolved.

*Covers:*

- No token budget — trust and feedback over process
- Individuals building their own review and PR management tools
- Folk at the edges: 20–40 PRs open, agentic flows managing them
- 20% → 70% of monorepo PRs with agent involvement in 4 months; self-driving ~4% and growing fast

There's no token budget at PostHog. We can see that the world of product engineering is changing rapidly. And we want people to figure out what that means for us... how we make the best use of the new tools and create new tools with them. So we want people to use the right amount of tokens for their work. And we're not going to pretend we know what that amount is right now.

The most important thing being that we're not putting a budget in front of people. In all the things we do at PostHog, we value trust and feedback over process. So if we find we get to the point where we're uncomfortable with someone's spend, we'll dig into that with them and figure out if the spend is reasonable. And what we can learn from that for everyone else.

At the individual level, we have people writing their own review tools and their own PR management tools. We've found that being able to speed up the rate at which we can create PR's doesn't mean we've been able to speed up the rate at which we can deal with PR's.

The folk who are really pushing the limits of what they can achieve have written their own applications. They have maybe 40 prs open at the same time. The only way to make that work is to have agentic loops getting those PRs ready for human attention. Things like keeping up to date with trunk, making sure that ci is passing, making sure that reviews have been acted on

$$$ something about skills and scouts $$$

Over the last 4 months we've moved from around 20% of our monorepo PRs being opened with agent involvement to 70% (that's not PRs with no human involvement :)). Self-driving product is around 4% of our PRs right now but growing very fast.
Comment thread
pauldambra marked this conversation as resolved.

## Local dev

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MattPua

would love to see something more on the actual numbers of PRs open at any given time/per user (not power users per say but average), and how we've changed processes to have that happen (beyond just token spend, like slack bot, etc)

i guess that's a "dev" thing rather than a "ci" thing

i don't imagine we can get historic data for how many open PRs each of us have i can measure it today, and we can ask folk if it has changed for them

why is that a thing to comment on?
the cognitive load of balancing multiple things?

what do you think is making it work or not?

i actually think this is interesting enough to be a follow-up piece!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the more interesting story IMO (CI story is great, dont get me wrong), is the way we are perceiving pRs and how many people are opening and juggling how many tasks at a given time. I think if you asked this a year ago, people might have had one or two PRs at a time, and that was all that they could fit in their context window of their heads. That made sense.

I think for us, because we are trying to be as AI-pilled as possible, we're trying to go really far ahead with the concept of how many PRs is too many, almost. What is that limit? What do we as PostHog do to enable people to even write and open that many PRs to begin with? If you think about it, we're talking about something like more than 20 PRs a person a month. Probably for a lot of orgs, that's a crazy number to think about. Probably what they would care about is: how does that even happen, or what can they do to enable their orgs to make that happen?

I think a lot of teams, from the CI perspective, already are kind of experiencing this problem: how does CI handle the workloads of this many PRs? GitHub is already a prime example ofthat. But I think you have a lot fewer teams, at least engineering teams, that are talking about how they make that culture happen. I think that's going to be the more interesting and unique thing we could talk about that's very PostHog.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i used to start to worry at around 15 open PRs (have always multitasked)

and now i start to worry at about 40


*Covers:*

- Heavy stack vs. agents wanting multiple copies running — macbooks can't keep up
- Skill-driven dev machines: ask your agent to start a dev box, test, record a video
- Cloud runners — for our stack and anybody's
- hogli custom CLI; pushing CI down into local development

The PostHog stack is very heavy for local development. that's always meant that we've needed very powerful dev machines and that was fine up until the point where people want to run multiple copies of the system to test multiple prs their agents are working on. and there's only so much ram and disk you can put into a macbook.

So we're building out literal dev machines. they're skill driven so you just ask your agent to start a dev machine and test the work that you're doing. a prompt like: "start a dev box, run this PR in it, record me a video of the changes that we're making so i can see the output of the test"

We also have a custom CLI we call `hogli`. it advertises a tool so that agents send feedback to our devex team when something is difficult for them. And gives us an easy way to push a bunch of our CI checks down into local development machines.

## CI

*Covers:*

- 10–50% MoM growth in PRs merged; 10,000 PRs/month north star, maybe a September problem
- Scale: 21.6M CI minutes in June — 41 years of compute
- Work not done: flaky test quarantine, merge queues, AST-based test selection (Goldilocks skipping)
- Dogfooding: GitHub data streamed into PostHog, engineering analytics on cost/time/failure

And the next step in the chain is ci we run a phenomenal amount of ci due to it was always a very big ci suite and now we see 10% - 50% month-on-month growth in PRs merged

| Month (2026) | PRs merged |
|---|---|
| January | 521 |
| February | 2,126 |
| March | 2,478 |
| April | 2,785 |
| May | 2,302 |
| June | 4,725 |
| July (projected) | ~5,200 (3,506 through Jul 21) |

We thought that 10,000 PRs in a month was a problem we had until at least December to solve. But getting self-driving running here at PostHog and our engineers getting agent- and skills- pilled means it's maybe a September problem. So the focus another focus of the developer experience team is "10 000 prs in a month is easy" that's our north star for developer experience.

depot, their infrastructure, is handling this incredibly well. In June 2026 we used 21,643,653 minutes of CI time. That's 41 _years_ of CI time in June.

we have to make this gigantically easier for the developers here. so that we can keep the same pace of work the same quality of work or even a increased pace and quality of work

So the work not done becomes super important.

- We're trying out ways of quarantining flaky tests

- We're trying out merge queues to make sure that you know the speed at which we can generate PRss. We're starting to see not having a merge queue be a problem.

- We're going to start looking into building out the AST for the changes that are made so that we can run only tests that could be impacted by the changes being made. At the minute, we still have too many PRs where the change is very contained but the computer can't tell that just from static analysis of paths and we run the whole test suite unnecessarily.

- A lot of investment going into how fast the CI jobs are

- How much were able to skip in CI and that's tricky work because we can't skip too much we have to skip just the right amount it needs to be Goldilocks work not done

- Alongside that we dog food PostHog all the time so we're now streaming github data into PostHog we have engineering analytics set up for ourselves so we can start to look really directly with PostHog AI what workflow jobs cost the most money take the most time fail most frequently really dig into very targeted improvements to see I flow for users that's getting to green on the PR

## Validation

*Covers:*

- A quarter of a million python tests — safety that lets agentic work move fast
- Measuring quality is hard (maybe pointless); fix fast over never break
- PR sizes growing but not hugely (percentile table)
- PR title composition stable, reverts flat — production isn't breaking under the load
- Reliability going up overall

We've always been very keen on automated testing and automated validation. We've got a quarter of a million python tests for our back end largely because know that we can accept your data and know that we can show you your data are super super important. We've always made sure that that's incredibly safe so that we can move fast and still be safe and that's really paying off now because it means we can have agentic driven work and have high confidence in the prs where it's safe to have high confidence.

Measuring quality is a very difficult (maybe pointless) task. We've always been more interested in being able to quickly fix things over avoiding breaking things in the first place. That's not true as much in a CI checks house, where the quality of the code and the safety of the change are much more important. In areas like the UI, how we're presenting information, how we're letting you have access, and how we let you filter things, we've always believed it's much more important that we find out if the change is useful than that we get the change perfect first time.

But we can have some measures of quality to help us see how things are changing

agents are writing bigger PRs but not hugely bigger. partly that is our engineers driving quality,

| Percentile | Start (wk of May 25) | End (wk of Jul 13) | Change |
|---|---|---|---|
| p50 | 120 | 144 | +20% |
| p75 | 398 | 760 | +91% |
| p90 | 1,004 | 1,432 | +43% |
| p99 | 7,718 | 14,023 | +82% |

It's not a great measure of quality to look at line count... but I'd expect that over some arbitrary number of lines. People just stop reviewing and the quality of the change isn't as high.

Then we can look at PR titles, since we use conventional commits to signal the type of work in the PR.

| Prefix | May 2025 (count / share) | Nov 2025 | Jun 2026 |
|---|---|---|---|
| Total PRs/mo (all PRs, not just merged) | 755 | 1,126 | 4,868 |
| fix | 309 / 40.9% | 430 / 38.2% | 1,997 / 41.0% |
| feat | 259 / 34.3% | 397 / 35.3% | 1,782 / 36.6% |
| chore | 154 / 20.4% | 250 / 22.2% | 823 / 16.9% |
| refactor | 15 / 2.0% | 28 / 2.5% | 130 / 2.7% |
| perf | 4 / 0.5% | 5 / 0.4% | 68 / 1.4% |
| revert | 1 / 0.1% | 5 / 0.4% | 9 / 0.2% |

We see that composition is very stable across the last year or so. Importantly reverts as a proportion of PRs is very stable. And we are super eager to revert whenever we see a need to. So, that's a good signal that production is not breaking more under the load of agentic PRs

An aside that reliability of PostHog overall is going up too, $$$some reliability fact here$$$

Comment thread
pauldambra marked this conversation as resolved.
flakey test suites are the biggest problem we face here. $$$ and so we've done $$$

## Review

*Covers:*

- StampHog: $300/month in tokens, auto-approves ~20% of PRs based on safety + familiarity
- ReviewHog: fleet-of-agents thorough review for anything not simple
- Humans review way less, reviews way more effective — focus on understanding, safety, value

@rnegron rnegron Jul 22, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Humans review way less

i am not sure this is true; according to https://us.posthog.com/project/2/dashboard/1860936

Another useful dashboard fyi https://us.posthog.com/project/2/dashboard/1812721

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in the trajectory will be that as PRs grow humans have to review less, and we have to figure out how to make that safe

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Humans review way less, reviews way more effective — focus on understanding, safety, value
- As PRs arrive faster and faster humans simply have to review less, and we have to figure out how to make that safe

- The linting analogy: agents catch logic laziness like linters caught formatting

### StampHog

The next step then is approving the PR we have a tool called StampHog which costs us about 300 dollars in tokens a month. It's an incredibly efficient investment in token for the speed up it gives engineers

What we've done is we've looked at:

- The open history of PRs in PostHog and said "what does a PR look like when it's approved without any further changes?"
- How safe the area of the application is to change
- How familiar with that part of the system the engineer opening the PR is

If StampHog is happy, it approves the PR. It's about 20% of our PRs are being approved that way right now. It's a huge speed increase for engineers who can now deliver small safe steps very quickly

### ReviewHog

We're also building out ReviewHog which will offer as part of self-driving product. It gives us the top-down review by fleet of agents doing really thorough review.

We have the simple PRs that can get just a "let's get this merged." Anything that's not simple then automatically gets ReviewHog running and gets a really thorough agentic review so that by the time you come to actually needing a human review there's very little for the human to do. They can concentrate on the genuinely important stuff

- Do they understand this change
- Does the author understand the change
- Is it safe
- Is it valuable

### It's just linting

You know, 12 months ago, if you had someone telling you that a line should be wrapped at a particular character or not wrapped at a particular character, you would say "hey, I've updated the linter, you can ignore this."

It's just linting. We shouldn't have humans doing linting of code and the same is true now where an agent can be doing a simple review.

You know you've said a string beginning with the character `O` is a good enough test that someone's name is `owen`. Well, it's not. It's gonna match `oscar` and `oliver` and so you need a better test or better code there. An agent can do that way faster, more effectively, and more consistently than a human. Agents will spot that kind of logic problem and laziness.

So in the same way you wouldn't have humans linting code, we now can have a world where humans review code way less. The reviews are way more effective as a result. We're doing a lot of work into what tools we can use in CI and what agentic flows we can use in CI in order to make it really safe to operate at this new increased speed of ten percent month on month.

## What's next

*Covers:*

- Agents testing code in CI: "look at this PR, record a video, assess whether it works"
- Agents escalating to humans — or codifying their testing as playwright tests
- Reducing human work per PR so review volume doesn't become the ceiling

The next horizon after that, which I think is something that has to be solved across the industry and we're really excited to work on, is having agents test as much of the code as possible.

I'm interested in getting to a point where we can run an agent in the CI, give it the prompt to look at the changes, record a video, and assess whether it works or not. We're not in the old world of writing some Playwright code by hand to assess a change and having to run that slow test every time there's a change. We can do a subset of what a human would do:

- Click around in the application
- See if it still works
- See if it does what it claims to do

The agent can escalate "hey I need a human, I don't like it. Either this doesn't make sense to me, I think this needs further thought, it isn't good enough, or doesn't work." The agent can also escalate say "hey, I wrote a Playwright test for this, I didn't just record the video, I also codified that testing because I think it should stay in the application."

All this stuff a human could still do if they choose, but in a world where we're going to be reviewing two or three or four times as many PRs, we have to reduce the amount of work we do per PR. We will hit some ceiling in what we can achieve just because humans are involved and not because the value of the system is better after that. Just because we physically can't spend the time.
Loading