Skip to content

docs(CLAUDE.md): require agents to watch a PR until its review loop closes - #303

Merged
marius-bughiu merged 1 commit into
mainfrom
claude/celerity-pr-review-workflow-7d981d
Jul 25, 2026
Merged

docs(CLAUDE.md): require agents to watch a PR until its review loop closes#303
marius-bughiu merged 1 commit into
mainfrom
claude/celerity-pr-review-workflow-7d981d

Conversation

@marius-bughiu

Copy link
Copy Markdown
Owner

What

Adds a section to CLAUDE.md"After opening a PR: watch it until the review is settled" — making the post-PR review loop an explicit part of an agent session's work rather than an optional extra.

Why

CLAUDE.md already told agents to reply to and resolve review comments, but nothing said they had to stick around for the review to arrive. Copilot reviews every PR here automatically and posts a few minutes after the PR opens, so a session that opened a PR and stopped would routinely leave comments unanswered.

The rule

  1. Wait for the Copilot review to land — poll gh pr view <N> --json reviews,comments,statusCheckRollup and gh api repos/marius-bughiu/Celerity/pulls/<N>/comments, since inline review comments come from a separate endpoint. "No comments" is only a valid conclusion from a check made after the review shows up in reviews, never from a single early poll.
  2. Address every comment under the existing reply-and-resolve rule — fix or push back with reasoning, reference the commit, resolve what you handled, leave a thread open only when the maintainer should decide.
  3. Keep watching after pushing fixes — a push re-triggers Copilot and the new review can raise fresh comments on the just-pushed code. Re-check CI each time too.
  4. Stop only when the loop is quiet and the result is genuinely satisfactory. Copilot suggestions are advice, not orders; an incorrect or scope-inflating suggestion earns a reasoned reply, not a reflexive commit.

The celerity---maintainer scheduled task has been updated in parallel (outside this repo) with the same loop as an explicit step between "open the PR" and "summarize". The other Celerity tasks that open PRs inherit the rule from CLAUDE.md.

Test plan

  • Docs-only change — no source, tests, benchmarks, or dashboard touched.
  • CI matrix green (build/test unaffected by this change).

🤖 Generated with Claude Code

…loses

Opening a PR was treated as the end of the work, so sessions could leave
Copilot review comments sitting unanswered. Add an explicit post-PR
section: wait for the Copilot review to actually land (polling both
`gh pr view --json reviews,comments,statusCheckRollup` and the separate
`pulls/<N>/comments` inline-comment endpoint), address every comment
under the existing reply-and-resolve rule, then loop — a push re-triggers
Copilot and can raise new comments on the just-pushed code.

Stop only when the latest review is clean, CI is green, and the agent has
reviewed its own fixes. Copilot suggestions are advice, not orders: an
incorrect or scope-inflating one earns a reasoned reply rather than a
reflexive commit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 08:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an explicit “post-PR” workflow to CLAUDE.md, making it clear that agent sessions must wait for GitHub Copilot’s automated review, address all review feedback, and continue iterating until the PR is actually settled.

Changes:

  • Document a required “watch the PR until the review loop closes” process after opening a PR.
  • Provide concrete polling commands for both PR reviews and inline review comments endpoints.
  • Clarify stop conditions (latest review addressed, CI green, and the agent has reviewed its own fixes).

@marius-bughiu
marius-bughiu merged commit c069b12 into main Jul 25, 2026
7 checks passed
@marius-bughiu
marius-bughiu deleted the claude/celerity-pr-review-workflow-7d981d branch July 25, 2026 14:11
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.

2 participants