The review-pr skill finds old problems in late review rounds and does not use the earlier review

Open
#45 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@c-w-z is already working on this.

Since Nov 30, 2026.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
46/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
git, github, shell

Research direction

Read .agents/skills/review-pr/SKILL.md and the relevant CONTRIBUTING.md sections, especially Branches and PRs and Commits. Compare the existing steps with the four proposals, including how earlier review findings are fetched and compared against the PR; the issue names the GitHub API endpoints and Git commands to consider. Done means the skill covers scope first, per-commit checks, all instances of each finding, and earlier review status while preserving a fresh search for new problems.

Written by the indexing model from the issue text.

Description

type/feature
Problem to solve

The review of #36 took six rounds. Many findings of the later rounds were in the PR from the first round. The review-pr skill has these gaps:

  1. The skill does not check the scope of the PR. Step 4 checks these sections of CONTRIBUTING.md: Commits, Text for outside readers, Pull requests and Before you commit. It does not check Branches and PRs, which says that one PR holds one group of decisions. In #36, the sixth round found that the PR holds a rule change that its README text does not use, and proposed a separate PR for it (https://github.com/c-w-z/commit-decision-record/pull/36#discussion_r4734857614). The rule change was in the PR from the first round. A split can make other findings invalid, so a late scope finding wastes the work of the earlier rounds.
  2. The skill does not check each commit. Step 1 reads gh pr diff, which shows the complete change of the PR. In #36, findings about the commit structure came in rounds 3, 4 and 5:
  3. A finding names one place only. The author fixes that place, and the same problem stays in other text or comes back in new text. In #36, the first round found that "Only the doc" reads as a limit of one doc for each decision (https://github.com/c-w-z/commit-decision-record/pull/36#discussion_r4732246627). The fifth round found the same problem in a different sentence (https://github.com/c-w-z/commit-decision-record/pull/36#discussion_r4734659433).
  4. A new round does not use the earlier review. Each round runs in a new AI assistant session, so the earlier findings do not affect the reviewer. But the skill does not read the earlier reviews either. So each round reviews the complete PR as new, and reports new Consider findings in text that did not change. A session that keeps the earlier review has the opposite risk: it checks the fixes and stops looking for new problems.
Proposal

Change .agents/skills/review-pr/SKILL.md:

  1. Scope first. In step 4, add Branches and PRs in CONTRIBUTING.md as the first item.
  2. Each commit. In step 1, for a PR, also read each commit with git log -p <base>..<head>. In step 4, check each commit alone against Commits in CONTRIBUTING.md:
    • The commit holds one decision.
    • A move or a rename and a rewrite are in different commits.
    • The commit obeys the rules that are in the branch at that commit.
  3. All instances in one finding. In step 5, for each finding, search the complete change for other instances of the same problem. List all instances in that one finding.
  4. A new section for a PR that has earlier reviews:
    1. Do steps 1 to 6 first. Do not read the earlier reviews before that. Then the earlier findings do not limit the search.
    2. Read the earlier reviews and replies: gh api repos/{owner}/{repo}/pulls/<N>/reviews, gh api repos/{owner}/{repo}/pulls/<N>/comments and gh api repos/{owner}/{repo}/issues/<N>/comments. Take the commit_id of the latest review.
    3. For each earlier finding, check that the fix is done and that the fix adds no new problem.
    4. Keep each new finding in git diff <commit_id>..HEAD. For a new finding in text that did not change, keep it if it is in Act on, and mark it as missed by the earlier round. Move a Consider finding in text that did not change to Noted.
    5. In the report, add the status of each earlier finding.

Cost of item 4.4: a Consider problem in text that did not change gets no fix in the PR. The review rounds then end.

Item 4.4 needs the commit_id of the earlier review in the PR branch. This is true only if the branch is not rewritten during the review, as #42 proposes. If the branch was rewritten, compare with git range-diff in place of git diff.

Version

c3185e8

More information
Dominant language
Shell
Stars
1
Forks
0
Avg merge
6h 59m
Merged PRs (30d)
26

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from c-w-z/commit-decision-record

All issues in c-w-z/commit-decision-record

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.