Skip to content

Commit e3fd47c

Browse files
authored
Merge pull request #18 from redhat-developer/feat/jira-subcommands
feat: add sub-command router and sprint ceremony workflows to rhdh-jira
2 parents 46c4d8a + 63ac8e3 commit e3fd47c

13 files changed

Lines changed: 1531 additions & 14 deletions

File tree

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ Test plugins in a local RHDH instance before deploying.
3838

3939
Track work across the four RHDH Jira projects.
4040

41-
- **[rhdh-jira](./skills/rhdh-jira/SKILL.md)** — Search, create, view, edit, transition, and link issues across RHIDP, RHDHPLAN, RHDHBUGS, and RHDHSUPP. Uses `acli` with REST API and GraphQL fallback for custom fields.
41+
- **[rhdh-jira](./skills/rhdh-jira/SKILL.md)** — Search, create, view, edit, transition, link, assign, and refine issues across RHIDP, RHDHPLAN, RHDHBUGS, and RHDHSUPP. Uses `acli` for simple operations, GraphQL for bulk reads, and REST API as fallback. Sub-commands:
42+
- **[assign](./skills/rhdh-jira/references/assign.md)** — Recommend assignees using team expertise profiling, sprint capacity analysis, and context proximity scoring. Supports deep mode (5-layer analysis via GraphQL) and quick mode (match from existing context). Assigns after user confirmation.
43+
- **[refine](./skills/rhdh-jira/references/refine.md)** — Check issues against RHDH workflow exit criteria, detect duplicates, verify parent/child hierarchy, flag unaddressed comments, identify stale issues, and validate sprint readiness.
44+
- **[plan](./skills/rhdh-jira/references/plan.md)** — Sprint planning prep: carryover report, velocity trend, per-member capacity, ready-for-planning queue, and sprint fill suggestions with expertise matching.
45+
- **[sprint-report](./skills/rhdh-jira/references/sprint-report.md)** — Sprint review summary: committed vs completed, per-member breakdown, epic progress, demo checklist with naming conventions, and velocity trend.
46+
- **[release](./skills/rhdh-jira/references/release.md)** — Release readiness: feature matrix, Program Increment funnel, epic roll-up, cross-team dependency map, blocker bugs, release notes readiness, and risk assessment.
4247

4348
### Orchestration
4449

skills/rhdh-jira/SKILL.md

Lines changed: 89 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
11
---
22
name: rhdh-jira
33
description: |
4-
Interacts with RHDH Jira projects (RHIDP, RHDHPLAN, RHDHBUGS, RHDHSUPP) using the Atlassian CLI (acli), with REST API and GraphQL fallback for custom field updates and complex queries. Use when the user needs to search, create, view, edit, transition, comment on, or link Jira issues for Red Hat Developer Hub. Also use when the user asks about Jira workflows, exit criteria, issue templates, custom fields, boards, sprints, JQL queries, or Jira API schema discovery. Trigger when the user mentions Jira issue keys like RHIDP-1234, RHDHPLAN-567, RHDHBUGS-890, or any RHDH project key. Also trigger for support case bug filing, feature request creation, release planning, or acli setup and installation.
4+
Interacts with RHDH Jira projects (RHIDP, RHDHPLAN, RHDHBUGS, RHDHSUPP) using acli, GraphQL, and REST API. Use when the user needs to search, create, view, edit, transition, assign, refine, or report on Jira issues for RHDH. Also use for sprint planning, sprint reviews, release readiness, assignee recommendations, or issue refinement. Trigger on Jira issue keys (RHIDP-1234, RHDHPLAN-567), sprint ceremony prep, "who should take this", "refine this", "plan the sprint", "sprint report", "how's the release looking", or "release status".
55
compatibility: "acli (Atlassian CLI) on PATH. Python 3 for scripts. Windows, macOS, Linux."
66
---
77

88
# RHDH Jira
99

1010
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.
1111

