$npx -y skills add opendatahub-io/ai-helpers --skill jira-status-summaryUpdate the Status Summary and Color Status fields on AIPCC Feature and Initiative tickets. Fetches child ticket activity via the jira-activity skill, generates a brief summary and sets the red/yellow/green color status. Use when asked to update the status summary for a Jira ticke
| 1 | # Jira Status Summary |
| 2 | |
| 3 | Update the "Status Summary" and "Color Status" fields on an AIPCC Feature |
| 4 | or Initiative ticket with an AI-generated summary and health color. |
| 5 | |
| 6 | ## Prerequisites |
| 7 | |
| 8 | - Python 3 and `uv` must be installed and available in PATH |
| 9 | - `acli` must be installed and authenticated (`acli jira auth`) |
| 10 | - `JIRA_API_TOKEN` environment variable must be set with a valid API token for https://redhat.atlassian.net |
| 11 | - `JIRA_EMAIL` environment variable must be set with the email address associated with your Atlassian account |
| 12 | - The `jira-activity` skill must be installed (provides child ticket activity data) |
| 13 | |
| 14 | ## Usage |
| 15 | |
| 16 | This skill takes a single ticket key as input and writes a formatted status |
| 17 | summary to the Jira "Status Summary" field and sets the "Color Status" |
| 18 | dropdown. |
| 19 | |
| 20 | If the user asks for a **dry run** (or uses the words "dry run", "preview", |
| 21 | "don't write", "show me first"), add `--dry-run` to the write command in |
| 22 | Step 5. This prints the formatted summary without writing to Jira, so the |
| 23 | user can review before committing. |
| 24 | |
| 25 | ## Implementation |
| 26 | |
| 27 | ### Step 1: Determine the Ticket Key |
| 28 | |
| 29 | 1. If a ticket key is provided by the user, use it |
| 30 | 2. Otherwise, search the conversation history for JIRA ticket references matching the pattern `[A-Z]+-\d+` |
| 31 | 3. If no ticket is found in context, ask the user: "Which ticket should I update the Status Summary for? (e.g., AIPCC-1234)" |
| 32 | |
| 33 | ### Step 2: Fetch Previous Status Summary and Color Status |
| 34 | |
| 35 | Fetch the previous Status Summary and Color Status from the ticket: |
| 36 | |
| 37 | ```bash |
| 38 | acli jira workitem view <TICKET-KEY> -f 'customfield_10814,customfield_10712' --json |
| 39 | ``` |
| 40 | |
| 41 | Parse the JSON output to extract: |
| 42 | |
| 43 | - `customfield_10814`: the previous summary (rich-text / ADF content) |
| 44 | - `customfield_10712`: the previous color status ("Green", "Yellow", or |
| 45 | "Red") |
| 46 | |
| 47 | If either field is empty or unset, treat it as no previous value. Save |
| 48 | both outputs for use in Step 4 -- the previous color provides trending |
| 49 | context (e.g. improving from red to yellow). |
| 50 | |
| 51 | If the command fails (e.g., due to permissions or network issues), continue |
| 52 | with Step 3 and generate the summary without prior context. |
| 53 | |
| 54 | ### Step 3: Fetch Child Ticket Activity |
| 55 | |
| 56 | Run the fetch script from the `jira-activity` skill to gather activity data |
| 57 | for the ticket and its entire child hierarchy. Execute the script directly |
| 58 | (not via `python`) relative to the jira-activity skill directory: |
| 59 | |
| 60 | ```bash |
| 61 | ./scripts/fetch_jira_activity.py <TICKET-KEY> --days 30 |
| 62 | ``` |
| 63 | |
| 64 | The script outputs JSON to stdout containing the complete hierarchy of issues |
| 65 | with levels, statuses, assignees, recent comments, and changelog entries. |
| 66 | |
| 67 | Capture the full JSON output for analysis in the next step. |
| 68 | |
| 69 | ### Step 4: Analyze Activity and Generate Summary |
| 70 | |
| 71 | Analyze the JSON output from Step 3 and determine: |
| 72 | |
| 73 | #### Health Color |
| 74 | |
| 75 | First, check the ticket's due date. If the due date is **more than 14 days |
| 76 | away**, assign **green** — early-stage features with ample time remaining |
| 77 | should not be penalized for low completion. Only override this to yellow or |
| 78 | red if child tickets have **explicit blockers** (status "Blocked", flagged |
| 79 | impediments, or unresolved dependency comments). |
| 80 | |
| 81 | If the due date is 14 days away or fewer (or no due date is set), assign a |
| 82 | color based on progress and risk: |
| 83 | |
| 84 | - **green**: Work is progressing normally. Child tickets are moving through |
| 85 | statuses, no significant blockers. |
| 86 | - **yellow**: Some concerns. Delays on key items, blocked tickets, slowing |
| 87 | momentum, approaching deadline risks. |
| 88 | - **red**: Significant blockers. Most child tickets stalled, at risk of |
| 89 | missing the due date, or critical path items are stuck. |
| 90 | |
| 91 | #### Summary Text |
| 92 | |
| 93 | Write a brief summary (2-4 sentences) for leadership consumption covering: |
| 94 | |
| 95 | - Overall progress and momentum |
| 96 | - Key completions or milestones since last update |
| 97 | - Active risks, blockers, or dependencies (if any) |
| 98 | - What is coming next |
| 99 | - Follow-up on items from the previous status (if a previous summary was |
| 100 | retrieved in Step 2): address open questions, note whether raised risks |
| 101 | or blockers have been resolved, and flag anything that was mentioned |
| 102 | previously but still has no progress |
| 103 | |
| 104 | For **yellow** or **red** items, the summary must also include a description |
| 105 | of the issue and a "path to green" (e.g. move dates, escalation, dependency |
| 106 | resolution). |
| 107 | |
| 108 | The summary must be self-contained and understandable without reading the |
| 109 | child tickets. Do NOT include the date, color name, emoji, or disclaimer |
| 110 | in the summary text -- those are added automatically by the script. |
| 111 | |
| 112 | ### Step 5: Write to Jira |
| 113 | |
| 114 | Run the write script located at `scripts/write_status_summary.py` relative |
| 115 | to this skill. Execute i |