Skip to content

NO-JIRA: Add improve-ai-quality skill for dashboard#8688

Draft
bryan-cox wants to merge 1 commit into
openshift:mainfrom
bryan-cox:improve-ai-quality-skill
Draft

NO-JIRA: Add improve-ai-quality skill for dashboard#8688
bryan-cox wants to merge 1 commit into
openshift:mainfrom
bryan-cox:improve-ai-quality-skill

Conversation

@bryan-cox
Copy link
Copy Markdown
Member

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

What this PR does / why we need it:

Adds a Claude Code skill (improve-ai-quality) to the jira-agent-dashboard
that closes the feedback loop between human reviewers and the AI automation
(jira-solve / address-review-comments).

The skill:

  1. Fetches classified review comments from the dashboard API
  2. Groups by topic/severity and identifies recurring patterns
  3. Maps patterns to specific files in hypershift and ai-helpers repos
  4. Opens draft PRs with evidence-backed reasoning for each proposed change

Each PR it opens must include verbatim reviewer quotes and clear reasoning
connecting the comment pattern to the proposed fix, so reviewers can verify
the changes make sense.

Success metric: fewer review comments per PR over time.

Which issue(s) this PR fixes:

N/A — new skill for the JIRA Agent Dashboard

Special notes for your reviewer:

This is a skill definition only (a markdown file). No Go code, no deployed
infrastructure changes. The skill will be invoked manually or via a future
CronJob.

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive skill documentation covering operational steps, success metrics, required access, target update scope, CLI arguments, example invocations, and the expected reporting format.
  • New Features
    • Added a CLI script to fetch and summarize dashboard review comments for a date range, detect available endpoints, emit summary metrics and per-comment truncated output, and write a structured JSON report.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot
Copy link
Copy Markdown

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

Details

In response to this:

What this PR does / why we need it:

Adds a Claude Code skill (improve-ai-quality) to the jira-agent-dashboard
that closes the feedback loop between human reviewers and the AI automation
(jira-solve / address-review-comments).

The skill:

  1. Fetches classified review comments from the dashboard API
  2. Groups by topic/severity and identifies recurring patterns
  3. Maps patterns to specific files in hypershift and ai-helpers repos
  4. Opens draft PRs with evidence-backed reasoning for each proposed change

Each PR it opens must include verbatim reviewer quotes and clear reasoning
connecting the comment pattern to the proposed fix, so reviewers can verify
the changes make sense.

Success metric: fewer review comments per PR over time.

Which issue(s) this PR fixes:

N/A — new skill for the JIRA Agent Dashboard

Special notes for your reviewer:

This is a skill definition only (a markdown file). No Go code, no deployed
infrastructure changes. The skill will be invoked manually or via a future
CronJob.

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Generated with Claude Code

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 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
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 5, 2026

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
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 5, 2026

Please specify an area label

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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 5, 2026

📝 Walkthrough

Walkthrough

This PR introduces a skill definition for the jira-agent-dashboard workflow that documents the "improve-ai-quality" Claude skill. The file specifies the skill's purpose, environment connectivity, target repositories, and a detailed 7-step operational flow: collecting classified comment summaries from the dashboard API; analyzing and prioritizing patterns; mapping to relevant code areas; cloning target repos; implementing scoped improvements; opening PRs with structured body requirements; and reporting findings. It also documents required CLI arguments and example command invocations.


Important

Pre-merge checks failed

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

