@deimoscloud/coreai 0.1.19 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,195 @@
1
+ ---
2
+ description: Use when creating a pull request, opening a PR, or when code is ready for review. Creates PR with proper format, links to Jira ticket, and automatically transitions the ticket to "In Review" status.
3
+ argument-hint: [ticket reference or PR title]
4
+ requires: [git]
5
+ optional: [jira]
6
+ ---
7
+
8
+ # Create Pull Request
9
+
10
+ You are creating a PR for: **$ARGUMENTS**
11
+
12
+ ## Pre-PR Checklist
13
+
14
+ Before creating a PR, verify:
15
+
16
+ ### 1. All Commits Pushed
17
+
18
+ ```bash
19
+ git status
20
+ ```
21
+
22
+ Ensure no uncommitted changes. If there are changes, use `/git-commit` first.
23
+
24
+ ### 2. Branch is Up-to-Date
25
+
26
+ ```bash
27
+ git fetch origin main
28
+ git log origin/main..HEAD --oneline
29
+ ```
30
+
31
+ If behind main, rebase:
32
+ ```bash
33
+ git rebase origin/main
34
+ git push --force-with-lease
35
+ ```
36
+
37
+ ### 3. CI Checks Ready
38
+
39
+ All local checks should have passed during `/git-commit`.
40
+
41
+ ## Extract Ticket Information
42
+
43
+ ### From Branch Name
44
+ ```bash
45
+ git branch --show-current
46
+ # Expected format: feature/{{JIRA_PROJECT}}-XX-description
47
+ ```
48
+
49
+ ### From Jira (if available)
50
+ Use MCP to get ticket details:
51
+ - Title
52
+ - Description
53
+ - Acceptance criteria
54
+
55
+ ## Create Pull Request
56
+
57
+ ### PR Title Format
58
+ ```
59
+ [{{JIRA_PROJECT}}-XX] <Brief description>
60
+ ```
61
+
62
+ **Examples:**
63
+ - `[{{JIRA_PROJECT}}-123] Add feature state machine`
64
+ - `[{{JIRA_PROJECT}}-456] Fix connection timeout handling`
65
+
66
+ ### PR Body Template
67
+
68
+ ```markdown
69
+ ## Summary
70
+
71
+ Brief description of what this PR does.
72
+
73
+ ## Changes
74
+
75
+ - Change 1
76
+ - Change 2
77
+ - Change 3
78
+
79
+ ## Ticket
80
+
81
+ [{{JIRA_PROJECT}}-XX]({{JIRA_URL}}/browse/{{JIRA_PROJECT}}-XX)
82
+
83
+ ## Testing
84
+
85
+ - [ ] Unit tests added/updated
86
+ - [ ] Manual testing completed
87
+ - [ ] Tested on [device/emulator]
88
+
89
+ ## Checklist
90
+
91
+ - [ ] Code follows development standards
92
+ - [ ] All quality checks pass
93
+ - [ ] No debug code or TODOs left
94
+ - [ ] Documentation updated (if applicable)
95
+ ```
96
+
97
+ ### Create PR with GitHub CLI
98
+
99
+ ```bash
100
+ gh pr create \
101
+ --title "[{{JIRA_PROJECT}}-XX] <description>" \
102
+ --body "$(cat <<'EOF'
103
+ ## Summary
104
+
105
+ <description>
106
+
107
+ ## Changes
108
+
109
+ - <change 1>
110
+ - <change 2>
111
+
112
+ ## Ticket
113
+
114
+ [{{JIRA_PROJECT}}-XX]({{JIRA_URL}}/browse/{{JIRA_PROJECT}}-XX)
115
+
116
+ ## Testing
117
+
118
+ - [ ] Unit tests added/updated
119
+ - [ ] Manual testing completed
120
+
121
+ ## Checklist
122
+
123
+ - [ ] Code follows development standards
124
+ - [ ] All quality checks pass
125
+ - [ ] No debug code or TODOs left
126
+ EOF
127
+ )"
128
+ ```
129
+
130
+ ## Update Jira Ticket
131
+
132
+ **MANDATORY:** After PR is created, transition the Jira ticket to "In Review".
133
+
134
+ ### Using Atlassian MCP
135
+
136
+ 1. Transition ticket to "In Review" status
137
+ 2. Add comment with PR link:
138
+
139
+ ```
140
+ PR created: <PR URL>
141
+
142
+ Changes:
143
+ - <summary of changes>
144
+
145
+ Ready for code review.
146
+ ```
147
+
148
+ ### Fallback (if MCP unavailable)
149
+
150
+ Report to user:
151
+ ```
152
+ Please manually update Jira ticket {{JIRA_PROJECT}}-XX:
153
+ - Status: In Review
154
+ - Add comment with PR link: <URL>
155
+ ```
156
+
157
+ ## Request Review
158
+
159
+ If you know who should review:
160
+ ```bash
161
+ gh pr edit <PR_NUMBER> --add-reviewer <github-username>
162
+ ```
163
+
164
+ ## Completion
165
+
166
+ After PR creation, report:
167
+ ```
168
+ Pull Request Created
169
+
170
+ PR: #<number> - [{{JIRA_PROJECT}}-XX] <title>
171
+ URL: <github PR URL>
172
+ Branch: feature/{{JIRA_PROJECT}}-XX-description -> main
173
+
174
+ Jira Updated:
175
+ - Ticket {{JIRA_PROJECT}}-XX transitioned to "In Review"
176
+ - Comment added with PR link
177
+
178
+ Next Steps:
179
+ - CI checks will run automatically
180
+ - Await code review
181
+ - Address any feedback
182
+ ```
183
+
184
+ ## Error Handling
185
+
186
+ **If PR creation fails:**
187
+ - Check if branch is pushed: `git push -u origin $(git branch --show-current)`
188
+ - Check if PR already exists: `gh pr list --head $(git branch --show-current)`
189
+ - Check GitHub CLI auth: `gh auth status`
190
+
191
+ **If Jira transition fails:**
192
+ - Note the failure in your completion report
193
+ - Ask user to manually update Jira
194
+
195
+ Now proceed with PR creation.
@@ -0,0 +1,168 @@
1
+ ---
2
+ description: Use when a PR has been merged, a ticket is complete, or development work is finished. Cleans up the git worktree created for parallel agent work. Typically used by the Engineering Manager after merge.
3
+ argument-hint: TICKET-XX or worktree path
4
+ requires: [git]
5
+ ---
6
+
7
+ # Worktree Cleanup
8
+
9
+ You are cleaning up the worktree for: **$ARGUMENTS**
10
+
11
+ ## When to Use
12
+
13
+ - PR has been merged to main
14
+ - Ticket is marked as Done
15
+ - Development work is complete and no longer needed
16
+
17
+ ## Cleanup Steps
18
+
19
+ ### 1. Identify Worktree to Remove
20
+
21
+ List all active worktrees:
22
+ ```bash
23
+ cd {{PROJECT_ROOT}}
24
+ git worktree list
25
+ ```
26
+
27
+ **Expected output:**
28
+ ```
29
+ {{PROJECT_ROOT}} abc1234 [main]
30
+ {{PROJECT_ROOT}}/../{{PROJECT_NAME}}-agent1-{{JIRA_PROJECT}}-123 def5678 [feature/{{JIRA_PROJECT}}-123-description]
31
+ {{PROJECT_ROOT}}/../{{PROJECT_NAME}}-agent2-{{JIRA_PROJECT}}-456 ghi9012 [feature/{{JIRA_PROJECT}}-456-description]
32
+ ```
33
+
34
+ ### 2. Verify PR is Merged
35
+
36
+ Before removing, confirm the PR is merged:
37
+ ```bash
38
+ gh pr list --state merged --search "{{JIRA_PROJECT}}-XX"
39
+ ```
40
+
41
+ Or check if the branch exists on remote:
42
+ ```bash
43
+ git ls-remote --heads origin feature/{{JIRA_PROJECT}}-XX-description
44
+ # Empty output = branch deleted (PR merged)
45
+ ```
46
+
47
+ ### 3. Remove Worktree
48
+
49
+ ```bash
50
+ # From the main repository
51
+ cd {{PROJECT_ROOT}}
52
+
53
+ # Remove the worktree
54
+ git worktree remove ../{{PROJECT_NAME}}-[agent-name]-{{JIRA_PROJECT}}-XX
55
+ ```
56
+
57
+ ### 4. Delete Local Branch (if exists)
58
+
59
+ ```bash
60
+ git branch -d feature/{{JIRA_PROJECT}}-XX-description
61
+ ```
62
+
63
+ If branch wasn't merged (force delete with caution):
64
+ ```bash
65
+ git branch -D feature/{{JIRA_PROJECT}}-XX-description
66
+ ```
67
+
68
+ ### 5. Prune Stale Worktrees
69
+
70
+ Clean up any stale worktree references:
71
+ ```bash
72
+ git worktree prune
73
+ ```
74
+
75
+ ### 6. Verify Cleanup
76
+
77
+ ```bash
78
+ git worktree list
79
+ ```
80
+
81
+ Confirm the worktree no longer appears.
82
+
83
+ ## Batch Cleanup
84
+
85
+ To clean up multiple worktrees at once:
86
+
87
+ ```bash
88
+ # List all worktrees
89
+ git worktree list
90
+
91
+ # Remove each one
92
+ git worktree remove ../{{PROJECT_NAME}}-agent1-{{JIRA_PROJECT}}-XXX
93
+ git worktree remove ../{{PROJECT_NAME}}-agent2-{{JIRA_PROJECT}}-YYY
94
+
95
+ # Prune all stale references
96
+ git worktree prune
97
+ ```
98
+
99
+ ## Error Handling
100
+
101
+ **If worktree has uncommitted changes:**
102
+ ```
103
+ error: '<path>' contains modified or untracked files, use --force to delete it
104
+ ```
105
+
106
+ Options:
107
+ 1. **If changes are needed:** Commit and push first, then remove
108
+ 2. **If changes can be discarded:** `git worktree remove --force ../path`
109
+
110
+ **If worktree directory doesn't exist but git tracks it:**
111
+ ```bash
112
+ git worktree prune
113
+ ```
114
+
115
+ **If branch is not fully merged:**
116
+ ```bash
117
+ # Check if branch was merged
118
+ git branch --merged main | grep feature/{{JIRA_PROJECT}}-XX
119
+
120
+ # If not merged but PR is closed/merged on GitHub, force delete
121
+ git branch -D feature/{{JIRA_PROJECT}}-XX-description
122
+ ```
123
+
124
+ ## Update Jira (Optional)
125
+
126
+ If the ticket isn't already Done, transition it:
127
+ - Use `/jira-transition` to move to "Done"
128
+ - Or use Atlassian MCP directly
129
+
130
+ ## Completion
131
+
132
+ After cleanup, report:
133
+ ```
134
+ Worktree Cleanup Complete
135
+
136
+ Removed:
137
+ - Worktree: {{PROJECT_ROOT}}/../{{PROJECT_NAME}}-[agent-name]-{{JIRA_PROJECT}}-XX
138
+ - Branch: feature/{{JIRA_PROJECT}}-XX-description
139
+
140
+ Active Worktrees:
141
+ <output of git worktree list>
142
+
143
+ Ticket {{JIRA_PROJECT}}-XX is ready to be marked as Done (if not already).
144
+ ```
145
+
146
+ ## Bulk Cleanup After Sprint
147
+
148
+ To clean up all worktrees from a completed sprint:
149
+
150
+ ```bash
151
+ # List all worktrees
152
+ git worktree list
153
+
154
+ # Remove all agent worktrees (keep main)
155
+ for dir in ../{{PROJECT_NAME}}-*-{{JIRA_PROJECT}}-*; do
156
+ if [ -d "$dir" ]; then
157
+ git worktree remove "$dir" --force
158
+ fi
159
+ done
160
+
161
+ # Prune
162
+ git worktree prune
163
+
164
+ # Clean up merged branches
165
+ git branch --merged main | grep -E "feature/{{JIRA_PROJECT}}-" | xargs -r git branch -d
166
+ ```
167
+
168
+ Now proceed with the worktree cleanup.
@@ -0,0 +1,112 @@
1
+ ---
2
+ description: Use when starting work on a ticket, implementing a feature, fixing a bug, or beginning any development task. Sets up an isolated git worktree for parallel agent work, preventing conflicts when multiple agents work simultaneously.
3
+ argument-hint: TICKET-XX [short-description]
4
+ requires: [git]
5
+ optional: [jira]
6
+ ---
7
+
8
+ # Worktree Setup for Parallel Development
9
+
10
+ You are setting up an isolated git worktree to work on: **$ARGUMENTS**
11
+
12
+ ## Why Worktrees?
13
+
14
+ Multiple agents can work on different tickets simultaneously without conflicts. Each agent gets its own working directory with its own branch, completely isolated from other agents.
15
+
16
+ ## Setup Steps
17
+
18
+ ### 1. Parse Arguments
19
+
20
+ Extract from `$ARGUMENTS`:
21
+ - **Ticket ID:** {{JIRA_PROJECT}}-XX (required)
22
+ - **Description:** Short description for branch name (optional, derive from ticket if not provided)
23
+
24
+ ### 2. Determine Your Agent Name
25
+
26
+ Identify which agent you are (e.g., `backend-engineer`, `frontend-engineer`). This is used in the worktree path.
27
+
28
+ ### 3. Fetch Latest Main
29
+
30
+ ```bash
31
+ cd {{PROJECT_ROOT}}
32
+ git fetch origin main
33
+ ```
34
+
35
+ ### 4. Create Worktree
36
+
37
+ ```bash
38
+ # Pattern: ../{{PROJECT_NAME}}-[agent-name]-{{JIRA_PROJECT}}-XX
39
+ git worktree add ../{{PROJECT_NAME}}-[agent-name]-{{JIRA_PROJECT}}-XX -b feature/{{JIRA_PROJECT}}-XX-[description] origin/main
40
+ ```
41
+
42
+ **Example:**
43
+ ```bash
44
+ git worktree add ../{{PROJECT_NAME}}-backend-engineer-{{JIRA_PROJECT}}-123 -b feature/{{JIRA_PROJECT}}-123-feature-name origin/main
45
+ ```
46
+
47
+ ### 5. Verify Worktree
48
+
49
+ ```bash
50
+ git worktree list
51
+ ```
52
+
53
+ Confirm your new worktree appears in the list.
54
+
55
+ ### 6. Set Working Directory
56
+
57
+ **CRITICAL:** All subsequent work must happen in the worktree directory:
58
+
59
+ ```
60
+ {{PROJECT_ROOT}}/../{{PROJECT_NAME}}-[agent-name]-{{JIRA_PROJECT}}-XX/
61
+ ```
62
+
63
+ Announce to the user:
64
+ ```
65
+ Worktree created. Working directory is now:
66
+ {{PROJECT_ROOT}}/../{{PROJECT_NAME}}-[agent-name]-{{JIRA_PROJECT}}-XX
67
+
68
+ All code changes will be made in this isolated directory.
69
+ ```
70
+
71
+ ### 7. Update Jira (if not already done)
72
+
73
+ If the ticket is not already "In Progress":
74
+ - Transition ticket to "In Progress"
75
+ - Add comment: "Starting work. Branch: `feature/{{JIRA_PROJECT}}-XX-[description]`"
76
+
77
+ ## Important Notes
78
+
79
+ - **Never work in the main repository** when a worktree is active for your ticket
80
+ - **One worktree per ticket** - if you already have a worktree for this ticket, use it instead of creating a new one
81
+ - **Worktree cleanup** is handled by the Engineering Manager after PR merge via `/worktree-cleanup`
82
+
83
+ ## Error Handling
84
+
85
+ **If worktree already exists:**
86
+ ```bash
87
+ # Check existing worktrees
88
+ git worktree list
89
+
90
+ # If your worktree exists, just use it
91
+ cd ../{{PROJECT_NAME}}-[agent-name]-{{JIRA_PROJECT}}-XX
92
+ ```
93
+
94
+ **If branch already exists:**
95
+ ```bash
96
+ # Use existing branch in new worktree
97
+ git worktree add ../{{PROJECT_NAME}}-[agent-name]-{{JIRA_PROJECT}}-XX feature/{{JIRA_PROJECT}}-XX-[description]
98
+ ```
99
+
100
+ ## Completion
101
+
102
+ After setup, announce:
103
+ ```
104
+ Worktree ready for {{JIRA_PROJECT}}-XX
105
+
106
+ Directory: {{PROJECT_ROOT}}/../{{PROJECT_NAME}}-[agent-name]-{{JIRA_PROJECT}}-XX
107
+ Branch: feature/{{JIRA_PROJECT}}-XX-[description]
108
+
109
+ Ready to begin implementation.
110
+ ```
111
+
112
+ Now proceed with the worktree setup.
@@ -0,0 +1,201 @@
1
+ ---
2
+ description: Use when creating a Jira ticket, adding a new task to backlog, reporting a bug, or creating a feature request. Ensures tickets have all required fields and follow the standard template.
3
+ argument-hint: <type> <title> [description]
4
+ requires: [jira]
5
+ ---
6
+
7
+ # Create Jira Ticket
8
+
9
+ You are creating a Jira ticket for: **$ARGUMENTS**
10
+
11
+ ## Ticket Types
12
+
13
+ | Type | Use For |
14
+ |------|---------|
15
+ | **Story** | New user-facing features |
16
+ | **Task** | Technical work, refactoring, infrastructure |
17
+ | **Bug** | Defects, issues, broken functionality |
18
+ | **Spike** | Research, investigation, prototyping |
19
+ | **Improvement** | Enhancements to existing features |
20
+
21
+ ## Required Fields
22
+
23
+ Every ticket MUST have:
24
+
25
+ 1. **Summary** - Clear, concise title
26
+ 2. **Type** - Story, Task, Bug, Spike, or Improvement
27
+ 3. **Description** - What needs to be done and why
28
+ 4. **Acceptance Criteria** - Definition of done (checklist)
29
+ 5. **Priority** - P0 (Critical), P1 (High), P2 (Medium), P3 (Low)
30
+ 6. **Labels** - Relevant labels
31
+
32
+ ## Create Ticket via Atlassian MCP
33
+
34
+ ### Using MCP
35
+
36
+ ```
37
+ mcp__atlassian__createJiraIssue
38
+
39
+ Project: {{JIRA_PROJECT}}
40
+ Issue Type: <Story|Task|Bug|Spike|Improvement>
41
+ Summary: <Clear title>
42
+ Description: <Detailed description>
43
+ Priority: <P0|P1|P2|P3>
44
+ Labels: <comma-separated labels>
45
+ ```
46
+
47
+ ### Description Template
48
+
49
+ ```markdown
50
+ ## Overview
51
+ [Brief description of what needs to be done]
52
+
53
+ ## Background
54
+ [Why this is needed, context, related tickets]
55
+
56
+ ## Requirements
57
+ - [Requirement 1]
58
+ - [Requirement 2]
59
+
60
+ ## Acceptance Criteria
61
+ - [ ] [Criterion 1]
62
+ - [ ] [Criterion 2]
63
+ - [ ] [Criterion 3]
64
+ - [ ] Unit tests written and passing
65
+ - [ ] Code reviewed and approved
66
+
67
+ ## Technical Notes
68
+ [Any technical considerations, constraints, or suggestions]
69
+
70
+ ## References
71
+ - [Links to PRD, design docs, related tickets]
72
+ ```
73
+
74
+ ## Ticket Templates by Type
75
+
76
+ ### Story Template
77
+
78
+ ```markdown
79
+ ## User Story
80
+ As a [user type], I want [functionality] so that [benefit].
81
+
82
+ ## Background
83
+ [Context and motivation]
84
+
85
+ ## Acceptance Criteria
86
+ - [ ] [User-visible outcome 1]
87
+ - [ ] [User-visible outcome 2]
88
+ - [ ] Unit tests written
89
+ - [ ] Manual testing completed
90
+
91
+ ## Design
92
+ [Link to UI mockups if applicable]
93
+ ```
94
+
95
+ ### Bug Template
96
+
97
+ ```markdown
98
+ ## Bug Description
99
+ [Clear description of the bug]
100
+
101
+ ## Steps to Reproduce
102
+ 1. [Step 1]
103
+ 2. [Step 2]
104
+ 3. [Step 3]
105
+
106
+ ## Expected Behavior
107
+ [What should happen]
108
+
109
+ ## Actual Behavior
110
+ [What actually happens]
111
+
112
+ ## Environment
113
+ - Device: [e.g., device type]
114
+ - OS Version: [e.g., version]
115
+ - App Version: [e.g., 1.0.0]
116
+
117
+ ## Acceptance Criteria
118
+ - [ ] Bug is fixed
119
+ - [ ] Regression test added
120
+ - [ ] Verified on affected device
121
+ ```
122
+
123
+ ### Task Template
124
+
125
+ ```markdown
126
+ ## Task Description
127
+ [What needs to be done]
128
+
129
+ ## Background
130
+ [Why this task is needed]
131
+
132
+ ## Scope
133
+ - [Item 1]
134
+ - [Item 2]
135
+
136
+ ## Out of Scope
137
+ - [Item that is NOT part of this task]
138
+
139
+ ## Acceptance Criteria
140
+ - [ ] [Deliverable 1]
141
+ - [ ] [Deliverable 2]
142
+ - [ ] Documentation updated (if applicable)
143
+ ```
144
+
145
+ ## Priority Guidelines
146
+
147
+ | Priority | Criteria | Response |
148
+ |----------|----------|----------|
149
+ | **P0** | Production down, data loss, security issue | Immediate |
150
+ | **P1** | Major feature broken, blocking release | This sprint |
151
+ | **P2** | Important but not blocking | Next sprint |
152
+ | **P3** | Nice to have, minor improvements | Backlog |
153
+
154
+ ## Local Fallback
155
+
156
+ If Atlassian MCP is unavailable, create a local ticket file:
157
+
158
+ **Path:** `/KnowledgeLibrary/tickets/backlog/{{JIRA_PROJECT}}-XXX-[short-description].md`
159
+
160
+ ```markdown
161
+ # [{{JIRA_PROJECT}}-XXX] [Title]
162
+
163
+ ## Metadata
164
+ - **Status:** Backlog
165
+ - **Priority:** [P0|P1|P2|P3]
166
+ - **Type:** [Story|Task|Bug|Spike|Improvement]
167
+ - **Created By:** [agent-name]
168
+ - **Created Date:** [YYYY-MM-DD]
169
+ - **Labels:** [comma-separated]
170
+
171
+ ## Description
172
+ [Full description]
173
+
174
+ ## Acceptance Criteria
175
+ - [ ] [Criterion 1]
176
+ - [ ] [Criterion 2]
177
+
178
+ ## References
179
+ - [Links]
180
+ ```
181
+
182
+ ## Completion
183
+
184
+ After ticket creation, report:
185
+ ```
186
+ Jira Ticket Created
187
+
188
+ Ticket: {{JIRA_PROJECT}}-XXX
189
+ Title: [Summary]
190
+ Type: [Type]
191
+ Priority: [Priority]
192
+ Status: Backlog
193
+
194
+ URL: {{JIRA_URL}}/browse/{{JIRA_PROJECT}}-XXX
195
+
196
+ Next Steps:
197
+ - Ticket is in Backlog, ready for sprint planning
198
+ - Use /delegate to assign when ready
199
+ ```
200
+
201
+ Now proceed with ticket creation.