12+
## Commands
13+
14+
| Command | Description | Reference |
15+
|---------|-------------|-----------|
16+
| `assign [issue key(s) or JQL]` | Recommend and assign team members using expertise, capacity, and context proximity analysis | [references/assign.md](references/assign.md) |
17+
| `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) |
18+
| `plan [team]` | Sprint planning prep: carryover, velocity, capacity, ready queue, sprint fill suggestions | [references/plan.md](references/plan.md) |
19+
| `sprint-report [team]` | Sprint review summary: committed vs completed, per-member breakdown, demo checklist | [references/sprint-report.md](references/sprint-report.md) |
20+
| `release [version]` | Release readiness: feature matrix, PI funnel, dependency map, blocker bugs, risk assessment | [references/release.md](references/release.md) |
21+
22+
Single source of truth for command descriptions: `scripts/command-metadata.json`
23+
24+
### Routing rules
25+
26+
1. **No argument**: Show the command menu. Ask what to do.
27+
2. **First word matches a command**: Load its reference file and follow it.
28+
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.
29+
1230
## Prerequisites
1331

1432
Run `scripts/setup.py` to verify everything is configured:
@@ -26,6 +44,16 @@ The script checks:
2644

2745
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).
2846

47+
### API preference order
48+
49+
All operations follow this priority: **acli → GraphQL → REST API**.
50+
51+
- **acli** — default for simple, single-issue operations (view, edit, assign, transition).
52+
- **GraphQL** — for bulk reads where acli would be too slow (expertise profiles, capacity, refinement checks). Skip acli entirely for bulk.
53+
- **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.
54+
55+
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.
56+
2957
### REST/GraphQL capability gate
3058

3159
Before attempting any REST API or GraphQL call:
@@ -40,6 +68,7 @@ Before attempting any REST API or GraphQL call:
4068
|--------|---------|
4169
| `scripts/setup.py` | Verify acli install + auth. Run with `--json` for structured output. |
4270
| `scripts/parse_issues.py` | Flatten, enrich, and filter acli JSON output. Solves the core problem: `acli search --json` can't return custom fields (team, story points, sprint). Pipe search results in, get clean data out. Use `--enrich` to fetch full fields, `-f team="X"` to filter by team. |
71+
| `scripts/command-metadata.json` | Single source of truth for sub-command descriptions and argument hints. |
4372

4473
## Projects
4574

@@ -76,15 +105,20 @@ Load only what the current task requires.
76105
| `references/jql-patterns.md` | Building a JQL query, finding a board ID, or looking up sprint information. JQL cookbook with 23+ tested queries. |
77106
| `references/auth.md` | Setting up authentication for REST API or GraphQL calls. Token file format, path discovery, security, instance config, common auth errors. |
78107
| `references/rest-api-fallback.md` | `acli` failed to update a custom field (Team, Size, Story Points, Release Note Type). Curl examples, response handling, OpenAPI spec discovery. |
79-
| `references/graphql-queries.md` | Complex read queries needing multiple fields, relationships, or custom field data in one call. Schema introspection, JQL search via GraphQL, field type fragments. |
108+
| `references/graphql-queries.md` | Complex read queries needing multiple fields, relationships, or custom field data in one call. Schema introspection, JQL search via GraphQL, field type fragments. Also for bulk operations where acli would be too slow. |
109+
| `references/assign.md` | Recommending assignees for unassigned issues. Team roster lookup, expertise profiling, sprint capacity analysis, context proximity scoring. Also for applying assignments after user confirmation. |
110+
| `references/refine.md` | Checking issues against exit criteria per status, identifying duplicates, missing fields, unaddressed comments, and readiness for the next workflow status. |
111+
| `references/plan.md` | Sprint planning prep: carryover report, velocity trend, per-member capacity, ready-for-planning queue, sprint fill suggestions. |
112+
| `references/sprint-report.md` | Sprint review summary: committed vs completed, per-member breakdown, epic progress, demo checklist with naming conventions, velocity trend. |
113+
| `references/release.md` | Release readiness report: feature matrix, PI funnel states, epic roll-up, cross-team dependency map, blocker bugs, RN readiness, risk assessment. |
80114

81115
## Common Gotchas
82116

83117
1. **`acli auth status` lies.** It checks OAuth, not API token auth. Always returns "unauthorized" with token auth even when Jira works fine. Use `acli jira project list --recent 1` as a smoke test instead.
84118
2. **`view` uses positional arg, everything else uses `--key`.** `acli jira workitem view RHIDP-123` but `acli jira workitem edit --key RHIDP-123 ...`.
85119
3. **`--yes` is mandatory for mutations.** All `edit`, `transition`, `assign`, and `link create` commands prompt interactively without it. Always pass `--yes`.
86120
4. **`--fields` is restrictive on search.** Only accepts `key`, `summary`, `status`, `assignee`, `issuetype`, `priority`, `description`, `labels`. For components, sprint, fixVersions, and all custom fields — use `--json` or `scripts/parse_issues.py --enrich`.
87-
5. **Team field is NOT JQL-filterable.** `customfield_10001` cannot be used in JQL WHERE clauses. Fetch all issues, filter by `customfield_10001.name` in post-processing.
121+
5. **Team field has two JQL syntaxes.** `customfield_10001` cannot be used in JQL WHERE clauses. However, `"Team[Team]" = {teamId}` (using the team UUID, not display name) works. Use the UUID syntax for JQL filtering; use `customfield_10001.name` in post-processing only when you need the display name from JSON output.
88122
6. **ADF vs plain text.** Reading descriptions via `--json` returns Atlassian Document Format (nested JSON). Creating/editing with `--description` accepts plain text. Don't try to round-trip ADF through `--description`.
89123
7. **Acceptance Criteria field is almost always null.** Scan the description for "Requirements", "Acceptance Criteria", or bullet-style criteria instead of checking `customfield_10718`.
90124
8. **`--enrich` is MANDATORY for custom fields.** Both `acli search --json` and `acli view KEY --json` (without `--fields "*all"`) return only basic fields (assignee, issuetype, priority, status, summary). Story points, team, sprint, and size will appear as empty/null — looking like the data isn't set when it actually is. Always use `scripts/parse_issues.py --enrich` to get custom field data. Skipping `--enrich` is the #1 cause of false "missing data" reports.
@@ -105,9 +139,19 @@ Load only what the current task requires.
105139
| Rate limiting (429) | Wait 5 seconds, retry once. |
106140
| Interactive prompt hangs | Missing `--yes` flag on a mutating command. |
107141
| Custom field update fails via `acli` | Fall back to Jira REST API using `.jira-token` file. See Gotcha #9. |
142+
| `issueSearchStable` returns errors | Fall back to REST API search (`/rest/api/3/search`) with the same JQL. Warn that the beta API failed. |
143+
144+
## Team Conventions
145+
146+
These apply across all sub-commands:
147+
148+
- **Release Pending counts as completed.** Release Pending items remain in the sprint and count toward velocity and capacity. They represent done work awaiting release.
149+
- **Confirmation flow.** Sub-commands that modify Jira issues (assign, refine, release) use a standard prompt: `"Apply changes? [y/N/edit]"`**y** applies all, **N** cancels, **edit** steps through each change individually.
108150

109151
## Common Workflows
110152

153+
> Sub-commands share data. `plan` reuses roster/capacity/expertise from `assign`. `sprint-report` uses the same velocity query pattern as `plan`. `release` references exit criteria from `workflows.md` and can invoke `assign` for unassigned Features.
154+
111155
### Creating an issue
112156

113157
1. Load `references/templates.md` for the body template
@@ -132,6 +176,46 @@ Load only what the current task requires.
132176
2. Use `issueByKey` for single issues or `issueSearchStable` (beta) for JQL search
133177
3. Fall back to `acli` + `parse_issues.py --enrich` if GraphQL returns errors
134178

179+
### Recommending and assigning issues
180+
181+
1. Load `references/assign.md`
182+
2. Identify unassigned issues (single key, JQL query, or passed-in list)
183+
3. Determine the team (from issue field, parent epic, or user input)
184+
4. Run deep or quick analysis per the reference
185+
5. Present recommendations, get user confirmation, then assign
186+
187+
### Refining issues
188+
189+
1. Load `references/refine.md`
190+
2. Identify issues to refine (specific keys, JQL, `sprint`, or `backlog`)
191+
3. Run all 6 checks: missing fields, duplicates, hierarchy, comments, staleness, sprint readiness
192+
4. Present refinement report with actionable recommendations
193+
5. Optionally apply auto-fixable changes and prompt for manual decisions
194+
195+
### Sprint planning prep
196+
197+
1. Load `references/plan.md`
198+
2. Resolve team, board, and sprint context
199+
3. Generate carryover report, velocity trend, capacity snapshot, and ready-for-planning queue
200+
4. Auto-generate sprint fill suggestions with expertise matching
201+
5. Surface critical customer bugs (exempt from capacity) and retro action items
202+
203+
### Sprint review summary
204+
205+
1. Load `references/sprint-report.md`
206+
2. Resolve sprint (active or previous)
207+
3. Partition completed vs carried over, compute completion rate
208+
4. Per-member breakdown, epic progress, demo checklist with naming conventions
209+
5. Optionally save as markdown file
210+
211+
### Release readiness
212+
213+
1. Load `references/release.md`
214+
2. Fetch Features for the target version/label
215+
3. Quick mode: PI funnel, feature matrix, readiness score
216+
4. Deep mode: adds epic roll-up, dependency map, coherence analysis, RN readiness, risk assessment
217+
5. Optionally remediate (assign owners, create Epics, transition statuses)
218+
135219
### Discovering unknown fields or endpoints
136220

137221
1. For REST: load `references/rest-api-fallback.md` — use the OpenAPI spec or `/rest/api/3/field` endpoint
@@ -141,5 +225,5 @@ Load only what the current task requires.
141225
## When NOT to Use
142226

143227
- **Non-RHDH Jira projects** — this skill's field mappings, workflows, and JQL patterns are specific to RHIDP/RHDHPLAN/RHDHBUGS/RHDHSUPP
144-
- **Jira REST API directly** — use `acli` first. REST API is a fallback for custom field updates and schema discovery when `acli` cannot handle the operation (see Gotcha #9)
145-
- **GraphQL for simple lookups** — use `acli` for single-issue views and simple searches. GraphQL is for complex queries needing relationships or many custom fields in one call, and for schema introspection
228+
- **Jira REST API directly** — use `acli` first, then GraphQL for bulk reads. REST API is the last resort for writes when acli fails and for schema discovery via OpenAPI spec (see Gotcha #9)
229+
- **GraphQL for simple lookups** — use `acli` for single-issue views and simple searches. GraphQL is for bulk operations, complex queries needing relationships or many custom fields in one call, team roster lookups, and schema introspection

0 commit comments

Comments
 (0)