jira: add ready-to-solve command for validating issue readiness - #429
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
WalkthroughAdds a new Jira command Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Cmd as "Command\n/jira:ready-to-solve"
participant Jira as "Jira API"
participant Script as "check_sections.py"
participant AI as "AI Assessor"
participant Labeler as "Label Applier"
User->>Cmd: invoke with <jira-issue-key> [--dry-run|--verbose|--fix]
Cmd->>Jira: fetch issue fields (description, summary, labels, status, issuetype)
Jira-->>Cmd: return issue fields
Cmd->>Script: send description JSON for deterministic checks
Script-->>Cmd: deterministic results (checks, stats, overall_pass)
Cmd->>AI: request qualitative assessments (AC, context, success/failure)
AI-->>Cmd: qualitative PASS/FAIL/WARNING verdicts
Cmd->>Cmd: aggregate deterministic + AI verdicts -> overall_pass
alt overall_pass == true
Cmd->>Labeler: apply `ready-to-solve` (unless --dry-run)
else overall_pass == false
alt --fix provided
Cmd->>Cmd: generate proposed description edits
Cmd->>User: show proposed diff
User-->>Cmd: approve/decline
alt approved
Cmd->>Jira: update issue description
Cmd->>Script: re-run deterministic checks
end
else
Cmd->>Labeler: apply `not-ready-to-solve` (unless --dry-run)
end
end
Labeler->>Jira: update labels (if not dry-run)
Jira-->>Labeler: confirm label update
Cmd->>User: output structured readiness report
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 9 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (9 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@plugins/jira/skills/ready-to-solve/check_sections.py`:
- Line 43: The type hints use Python 3.9+ syntax (e.g., list[str], tuple[bool,
str], re.Pattern); update them for Python 3.8 compatibility by importing List,
Tuple, and Pattern from typing and replacing annotations accordingly (e.g.,
change build_heading_regex(headings: list[str]) -> re.Pattern to
build_heading_regex(headings: List[str]) -> Pattern) and similarly update any
functions using tuple[bool, str] to Tuple[bool, str]; ensure the typing imports
are added at top of the module.
In `@plugins/jira/skills/ready-to-solve/SKILL.md`:
- Around line 42-44: Change the Phase 1 Jira fetch URL in SKILL.md so it uses
the same Jira instance as the later update step: replace the host
"issues.redhat.com" with "redhat.atlassian.net" in the curl request that
retrieves issue fields (the curl line that queries
/rest/api/2/issue/{issue_key}?fields=description,summary,labels,status,issuetype)
so read and write operations use a consistent Jira base URL.
🪄 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: Pro Plus
Run ID: 217a614b-9d5e-417b-ad1a-68b497eea2cd
📒 Files selected for processing (7)
.claude-plugin/marketplace.jsonPLUGINS.mddocs/data.jsonplugins/jira/.claude-plugin/plugin.jsonplugins/jira/commands/ready-to-solve.mdplugins/jira/skills/ready-to-solve/SKILL.mdplugins/jira/skills/ready-to-solve/check_sections.py
3c9879e to
a8c5eb2
Compare
Add /jira:ready-to-solve command that checks whether a Jira issue is well-groomed enough for /jira:solve to produce a quality solution. Runs a two-phase validation: - Deterministic checks via a Python script (required sections exist, have adequate content, proper structure) - AI qualitative assessment (AC specificity, implementation context, clear success/failure conditions) Supports --dry-run, --verbose, and --fix flags. The --fix flag generates a revised description for failing sections and asks for confirmation before updating the issue. On pass adds the Jira label ready-to-solve, on fail adds not-ready-to-solve. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
a8c5eb2 to
f43ba33
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
plugins/jira/skills/ready-to-solve/SKILL.md (1)
42-44:⚠️ Potential issue | 🟡 MinorUse consistent Jira instance URL across operations.
Line 43 uses
issues.redhat.comfor the fetch operation, while line 143 usesredhat.atlassian.netfor the update operation. The codebase consistently usesredhat.atlassian.netfor API operations. Align the fetch URL to match:🔧 Proposed fix
curl -s -H "Authorization: Bearer $JIRA_PERSONAL_TOKEN" \ - "https://issues.redhat.com/rest/api/2/issue/{issue_key}?fields=description,summary,labels,status,issuetype" + "https://redhat.atlassian.net/rest/api/2/issue/{issue_key}?fields=description,summary,labels,status,issuetype"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/jira/skills/ready-to-solve/SKILL.md` around lines 42 - 44, The fetch curl in SKILL.md uses the wrong Jira host; update the URL in the curl command that retrieves issue fields (the line with curl -s -H "Authorization: Bearer $JIRA_PERSONAL_TOKEN" "https://issues.redhat.com/rest/api/2/issue/{issue_key}?fields=description,summary,labels,status,issuetype") to use the same host as the update operation (redhat.atlassian.net) so all Jira API calls are consistent.
🧹 Nitpick comments (3)
plugins/jira/skills/ready-to-solve/SKILL.md (2)
124-126: Improve readability by varying sentence structure.Three consecutive bullet points begin with "AI qualitative failures". Consider restructuring for better readability:
✍️ Suggested rewording
- - **AI qualitative failures (vague AC)**: Rewrite vague criteria to be specific and testable (e.g., "works properly" becomes "returns 200 on valid input"). - - **AI qualitative failures (insufficient context)**: Add implementation pointers -- component names, likely file paths, related features. - - **AI qualitative failures (unclear success conditions)**: Add explicit done criteria and edge cases. + - **Vague acceptance criteria (AI qualitative failure)**: Rewrite vague criteria to be specific and testable (e.g., "works properly" becomes "returns 200 on valid input"). + - **Insufficient implementation context (AI qualitative failure)**: Add implementation pointers -- component names, likely file paths, related features. + - **Unclear success conditions (AI qualitative failure)**: Add explicit done criteria and edge cases.As per coding guidelines, static analysis tool LanguageTool flagged repetitive sentence beginnings (ENGLISH_WORD_REPEAT_BEGINNING_RULE).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/jira/skills/ready-to-solve/SKILL.md` around lines 124 - 126, The three consecutive bullets starting with "AI qualitative failures" in SKILL.md are repetitive; rewrite them to vary sentence openings while preserving meaning for the items "AI qualitative failures (vague AC)", "AI qualitative failures (insufficient context)" and "AI qualitative failures (unclear success conditions)"; for example, change one to "Vague acceptance criteria: Rewrite..." another to "Provide missing context: Add implementation pointers..." and the third to "Clarify success conditions: Add explicit done criteria and edge cases", ensuring each bullet still references the same concepts and keeps the suggested examples (e.g., "returns 200 on valid input") and implementation pointers.
103-105: Add language specifiers to fenced code blocks.Code blocks are missing language specifiers. Add
textfor pseudo-code andbashfor command examples to improve syntax highlighting.📝 Proposed fix
### Phase 4: Aggregate Verdict -``` +```text overall_pass = (all REQUIRED deterministic checks pass) AND (no AI check has verdict FAIL)
- Basic usage:
/jira:ready-to-solve OCPBUGS-12345
- Dry run (no label changes):
/jira:ready-to-solve OCPBUGS-12345 --dry-run
- Verbose output:
/jira:ready-to-solve OCPBUGS-12345 --verbose
- Validate and fix failing checks:
/jira:ready-to-solve OCPBUGS-12345 --fix</details> As per coding guidelines, static analysis tool markdownlint-cli2 recommends specifying language for fenced code blocks (MD040). Also applies to: 230-232, 235-237, 240-242, 245-247 <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@plugins/jira/skills/ready-to-solve/SKILL.mdaround lines 103 - 105, The
fenced code blocks in SKILL.md lack language specifiers; update the pseudo-code
block containing "overall_pass = (all REQUIRED deterministic checks pass) AND
(no AI check has verdict FAIL)" to usetext and update each command example block that shows "/jira:ready-to-solve OCPBUGS-12345" (and its variants --dry-run, --verbose, --fix) to usebash so markdownlint MD040 is satisfied;
ensure all other similar fenced blocks mentioned (lines ~230–247) are updated
the same way.</details> </blockquote></details> <details> <summary>plugins/jira/commands/ready-to-solve.md (1)</summary><blockquote> `10-12`: **Add language specifiers to fenced code blocks.** The code blocks are missing language specifiers. Add `bash` for command examples and `text` for file path references to improve syntax highlighting and accessibility. <details> <summary>📝 Proposed fix</summary> ```diff ## Synopsis -``` +```bash /jira:ready-to-solve <jira-issue-key> [--dry-run] [--verbose] [--fix] ``` Load the skill file for detailed implementation guidance: -``` +```text plugins/jira/skills/ready-to-solve/SKILL.md ``` 1. **Check readiness of an issue**: - ``` + ```bash /jira:ready-to-solve OCPBUGS-12345 ``` 2. **Preview without applying labels**: - ``` + ```bash /jira:ready-to-solve OCPBUGS-12345 --dry-run ``` 3. **Get detailed output with section content**: - ``` + ```bash /jira:ready-to-solve OCPBUGS-12345 --verbose ``` 4. **Validate and fix failing checks**: - ``` + ```bash /jira:ready-to-solve OCPBUGS-12345 --fix ``` ``` </details> As per coding guidelines, static analysis tool markdownlint-cli2 recommends specifying language for fenced code blocks (MD040). Also applies to: 31-33, 91-93, 96-98, 101-103, 106-108 <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@plugins/jira/commands/ready-to-solve.mdaround lines 10 - 12, Update the
fenced code blocks in plugins/jira/commands/ready-to-solve.md to include
language specifiers: addbash for all command examples that show the /jira:ready-to-solve usage (e.g., the top usage block and the example invocations like "/jira:ready-to-solve OCPBUGS-12345", "--dry-run", "--verbose", "--fix") and addtext for file/path references such as
plugins/jira/skills/ready-to-solve/SKILL.md; update the blocks noted (including
the usage block and examples around the sections referenced: 31-33, 91-93,
96-98, 101-103, 106-108) so each fenced block has the correct language
specifier.</details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In@plugins/jira/skills/ready-to-solve/SKILL.md:
- Around line 42-44: The fetch curl in SKILL.md uses the wrong Jira host; update
the URL in the curl command that retrieves issue fields (the line with curl -s
-H "Authorization: Bearer $JIRA_PERSONAL_TOKEN"
"https://issues.redhat.com/rest/api/2/issue/{issue_key}?fields=description,summary,labels,status,issuetype")
to use the same host as the update operation (redhat.atlassian.net) so all Jira
API calls are consistent.
Nitpick comments:
In@plugins/jira/commands/ready-to-solve.md:
- Around line 10-12: Update the fenced code blocks in
plugins/jira/commands/ready-to-solve.md to include language specifiers: addthe top usage block and the example invocations like "/jira:ready-to-solve OCPBUGS-12345", "--dry-run", "--verbose", "--fix") and add ```text for file/path references such as plugins/jira/skills/ready-to-solve/SKILL.md; update the blocks noted (including the usage block and examples around the sections referenced: 31-33, 91-93, 96-98, 101-103, 106-108) so each fenced block has the correct language specifier. In `@plugins/jira/skills/ready-to-solve/SKILL.md`: - Around line 124-126: The three consecutive bullets starting with "AI qualitative failures" in SKILL.md are repetitive; rewrite them to vary sentence openings while preserving meaning for the items "AI qualitative failures (vague AC)", "AI qualitative failures (insufficient context)" and "AI qualitative failures (unclear success conditions)"; for example, change one to "Vague acceptance criteria: Rewrite..." another to "Provide missing context: Add implementation pointers..." and the third to "Clarify success conditions: Add explicit done criteria and edge cases", ensuring each bullet still references the same concepts and keeps the suggested examples (e.g., "returns 200 on valid input") and implementation pointers. - Around line 103-105: The fenced code blocks in SKILL.md lack language specifiers; update the pseudo-code block containing "overall_pass = (all REQUIRED deterministic checks pass) AND (no AI check has verdict FAIL)" to use ```text and update each command example block that shows "/jira:ready-to-solve OCPBUGS-12345" (and its variants --dry-run, --verbose, --fix) to use ```bash so markdownlint MD040 is satisfied; ensure all other similar fenced blocks mentioned (lines ~230–247) are updated the same way.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID:
e95d407b-535f-4745-bc72-0974b418c8b6📒 Files selected for processing (7)
.claude-plugin/marketplace.jsonPLUGINS.mddocs/data.jsonplugins/jira/.claude-plugin/plugin.jsonplugins/jira/commands/ready-to-solve.mdplugins/jira/skills/ready-to-solve/SKILL.mdplugins/jira/skills/ready-to-solve/check_sections.py✅ Files skipped from review due to trivial changes (3)
- plugins/jira/.claude-plugin/plugin.json
- .claude-plugin/marketplace.json
- plugins/jira/skills/ready-to-solve/check_sections.py
🚧 Files skipped from review as they are similar to previous changes (2)
- PLUGINS.md
- docs/data.json
There was a problem hiding this comment.
🧹 Nitpick comments (3)
plugins/jira/skills/ready-to-solve/SKILL.md (1)
124-126: Consider varying the sentence structure for improved readability.Three consecutive bullet points begin with "AI qualitative failures". While clear, varying the structure could improve flow. For example, the third bullet could begin with "When success conditions are unclear" or similar.
♻️ Optional rewording
- - **AI qualitative failures (vague AC)**: Rewrite vague criteria to be specific and testable (e.g., "works properly" becomes "returns 200 on valid input"). - - **AI qualitative failures (insufficient context)**: Add implementation pointers -- component names, likely file paths, related features. - - **AI qualitative failures (unclear success conditions)**: Add explicit done criteria and edge cases. + - **AI qualitative failures (vague AC)**: Rewrite vague criteria to be specific and testable (e.g., "works properly" becomes "returns 200 on valid input"). + - **Insufficient implementation context**: Add implementation pointers -- component names, likely file paths, related features. + - **Unclear success conditions**: Add explicit done criteria and edge cases to the acceptance criteria.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/jira/skills/ready-to-solve/SKILL.md` around lines 124 - 126, The three consecutive bullets all start with the phrase "**AI qualitative failures**", making the list repetitive; edit the three bullet points (the entries currently titled "**AI qualitative failures (vague AC)**", "**AI qualitative failures (insufficient context)**", and "**AI qualitative failures (unclear success conditions)**") to vary sentence structure — e.g., keep the first as-is, rewrite the second to start with an action or outcome ("Provide implementation pointers such as component names, file paths, related features") and the third to start with a conditional or scenario ("When success conditions are unclear, add explicit done criteria and edge cases"), ensuring clarity and consistent tense while preserving the original meaning.plugins/jira/commands/ready-to-solve.md (2)
10-12: Add language specifier to code block.The synopsis code block should specify a language (e.g.,
bashorshell) for proper syntax highlighting.♻️ Proposed fix
-``` +```bash /jira:ready-to-solve <jira-issue-key> [--dry-run] [--verbose] [--fix]</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@plugins/jira/commands/ready-to-solve.mdaround lines 10 - 12, The code block
showing the command synopsis for /jira:ready-to-solve should include a language
specifier for syntax highlighting; update the fenced code block containing
"/jira:ready-to-solve [--dry-run] [--verbose] [--fix]" to use a
shell/bash tag (e.g., changetobash) so the snippet for the
/jira:ready-to-solve command renders with proper highlighting.</details> --- `88-109`: **Add language specifiers to example code blocks.** The four example code blocks (lines 91, 96, 101, 106) should specify `bash` or `shell` for proper syntax highlighting and consistency with documentation best practices. <details> <summary>♻️ Proposed fix</summary> ```diff 1. **Check readiness of an issue**: - ``` + ```bash /jira:ready-to-solve OCPBUGS-12345 ``` 2. **Preview without applying labels**: - ``` + ```bash /jira:ready-to-solve OCPBUGS-12345 --dry-run ``` 3. **Get detailed output with section content**: - ``` + ```bash /jira:ready-to-solve OCPBUGS-12345 --verbose ``` 4. **Validate and fix failing checks**: - ``` + ```bash /jira:ready-to-solve OCPBUGS-12345 --fix ``` ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@plugins/jira/commands/ready-to-solve.mdaround lines 88 - 109, The example
code fences in the Examples section for the /jira:ready-to-solve command
currently use plain triple-backtick blocks; update each opening fence for the
four examples that contain "/jira:ready-to-solve OCPBUGS-12345" so they read
bash (orshell) to enable shell syntax highlighting and keep style
consistent—modify the blocks around the occurrences of the command in the
Examples section (the preview/dry-run, verbose, and --fix examples and the
initial check example) to start with ```bash.</details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In@plugins/jira/commands/ready-to-solve.md:
- Around line 10-12: The code block showing the command synopsis for
/jira:ready-to-solve should include a language specifier for syntax
highlighting; update the fenced code block containing "/jira:ready-to-solve
[--dry-run] [--verbose] [--fix]" to use a shell/bash tag (e.g.,
changetobash) so the snippet for the /jira:ready-to-solve command
renders with proper highlighting.- Around line 88-109: The example code fences in the Examples section for the
/jira:ready-to-solve command currently use plain triple-backtick blocks; update
each opening fence for the four examples that contain "/jira:ready-to-solve
OCPBUGS-12345" so they readbash (orshell) to enable shell syntax
highlighting and keep style consistent—modify the blocks around the occurrences
of the command in the Examples section (the preview/dry-run, verbose, and --fix
examples and the initial check example) to start with ```bash.In
@plugins/jira/skills/ready-to-solve/SKILL.md:
- Around line 124-126: The three consecutive bullets all start with the phrase
"AI qualitative failures", making the list repetitive; edit the three bullet
points (the entries currently titled "AI qualitative failures (vague AC)",
"AI qualitative failures (insufficient context)", and "AI qualitative
failures (unclear success conditions)") to vary sentence structure — e.g.,
keep the first as-is, rewrite the second to start with an action or outcome
("Provide implementation pointers such as component names, file paths, related
features") and the third to start with a conditional or scenario ("When success
conditions are unclear, add explicit done criteria and edge cases"), ensuring
clarity and consistent tense while preserving the original meaning.</details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Path: .coderabbit.yaml **Review profile**: CHILL **Plan**: Pro Plus **Run ID**: `855f5529-ef20-4311-b2fe-532c54899eb9` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between a8c5eb276c00c8556cb89824ac471f6d58ef463d and f43ba33222c4647d59969c236b05053fc970c2ae. </details> <details> <summary>📒 Files selected for processing (7)</summary> * `.claude-plugin/marketplace.json` * `PLUGINS.md` * `docs/data.json` * `plugins/jira/.claude-plugin/plugin.json` * `plugins/jira/commands/ready-to-solve.md` * `plugins/jira/skills/ready-to-solve/SKILL.md` * `plugins/jira/skills/ready-to-solve/check_sections.py` </details> <details> <summary>✅ Files skipped from review due to trivial changes (2)</summary> * plugins/jira/.claude-plugin/plugin.json * .claude-plugin/marketplace.json </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (3)</summary> * PLUGINS.md * docs/data.json * plugins/jira/skills/ready-to-solve/check_sections.py </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
- Add language specifiers to all fenced code blocks (bash, text) - Vary repetitive "AI qualitative failures" bullet headings - Bump plugin version to 0.4.1 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6b8eca0 to
4ac768c
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4ac768c to
53829fd
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox, enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
/jira:ready-to-solvecommand that validates whether a Jira issue is well-groomed enough for/jira:solveto produce a quality solution--dry-run,--verbose, and--fixflags —--fixgenerates a revised description for failing sections and asks for user confirmation before updatingready-to-solve. On fail, addsnot-ready-to-solve. Removes the stale opposite label if present.Test plan
h2.) and Markdown (##) heading formatsmake lintpasses--fixflag on a failing issue🤖 Generated with Claude Code via
/jira:ready-to-solveSummary by CodeRabbit