❌ Failed checks (1 error)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error Line 15 of fetch-comments.sh logs BASE_URL which contains developer-specific hostname "brcox.hypershift.devcluster.openshift.com" - sensitive internal infrastructure data exposed in logs. Remove BASE_URL from log on line 15. Log only dates. Use environment variable for the fallback URL to avoid hardcoding internal hostnames.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding a new improve-ai-quality skill for the dashboard, with NO-JIRA indicating no associated issue.
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.
Stable And Deterministic Test Names ✅ Passed PR contains only markdown documentation and bash script; no Go test files or Ginkgo tests exist that need validation for stable test names.
Test Structure And Quality ✅ Passed PR adds only documentation (SKILL.md) and bash script (fetch-comments.sh), no Ginkgo tests. Check for test quality doesn't apply to this PR.
Topology-Aware Scheduling Compatibility ✅ Passed PR adds documentation and a bash utility script only. No deployment manifests, operator code, or Kubernetes controllers present. Topology-aware scheduling check is not applicable.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR adds only a Markdown skill documentation file (SKILL.md) and a Bash script (fetch-comments.sh), not Ginkgo e2e tests. The check applies only to new Ginkgo e2e tests, so it is not applicable here.
No-Weak-Crypto ✅ Passed The PR adds only documentation and a bash script that fetches data via curl and jq. No weak crypto algorithms, custom crypto implementations, or non-constant-time secret comparisons are present.
Container-Privileges ✅ Passed PR adds documentation (SKILL.md) and bash script (fetch-comments.sh) with no K8s manifests or container privilege configurations.
✨ 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
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 5, 2026

