'One PR Per Day' Rule Gains Attention as Productivity Metric
The engineering management principle of a "One Pull Request Per Day" rule is gaining renewed attention as a lightweight productivity ritual. Engineer Neil Mitchell described the practice as a way to encourage incremental delivery and a culture of continuous improvement. The rule aims to reduce the friction of merging code and build team momentum without heavy process overhead.
- The "One PR Per Day" rule is a specific application of the broader principle of keeping pull requests small; data analysis across over 50,000 PRs shows that pull requests with 200-400 lines of code have 40% fewer defects than larger ones, and those under 200 lines are approved three times faster. - Critics argue that focusing on PR count can turn it into a "vanity metric," encouraging developers to game the system with trivial changes instead of focusing on impactful work. This has led many organizations to adopt more holistic frameworks like DORA metrics, which measure deployment frequency, lead time, change failure rate, and time to restore service. - The practice is deeply connected to the principle of Continuous Integration, which states that all team members should commit to the mainline at least once a day to prevent long-lived branches and the "solo developer syndrome" where large, complex code drops become difficult to review and integrate. - Neil Mitchell, who popularized the rule, positioned it as a way to grant developers autonomy while ensuring daily, incremental progress that allows for early feedback and course correction before significant time is invested in a potentially flawed direction. - To facilitate the merging of small, incremental changes for larger features, teams often rely on techniques like feature flags, which allow incomplete or unreleased code to be merged into the main production branch without being visible to users. - An alternative to the asynchronous pull request workflow is pair programming, which advocates for two developers working on the same code simultaneously, effectively providing a continuous, real-time review and eliminating the lag time between code completion and merging. - To prevent small, frequent PRs from being bogged down by stylistic debates, engineering teams often enforce automated code formatters and linters like `gofmt` or `eslint` in their continuous integration pipeline, ensuring that human review time is focused on logic and architecture rather than syntax.