feat: add raise-pr and bug-fix skills with Jira integration (v0.7.0)#54
feat: add raise-pr and bug-fix skills with Jira integration (v0.7.0)#54its-mitesh-kumar wants to merge 9 commits into
Conversation
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
|
Raise PR Test : redhat-developer/rhdh-plugins#3708 (comment) |
durandom
left a comment
There was a problem hiding this comment.
Review
Ambitious PR adding two full skills (`raise-pr` + `bug-fix`) that automate the PR lifecycle and end-to-end bug fixing with Playwright recordings. The architecture is well-thought-out — `bug-fix` chains into `raise-pr` with a clean caller-context contract.
What's good
- Repo profiles (`repo-profiles.md`) — auto-detection via `git remote -v` with separate templates for rhdh-plugins vs community-plugins is practical
- Baseline diffing — capturing `git status --porcelain` before builds to filter out pre-existing dirty files in Step 7 is clever and prevents accidental staging of unrelated changes
- Video recording workflow — the principled approach (write repro test → fail → capture before → fix → pass → capture after) with hard gates at each step prevents out-of-order execution
- GitHub Contents API for GIF upload — embedding recordings directly in the PR description via branch-committed files that auto-delete on merge is clean
- Jira input parsing (`jira-input.md`) — handles all common input formats (bare key, browse URL, URL without scheme, URL with query params)
- Changeset generation rules — correctly scoping to `plugins/` only, ignoring `packages/`, and checking published paths is right
Issues
-
Cursor-specific references. Several places reference Cursor-specific constructs:
- `CallMcpTool: server="user-jira"` in Step 11 — not portable to Claude Code or other agents
- `required_permissions: ["all"]` in `preflight_system_limits` — Cursor Shell tool concept
- The Prerequisites mention "Cursor" specifically for MCP setup
Consider abstracting the MCP calls behind a generic pattern (e.g., "use your agent's Jira MCP tool to add a comment") and noting Cursor as one implementation option.
-
PR size. Two full skills (700+ lines of SKILL.md each) plus 3 reference files in one PR is a lot to review. If this hasn't been through internal testing yet, consider splitting `raise-pr` into its own PR — it's independently useful and simpler to validate. `bug-fix` can follow as a separate PR that chains into it.
-
`workspace-map.md` will go stale. The Jira Component → workspace mapping is hardcoded. Consider generating this from the workspace directories + some metadata, or at least noting a date/version.
-
`ulimit -n 65536` in principles. This is macOS-specific (Linux typically has higher defaults). The principle should note this is primarily for macOS development.
-
Version conflict. This bumps 0.6.1 → 0.7.0. PR #58 also bumps 0.6.1 → 0.7.0. If both need to be v0.7.0 (minor for new skills), only one can merge with that version.
Recommendation
The skills are well-designed. Address the Cursor-specific portability concerns and consider splitting into two PRs for easier review. Needs version coordination with #58.
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com> # Conflicts: # .claude-plugin/marketplace.json # .claude-plugin/plugin.json # uv.lock
8201527 to
6b3a527
Compare
|
@durandom Thanks for the thorough review! Addressing each point: 1. Cursor-specific references — Fixed. Removed all Cursor-specific constructs ( 2. PR size — Keeping as one PR since Tested end-to-end on two real issues:
3. 4. 5. Version conflict — Currently keeping v0.7.0 — if #58 merges first, I'll bump to v0.8.0 before this one goes in. Since the review, also added:
Hence I have updated the PR description and architecture diagram. Cc: @christoph-jerolimov @Eswaraiahsapram @lokanandaprabhu @sanketpathak |
|
First bug fix PR redhat-developer/rhdh-plugins#3741 raised by using these both skill which was invoked using |
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
|
Another PR redhat-developer/rhdh-plugins#3846 successfully merged , which was fixed/raised using |
Summary
raise-prskill that automates the full PR workflow (detect workspace, build, generate changeset, commit, push, create PR) for bothrhdh-pluginsandcommunity-pluginsmonoreposgit remote -vand adapts PR template, npm scope, and upstream target accordingly--aauto-approve mode to skip all approval gates for unattended workflows#N) as bug referencesredhat-developer/rhdh-pluginsandbackstage/community-plugins, with repo-specific PR templates, commit conventions, and issue-linking rules## Fixedsection, post-PR comment, issue transition to Review, and web link via REST APIFixesin PR body for auto-close, post-PR comment, label managementbug-fixskill for end-to-end bug fixing with two modes: full-e2e (UI bugs with Playwright before/after recordings) and no-e2e (backend bugs with unit/integration test verification)not-ready-for-agentlabel and a missing-info comment if details are insufficient--no-verifymode forbug-fixto skip the user verification gate and auto-chain intoraise-pr --aArchitecture
Context
Extracts and generalizes the existing Cursor command (
rhdh-plugins/.cursor/commands/pr.md) and its #3679 enhancement into a portable agent skill that works across both plugin monorepos.The
raise-prskill has first-class issue support — any PR linked to a Jira issue gets automatic branch naming (fix/<workspace>-<JIRA-KEY>-<slug>), aFixes:commit trailer, a## Fixedsection in the PR body, post-PR Jira comment via MCP, issue transition to Review via ACLI, and web link via REST API. GitHub issues getFixes <url>in the PR body for auto-close, a post-PR comment, and label updates.The
bug-fixskill chains intoraise-prafter reproducing and fixing a bug. For UI bugs (full-e2e mode): writes a Playwright reproduction test with video recording, captures diagnostic context (screenshot + DOM + computed styles), applies the fix, captures before/after recordings, converts to GIFs, generates a test plan, and creates the PR with embedded visual evidence. For backend bugs (no-e2e mode): checks existing tests or writes a temporary repro unit test, diagnoses and fixes, verifies tests pass, deletes the temp test, and chains into raise-pr.Before any fix attempt, the skill validates the issue has sufficient detail (steps to reproduce, expected behavior, component/workspace). Issues missing required fields are automatically labeled
not-ready-for-agentwith a comment listing what's needed.How to Use
Prerequisites
ghCLI — GitHub CLI must be installed and authenticated (gh auth statusshould show logged in). Install: https://cli.github.com/rhdh-pluginsorcommunity-pluginsyarnavailable on PATHffmpegon PATH (for converting screen recordings to GIFs). Install if missing:which ffmpeg || brew install ffmpegInstall
Install from local checkout (while PR is unmerged):
After merge:
Invoke
What it does
not-ready-for-agentif missing infoworkspaces/lightspeed) and determines if the target isrhdh-pluginsorcommunity-pluginsraise-pr— builds, generates changeset, commits with DCO, pushes, uploads GIFs, creates PR with conditional sections, performs post-PR issue updates (Jira: comment + transition + web link; GitHub: comment + auto-close)Using raise-pr standalone
PR Body Sections (conditional)
issue_sourceis set (Jira for rhdh-plugins only; GitHub for both repos)test_planprovided by callerissue_sourceis present (bug-fix invoked raise-pr)Key Design Decisions
gh pr create— GIFs are uploaded to the fork branch via GitHub Contents API with DCO-compliant Signed-off-by trailers, and the resultingraw.githubusercontent.comURLs are embedded directly in the PR body.outerHTML, computed styles) before any fix is applied, providing concrete evidence for root-cause identification.Fixeskeyword.Files
raise-pr skill
skills/raise-pr/SKILL.md— 11-step workflow with repo auto-detection,--aauto-approve mode, dual-source issue resolution, GIF upload via Contents API, and post-PR issue updates (Jira comment/transition/web-link, GitHub comment/auto-close)skills/raise-pr/references/repo-profiles.md— per-repo config with conditional PR body templates, community-plugins Jira isolation rules, and DCO requirementsskills/raise-pr/references/jira-input.md— shared Jira key/URL parsing logic and REST API patterns (fetch, web link, comment, transition)bug-fix skill
skills/bug-fix/SKILL.md— multi-step workflow with dual-source input, readiness check, triage gate, workspace/repo detection, full-e2e and no-e2e modes,--no-verifyflagskills/bug-fix/references/workspace-map.md— Jira component and GitHub label to workspace mapping for both rhdh-plugins and community-plugins, with cross-cutting component disambiguationskills/bug-fix/references/github-input.md— GitHub issue URL parsing andghCLI patterns for fetching, commenting, and labelingskills/bug-fix/references/e2e-patterns.md— shared Playwright patterns across all workspacesskills/bug-fix/references/video-recording.md— Playwright video config, ffmpeg conversion, and automated GitHub Contents API embeddingShared
docs/agents/triage-labels.md— updated withnot-ready-for-agentlabel for agent-readiness triage gateMetadata
README.md— added Bug Fix section, updated raise-pr descriptionpyproject.toml,.claude-plugin/plugin.json,.claude-plugin/marketplace.json— version bump to 0.7.0Test plan
uv run pytestpasses (321 passed, 1 pre-existing failure unrelated to this PR)test_skill_structure.py)test_marketplace.py)npx skills add redhat-developer/rhdh-skill --skill raise-prand verify issue input parsing (Jira + GitHub)npx skills add redhat-developer/rhdh-skill --skill bug-fixand verify trigger phrasesraise-prwith a Jira key: verify branch name, commit trailer, PR body, and post-PR Jira comment/transition/web-linkraise-prwith a GitHub issue: verify PR bodyFixeslink, post-PR comment, auto-close behaviorbug-fixwith an RHDHBUGS issue: verify full workflow including triage gate, screenshot capture, test plan generation, GIF upload, and PR creationbug-fixtargeting community-plugins: verify no Jira info leaks into PR body or commit messagesbug-fix --no-verify: verify it auto-chains intoraise-pr --awithout pausing