- All playbooks
- Have an agent prove code is unused, then delete it in reviewed batches
Have an agent prove code is unused, then delete it in reviewed batches
Fan out one deletion pull request per area, with the agent's evidence in each description.
Company examples
How OpenAI used this technique
Read what OpenAI changed and follow the original sources.
Have an agent prove code is unused, then delete it in reviewed batches
OpenAI engineers gave GPT-6 Astra a short prompt to find and clean up dead code, with Slack, the feature-flag platform and other sources allowed as evidence. It looked at past pull requests, Slack threads, project trackers and production profiling tables, and explained its rationale for each deletion. Five engineers ran variations of the prompt across repositories and fanned the code reviews out to the teams with context on each project.
another set of cleanups removed about 400 visual snapshot variants from our test suite Source
- Use it when
- Unused tests, snapshots, images and code add CI time and artifact size.
- Before applying it
- Past incidents came from mistaken removals, so require the agent to cite its evidence for each deletion and send each pull request to the team that owns the code.
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