-
Notifications
You must be signed in to change notification settings - Fork 666
NO-JRIA: Add /bug slash command for comprehensive bug workflow #15752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Adds a new Claude Code slash command that guides through the complete bug reporting and fixing process: investigation, JIRA bug report creation with proper formatting, optional JIRA CLI integration, branch creation, and fix proposal with suggested regression tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
WalkthroughA new documentation file is added at Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this 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/commands/bug.md (1)
17-17: Minor wording improvements from linting analysis. Two small refinements to strengthen clarity:
- Line 17: Replace "short description" with "brief description" for more precise phrasing.
- Line 145: Replace "not practical" with "impractical" for conciseness.
Apply this diff:
-You are a senior engineer helping to document and fix bugs in the OpenShift Console. When the user provides a short description of observed behavior, follow these steps: +You are a senior engineer helping to document and fix bugs in the OpenShift Console. When the user provides a brief description of observed behavior, follow these steps:- - If automated testing is not practical, explain why and suggest manual testing steps instead + - If automated testing is impractical, explain why and suggest manual testing steps insteadAlso applies to: 145-145
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
.claude/commands/bug.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
.claude/commands/bug.md
[style] ~17-~17: Consider using the synonym “brief” (= concise, using a few words, not lasting long) to strengthen your wording.
Context: ...Shift Console. When the user provides a short description of observed behavior, follo...
(QUICK_BRIEF)
[style] ~145-~145: Consider using “impractical” to avoid wordiness.
Context: ...appropriate - If automated testing is not practical, explain why and suggest manual testing...
(NOT_ABLE_PREMIUM)
🪛 markdownlint-cli2 (0.18.1)
.claude/commands/bug.md
70-70: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
103-103: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (2)
.claude/commands/bug.md (2)
1-13: Well-structured usage and context. The sections clearly establish the command's purpose, usage pattern, and project-specific constraints.
15-97: Comprehensive workflow guidance with good structure. The five-step process is logical and detailed, with clear expectations for investigation, bug report creation, and proposed fixes. The regression testing guidance (lines 88–95) is particularly strong, distinguishing between testable and non-testable bugs.
| ### Step 3: Check for Jira CLI | ||
|
|
||
| After writing the bug report, check if the `jira` CLI command is available: | ||
| 1. Run `which jira` to check for the Jira CLI | ||
| 2. If available, offer to create the bug in JIRA using the command: | ||
| ``` | ||
| jira issue create --project OCPBUGS --type Bug --component "Management Console" --summary "<title>" --body "<description>" | ||
| ``` | ||
| 3. If not available, inform the user they'll need to create the issue manually in JIRA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify language identifier for fenced code block. The JIRA CLI command example at line 70 is presented in a fenced code block without a language identifier, which violates MD040 linting rules.
Apply this diff:
1. Run `which jira` to check for the Jira CLI
2. If available, offer to create the bug in JIRA using the command:
- ```
+ ```bash
jira issue create --project OCPBUGS --type Bug --component "Management Console" --summary "<title>" --body "<description>"
- ```
+ ```🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
70-70: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In .claude/commands/bug.md around lines 65 to 73, the fenced code block
containing the JIRA CLI example is missing a language identifier which triggers
MD040; update the block to start with a bash language tag by replacing the
opening "```" with "```bash" (leave the closing "```" as-is) so the code block
is properly fenced as bash.
| ## Output Format | ||
|
|
||
| Present the bug report in a clear, formatted markdown block that can be easily copied to JIRA. Use this structure: | ||
|
|
||
| ``` | ||
| ## [BUG TITLE] | ||
|
|
||
| **Description of problem:** | ||
| [Description] | ||
|
|
||
| **Version-Release number:** | ||
| [Version] | ||
|
|
||
| **How reproducible:** | ||
| [Always/Sometimes/Rarely/Unknown] | ||
|
|
||
| **Steps to Reproduce:** | ||
| 1. [Step 1] | ||
| 2. [Step 2] | ||
| 3. [Step 3] | ||
|
|
||
| **Actual results:** | ||
| [What happens] | ||
|
|
||
| **Expected results:** | ||
| [What should happen] | ||
|
|
||
| **Additional info:** | ||
| [Technical details, code references, etc.] | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify language identifier for fenced code block. The output format template is clear and well-organized, but the fenced code block at line 103 needs a language identifier to comply with markdown linting rules.
Apply this diff to add the language identifier:
-```
+```markdownThis applies to line 103 at the opening of the code block.
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
103-103: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In .claude/commands/bug.md around lines 99 to 128 the fenced code block is
missing a language identifier which fails markdown linting; update the opening
fence at line 103 from ``` to ```markdown so the block is explicitly marked as
markdown and save the file.
| ## Example Interaction | ||
|
|
||
| User: `/bug The namespace selector dropdown shows duplicates` No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Incomplete example interaction—consider expanding or clarifying scope. The Example Interaction section shows only the user's initial command but no AI response or workflow demonstration. This leaves ambiguity about what the output should look like. Either expand this to show the full workflow (investigation findings, bug report in markdown format, branch creation, proposed fix, etc.) or clarify that this is just a usage example rather than a complete interaction model.
Please clarify whether this example should demonstrate the complete workflow described in Steps 1–5, or whether its current incomplete state is intentional.
🏁 Script executed:
#!/bin/bash
# Examine the bug.md file around lines 154-156 with context
cat .claude/commands/bug.md | head -160 | tail -40Length of output: 1895
🏁 Script executed:
#!/bin/bash
# Check total file length and view from line 150 to end
echo "=== Total lines in file ==="
wc -l .claude/commands/bug.md
echo ""
echo "=== Content from line 150 to end of file ==="
tail -n +150 .claude/commands/bug.mdLength of output: 328
Incomplete example interaction—expand to demonstrate full workflow or clarify intent. The Example Interaction section (line 154-155) shows only the user's initial command with no AI response or workflow output. The file ends abruptly without demonstrating the result. Since Steps 1–5 describe a complete workflow (investigation, bug report generation, branch creation, fix proposal), expand this example to show the expected output, or explicitly note that it's only a usage pattern stub.
🤖 Prompt for AI Agents
In .claude/commands/bug.md around lines 154 to 156, the "Example Interaction"
only shows the user's command and ends abruptly; expand it to either (A) provide
a full example conversation that demonstrates the expected workflow — include
the AI's investigation summary, generated bug report, suggested branch
name/commit message, and proposed fix description (matching Steps 1–5), or (B)
explicitly mark the snippet as a usage-pattern stub by adding a one-line note
such as "This is a usage example only; actual AI response will include
investigation, report, branch and fix steps." Pick one approach and update the
file so readers see either a concrete end-to-end example or a clear stub
indicator.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: TheRealJon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@TheRealJon: all tests passed! Full PR test history. Your PR dashboard. 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. |
| - Bug reports should be created in the OCPBUGS JIRA project with the "Management Console" component | ||
| - Bug branches should be created from the main branch (named `main` in OpenShift projects) | ||
| - The codebase uses both frontend (TypeScript/React) and backend (Go) code | ||
| - Bug reports should follow Red Hat's issue reporting standards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we provide more context to claude here? Not sure how this command will have access to RH reporting standards?
|
|
||
| ## Instructions | ||
|
|
||
| You are a senior engineer helping to document and fix bugs in the OpenShift Console. When the user provides a short description of observed behavior, follow these steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we plan to share this command in other repos too? during investigation if found that the bug is actually for another repo can it go to JIRA reference the other repo? Or will it delete the ticket using CLI?
Adds a new Claude Code slash command that guides through the complete bug reporting and fixing process: investigation, JIRA bug report creation with proper formatting, optional JIRA CLI integration, branch creation, and fix proposal with suggested regression tests.
🤖 Generated with Claude Code