Skip to content

Agents hand a change back for local review instead of opening the PR - #40

Merged
gavinbee merged 1 commit into
mainfrom
39-local-review-before-pr
Aug 8, 2026
Merged

Agents hand a change back for local review instead of opening the PR#40
gavinbee merged 1 commit into
mainfrom
39-local-review-before-pr

Conversation

@gavinbee

@gavinbee gavinbee commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Closes #39

What changes

CONTRIBUTING.md and AGENTS.md both had the agent open the PR and then hand off. That allows a pull request to be opened under the author's name carrying work the author has not read a line of.

The rule is stated as an invariant rather than a procedure, so it covers humans and agents with one sentence:

Nobody opens a pull request carrying work its author hasn't read.

For a human it is nearly free but not empty — reading your own diff before opening is where debug output, stray files, and data or credentials that were never meant to be committed get caught. For an agent the same rule cannot be satisfied without stopping, because the author is somebody else, so the handoff falls out as a consequence rather than as a separate regime.

Structure

  • CONTRIBUTING.md — new step 4 between "Do the work" and "Open a PR". The old step 6 survives as step 7, because do not self-merge is a different handoff from do not open the PR; both are real and they happen at different moments.
  • AGENTS.md §3 — the imperative version, since that file is the distilled summary.

Two things worth a look in review

The questions clause. Both files now say an agent raises open questions with the author rather than in the PR description. This is the failure that prompted the issue: an agent's uncertainty written into a PR reads as though the author is asking their reviewers, sponsoring a question they never asked and handing the agent's decision to collaborators.

The exception is extended. The bulk-mechanical-change exception previously covered agent merging; it now covers agent opening too. Reasoning: twenty PRs each needing individual local review is exactly the round-trip friction the exception exists for. Easy to drop if you would rather keep it narrow — this was flagged as an open point on #39.

Both files had the agent open the PR and then hand off, which allows a pull
request to be opened under the author's name carrying work the author has not
read a line of. A PR is a claim that its author stands behind the change, and
that claim is false if they have not seen it.

Stated as an invariant rather than a procedure, so one rule covers humans and
agents: nobody opens a pull request carrying work its author hasn't read. For
a human it is nearly free but not empty -- reading your own diff is where
debug output, stray files, and data or credentials that were never meant to be
committed get caught. For an agent the same rule cannot be satisfied without
stopping, because the author is somebody else.

Also states that an agent raises open questions with the author rather than in
the PR description. A question written into a PR reads as though the author is
asking their reviewers: it sponsors a question they never asked and hands the
agent's decision to their collaborators. This is the failure that prompted the
rule.

The pre-merge handoff stays as its own step, since "do not self-merge" is a
different handoff from "do not open the PR". The bulk-mechanical-change
exception is extended to cover opening as well as merging, on the grounds that
twenty PRs needing individual local review is the same friction the exception
already exists for.

Closes #39

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates SwimBlocks contributor/agent workflow guidance to ensure pull requests are only opened after the PR author has personally reviewed the diff, with explicit agent handoff rules that occur before PR creation.

Changes:

  • Inserts a new pre-PR step requiring the author to read git diff main... before opening a PR, and defines the agent consequence (push branch + summarize + wait).
  • Clarifies that open questions should be raised with the author during handoff rather than placed into the PR description.
  • Extends the “large mechanical changes” exception to allow agent-opened PRs (by prior agreement), not just agent-merged PRs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
CONTRIBUTING.md Adds a “read before PR” invariant step, reorders handoff steps, and updates the mechanical-change exception wording.
AGENTS.md Replaces “agent opens PR then hands off” with “hand off for local review before PR,” plus guidance on where to raise questions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@gavinbee
gavinbee merged commit 3d54d45 into main Aug 8, 2026
2 checks passed
@gavinbee
gavinbee deleted the 39-local-review-before-pr branch August 8, 2026 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agents should hand a change back for local review instead of opening the PR

2 participants