Skip to content

Instantly share code, notes, and snippets.

@garbear
Created September 20, 2026 19:07
Show Gist options
  • Select an option

  • Save garbear/b222ef220cdca2ee9cd4d5cc490b9aa4 to your computer and use it in GitHub Desktop.

Select an option

Save garbear/b222ef220cdca2ee9cd4d5cc490b9aa4 to your computer and use it in GitHub Desktop.

Scope

Keep changes focused on the task that was requested.

  • Make the smallest change that fully solves the stated problem.
  • Treat the issue, pull request, or user request as the scope boundary.
  • Do not fix unrelated problems discovered while working on the requested change.
  • Do not expand a bug fix into a refactor unless the refactor is necessary to fix the bug.
  • Do not add speculative hardening for hypothetical scenarios that are outside the stated scope.
  • Do not preserve legacy behavior or compatibility when the task explicitly allows or requires a breaking change.
  • Avoid unrelated cleanup, renaming, formatting, or modernization.
  • If additional work would be valuable but is not required, identify it as follow-up work instead of including it in the current change.

If the implementation grows materially beyond the original task, stop expanding it and report why additional scope appears necessary.

Reviews

Review the change that was requested, not every possible improvement to the surrounding code.

  • Prioritize regressions, correctness problems, build failures, security issues, and behavior that contradicts the stated intent.
  • Distinguish issues introduced by the change from pre-existing issues.
  • Do not require unrelated pre-existing problems to be fixed as part of the review.
  • Do not turn speculative edge cases into blocking findings unless they are reasonably reachable in supported use.
  • Respect intentional breaking changes and explicitly stated compatibility boundaries.
  • Separate blocking findings from optional improvements and follow-up work.
  • Prefer a focused fix over requesting a broader redesign when both correctly solve the stated problem.

A review should reduce risk without unnecessarily increasing the scope of the pull request.

Change size

Large changes have a disproportionately high review and maintenance cost.

  • Prefer small, independently reviewable changes.
  • Do not combine a functional fix, unrelated cleanup, and architectural refactoring in one change.
  • When a substantial refactor or feature is required, establish the architecture and intended scope before generating a large implementation.
  • If implementation reveals that a substantially larger change is necessary, report that before continuing to expand the diff.
  • Do not generate additional abstraction, infrastructure, or compatibility layers without a demonstrated need in the requested change.

Generated code is not free simply because it is easy to produce. Optimize for code that needs to exist and can be reviewed and maintained.

Release stabilization

When working on a release branch or during Beta/RC stabilization, minimize change risk.

  • Prefer targeted fixes over refactoring.
  • Avoid architectural changes, API changes, and unrelated cleanup unless explicitly requested.
  • Do not broaden a release-blocking fix to cover adjacent improvements that can wait for the next development cycle.
  • Keep fixes easy to review, test, and revert.

Before submitting

Review the final diff as a human reviewer would.

  • Remove unrelated changes and formatting churn.
  • Remove code that is not necessary for the requested behavior.
  • Check that tests are proportional to the change and test the intended behavior.
  • Confirm that no speculative edge-case handling substantially expanded the implementation.
  • Confirm that every changed file is necessary for the task.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment