@deimoscloud/coreai 0.1.18 → 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,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.
@@ -0,0 +1,185 @@
1
+ ---
2
+ description: Use when updating a Jira ticket status, moving a ticket to a different state, marking a ticket as done, starting work on a ticket, or putting a ticket in review. Handles status transitions with proper comments.
3
+ argument-hint: TICKET-XX to <status>
4
+ requires: [jira]
5
+ ---
6
+
7
+ # Jira Ticket Transition
8
+
9
+ You are transitioning: **$ARGUMENTS**
10
+
11
+ ## Valid Status Transitions
12
+
13
+ ```
14
+ Backlog → To Do → In Progress → In Review → Done
15
+
16
+ Blocked
17
+
18
+ In Progress
19
+ ```
20
+
21
+ | From | To | When |
22
+ |------|-----|------|
23
+ | Backlog | To Do | Sprint planning, ticket prioritized |
24
+ | To Do | In Progress | Work begins on ticket |
25
+ | In Progress | In Review | PR created |
26
+ | In Progress | Blocked | Dependency or blocker identified |
27
+ | Blocked | In Progress | Blocker resolved |
28
+ | In Review | In Progress | PR feedback requires changes |
29
+ | In Review | Done | PR merged, work complete |
30
+
31
+ ## Transition via Atlassian MCP
32
+
33
+ ### Get Current Status First
34
+
35
+ ```
36
+ mcp__atlassian__getJiraIssue
37
+ Issue Key: {{JIRA_PROJECT}}-XX
38
+ ```
39
+
40
+ ### Transition Ticket
41
+
42
+ ```
43
+ mcp__atlassian__transitionJiraIssue
44
+ Issue Key: {{JIRA_PROJECT}}-XX
45
+ Transition: <target status>
46
+ ```
47
+
48
+ ### Add Transition Comment
49
+
50
+ ```
51
+ mcp__atlassian__addCommentToJiraIssue
52
+ Issue Key: {{JIRA_PROJECT}}-XX
53
+ Comment: <transition comment>
54
+ ```
55
+
56
+ ## Required Comments by Transition
57
+
58
+ ### To Do → In Progress
59
+
60
+ ```
61
+ Starting work on this ticket.
62
+ Assigned to: @[agent-name]
63
+ Branch: feature/{{JIRA_PROJECT}}-XX-[description]
64
+ ```
65
+
66
+ ### In Progress → In Review
67
+
68
+ ```
69
+ PR created: <PR URL>
70
+
71
+ Changes implemented:
72
+ - [Change 1]
73
+ - [Change 2]
74
+
75
+ Ready for code review.
76
+ ```
77
+
78
+ ### In Progress → Blocked
79
+
80
+ ```
81
+ BLOCKED: [Reason for block]
82
+
83
+ Blocking issue: [Description or ticket reference]
84
+ Required to unblock: [What needs to happen]
85
+ ```
86
+
87
+ ### Blocked → In Progress
88
+
89
+ ```
90
+ Blocker resolved: [How it was resolved]
91
+ Resuming work.
92
+ ```
93
+
94
+ ### In Review → In Progress
95
+
96
+ ```
97
+ Addressing review feedback:
98
+ - [Feedback item 1]
99
+ - [Feedback item 2]
100
+
101
+ Will update PR when changes are complete.
102
+ ```
103
+
104
+ ### In Review → Done
105
+
106
+ ```
107
+ PR merged: [Merge commit SHA or PR URL]
108
+
109
+ Acceptance criteria verified:
110
+ - [x] [Criterion 1]
111
+ - [x] [Criterion 2]
112
+
113
+ Ticket complete.
114
+ ```
115
+
116
+ ## Workflow Integration
117
+
118
+ This skill integrates with the workflow defined in `WORKFLOWS.md`:
119
+
120
+ | Workflow State | Jira Status |
121
+ |----------------|-------------|
122
+ | BACKLOG | Backlog |
123
+ | ASSIGNED | In Progress |
124
+ | BRANCH_CREATED | In Progress |
125
+ | IMPLEMENTING | In Progress |
126
+ | PR_CREATED | In Review |
127
+ | IN_REVIEW | In Review |
128
+ | APPROVED | In Review |
129
+ | MERGED | Done |
130
+ | VERIFIED | Done |
131
+ | DONE | Done |
132
+
133
+ ## Validation
134
+
135
+ Before transitioning, verify:
136
+
137
+ ### To "In Progress"
138
+ - [ ] Ticket has clear acceptance criteria
139
+ - [ ] No blocking dependencies
140
+ - [ ] Agent is ready to begin work
141
+
142
+ ### To "In Review"
143
+ - [ ] PR exists and is linked
144
+ - [ ] All commits pushed
145
+ - [ ] CI checks passing (or will pass)
146
+
147
+ ### To "Done"
148
+ - [ ] PR is merged
149
+ - [ ] Acceptance criteria met
150
+ - [ ] No open review comments
151
+
152
+ ### To "Blocked"
153
+ - [ ] Blocker is clearly documented
154
+ - [ ] Blocking ticket/issue referenced if applicable
155
+
156
+ ## Error Handling
157
+
158
+ **If transition fails:**
159
+ 1. Check current ticket status
160
+ 2. Verify the transition is valid from current status
161
+ 3. Some transitions may require specific permissions
162
+
163
+ **If MCP is unavailable:**
164
+ Report to user:
165
+ ```
166
+ Unable to transition ticket via MCP.
167
+ Please manually update {{JIRA_PROJECT}}-XX to [status] in Jira.
168
+ Add comment: [suggested comment]
169
+ ```
170
+
171
+ ## Completion
172
+
173
+ After transition, report:
174
+ ```
175
+ Jira Ticket Transitioned
176
+
177
+ Ticket: {{JIRA_PROJECT}}-XX
178
+ Previous Status: [old status]
179
+ New Status: [new status]
180
+ Comment Added: Yes
181
+
182
+ URL: {{JIRA_URL}}/browse/{{JIRA_PROJECT}}-XX
183
+ ```
184
+
185
+ Now proceed with the ticket transition.