Skip to content

NO-JIRA: Improve AI skill quality based on review comment analysis - #531

Closed
bryan-cox wants to merge 1 commit into
openshift-eng:mainfrom
bryan-cox:improve-ai-quality-20260605
Closed

NO-JIRA: Improve AI skill quality based on review comment analysis#531
bryan-cox wants to merge 1 commit into
openshift-eng:mainfrom
bryan-cox:improve-ai-quality-20260605

Conversation

@bryan-cox

@bryan-cox bryan-cox commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Automated analysis of review comments from the JIRA Agent Dashboard
identified recurring patterns in PR feedback. This PR updates jira:solve
and address-reviews skills to address the most common issues.

Analysis Period

2025-01-01 to 2026-06-05 — 78 comments analyzed, 62 actionable
(after filtering nitpick/approval/unclassified)

Changes

Change 1: Anti-patterns for dead code and unrelated changes

File: plugins/jira/commands/solve.md

Pattern: style + process — 15 comments across multiple PRs

Evidence:

"mustParseCRD is dead code — defined but never called anywhere. Remove it."
@bryan-cox, PR openshift/hypershift#8535

"This cosmetic formatting change is completely unrelated to Azure role assignment validation."
@bryan-cox, PR openshift/hypershift#8319

"It looks like the valid character set TODO here wasn't resolved."
@everettraven, PR openshift/hypershift#8211

Reasoning: Added 4 explicit anti-patterns to the forbidden list:
unresolved TODO comments in validation, exported test-only functions,
dead code, and unrelated cosmetic changes.


Change 2: Pre-commit code quality checks

File: plugins/jira/commands/solve.md

Pattern: logic_bug + architecture_design — 28 comments total

Evidence:

"We have been moving away from using the service-ca operator at all."
@bryan-cox, PR openshift/hypershift#7943

"CompareCRDs is exported but only used in tests."
@bryan-cox, PR openshift/hypershift#8535

Reasoning: Added a pre-commit checklist requiring agents to search
for existing patterns, verify test coverage of new exports, check for
dead code, and validate regex character classes before committing.


Change 3: Push verification in solve.md

File: plugins/jira/commands/solve.md

Pattern: process — 5 required_change comments about unpushed code

Evidence:

"I see [comment] but I don't see where you pushed changes for this"
@bryan-cox, PR openshift/hypershift#7836

"[comment] wasn't actually done, nothing was pushed"
@bryan-cox, PR openshift/hypershift#8319

Reasoning: jira:solve claimed work was done but never pushed. Added
explicit push verification step matching what address-reviews already has.


Change 4: Push verification and restructure-commits in address-reviews.md

File: plugins/utils/commands/address-reviews.md

Pattern: process — 4 suggestion comments about commit organization

Evidence:

"can you reorganize the commits please"
@bryan-cox, PR openshift/hypershift#8319

"Use the /restructure-commits command out of the hypershift repo"
@bryan-cox, PR openshift/hypershift#7943

"Can you use the restructure commits skill in this repo to redo the commits please?"
@bryan-cox, PR openshift/hypershift#8106

Reasoning: Reviewers had to ask for commit restructuring across 3
different PRs. Added explicit guidance to use the restructure-commits
skill when requested, and strengthened the push verification guideline.

Test Plan

  • Verify skill markdown files parse correctly
  • Next jira-solve and address-reviews runs should show fewer process and style comments
  • Compare comment counts week-over-week in the dashboard

🤖 Generated with Claude Code via improve-ai-quality skill

Summary by CodeRabbit

  • Documentation
    • Enhanced validation rules for commit creation processes with stricter guidelines.
    • Added branch push verification step to confirm successful remote synchronization before proceeding.
    • Updated operational guidelines to leverage restructuring skills for commit organization tasks.

Analyzed 78 review comments (62 actionable) from 2025-01-01 to 2026-06-05.
Added anti-patterns for dead code, unrelated changes, unresolved TODOs
in validation. Added pre-commit quality checks and push verification to
solve.md. Strengthened push verification and restructure-commits
guidance in address-reviews.md.

Signed-off-by: JIRA Agent <jira-agent@hypershift.dev>
Commit-Message-Assisted-by: Claude (via Claude Code)
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 5, 2026
@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 Jun 5, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@bryan-cox: This pull request explicitly references no jira issue.

