Skip to content
matthewcm.dev

    ↑ ↓ move · ↵ open · tab scopeopen graph →

    Slicing Pull Requests

    Build and split a feature as interface, then core integrations, then helpers, then final integration and tests, with one reviewable PR per slice.

    Seedtended planted 1 min read

    🌱 A rough idea, planted recently. Expect rough edges — it will grow.

    On this page

    Order the work so each slice compiles and reviews on its own: interface first, integration and tests last.

    The sequence

    1. Design and implement the interface: types, contracts, stubs.
    2. Core integrations: the main pieces wired to real dependencies.
    3. Helper methods: the supporting logic.
    4. Final integration and tests: wire it together end to end.

    Split the change into PRs along those lines. Where a slice is still too big, bisect it again. The history stays tidy and each PR is easy to understand on its own.

    Why it works

    When it doesn’t fit

    A genuinely tiny change doesn’t need four PRs. And if the interface is still being discovered, a throwaway spike first is better than freezing a contract you’ll rewrite; slice once you know the shape.

    • #pull-requests
    • #code-review
    • #git
    • #batch-size
    • #ways-of-working

    ↪ Links to (3)