$npx -y skills add redhat-developer/rhdh-skill --skill rhdh-jiraInteracts with RHDH Jira projects (RHIDP, RHDHPLAN, RHDHBUGS, RHDHSUPP) using acli, GraphQL, and REST API. Covers the full Jira lifecycle: create issues, assign, refine, plan sprints, report, track releases, and update status. Trigger on Jira keys (RHIDP-1234), "create a feature/
| 1 | <essential_principles> |
| 2 | |
| 3 | # RHDH Jira |
| 4 | |
| 5 | Foundational skill for interacting with RHDH's Jira instance via the Atlassian CLI (`acli`). Covers all four active projects, issue types, workflows, custom fields, and JQL patterns. |
| 6 | |
| 7 | </essential_principles> |
| 8 | |
| 9 | <intake> |
| 10 | |
| 11 | ## Commands |
| 12 | |
| 13 | | Command | Description | Reference | |
| 14 | |---------|-------------|-----------| |
| 15 | | `assign [issue key(s) or JQL]` | Recommend and assign team members using expertise, capacity, and context proximity analysis | [references/assign.md](references/assign.md) | |
| 16 | | `refine [issue key(s), JQL, or 'sprint']` | Check issues against exit criteria, identify duplicates, missing fields, unaddressed comments, and readiness | [references/refine.md](references/refine.md) | |
| 17 | | `plan [team]` | Sprint planning prep: carryover, velocity, capacity, ready queue, sprint fill suggestions | [references/plan.md](references/plan.md) | |
| 18 | | `sprint-report [team]` | Sprint review summary: committed vs completed, per-member breakdown, demo checklist | [references/sprint-report.md](references/sprint-report.md) | |
| 19 | | `release [version]` | Release readiness: feature matrix, PI funnel, dependency map, blocker bugs, risk assessment | [references/release.md](references/release.md) | |
| 20 | | `to-feature [description]` | Create a RHDHPLAN Feature with grill, duplicate check, and optional Epic decomposition | [references/to-feature.md](references/to-feature.md) | |
| 21 | | `to-epic [description]` | Create an RHIDP Epic with grill, duplicate check, and optional Story/Task decomposition | [references/to-epic.md](references/to-epic.md) | |
| 22 | | `to-issue [description]` | Create a Story, Task, Bug, or Spike with automatic type inference and grill | [references/to-issue.md](references/to-issue.md) | |
| 23 | | `update-jira-status [key]` | Update issue with session progress, status comment, transition, and upward cascade | [references/update-jira-status.md](references/update-jira-status.md) | |
| 24 | |
| 25 | Single source of truth for command descriptions: `scripts/command-metadata.json` |
| 26 | |
| 27 | **Wait for response before proceeding.** |
| 28 | |
| 29 | </intake> |
| 30 | |
| 31 | <routing> |
| 32 | |
| 33 | ### Routing rules |
| 34 | |
| 35 | 1. **No argument**: Show the command menu. Ask what to do. |
| 36 | 2. **First word matches a command**: Load its reference file and follow it. |
| 37 | 3. **First word doesn't match**: General Jira invocation using the full argument as context — use the reference files table below to decide what to load. |
| 38 | |
| 39 | </routing> |
| 40 | |
| 41 | ## Prerequisites |
| 42 | |
| 43 | Run `scripts/setup.py` to verify everything is configured: |
| 44 | |
| 45 | ```bash |
| 46 | python scripts/setup.py |
| 47 | ``` |
| 48 | |
| 49 | The script checks: |
| 50 | |
| 51 | 1. `acli` binary on PATH |
| 52 | 2. Jira API token auth configured (`~/.config/acli/jira_config.yaml`) |
| 53 | 3. `.jira-token` file next to `acli` executable (for REST API fallback) |
| 54 | 4. Smoke test against `redhat.atlassian.net` |
| 55 | |
| 56 | If `acli` is not installed, download from [Atlassian CLI](https://developer.atlassian.com/cloud/acli/) and follow the [Getting Started guide](https://developer.atlassian.com/cloud/acli/guides/how-to-get-started/) for installation and authentication setup. Use API token authentication, not OAuth — OAuth sessions expire and `acli auth status` gives false negatives with token auth (see Gotchas). |
| 57 | |
| 58 | ### API preference order |
| 59 | |
| 60 | All operations follow this priority: **acli → GraphQL → REST API**. |
| 61 | |
| 62 | - **acli** — default for simple, single-issue operations (view, edit, assign, transition). |
| 63 | - **GraphQL** — for bulk reads where acli would be too slow (expertise profiles, capacity, refinement checks). Skip acli entirely for bulk. |
| 64 | - **REST API** — for writes when already in an authenticated API context (avoids shelling out to acli mid-workflow), or as fallback when acli fails for custom field updates. |
| 65 | |
| 66 | Sub-commands (`assign`, `refine`) document which API they use. When a sub-command's workflow already has `AUTH` set from GraphQL reads, prefer REST for writes. |
| 67 | |
| 68 | ### REST/GraphQL capability gate |
| 69 | |
| 70 | Before attempting any REST API or GraphQL call: |
| 71 | |
| 72 | 1. Run `python scripts/setup.py --json` and check `token_file_found` |
| 73 | 2. If missing, state: "REST API/GraphQL fallback unavailable — `.jira-token` not configured. Run `setup.py` for instructions." Continue with acli-only workflow. |
| 74 | 3. If the user needs REST/GraphQL, load `references/auth.md` for setup instructions |
| 75 | |
| 76 | ## Scripts |
| 77 | |
| 78 | | Script | Purpose | |
| 79 | |--------|---------| |
| 80 | | `scripts/setup.py` | Verify acli install + auth. Run with `--json` for structured output. | |
| 81 | | `scripts/parse_issues.py` | Flatten, enrich, and filter acli JSON output. Solves the core problem: |