Skip to content

ci: install Claude Code plugins in hypershift agent workflows#80294

Open
enxebre wants to merge 1 commit into
openshift:mainfrom
enxebre:install-claude-plugins
Open

ci: install Claude Code plugins in hypershift agent workflows#80294
enxebre wants to merge 1 commit into
openshift:mainfrom
enxebre:install-claude-plugins

Conversation

@enxebre

@enxebre enxebre commented Jun 9, 2026

Copy link
Copy Markdown
Member

Add plugin install commands for ai-helpers utils, golang, and enxebre/ai-scripts git plugin to both the review-agent and jira-agent process steps.

Summary by CodeRabbit

This PR adds tool and plugin installation steps to the HyperShift CI agent workflows. The changes enhance two critical agent scripts in the OpenShift CI infrastructure that handle automated issue and pull request processing:

Modified Files:

  • ci-operator/step-registry/hypershift/jira-agent/process/hypershift-jira-agent-process-commands.sh
  • ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh

Changes:
Both scripts now include initialization steps that install additional dependencies before their main processing logic:

  1. Go tooling: Installs gopls (Go language server) via go install golang.org/x/tools/gopls@latest with appropriate PATH updates
  2. Pre-commit tool: Installs the pre-commit framework via pip
  3. Claude Code plugins: Configures multiple Claude Code plugins using the claude plugin CLI:
    • ai-helpers utilities plugin
    • golang plugin for Go language support
    • enxebre/ai-scripts git plugin for custom scripting capabilities

These installations ensure that the jira-agent and review-agent have access to code analysis tools, language servers, and custom automation scripts needed for their CI tasks.

Impact:
The changes enable the HyperShift CI agents to leverage Go-specific code analysis (via gopls), automated code style checking (via pre-commit), and custom OpenShift automation scripts (via Claude plugins), improving the quality and automation of issue resolution and code review workflows in the HyperShift CI infrastructure.

(+14/-0 per file, Medium code review effort)

Add plugin install commands for ai-helpers utils, golang, and
enxebre/ai-scripts git plugin to both the review-agent and
jira-agent process steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Two HyperShift agent scripts are updated to add prerequisite tool installations. The Jira agent and review agent scripts now install Go language tooling (gopls), Python pre-commit, and Claude Code plugins before executing their respective workflows.

Changes

Tool and Plugin Setup for HyperShift Agents

Layer / File(s) Summary
Jira agent tool and plugin setup
ci-operator/step-registry/hypershift/jira-agent/process/hypershift-jira-agent-process-commands.sh
Adds setup block to install gopls via go install, pre-commit via pip, and multiple Claude Code plugins (ai-helpers, ai-scripts, git) before the main HyperShift Jira workflow executes.
Review agent tool and plugin setup
ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh
Adds startup setup block to install gopls via go install, pre-commit via pip, and Claude Code plugins for OpenShift operations and scripting before repository cloning and configuration steps.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

lgtm, ok-to-test

Suggested reviewers

  • bradmwilliams
  • dgoodwin
🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Claude Code plugin installation to hypershift agent workflows.
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.
Stable And Deterministic Test Names ✅ Passed PR modifies only bash shell scripts for CI/CD tool installation, not Ginkgo tests. Custom check for stable test names is not applicable to non-test shell scripts.
Test Structure And Quality ✅ Passed Custom check for Ginkgo test quality is not applicable to this PR. The PR modifies shell scripts for CI/CD workflows, not Ginkgo test files.
Microshift Test Compatibility ✅ Passed PR modifies CI configuration shell scripts that install tools and plugins, not Ginkgo e2e test files. The check applies only when new e2e tests are added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR modifies shell scripts for CI tool installation, not Ginkgo e2e tests. The SNO compatibility check applies only to new e2e tests and is not applicable here.
Topology-Aware Scheduling Compatibility ✅ Passed PR changes are CI infrastructure shell scripts that install tools and plugins, not deployment manifests, operator code, or controllers. No scheduling constraints are introduced.
Ote Binary Stdout Contract ✅ Passed Modified files are CI shell scripts, not Go OTE binaries. The OTE Stdout Contract applies only to Go binaries with main()/TestMain() entry points.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Check is not applicable. PR modifies shell scripts for CI tool dependencies, not Ginkgo e2e tests. No test code with IPv4/external connectivity assumptions is added.
No-Weak-Crypto ✅ Passed The PR only adds tool installation commands (gopls, pre-commit, Claude plugins) to bash scripts. No cryptographic algorithms, custom crypto implementations, or secret comparisons are introduced.
Container-Privileges ✅ Passed PR only modifies bash scripts (hypershift agent workflows), not container/K8s manifests. Container-privileges check for privileged flags is not applicable.
No-Sensitive-Data-In-Logs ✅ Passed The added lines install tools and plugins via standard package managers and Claude CLI without logging passwords, tokens, API keys, PII, or other sensitive data.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 celebdor and csrwng June 9, 2026 14:27
@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre

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 9, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@enxebre: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-hypershift-main-address-review-comments openshift/hypershift presubmit Registry content changed
pull-ci-openshift-hypershift-release-5.1-address-review-comments openshift/hypershift presubmit Registry content changed
pull-ci-openshift-hypershift-release-5.0-address-review-comments openshift/hypershift presubmit Registry content changed
pull-ci-openshift-hypershift-release-4.23-address-review-comments openshift/hypershift presubmit Registry content changed
pull-ci-openshift-hypershift-release-4.22-address-review-comments openshift/hypershift presubmit Registry content changed
periodic-ci-openshift-hypershift-release-4.22-periodic-review-agent N/A periodic Registry content changed
periodic-ci-openshift-hypershift-main-periodic-jira-agent N/A periodic Registry content changed
periodic-ci-openshift-hypershift-main-periodic-review-agent N/A periodic Registry content changed

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

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

🤖 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
`@ci-operator/step-registry/hypershift/jira-agent/process/hypershift-jira-agent-process-commands.sh`:
- Around line 36-48: Pin all tool and plugin versions to ensure deterministic
CI: replace the floating gopls@latest in the go install call with a specific
module version (e.g., gopls@vX.Y.Z), change pip install pre-commit to pip
install pre-commit==X.Y.Z, and update each claude plugin marketplace add /
claude plugin install invocation to include explicit version identifiers using
the correct claude CLI syntax (e.g., repo@version or --version) for
openshift-eng/ai-helpers, utils@ai-helpers, golang@ai-helpers,
enxebre/ai-scripts and git@enxebre so the install lines in the script are
deterministic and reproducible.

In
`@ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh`:
- Around line 9-21: Pin all tool versions instead of using floating tags: change
the go install invocation that currently uses gopls@latest to a specific
validated version (replace gopls@latest), pin pip install pre-commit to a
specific release (e.g., pre-commit==X.Y.Z), and include explicit version
arguments when adding/installing Claude plugins (replace the marketplace
add/install calls for openshift-eng/ai-helpers, utils@ai-helpers,
golang@ai-helpers, enxebre/ai-scripts, and git@enxebre with the correct CLI
syntax and concrete versions per the claude plugin install --help), leaving the
PATH export unchanged; ensure you use the correct flag (e.g., --version or the
CLI-supported mechanism) for each claude command and document the chosen
versions in the script comment.
🪄 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: 4b7560e1-d888-4cbe-86a0-dd17c7aa08a4

📥 Commits

Reviewing files that changed from the base of the PR and between 30396fc and e031fa5.

📒 Files selected for processing (2)
  • ci-operator/step-registry/hypershift/jira-agent/process/hypershift-jira-agent-process-commands.sh
  • ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh

Comment on lines +36 to +48
# Install tool dependencies
echo "Installing tool dependencies..."
go install golang.org/x/tools/gopls@latest
export PATH="${GOPATH:-$HOME/go}/bin:$PATH"
pip install pre-commit

# Install plugins
echo "Installing Claude Code plugins..."
claude plugin marketplace add openshift-eng/ai-helpers
claude plugin install utils@ai-helpers
claude plugin install golang@ai-helpers
claude plugin marketplace add enxebre/ai-scripts
claude plugin install git@enxebre

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

Pin versions for all installed dependencies.

Installing gopls@latest, pre-commit without a version specifier, and Claude plugins without explicit versions creates non-deterministic CI behavior. If any of these tools release breaking changes, the CI job will fail unpredictably. For reproducible builds, pin all tool versions:

🔒 Proposed fix to pin dependency versions
 # Install tool dependencies
 echo "Installing tool dependencies..."
-go install golang.org/x/tools/gopls@latest
+go install golang.org/x/tools/gopls@v0.16.1
 export PATH="${GOPATH:-$HOME/go}/bin:$PATH"
