- All playbooks
- Schedule agents to open small cleanup pull requests for review
Schedule agents to open small cleanup pull requests for review
Encode golden principles, then let background agents scan, grade and open targeted refactors.
Company examples
How OpenAI used this technique
Read what OpenAI changed and follow the original sources.
Schedule agents to open small cleanup pull requests for review
OpenAI's agent-first team encodes golden principles in the repository, such as preferring shared utility packages and validating data at its boundaries. On a regular cadence, background agents scan for deviations, update quality grades and open targeted refactoring pull requests, and most of them can be reviewed in under a minute and automerged. This replaced a weekly manual cleanup.
Our team used to spend every Friday (20% of the week) cleaning up “AI slop.” Source
- Use it when
- Cleanup work piles up until it needs a dedicated day.
- Before applying it
- Automerge only changes small enough to review in a minute and covered by required checks.
Company Playbooks
- Read Anthropic’s playbookRun only affected tests
- Read DoorDash’s playbookRun build and test in parallel, sharded across CI agents
- Read Linear’s playbookBenchmark the same job on faster hardware
- Read Mastra’s playbookStarSling runners for the slowest test workflow
- Read OpenAI’s playbookRank CI fixes by the minutes they save
- Read Ramp’s playbookMove a CPU-bound test suite to a faster CPU
- Read Shopify’s playbookLet an agent iterate against one CI metric
- Read Spotify’s playbookBuild arm64 on native arm64 runners
- Read Stripe’s playbookRun only the tests a change can reach
- Read Uber’s playbookBuild the merge-queue speculations most likely to be needed