docs(CLAUDE.md): require agents to watch a PR until its review loop closes - #303
Merged
Merged
Conversation
…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>
Contributor
There was a problem hiding this comment.
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.mdalready 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
gh pr view <N> --json reviews,comments,statusCheckRollupandgh 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 inreviews, never from a single early poll.The
celerity---maintainerscheduled 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 fromCLAUDE.md.Test plan
🤖 Generated with Claude Code