Skip to content

Conversation

@TheRealJon
Copy link
Member

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

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]>
@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

Walkthrough

A new documentation file is added at .claude/commands/bug.md that outlines the workflow, instructions, and formatting guidelines for the /bug command, including investigation steps, bug report structure, and usage examples for senior engineers.

Changes

Cohort / File(s) Change Summary
Bug Command Documentation
\.claude/commands/bug\.md
New documentation file defining the /bug command workflow, including context, usage instructions, multi-step investigation process, bug report template structure, Jira CLI integration checks, and examples for comprehensive bug reporting

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single documentation file addition with no code or logic changes
  • Straightforward content review for accuracy and clarity
  • No structural or functional impact on codebase
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Copy link

@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/commands/bug.md (1)

17-17: Minor wording improvements from linting analysis. Two small refinements to strengthen clarity:

  1. Line 17: Replace "short description" with "brief description" for more precise phrasing.
  2. 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 instead

Also 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

📥 Commits

Reviewing files that changed from the base of the PR and between 86c7b34 and 4a75e03.

📒 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.

Comment on lines +65 to +73
### 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
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines +99 to +128
## 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.]
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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:

-```
+```markdown

This 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.

Comment on lines +154 to +156
## Example Interaction

User: `/bug The namespace selector dropdown shows duplicates` No newline at end of file
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 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 -40

Length 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.md

Length 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.

@openshift-ci openshift-ci bot requested review from jhadvig and rhamilto November 20, 2025 21:06
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 20, 2025

[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 /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 Nov 20, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 20, 2025

@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
Copy link
Member

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:
Copy link
Member

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?

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