Skip to content

Commit 8bb7084

Browse files
committed
chore: Create task for github issue management
Signed-off-by: Sergiy Kulanov <sergiy_kulanov@epam.com>
1 parent e358b54 commit 8bb7084

File tree

1 file changed

+160
-0
lines changed

1 file changed

+160
-0
lines changed
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
---
2+
dependencies:
3+
data:
4+
- ../../.github/ISSUE_TEMPLATE/enhancement.yml
5+
- ../../.github/ISSUE_TEMPLATE/feature_request.yml
6+
- ../../.github/ISSUE_TEMPLATE/bug_report.yml
7+
mcp_servers:
8+
- github
9+
---
10+
11+
# Task: Create GitHub Issues
12+
13+
## Description
14+
15+
Create GitHub issues (epics, stories, bugs) for KubeRocketCI/kuberocketai repository using existing GitHub templates and GitHub MCP server.
16+
17+
## Prerequisites
18+
19+
<prerequisites>
20+
- GitHub MCP Server: Available and configured
21+
- Repository Access: KubeRocketCI/kuberocketai with issue creation permissions
22+
</prerequisites>
23+
24+
## Instructions
25+
26+
<instructions>
27+
28+
### 1. Gather Requirements
29+
30+
Ask user to specify:
31+
32+
- Type: Epic, Story (Enhancement), or Bug
33+
- Title: Clear, descriptive title
34+
- Repository: Default `KubeRocketCI/kuberocketai` (allow override)
35+
- Labels: Optional extra labels
36+
- Assignees: Default `SergK` (allow override)
37+
- Related Epic #: Optional (adds a note at the end of the body)
38+
39+
Then, based on the selected Type, prompt for fields derived from the corresponding template (see Template-Driven Rendering):
40+
41+
- Epic (feature_request.yml):
42+
- Feature Summary (required)
43+
- Problem Statement (required)
44+
- Proposed Solution (required)
45+
- Alternative Solutions (optional)
46+
- Usage Examples (optional)
47+
- Acceptance Criteria (optional)
48+
49+
- Story/Enhancement (enhancement.yml):
50+
- Current Functionality (required)
51+
- Current Limitations (required)
52+
- Proposed Improvement (required)
53+
- Expected Benefits (required)
54+
- Implementation Examples (optional)
55+
- Testing Considerations (optional)
56+
57+
- Bug (bug_report.yml):
58+
- Bug Description (required)
59+
- Steps to Reproduce (required)
60+
- Expected Behavior (required)
61+
- Actual Behavior (required)
62+
- Error Logs/Output (optional)
63+
64+
### 2. Preview & Confirm Before Creation
65+
66+
CRITICAL: Always confirm with user before creating any GitHub issue:
67+
68+
- Show a full preview of the issue body rendered from the selected template and provided fields (H2 headers per textarea label, in template order)
69+
- Ask for explicit approval: "Should I create this issue?"
70+
- Only proceed after user confirms "yes"
71+
72+
### 3. Label Strategy
73+
74+
Base Labels: Use template defaults from `.github/ISSUE_TEMPLATE/*.yml`
75+
76+
Repository Extensions (add if conditions match):
77+
78+
- All Epics → +`epic`
79+
- Breaking changes mentioned → +`breaking-change`
80+
- Technical debt scope → +`technical-debt`
81+
- High priority/complexity → +`critical`
82+
83+
### 4. Create Issue
84+
85+
### Template-Driven Rendering (for API/MCP creation)
86+
87+
When creating issues programmatically, derive the output structure from the corresponding GitHub Issue Template to keep a single source of truth.
88+
89+
- Locate template by type:
90+
- Epic → `.github/ISSUE_TEMPLATE/feature_request.yml`
91+
- Story/Enhancement → `.github/ISSUE_TEMPLATE/enhancement.yml`
92+
- Bug → `.github/ISSUE_TEMPLATE/bug_report.yml`
93+
94+
- Parse the template YAML and render sections in order:
95+
- For each `body` item with `type: textarea`, use `attributes.label` as a Markdown H2 header (e.g., `## {label}`)
96+
- Preserve item ordering from the template
97+
- Optionally include `attributes.description` as helper text under the header (plain text), if needed
98+
- Respect `validations.required`; HALT if any required textarea is missing in user input
99+
100+
- Metadata handling:
101+
- Title: use the template `title` prefix unless a custom title is provided by the user
102+
- Labels: include template default labels plus any user-specified labels
103+
- Assignees: include template default assignees unless overridden
104+
- Non-textarea fields (dropdowns, inputs, checkboxes): if user provided values, include a short "Metadata" section listing key-value pairs
105+
106+
- Validation:
107+
- CRITICAL: If the mapped template file is missing, HALT and report the exact missing path; do not create the issue
108+
- If any required field per template is missing, HALT and list missing fields
109+
- If `Type` is not one of: Epic, Story (Enhancement), Bug — HALT and show the allowed values
110+
111+
- Conventions:
112+
- Keep content concise and outcome-focused; avoid command-level testing instructions in high-level sections
113+
- Maintain template order and naming to match the UI form experience
114+
115+
</instructions>
116+
117+
## Output Format
118+
119+
- Location: GitHub issue in the target repository (return created issue URL)
120+
- Type: Epic → Feature Request, Story → Enhancement, Bug → Bug Report
121+
- Title: Use template title prefix unless user provides an explicit title override
122+
- Labels/Assignees: Apply template defaults plus any user-provided additions
123+
124+
## Execution Checklist
125+
126+
### Discovery Phase
127+
128+
- Validate Type is one of: Epic, Story (Enhancement), Bug
129+
- Verify mapped template file exists for the selected Type
130+
- Collect required fields as defined by the template (textareas with required: true)
131+
132+
### Planning Phase
133+
134+
- Render preview using template labels as H2 headers, in template order
135+
- Validate all required fields populated; list any missing and HALT
136+
- Apply label strategy: template defaults + repository extensions
137+
- Confirm labels and assignees (template defaults + repository patterns)
138+
139+
### Creation Phase
140+
141+
- Create issue via GitHub MCP server
142+
- Append `Relates to: #<n>` if provided
143+
- Return issue URL to the user
144+
145+
## Success Criteria
146+
147+
<success_criteria>
148+
- User Confirmation: User explicitly approved issue creation
149+
- Issue Created: GitHub issue successfully created
150+
- Correct Template: Appropriate GitHub template used
151+
- Proper Labels: Template-required labels applied
152+
- URL Provided: GitHub issue URL returned to user
153+
</success_criteria>
154+
155+
## Important Notes
156+
157+
- Never create issues without user confirmation
158+
- GitHub templates handle all field requirements automatically
159+
- To link to an epic, provide the "Related Epic #"; the agent will append `Relates to: #<number>` automatically
160+
- All created issues auto-assigned to SergK as repository owner

0 commit comments

Comments
 (0)