- All playbooks
- Check out only the gate’s script
Check out only the gate’s script
Give a small aggregation job a sparse checkout of the files it reads.
Company examples
How Stripe used this technique
Read what Stripe changed and follow the original sources.
Check out only the gate’s script
Sorbet’s all-succeeded job switched to a sparse checkout of its CI scripts directory, on an agent that already had the sparse-checkout plugin installed. On GitHub Actions the equivalent is actions/checkout with sparse-checkout listing every script and local action the gate reads.
Before the change the step took 27 seconds, 25 of them cloning the repository. Source
- Use it when
- A small aggregation job spends most of its time cloning unrelated source.
- Before applying it
- Include every transitive script and local action in the sparse set, and keep the gate’s complete success logic.
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