[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
Copy link
Copy Markdown
Contributor

@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: 1

🧹 Nitpick comments (2)
jira-agent-dashboard/.claude/skills/improve-ai-quality/SKILL.md (2)

32-34: 💤 Low value

Add language identifier to code block.

Markdown linters prefer explicit language identifiers on fenced code blocks for better syntax highlighting and tooling support.

📝 Proposed fix
-```
+```http
 http://dashboard.jira-agent-dashboard.svc.cluster.local:8080

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

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

In @jira-agent-dashboard/.claude/skills/improve-ai-quality/SKILL.md around lines
32 - 34, The fenced code block containing the URL in SKILL.md lacks a language
identifier; update the block delimiter to include a language (e.g., add "http"
after the opening backticks) so the snippet reads as a fenced code block with a
language identifier for the URL shown in the diff (the block currently
containing "http://dashboard.jira-agent-dashboard.svc.cluster.local:8080").


</details>

---

`252-254`: _💤 Low value_

**Add language identifiers to command example code blocks.**

Markdown linters prefer explicit language identifiers on fenced code blocks for better syntax highlighting and tooling support.



<details>
<summary>📝 Proposed fix</summary>

```diff
-```
+```bash
 /improve-ai-quality 2026-05-01 2026-06-01

Or for the default last-7-days window:
- +bash
/improve-ai-quality

Also applies to: 257-259

🤖 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 `@jira-agent-dashboard/.claude/skills/improve-ai-quality/SKILL.md` around lines
252 - 254, The fenced code blocks showing the slash command examples (e.g., the
block containing "/improve-ai-quality 2026-05-01 2026-06-01" and the other block
for the default "/improve-ai-quality") lack language identifiers; update those
fenced code blocks to include "bash" (i.e., change the opening ``` to ```bash)
so markdown linters and syntax highlighters recognize them—apply this change for
the example at the shown block and the other occurrence referenced around lines
257-259.
🤖 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 `@jira-agent-dashboard/.claude/skills/improve-ai-quality/SKILL.md`:
- Line 187: The heredoc is quoted as <<'EOF' which prevents shell variable
expansion; change the heredoc opener used with --body "$(cat <<'EOF'" to an
unquoted marker (e.g., <<EOF) so variables like ${FROM}, ${TO}, ${COUNT}, and
${ACTIONABLE} are expanded into the PR body; update the heredoc opener in the
command that constructs the --body (the cat <<'EOF' invocation) and leave the
closing EOF unchanged.

---

Nitpick comments:
In `@jira-agent-dashboard/.claude/skills/improve-ai-quality/SKILL.md`:
- Around line 32-34: The fenced code block containing the URL in SKILL.md lacks
a language identifier; update the block delimiter to include a language (e.g.,
add "http" after the opening backticks) so the snippet reads as a fenced code
block with a language identifier for the URL shown in the diff (the block
currently containing
"http://dashboard.jira-agent-dashboard.svc.cluster.local:8080").
- Around line 252-254: The fenced code blocks showing the slash command examples
(e.g., the block containing "/improve-ai-quality 2026-05-01 2026-06-01" and the
other block for the default "/improve-ai-quality") lack language identifiers;
update those fenced code blocks to include "bash" (i.e., change the opening ```
to ```bash) so markdown linters and syntax highlighters recognize them—apply
this change for the example at the shown block and the other occurrence
referenced around lines 257-259.
🪄 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), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 374628df-fd3c-43d3-bbf8-b3f897cda24c

📥 Commits

Reviewing files that changed from the base of the PR and between f13c62d and a6073a4.

📒 Files selected for processing (1)
  • jira-agent-dashboard/.claude/skills/improve-ai-quality/SKILL.md


gh pr create --base main \
--title "NO-JIRA: Improve AI skill quality based on review comment analysis" \
--body "$(cat <<'EOF'
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 | 🔴 Critical | ⚡ Quick win

Fix heredoc quoting to enable variable expansion.

The heredoc uses <<'EOF' with single quotes, which prevents shell variable expansion. Variables like ${FROM}, ${TO}, ${COUNT}, and ${ACTIONABLE} on lines 195, 196 will appear literally in the PR body instead of being substituted with their values.

🐛 Proposed fix
-  --body "$(cat <<'EOF'
+  --body "$(cat <<EOF
 ## Summary
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
--body "$(cat <<'EOF'
--body "$(cat <<EOF
🤖 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 `@jira-agent-dashboard/.claude/skills/improve-ai-quality/SKILL.md` at line 187,
The heredoc is quoted as <<'EOF' which prevents shell variable expansion; change
the heredoc opener used with --body "$(cat <<'EOF'" to an unquoted marker (e.g.,
<<EOF) so variables like ${FROM}, ${TO}, ${COUNT}, and ${ACTIONABLE} are
expanded into the PR body; update the heredoc opener in the command that
constructs the --body (the cat <<'EOF' invocation) and leave the closing EOF
unchanged.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.43%. Comparing base (f13c62d) to head (0af4d80).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8688   +/-   ##
=======================================
  Coverage   41.43%   41.43%           
=======================================
  Files         756      756           
  Lines       93647    93647           
=======================================
  Hits        38802    38802           
  Misses      52124    52124           
  Partials     2721     2721           
Flag Coverage Δ
cmd-support 34.87% <ø> (ø)
cpo-hostedcontrolplane 43.50% <ø> (ø)
cpo-other 42.74% <ø> (ø)
hypershift-operator 51.57% <ø> (ø)
other 31.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Adds a Claude Code skill that analyzes classified review comments from
the JIRA Agent Dashboard, identifies recurring patterns in PR feedback,
and opens PRs to improve the AI skills and repo configuration that
generate those PRs. This closes the feedback loop between human
reviewers and the jira-solve / address-review-comments automation.

The skill fetches comments from the dashboard API, groups by topic and
severity, maps patterns to specific files in hypershift and ai-helpers
repos, and opens draft PRs with evidence-backed reasoning for each
proposed change.

Signed-off-by: Bryan Cox <brcox@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
@bryan-cox bryan-cox force-pushed the improve-ai-quality-skill branch from a6073a4 to 0af4d80 Compare June 5, 2026 19:45
Copy link
Copy Markdown
Contributor

@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: 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
`@jira-agent-dashboard/.claude/skills/improve-ai-quality/scripts/fetch-comments.sh`:
- Around line 8-13: The fallback public dashboard URL is hardcoded into the
BASE_URL assignment; replace the literal personal cluster URL with a
configurable value (e.g., read DASHBOARD_PUBLIC_URL or DASHBOARD_BASE_URL env
var) and fall back to a neutral default or fail loudly if not set. Update the
curl check/else branch that sets BASE_URL so it uses the environment variable
(and optionally a safe default like an empty string or a documented public host)
instead of the developer-specific URL, and ensure any downstream code handles an
unset/empty BASE_URL gracefully.
🪄 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), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 2ffd9c7b-622e-4aea-be96-3fcd80caa51a

📥 Commits

Reviewing files that changed from the base of the PR and between a6073a4 and 0af4d80.

📒 Files selected for processing (2)
  • jira-agent-dashboard/.claude/skills/improve-ai-quality/SKILL.md
  • jira-agent-dashboard/.claude/skills/improve-ai-quality/scripts/fetch-comments.sh

Comment on lines +8 to +13
# In-cluster URL (CronJob) or public route (local dev)
if curl -s --connect-timeout 2 "http://dashboard.jira-agent-dashboard.svc.cluster.local:8080/healthz" >/dev/null 2>&1; then
BASE_URL="http://dashboard.jira-agent-dashboard.svc.cluster.local:8080"
else
BASE_URL="https://dashboard-public-jira-agent-dashboard.apps.jira-agent-scraper.brcox.hypershift.devcluster.openshift.com"
fi
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

Avoid hardcoding a developer-specific public dashboard URL.

At Line 12, the fallback host is tied to a personal/dev cluster domain. That makes this script non-portable and fragile outside that exact environment.

Proposed fix
 # In-cluster URL (CronJob) or public route (local dev)
 if curl -s --connect-timeout 2 "http://dashboard.jira-agent-dashboard.svc.cluster.local:8080/healthz" >/dev/null 2>&1; then
   BASE_URL="http://dashboard.jira-agent-dashboard.svc.cluster.local:8080"
 else
-  BASE_URL="https://dashboard-public-jira-agent-dashboard.apps.jira-agent-scraper.brcox.hypershift.devcluster.openshift.com"
+  BASE_URL="${DASHBOARD_PUBLIC_BASE_URL:-https://dashboard-public-jira-agent-dashboard.apps.<cluster-domain>}"
 fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# In-cluster URL (CronJob) or public route (local dev)
if curl -s --connect-timeout 2 "http://dashboard.jira-agent-dashboard.svc.cluster.local:8080/healthz" >/dev/null 2>&1; then
BASE_URL="http://dashboard.jira-agent-dashboard.svc.cluster.local:8080"
else
BASE_URL="https://dashboard-public-jira-agent-dashboard.apps.jira-agent-scraper.brcox.hypershift.devcluster.openshift.com"
fi
# In-cluster URL (CronJob) or public route (local dev)
if curl -s --connect-timeout 2 "http://dashboard.jira-agent-dashboard.svc.cluster.local:8080/healthz" >/dev/null 2>&1; then
BASE_URL="http://dashboard.jira-agent-dashboard.svc.cluster.local:8080"
else
BASE_URL="${DASHBOARD_PUBLIC_BASE_URL}"
if [ -z "$BASE_URL" ]; then
echo "Error: DASHBOARD_PUBLIC_BASE_URL environment variable not set" >&2
exit 1
fi
fi
🤖 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
`@jira-agent-dashboard/.claude/skills/improve-ai-quality/scripts/fetch-comments.sh`
around lines 8 - 13, The fallback public dashboard URL is hardcoded into the
BASE_URL assignment; replace the literal personal cluster URL with a
configurable value (e.g., read DASHBOARD_PUBLIC_URL or DASHBOARD_BASE_URL env
var) and fall back to a neutral default or fail loudly if not set. Update the
curl check/else branch that sets BASE_URL so it uses the environment variable
(and optionally a safe default like an empty string or a documented public host)
instead of the developer-specific URL, and ensure any downstream code handles an
unset/empty BASE_URL gracefully.

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/needs-area 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.

2 participants