$npx -y skills add opendatahub-io/ai-helpers --skill jira-aipcc-createCreate Jira issues in the AIPCC project. Infers summary, description, type, and component from conversation context, confirms with the user before creating. Use when the user wants to file a new AIPCC Jira issue.
| 1 | # Create AIPCC Jira Issue |
| 2 | |
| 3 | Create Jira issues in the AIPCC project using the `acli` CLI. |
| 4 | |
| 5 | ## Prerequisites |
| 6 | |
| 7 | - `acli` must be installed and authenticated (`acli jira auth`) |
| 8 | |
| 9 | ## Implementation |
| 10 | |
| 11 | ### Step 1: Infer Issue Details from Context |
| 12 | |
| 13 | Analyze the conversation to determine: |
| 14 | |
| 15 | 1. **Summary**: A concise title (under 100 characters) describing the issue |
| 16 | 2. **Description**: A Markdown description with relevant context, root cause, fix details, or requirements (use Markdown) |
| 17 | 3. **Type**: One of the following based on the nature of work |
| 18 | - `Bug`: problem that impairs or prevents product functions; tracks escaped defects |
| 19 | - `Story`: action-oriented, smallest unit of work that can be completed within one sprint |
| 20 | - `Epic`: large user story that needs to be broken down; groups bugs, stories, and tasks to show progress of a larger effort; represents significant deliverable; does not span teams |
| 21 | - `Feature`: use when tracking capability or well-defined set of functionality delivering business value; can include additions/changes to existing functionality |
| 22 | - `Spike`: time-bound unit of work representing research-related task; not easy to size |
| 23 | - `Initiative`: use when capturing internal improvements |
| 24 | - `Task`: unit of work to be accomplished, not end-user facing |
| 25 | 4. **Component**: One of the valid AIPCC components: |
| 26 | - `Accelerator Enablement` |
| 27 | - `AI Eng Agilist` |
| 28 | - `AI Testing + Workflow Validation` |
| 29 | - `AIPCC Ecosystems` |
| 30 | - `AIPCC Productization` |
| 31 | - `Development Platform` |
| 32 | - `Model Validation` |
| 33 | - `PyTorch` |
| 34 | - `Wheel Package Index` |
| 35 | |
| 36 | 5. **Parent Epic** (optional): If the user specifies an epic key (e.g. AIPCC-1234), include it as the parent |
| 37 | |
| 38 | If any field cannot be confidently inferred, ask the user. |
| 39 | |
| 40 | ### Step 2: Confirm with the User |
| 41 | |
| 42 | Present the proposed issue details to the user in a clear format: |
| 43 | |
| 44 | ``` |
| 45 | I'll create the following AIPCC JIRA issue: |
| 46 | |
| 47 | **Type**: Bug |
| 48 | **Component**: Wheel Package Index |
| 49 | **Parent Epic**: AIPCC-1234 (if specified) |
| 50 | **Summary**: Fix duplicate CI pipeline runs |
| 51 | **Description**: |
| 52 | > [description] |
| 53 | |
| 54 | Shall I go ahead and create this? |
| 55 | ``` |
| 56 | |
| 57 | Wait for user confirmation before proceeding. If the user requests changes, adjust accordingly. |
| 58 | |
| 59 | ### Step 3: Create the Issue |
| 60 | |
| 61 | Build a JSON file with the following structure. |
| 62 | |
| 63 | **Important**: The `description` field MUST be in Atlassian Document Format (ADF), not plain text. `acli` will reject plain text descriptions with an error. |
| 64 | |
| 65 | If the user specifies a parent epic, include the `parent` field in `additionalAttributes`. This is the only way to set the epic/parent relationship — `acli jira workitem edit` does not support `additionalAttributes` or custom fields, so the parent must be set at creation time. |
| 66 | |
| 67 | ```json |
| 68 | { |
| 69 | "projectKey": "AIPCC", |
| 70 | "summary": "<summary>", |
| 71 | "type": "<type>", |
| 72 | "description": { |
| 73 | "version": 1, |
| 74 | "type": "doc", |
| 75 | "content": [ |
| 76 | { |
| 77 | "type": "paragraph", |
| 78 | "content": [ |
| 79 | { |
| 80 | "type": "text", |
| 81 | "text": "<description text>" |
| 82 | } |
| 83 | ] |
| 84 | } |
| 85 | ] |
| 86 | }, |
| 87 | "additionalAttributes": { |
| 88 | "components": [{"name": "<component>"}], |
| 89 | "parent": {"key": "<EPIC-KEY>"} |
| 90 | } |
| 91 | } |
| 92 | ``` |
| 93 | |
| 94 | Omit the `parent` field from `additionalAttributes` if no epic is specified. |
| 95 | |
| 96 | Write it to a temporary file: |
| 97 | |
| 98 | ```bash |
| 99 | cat > "$(mktemp /tmp/acli-issue-create-XXXX.json)" << 'EOF' |
| 100 | { ... } |
| 101 | EOF |
| 102 | ``` |
| 103 | |
| 104 | Create the issue using: |
| 105 | |
| 106 | ```bash |
| 107 | acli jira workitem create --from-json <JSON-FILE> |
| 108 | ``` |
| 109 | |
| 110 | ### Step 4: Report Result |
| 111 | |
| 112 | On success, `acli` prints the new issue key and URL. Report this to the user: |
| 113 | |
| 114 | ``` |
| 115 | Created AIPCC-12345: https://redhat.atlassian.net/browse/AIPCC-12345 |
| 116 | ``` |
| 117 | |
| 118 | Clean up the temporary JSON file after creation. |
| 119 | |
| 120 | ## Error Handling |
| 121 | |
| 122 | - **acli not found**: Tell the user to install acli and run `acli jira auth` |
| 123 | - **Authentication failure**: Tell the user to run `acli jira auth` |
| 124 | - **Creation failure**: Display the error from acli and suggest checking permissions |
| 125 | - **Invalid component**: Show the list of valid components and ask the user to pick one |
| 126 | |
| 127 | ## Examples |
| 128 | |
| 129 | ### Context-Aware Creation |
| 130 | |
| 131 | ```text |
| 132 | User: [After discussing a bug fix] Create a JIRA for this |
| 133 | Assistant: [Infers details from conversation, presents for confirmation, creates on approval] |
| 134 | ``` |
| 135 | |
| 136 | ### Explicit Request |
| 137 | |
| 138 | ```text |
| 139 | User: /jira.aipcc-create Bug: selfservice build monitoring flakes |
| 140 | Assistant: [Uses provided info, infers description and component, confirms, creates] |
| 141 | ``` |
| 142 | |
| 143 | ### Ambiguous Component |
| 144 | |
| 145 | ```text |
| 146 | User: File a task for updating the CI pipeline docs |
| 147 | Assistant: I'll create an AIPCC task. Which component does this fall under? |
| 148 | 1. AIPCC Productization |
| 149 | 2. Wheel Package Index |
| 150 | 3. Development Platform |
| 151 | ... |
| 152 | ``` |