-pip install pre-commit
+pip install pre-commit==3.8.0
 
 # Install plugins
 echo "Installing Claude Code plugins..."
 claude plugin marketplace add openshift-eng/ai-helpers
-claude plugin install utils@ai-helpers
-claude plugin install golang@ai-helpers
+claude plugin install utils@ai-helpers --version v1.0.0
+claude plugin install golang@ai-helpers --version v1.0.0
 claude plugin marketplace add enxebre/ai-scripts
-claude plugin install git@enxebre
+claude plugin install git@enxebre --version v1.0.0

Note: Replace the example version numbers with the current stable versions that have been validated. Check the actual claude plugin install CLI syntax for version specification—the --version flag shown above is illustrative; consult claude plugin install --help for the correct syntax.

🤖 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
`@ci-operator/step-registry/hypershift/jira-agent/process/hypershift-jira-agent-process-commands.sh`
around lines 36 - 48, Pin all tool and plugin versions to ensure deterministic
CI: replace the floating gopls@latest in the go install call with a specific
module version (e.g., gopls@vX.Y.Z), change pip install pre-commit to pip
install pre-commit==X.Y.Z, and update each claude plugin marketplace add /
claude plugin install invocation to include explicit version identifiers using
the correct claude CLI syntax (e.g., repo@version or --version) for
openshift-eng/ai-helpers, utils@ai-helpers, golang@ai-helpers,
enxebre/ai-scripts and git@enxebre so the install lines in the script are
deterministic and reproducible.

Comment on lines +9 to +21
# Install tool dependencies
echo "Installing tool dependencies..."
go install golang.org/x/tools/gopls@latest
export PATH="${GOPATH:-$HOME/go}/bin:$PATH"
pip install pre-commit

# Install plugins
echo "Installing Claude Code plugins..."
claude plugin marketplace add openshift-eng/ai-helpers
claude plugin install utils@ai-helpers
claude plugin install golang@ai-helpers
claude plugin marketplace add enxebre/ai-scripts
claude plugin install git@enxebre

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

Pin versions for all installed dependencies.

Installing gopls@latest, pre-commit without a version specifier, and Claude plugins without explicit versions creates non-deterministic CI behavior. If any of these tools release breaking changes, the CI job will fail unpredictably. For reproducible builds, pin all tool versions:

🔒 Proposed fix to pin dependency versions
 # Install tool dependencies
 echo "Installing tool dependencies..."
-go install golang.org/x/tools/gopls@latest
+go install golang.org/x/tools/gopls@v0.16.1
 export PATH="${GOPATH:-$HOME/go}/bin:$PATH"
-pip install pre-commit
+pip install pre-commit==3.8.0
 
 # Install plugins
 echo "Installing Claude Code plugins..."
 claude plugin marketplace add openshift-eng/ai-helpers
-claude plugin install utils@ai-helpers
-claude plugin install golang@ai-helpers
+claude plugin install utils@ai-helpers --version v1.0.0
+claude plugin install golang@ai-helpers --version v1.0.0
 claude plugin marketplace add enxebre/ai-scripts
-claude plugin install git@enxebre
+claude plugin install git@enxebre --version v1.0.0

Note: Replace the example version numbers with the current stable versions that have been validated. Check the actual claude plugin install CLI syntax for version specification—the --version flag shown above is illustrative; consult claude plugin install --help for the correct syntax.

🤖 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
`@ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh`
around lines 9 - 21, Pin all tool versions instead of using floating tags:
change the go install invocation that currently uses gopls@latest to a specific
validated version (replace gopls@latest), pin pip install pre-commit to a
specific release (e.g., pre-commit==X.Y.Z), and include explicit version
arguments when adding/installing Claude plugins (replace the marketplace
add/install calls for openshift-eng/ai-helpers, utils@ai-helpers,
golang@ai-helpers, enxebre/ai-scripts, and git@enxebre with the correct CLI
syntax and concrete versions per the claude plugin install --help), leaving the
PATH export unchanged; ensure you use the correct flag (e.g., --version or the
CLI-supported mechanism) for each claude command and document the chosen
versions in the script comment.

@bryan-cox

Copy link
Copy Markdown
Member

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-jira-agent

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@enxebre: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/periodic-ci-openshift-hypershift-main-periodic-jira-agent e031fa5 link unknown /pj-rehearse periodic-ci-openshift-hypershift-main-periodic-jira-agent

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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants