| name | create-ticket |
| model | haiku |
| description | Interactively create GitHub issues (Bug, Feature, Task) for the current repository. Infrastructure changes are Tasks auto-labeled `infra-task`. Parses optional args for type and description, asks targeted questions, assigns labels, and creates the issue via gh CLI. |
| alwaysApply | false |
| metadata | {"author":"project","version":"1.0"} |
Create a GitHub issue in this repository. Guides the user through an interactive flow to gather all required information, then creates the issue via gh issue create.
Prerequisites
Before starting the flow, verify gh CLI is available and authenticated:
gh auth status
- If
gh is not installed ā stop and tell the user: "GitHub CLI (gh) is required. Install it: https://cli.github.com/"
- If not authenticated ā stop and tell the user: "Run
gh auth login to authenticate first."
- If authenticated ā proceed to Step 0
Usage: /create-ticket [type: description]
Examples:
/create-ticket ā fully interactive
/create-ticket bug: login page crashes on Safari
/create-ticket feature: add bulk delete for models
/create-ticket task: refactor Sidebar for reuse in entity lists
/create-ticket infra: add LOG_LEVEL to prod
Step 0 ā Parse Args
If the user provided arguments after /create-ticket, parse them:
- Look for a type prefix:
bug:, feature:, task:, infra: (case-insensitive)
bug: ā Bug
feature: ā Feature
task: ā Task (general engineering)
infra: ā Task + force infra-task label (shortcut for infra change)
- If found ā set issue type, use the rest as a seed for the title/description
- If not found ā treat the entire arg string as a description seed and ask for type
- If no args at all ā start fully interactive from Step 1
When args provide a description seed, use it to:
- Generate a proposed title ā concise, under 80 characters
- Generate a proposed summary ā a short paragraph followed by key points as a bullet list. For bugs, also draft the actual/expected result from context.
- Pre-fill relevant body fields where obvious
- Auto-assign labels ONLY when the description makes them 100% clear
- For ANY label where assignment is not certain from the description, ask the user directly
Step 1 ā Issue Type
Skip if parsed from args.
Use AskUserQuestion to ask:
"What type of issue do you want to create?"
Options (these match the repo's GitHub issue types):
- Bug ā Report a problem or defect
- Feature ā Request a new feature or enhancement
- Task ā Engineering work that is not a user-facing feature (refactor, reuse, tech debt, cleanup, test/build improvements, AND infrastructure changes ā env var, secret, config, deployment setting)
Infrastructure changes are NOT a separate top-level type. They're a Task that gets auto-labeled infra-task. Detection happens in Step 3 from context keywords (env var, secret, prod/uat, deployment, config, LOG_LEVEL, etc.).
Step 2 ā Title & Summary Proposal
2a. Optional Code Research
Before drafting the proposal, check whether the user's input references code concepts that would benefit from codebase investigation.
Trigger signals (offer the question when ANY are present):
- Verbs: refactor, reuse, extract, consolidate, migrate, rename, split, merge, deduplicate, unify, abstract, move, replace
- Implementation nouns paired with an action: component, hook, utility, service, module, layout, route, page, store, context, provider
- Explicit file paths, component names (e.g.,
Sidebar), or function/hook names
If triggered, use AskUserQuestion:
"Your request touches code (e.g., refactoring/reuse). Do you want me to dive into the codebase and include relevant details in the ticket?"
Options:
- Yes, research ā Explore the codebase and add findings to the description
- No, skip ā Proceed without code research
If Yes, spawn an Explore agent (via the Agent tool with subagent_type: Explore) to find:
- Current location(s) of the subject code (file paths with line references)
- Similar or duplicated patterns elsewhere in the codebase
- Files/components/consumers that would be affected by the change
- Existing conventions or abstractions to align with
Keep the summary concise ā bullet points with path:line references, not prose walls. These findings feed into 2b (title sharpness, description clarity, and a new Details section in the body).
2b. Draft the Proposal
Based on the user's input, answers so far, and any code research findings:
-
Propose a title ā concise, under 80 characters. If research was done, make it specific (e.g., "Refactor Sidebar for reuse in ModelList, AdapterList, UserList").
-
Propose a summary ā structured as:
- A short description paragraph (1-3 sentences explaining what and why)
- Key points as a bullet list extracting the important details
- For bugs: also include drafted "Actual result" and "Expected result" if enough context exists
- If code research was done: a Details section listing current location, affected files, duplicated patterns, and recommended scope (with
path:line references)
-
List all labels that will be auto-assigned based on the issue type and any labels already determined from context (e.g., bug, Design Required if obvious from description). Mark labels that will be asked about later as "TBD".
Present the proposal to the user and ask for confirmation:
"Here's what I've drafted from your input:
Title: <proposed title>
Summary:
Key points:
Labels (planned):
label1 (auto)
label2 (auto)
- Priority ā TBD
- Severity ā TBD
- ...
Want to use this, or change anything?"
Options:
- Use as-is ā proceed with this draft
- Edit ā I want to change something
If Edit: ask what they want to change, revise, and re-confirm.
The proposed summary becomes the main content of the description/body field.
IMPORTANT: If the user approves the draft ("Use as-is"), do NOT re-ask fields that were already covered in the draft. In Step 3, only ask for fields that are missing or were not part of the proposal. For example, if the draft already includes "Actual result" and "Expected result" for a bug, skip those questions and only ask for remaining fields (version confirmation, steps to reproduce, severity, etc.).
Step 3 ā Type-Specific Fields
Before asking individual fields, if the draft from Step 2 already covers some fields, ask the user:
"The draft already covers some details. How do you want to proceed?"
Options:
- Use draft, fill remaining ā Accept drafted fields, only ask for missing ones (version, severity, etc.)
- Provide details now ā Go through each field interactively
- Use draft as-is ā Skip all type-specific questions, use drafted content for all fields and fill missing fields with reasonable defaults or "No response"
Gather information interactively based on the issue type. Ask each field as a separate question using AskUserQuestion (open-ended, no preset options) unless a dropdown/choice is specified.
Bug
- Version: Auto-detect by reading the
version field from the root package.json. Confirm with user:
"The current version is <version>. Is this the version where you see the bug?"
- Steps to reproduce: Ask:
"How do you reproduce this bug? Provide step-by-step instructions."
- Actual result: Ask:
"What happens currently? (the broken behavior)"
- Expected result: Ask:
"What should happen instead?"
- Additional information (optional): Ask:
"Any additional context? (screenshots, logs, browser info ā or skip)"
- Severity: Use AskUserQuestion with options:
- Critical ā Severe issue impacting core functionality, requires urgent resolution
- Major ā Affects many users or key components
- Minor ā Minor issue with limited impact
- Low ā Low issue with little to no critical impact
Feature
- Description: Ask:
"Describe the feature. What should it do and why is it needed?"
- Related issues (optional): Ask:
"Are there any related issues? (paste issue numbers/URLs or skip)"
Task
Covers engineering work (refactor, reuse, tech debt, cleanup, test/build improvements) AND infrastructure changes (env var, secret, config, deployment setting).
Step 3.0 ā Infra sub-classification
Before gathering fields, detect whether this Task is an infrastructure change.
Infra signals (auto-apply infra-task label when ANY are present):
- Keywords: environment variable, env var, secret, credential, config change, deployment,
LOG_LEVEL, NODE_ENV, prod / uat / development, Kubernetes, Helm, CI/CD, pipeline
- The user invoked
/create-ticket infra: ⦠(args prefix forces infra-task label)
- The description only describes a runtime/config change with no code change
If infra signals are clearly present ā auto-apply infra-task label (tell the user), go to the infra field set below.
If genuinely ambiguous ā use AskUserQuestion:
"This looks like a Task. Is it an infrastructure change (env var, secret, config, deployment)?"
Options: Yes, infra (adds infra-task label) / No, general task
General Task fields (no infra-task label):
- Description: Ask:
"Describe the task. What needs to change and why? (problem/motivation)"
- Acceptance criteria (optional): Ask:
"List acceptance criteria or sub-tasks as checklist items (one per line), or skip."
Format each as - [ ] <item> in the body.
- Related issues (optional): Ask:
"Are there any related issues or PRs? (paste numbers/URLs or skip)"
Infra Task fields (infra-task label auto-applied):
- Change type: Use AskUserQuestion with options:
- environment variable
- secret
- config change
- extra configuration
- other
- Target environment: Use AskUserQuestion with options:
- development
- uat
- production
- all
- Task list: Ask:
"List the changes needed as checklist items (one per line)."
Format each as - [ ] <item> in the body.
- Context / reason (optional): Ask:
"Why is this change needed? Link to a ticket, incident, or PR if applicable. (or skip)"
Step 4 ā Priority
Use AskUserQuestion:
"What priority level?"
Options:
- High ā Requires immediate action
- Medium ā Important but not urgent
- Low ā Low urgency
Step 5 ā Conditional Labels
Evaluate the description and context gathered so far. For each label below:
- If it is 100% clear from context that the label applies ā auto-assign it and inform the user
- If it is uncertain ā ask the user directly
Design Required
Auto-assign yes if the user explicitly mentions: new page, new UI component, layout change, redesign, UX change, new visual element.
Auto-assign no (skip the question entirely) when the context clearly has no design implications ā e.g., crashes, errors, backend issues, config changes, refactoring, performance bugs, infra tasks.
Only ask the user when it's genuinely ambiguous (e.g., "improve the user list" ā could be UX or just data):
"Does this issue require design work?"
Options: Yes / No
SIA (Security Impact Analysis)
Auto-assign SIA-required if the user mentions: authentication, authorization, tokens, secrets, passwords, permissions, session, credentials, encryption, PII.
Otherwise ask:
"Does this issue have a security impact that needs analysis?"
Options:
- SIA-required ā Yes, needs security review
- SIA-not required ā No security impact
Step 6 ā Assignee
A ticket MUST have an assignee ā never leave one unassigned (tickets without owners get lost). Default to the creator (@me).
Use AskUserQuestion:
"Assign to you (the creator) by default, or someone else?"
Options:
- Me (default) ā Assign to the creator (
@me)
- Someone else ā Ask for a GitHub username
If Someone else, ask:
"GitHub username to assign?"
Step 7 ā Preview
Show the user a formatted preview of the entire issue:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ISSUE PREVIEW
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Title: <title>
Type: <Bug/Feature/Task> (reflected via labels)
Labels: <comma-separated list ā includes `infra-task` if this is an infra change>
Assignee: <@me (creator) / username>
Project: epam/68
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
BODY:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
<formatted body matching template structure>
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Use AskUserQuestion:
"Create this issue?"
Options:
- Create ā Create the issue now
- Edit ā I want to change something
- Cancel ā Don't create the issue
If Edit: Ask what they want to change, update it, and show the preview again.
If Cancel: Stop and confirm cancellation.
Step 8 ā Create
Build and execute the gh command:
gh issue create \
--title "<title>" \
--body "<body>" \
--label "<label1>,<label2>,..." \
--project "epam/68" \
--assignee "<@me|username>"
Notes:
--type is not supported by gh issue create. Issue type (Bug/Feature/Task) is conveyed via labels (bug, enhancement, or task-specific labels) ā there is no separate type flag.
- There is no separate "Infra Task" type ā infrastructure work is a Task with the
infra-task label auto-applied and the infra-specific body structure (change type, target environment, task list).
--assignee is ALWAYS set (default @me). Never omit it ā the skill guarantees every ticket has an owner.
- The
<details-section> placeholder in the templates below is the code-research findings from Step 2a. If research was NOT performed, omit the entire ### Details heading and its content ā do not leave an empty section.
- The body must be formatted to match the GitHub issue template output format:
Bug body format:
### EPAM AI DIAL Admin version
<version>
### How to reproduce
<steps>
### Actual result
<actual>
### Expected result
<expected>
### Additional information
<info or "_No response_">
### Details
<details-section>
### Confidential information
- [X] I confirm that do not share any confidential information
Feature body format:
### Description
<description>
### Related issues
<issues or "_No response_">
### Details
<details-section>
### Confidential information
- [X] I confirm that do not share any confidential information
Task body format (general):
### Description
<description>
### Acceptance criteria
<checklist items or "_No response_">
### Related issues
<issues or "_No response_">
### Details
<details-section>
### Confidential information
- [X] I confirm that do not share any confidential information
Task body format (infra variant ā used when infra-task label is applied):
### Type of change
<change type>
### Target environment
<environment>
### Task list
<checklist items>
### Context / reason
<context or "_No response_">
### Details
<details-section>
After successful creation, display the issue URL returned by gh.
Label Reference
| Label | Applied When |
|---|
bug | Type = Bug |
enhancement | Type = Feature |
to-be-documented | Type = Feature (always) |
infra-task | Type = Task AND infra signals detected (keywords: env var, secret, config change, deployment, prod/uat, LOG_LEVEL, etc.) OR user invoked /create-ticket infra: ⦠OR user confirms "Yes, infra" in Step 3 |
Priority-Low | User selects Low priority |
Priority-Medium | User selects Medium priority |
Priority-High | User selects High priority |
Severity-Low | Bug ā user selects Low |
Severity-Minor | Bug ā user selects Minor |
Severity-Major | Bug ā user selects Major |
Severity-Critical | Bug ā user selects Critical |
Design Required | Auto or asked ā see Step 5 |
SIA-required | Auto or asked ā see Step 5 |
SIA-not required | User confirms no security impact |
Guardrails
- NEVER create an issue without showing a preview and getting explicit confirmation
- NEVER auto-assign a label unless you are 100% certain from the user's input
- When uncertain about ANY label, ask directly ā don't guess
- Always use the exact label names as listed in the Label Reference table
- Always add
--project "epam/68"
- The confidential information checkbox is always pre-checked in the body
- If
gh CLI fails, show the error and suggest the user check their auth (gh auth status)