Skip to content

NO-JIRA: claude: Turn pr-review skill into code-reviewer agent#2245

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
tchap:code-reviewer-agent
Mar 31, 2026
Merged

NO-JIRA: claude: Turn pr-review skill into code-reviewer agent#2245
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
tchap:code-reviewer-agent

Conversation

@tchap
Copy link
Copy Markdown
Contributor

@tchap tchap commented Mar 30, 2026

There is no reason to fill your context window with code review stuff, better to split it into a subagent.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 30, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@tchap: This pull request explicitly references no jira issue.

Details

In response to this:

There is no reason to fill your context window with code review stuff, better to split it into a subagent.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: f5c192ba-adc1-4a8f-9ccd-685570d694d4

📥 Commits

Reviewing files that changed from the base of the PR and between 7b89009 and b7c53a3.

📒 Files selected for processing (4)
  • .claude/agents/code-reviewer.md
  • .claude/commands/pr-review.md
  • .claude/settings.json
  • .claude/skills/pr-review/SKILL.md
💤 Files with no reviewable changes (2)
  • .claude/commands/pr-review.md
  • .claude/skills/pr-review/SKILL.md
✅ Files skipped from review due to trivial changes (2)
  • .claude/settings.json
  • .claude/agents/code-reviewer.md

Walkthrough

Adds a new Claude "code-reviewer" agent configuration and updates agent permissions; also removes an existing pr-review command and its associated skill file. The agent runs automated checks (build/test/verify/tidy and git diff) and performs oc/kubectl-aware code reviews.

Changes

Cohort / File(s) Summary
Agent Configuration
.claude/agents/code-reviewer.md
Added new Claude agent defining a code-reviewer role that runs go mod tidy -diff, make oc, make verify, make test, and performs git-diff-based oc/kubectl-aware code review with structured findings.
Permissions Settings
.claude/settings.json
Added top-level permissions.allow entries permitting execution of Bash(make oc), Bash(make verify), Bash(make test), Bash(go mod tidy -diff), and Bash(git diff:*).
Removed Command
.claude/commands/pr-review.md
Removed the pr-review command metadata/documentation (frontmatter, synopsis, usage and argument specification).
Removed Skill
.claude/skills/pr-review/SKILL.md
Deleted the PR Review skill document that described the previous end-to-end review workflow and guidance (tidy/build/verify/test, code-quality checks, and summary format).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested review from ardaguclu and ingvagabund March 30, 2026 10:40
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
.claude/agents/code-reviewer.md (1)

20-27: “Run in parallel” is ambiguous and may reduce signal quality.

For these heavyweight targets, forcing parallel execution can increase contention and make failures harder to interpret. Consider stating an explicit order (or parallel groups) instead of blanket parallelism.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/agents/code-reviewer.md around lines 20 - 27, The instruction "Run
these commands in parallel" is ambiguous and risky for heavyweight targets;
change the guidance to an explicit order or defined parallel groups instead of
blanket parallelism—for example, run "go mod tidy -diff" first, then "make oc",
and finally run "make verify" and "make test" sequentially (or state them as a
controlled parallel group if needed), updating the text that lists "go mod tidy
-diff", "make oc", "make verify", and "make test" accordingly to reflect the
chosen order/grouping.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/agents/code-reviewer.md:
- Around line 60-64: The summary currently mandates a standalone "Linting
status" but no explicit lint step exists; update the reporting template or CI to
be consistent by either adding a lint job (run the linter and report its
pass/fail) or renaming the field to "Verify/Lint status (from `make verify`)"
and populate it from the existing `make verify` result; ensure the structured
summary output (Build status, Test results, Linting/Verify status, Code quality
observations) uses that single, unambiguous field so consumers know whether
linting was actually executed.
- Around line 29-31: The current known-issue line that broadly ignores failures
under the package string `github.com/openshift/oc/pkg/cli` and the phrase
"kubeconfig error" is too wide; update that sentence to target the specific
failing test and/or error signature instead (e.g., reference the failing test
function name and include a precise error substring or regex like
"kubeconfig.*no such file or directory" or the exact test identifier) so only
that test failure is exempted; edit the line that currently reads "Known Issue:
Test failure in `github.com/openshift/oc/pkg/cli` (kubeconfig error) can be
ignored" to instead name the exact test and error pattern to match.