Details

In response to this:

Summary

Automated analysis of review comments from the JIRA Agent Dashboard
identified recurring patterns in PR feedback. This PR updates jira:solve
and address-reviews skills to address the most common issues.

Analysis Period

2025-01-01 to 2026-06-05 — 78 comments analyzed, 62 actionable
(after filtering nitpick/approval/unclassified)

Changes

Change 1: Anti-patterns for dead code and unrelated changes

File: plugins/jira/commands/solve.md

Pattern: style + process — 15 comments across multiple PRs

Evidence:

"mustParseCRD is dead code — defined but never called anywhere. Remove it."
@bryan-cox, PR openshift/hypershift#8535

"This cosmetic formatting change is completely unrelated to Azure role assignment validation."
@bryan-cox, PR openshift/hypershift#8319

"It looks like the valid character set TODO here wasn't resolved."
@everettraven, PR openshift/hypershift#8211

Reasoning: Added 4 explicit anti-patterns to the forbidden list:
unresolved TODO comments in validation, exported test-only functions,
dead code, and unrelated cosmetic changes.


Change 2: Pre-commit code quality checks

File: plugins/jira/commands/solve.md

Pattern: logic_bug + architecture_design — 28 comments total

Evidence:

"We have been moving away from using the service-ca operator at all."
@bryan-cox, PR openshift/hypershift#7943

"CompareCRDs is exported but only used in tests."
@bryan-cox, PR openshift/hypershift#8535

Reasoning: Added a pre-commit checklist requiring agents to search
for existing patterns, verify test coverage of new exports, check for
dead code, and validate regex character classes before committing.


Change 3: Push verification in solve.md

File: plugins/jira/commands/solve.md

Pattern: process — 5 required_change comments about unpushed code

Evidence:

"I see [comment] but I don't see where you pushed changes for this"
@bryan-cox, PR openshift/hypershift#7836

"[comment] wasn't actually done, nothing was pushed"
@bryan-cox, PR openshift/hypershift#8319

Reasoning: jira:solve claimed work was done but never pushed. Added
explicit push verification step matching what address-reviews already has.


Change 4: Push verification and restructure-commits in address-reviews.md

File: plugins/utils/commands/address-reviews.md

Pattern: process — 4 suggestion comments about commit organization

Evidence:

"can you reorganize the commits please"
@bryan-cox, PR openshift/hypershift#8319

"Use the /restructure-commits command out of the hypershift repo"
@bryan-cox, PR openshift/hypershift#7943

"Can you use the restructure commits skill in this repo to redo the commits please?"
@bryan-cox, PR openshift/hypershift#8106

Reasoning: Reviewers had to ask for commit restructuring across 3
different PRs. Added explicit guidance to use the restructure-commits
skill when requested, and strengthened the push verification guideline.

Test Plan

  • Verify skill markdown files parse correctly
  • Next jira-solve and address-reviews runs should show fewer process and style comments
  • Compare comment counts week-over-week in the dashboard

🤖 Generated with Claude Code via improve-ai-quality skill

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

openshift-ci Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox

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 Jun 5, 2026
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This PR strengthens operational guidelines across two AI helper commands by adding explicit verification checkpoints and quality validation rules: the jira:solve command now requires code quality checks during commit creation and SHA verification before PR creation, while the address-reviews command requires push verification before status replies and directs commit reorganization requests to dedicated skills.

Changes

Operational Verification Rules

Layer / File(s) Summary
jira:solve Commit Creation and PR Creation verification
plugins/jira/commands/solve.md
Commit Creation guidance expanded with validation checklist (no unresolved TODOs, no test-only exports, dead code removal, cosmetic-only avoidance); PR Creation now requires explicit SHA match verification between local and remote before proceeding.
address-reviews push verification and commit restructuring
plugins/utils/commands/address-reviews.md
Added requirement to verify Step 4 push succeeded before replying that changes were made; added directive to use restructure-commits / restructure-hypershift-commits skills for commit reorganization instead of manual rebasing.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • mrunalp
  • enxebre

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 errors)

Check name Status Explanation Resolution
No Assumed Git Remote Names ❌ Error PR hardcodes "origin" remote name in multiple locations (solve.md lines 23, 136, 153 and address-reviews.md lines 170, 172, 182, 267) without discovering remotes first. Replace hardcoded "origin" with discovered remote variables. Use BASE_REMOTE or equivalent in all git operations (pull, log, rebase, ls-remote, push).
Git Push Safety Rules ❌ Error PR violates Git Push Safety Rules: force-with-lease on line 262 of address-reviews.md; missing user permission before push in both files; hardcoded 'origin' remote assumptions without discovery. Remove --force-with-lease from line 262; add explicit user confirmation before all pushes; discover remotes dynamically (prefer upstream, then origin, then tracking remote) instead of hardcoding 'origin'.
✅ Passed checks (8 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: improving AI skill quality through analysis of review comments, which directly matches the PR's primary objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Real People Names In Style References ✅ Passed No real people names used as style references in modified files; only technical instructions and tool attribution present.
No Untrusted Mcp Servers ✅ Passed PR contains only markdown documentation changes to AI skill commands. No MCP server installations, untrusted npm packages, arbitrary GitHub repositories, or any executable dependency code introduced.
Ai-Helpers Overlap Detection ✅ Passed Two complementary commands in different plugins with <8% similarity: jira:solve (creates PRs) and utils:address-reviews (handles reviews). No concurrent PRs or existing overlaps found.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/utils/commands/address-reviews.md`:
- Around line 289-290: Update Step 4 to stop assuming remotes and disallow
force-pushes: replace any use of "git push --force-with-lease" and any implicit
"origin" assumptions with a discovery step that lists configured remotes and
prompts the user to pick one, require explicit user confirmation before
performing any push, and remove/forbid all force-push variants; keep references
to the restructure skills ("restructure-commits" and
"restructure-hypershift-commits") but ensure they follow the new flow (discover
remotes, request permission, then use a safe non-force push).
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 785db2e8-1d35-4f2b-a385-76263acd3df5

📥 Commits

Reviewing files that changed from the base of the PR and between 7ce876b and 4324e37.

📒 Files selected for processing (2)
  • plugins/jira/commands/solve.md
  • plugins/utils/commands/address-reviews.md

Comment on lines +289 to +290
- **Never claim work is done without verifying the push**: After posting replies that say changes were made, the push in Step 4b MUST succeed and be verified in Step 4c. If the push fails or is skipped, the replies become lies — reviewers will see "Done" but find no code changes. This has been the single most repeated process failure.
- **Use the restructure-commits skill when asked**: When a reviewer requests commit reorganization (e.g., "restructure commits", "reorganize commits"), use the `restructure-commits` or `restructure-hypershift-commits` skill rather than manually rebasing. Reviewers have had to ask for this multiple times across PRs.

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Push-verification guidance conflicts with current push mechanics; align Step 4 with repo safety rules.

These new rules are directionally correct, but the command still relies on git push --force-with-lease and origin-assumed verification in the same workflow. Please update the flow to (1) require explicit user permission before push, (2) remove all force-push variants, and (3) discover remotes before using them.

As per coding guidelines, “NEVER allow force push operations anywhere,” “Commands and skills must NEVER push without explicit user permission,” and “Code should NEVER assume git remote names like 'origin' or 'upstream' without first discovering them.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/utils/commands/address-reviews.md` around lines 289 - 290, Update
Step 4 to stop assuming remotes and disallow force-pushes: replace any use of
"git push --force-with-lease" and any implicit "origin" assumptions with a
discovery step that lists configured remotes and prompts the user to pick one,
require explicit user confirmation before performing any push, and remove/forbid
all force-push variants; keep references to the restructure skills
("restructure-commits" and "restructure-hypershift-commits") but ensure they
follow the new flow (discover remotes, request permission, then use a safe
non-force push).

@stbenjam

stbenjam commented Jun 8, 2026

Copy link
Copy Markdown
Member

For golang would it make sense to run deadcode? It could be an interesting thing to build to have a hook that tells claude before it pushes that it left deadcode around.

@enxebre

enxebre commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

lgtm

@bryan-cox

Copy link
Copy Markdown
Contributor Author

/close

opened this as an experiement. will follow up with an official one.

@openshift-ci openshift-ci Bot closed this Jun 15, 2026
@openshift-ci

openshift-ci Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@bryan-cox: Closed this PR.

Details

In response to this:

/close

opened this as an experiement. will follow up with an official one.

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.

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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants