Create a new GitHub issue (feature request or bug report) by gathering an unstructured description from the user, classifying it, filling out the appropriate Kibana template, interviewing the user to improve any weak sections, and filing the issue via the GitHub CLI.
Guide the user through creating a well-structured GitHub issue from scratch.
Ask the user to describe their feature request or bug report in their own words — no structure required. Tell them to include as much or as little as they know. End your response and wait for the user to reply before proceeding.
Example prompt to the user:
Describe the feature you'd like or the bug you've found in your own words. Don't worry about structure — just tell me what you're thinking and I'll help shape it.
Using the user's description, determine whether this is a bug report or a feature request:
If classification is ambiguous, ask the user which type applies before continuing.
Read the template to know which fields to populate:
.github/ISSUE_TEMPLATE/Bug_report.md.github/ISSUE_TEMPLATE/Feature_request.ymlUsing the user's description as source material, populate as many template fields as you can. Apply reasonable inference:
Leave fields blank where the description provides no basis for inference. Do not ask questions yet — draft first.
Draft a concise, descriptive issue title (under 72 characters) that captures the core ask or bug. Prefix with the relevant area if apparent (e.g. [Discover], [Maps], [Alerting]).
Review your draft. Identify fields that are:
For each such field, ask one question at a time, then end your response and wait for the user to reply before moving to the next field.
Guidelines:
Describe the bug, Steps to reproduce, Expected behavior, What feature do you want added?, Why?): always ask if missing or weak.screenshots, logs, browser console errors, additional context, Priority): ask once; accept "N/A" or "none" and move on.For feature requests, also probe for these common gaps (even if the field is not empty, ensure the draft addresses them):
Display the complete proposed issue (title + body) and ask the user to confirm or request changes. End your response and wait for explicit confirmation before filing.
After the user confirms, create the issue:
ISSUE_BODY=$(cat <<'EOF'
<formatted body here>
EOF
)
gh issue create --repo elastic/kibana --title "<TITLE>" --body "$ISSUE_BODY" --label "<bug|enhancement>"
Use label bug for bug reports and enhancement for feature requests.
Report the new issue URL to the user when done.