In @.claude/settings.json:
- Around line 2-8: The permissions allowlist under the "permissions" -> "allow"
array is missing the required Git permission; add "Bash(git diff)" to the allow
list (alongside existing entries like "Bash(make oc)", "Bash(make verify)",
"Bash(make test)", "Bash(go mod tidy -diff)") so the code-reviewer agent can run
its core git diff step referenced in agents/code-reviewer.md; update the "allow"
array in .claude/settings.json accordingly.

---

Nitpick comments:
In @.claude/agents/code-reviewer.md:
- Around line 20-27: The instruction "Run these commands in parallel" is
ambiguous and risky for heavyweight targets; change the guidance to an explicit
order or defined parallel groups instead of blanket parallelism—for example, run
"go mod tidy -diff" first, then "make oc", and finally run "make verify" and
"make test" sequentially (or state them as a controlled parallel group if
needed), updating the text that lists "go mod tidy -diff", "make oc", "make
verify", and "make test" accordingly to reflect the chosen order/grouping.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 5b018651-c1ca-4434-9881-5b148f374481

📥 Commits

Reviewing files that changed from the base of the PR and between c268e49 and 7b89009.

📒 Files selected for processing (2)
  • .claude/agents/code-reviewer.md
  • .claude/settings.json

@tchap
Copy link
Copy Markdown
Contributor Author

tchap commented Mar 30, 2026

I will continue with CodeRabbit review tomorrow.

/retitle WIP: NO-JIRA: claude: Turn pr-review skill into code-reviewer agent

@openshift-ci openshift-ci bot changed the title NO-JIRA: claude: Turn pr-review skill into code-reviewer agent WIP: NO-JIRA: claude: Turn pr-review skill into code-reviewer agent Mar 30, 2026
Copy link
Copy Markdown
Member

@ardaguclu ardaguclu left a comment

Choose a reason for hiding this comment

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

One comment. Also would it make sense updating the README about how this can be used?.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 30, 2026
@tchap tchap marked this pull request as draft March 30, 2026 11:19
@tchap tchap force-pushed the code-reviewer-agent branch from 7b89009 to 132c8a7 Compare March 30, 2026 11:21
@tchap
Copy link
Copy Markdown
Contributor Author

tchap commented Mar 30, 2026

/retitle NO-JIRA: claude: Turn pr-review skill into code-reviewer agent

@openshift-ci openshift-ci bot changed the title WIP: NO-JIRA: claude: Turn pr-review skill into code-reviewer agent NO-JIRA: claude: Turn pr-review skill into code-reviewer agent Mar 30, 2026
@tchap tchap force-pushed the code-reviewer-agent branch from 132c8a7 to e8b034f Compare March 30, 2026 11:33
@tchap tchap force-pushed the code-reviewer-agent branch from e8b034f to 123e80e Compare March 30, 2026 13:21
@ardaguclu
Copy link
Copy Markdown
Member

This PR looks good to me. Maybe it is better to check the reviews from CodeRabbit. Ping me once this is ready to tag.

@tchap tchap force-pushed the code-reviewer-agent branch 3 times, most recently from 4833344 to f426bbd Compare March 30, 2026 13:30
@tchap tchap force-pushed the code-reviewer-agent branch from f426bbd to b7c53a3 Compare March 30, 2026 13:31
@tchap
Copy link
Copy Markdown
Contributor Author

tchap commented Mar 30, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@tchap tchap marked this pull request as ready for review March 30, 2026 15:31
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 30, 2026
@openshift-ci openshift-ci bot requested review from ardaguclu and atiratree March 30, 2026 15:32
@ardaguclu
Copy link
Copy Markdown
Member

That looks great, we are one step closer to agentic sdlc :). Thank you
/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 30, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ardaguclu, tchap

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 30, 2026
@tchap
Copy link
Copy Markdown
Contributor Author

tchap commented Mar 30, 2026

/verified by @tchap

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 30, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@tchap: This PR has been marked as verified by @tchap.

Details

In response to this:

/verified by @tchap

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD bb4c3de and 2 for PR HEAD b7c53a3 in total

@tchap
Copy link
Copy Markdown
Contributor Author

tchap commented Mar 31, 2026

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

@tchap: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 12f8fce into openshift:main Mar 31, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants