@groupby/ai-dev 0.2.0 → 0.2.3

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.
Files changed (41) hide show
  1. package/README.md +3 -1
  2. package/dist/index.js +86 -19
  3. package/package.json +3 -3
  4. package/toolsets/rzlv-flow/README.md +54 -9
  5. package/toolsets/rzlv-flow/resources/confluence-file-structure.md +129 -23
  6. package/toolsets/rzlv-flow/resources/sync-state-format.md +109 -0
  7. package/toolsets/rzlv-flow/skills/jira-daily-triage/SKILL.md +13 -5
  8. package/toolsets/rzlv-flow/skills/jira-sprint-status/SKILL.md +28 -1
  9. package/toolsets/rzlv-flow/skills/jira-ticket-focus/SKILL.md +6 -1
  10. package/toolsets/rzlv-flow/skills/jira-wrap-sync/SKILL.md +41 -8
  11. package/skills/skills/README.md +0 -61
  12. package/skills/skills/archived/README.md +0 -3
  13. package/skills/skills/library/README.md +0 -3
  14. package/skills/skills/library/frontend-design/LICENSE.txt +0 -177
  15. package/skills/skills/library/frontend-design/SKILL.md +0 -42
  16. package/teams/teams/brain-studio/skills/code-review/SKILL.md +0 -46
  17. package/toolsets/toolsets/rzlv-flow/README.md +0 -102
  18. package/toolsets/toolsets/rzlv-flow/docs/mcp-setup.md +0 -126
  19. package/toolsets/toolsets/rzlv-flow/resources/README.md +0 -16
  20. package/toolsets/toolsets/rzlv-flow/resources/confluence-file-structure.md +0 -285
  21. package/toolsets/toolsets/rzlv-flow/resources/confluence-page-templates/README.md +0 -19
  22. package/toolsets/toolsets/rzlv-flow/resources/confluence-page-templates/decisions.md +0 -36
  23. package/toolsets/toolsets/rzlv-flow/resources/confluence-page-templates/initiative-overview.md +0 -40
  24. package/toolsets/toolsets/rzlv-flow/resources/confluence-page-templates/strategic-context.md +0 -44
  25. package/toolsets/toolsets/rzlv-flow/resources/confluence-page-templates/technical-architecture.md +0 -48
  26. package/toolsets/toolsets/rzlv-flow/resources/fcmp-protocol.md +0 -331
  27. package/toolsets/toolsets/rzlv-flow/resources/jira-file-structure.md +0 -177
  28. package/toolsets/toolsets/rzlv-flow/resources/sync-state-format.md +0 -318
  29. package/toolsets/toolsets/rzlv-flow/skills/atlassian-orchestrator/SKILL.md +0 -643
  30. package/toolsets/toolsets/rzlv-flow/skills/context-analyst/SKILL.md +0 -265
  31. package/toolsets/toolsets/rzlv-flow/skills/jira-comment/SKILL.md +0 -89
  32. package/toolsets/toolsets/rzlv-flow/skills/jira-daily-triage/SKILL.md +0 -143
  33. package/toolsets/toolsets/rzlv-flow/skills/jira-sprint-status/SKILL.md +0 -143
  34. package/toolsets/toolsets/rzlv-flow/skills/jira-status/SKILL.md +0 -97
  35. package/toolsets/toolsets/rzlv-flow/skills/jira-sync/SKILL.md +0 -148
  36. package/toolsets/toolsets/rzlv-flow/skills/jira-ticket-focus/SKILL.md +0 -245
  37. package/toolsets/toolsets/rzlv-flow/skills/jira-ticket-trace/SKILL.md +0 -112
  38. package/toolsets/toolsets/rzlv-flow/skills/jira-wrap-sync/SKILL.md +0 -260
  39. /package/toolsets/{toolsets/rzlv-flow → rzlv-flow}/docs/getting-started.md +0 -0
  40. /package/toolsets/{toolsets/rzlv-flow → rzlv-flow}/skills/confluence-fetch/SKILL.md +0 -0
  41. /package/toolsets/{toolsets/rzlv-flow → rzlv-flow}/skills/confluence-publish/SKILL.md +0 -0
@@ -1,97 +0,0 @@
1
- ---
2
- name: jira-status
3
- description: Change a Jira ticket's status with transition validation and FCMP sync safety. Fetches current state, verifies status hasn't changed remotely, shows available transitions as a numbered list, and executes the selected transition. Use when you want to move a Jira ticket to a different status.
4
- ---
5
-
6
- Transition a Jira ticket's status with sync safety. Follows the FCMP protocol — fetches the current state, verifies no remote status change since last sync, presents valid transitions as a numbered list, and executes the selected transition via MCP.
7
-
8
- ## Requirements
9
-
10
- Requires: Atlassian MCP (`atlassian-rovo`). See the rzlv-flow toolset README for setup.
11
-
12
- ## Resources to Load
13
-
14
- Before executing, read this resource file:
15
-
16
- - `docs/ai/resources/fcmp-protocol.md` — follow the FCMP protocol for status transitions
17
-
18
- ## Process
19
-
20
- ### Step 1: Get Ticket Key
21
-
22
- - Use the `focused_ticket` from conversation context if available.
23
- - Otherwise, ask the user for the ticket key.
24
-
25
- ### Step 2: FETCH — Get Current State
26
-
27
- Fetch the current ticket state via `mcp_atlassian-rovo_fetch()`:
28
-
29
- - Current status
30
- - Assignee and summary (for confirmation context)
31
- - Version field (for optimistic locking)
32
-
33
- ### Step 3: COMPARE — Verify No Remote Change
34
-
35
- Compare the fetched status against the last known local state (from the `{TICKET-KEY}.md` frontmatter if available).
36
-
37
- - If the remote status has changed since last sync, warn the user:
38
- ```
39
- ⚠️ Status changed remotely: {old_status} → {current_remote_status}
40
- Continue with transition from {current_remote_status}? (y/n)
41
- ```
42
-
43
- ### Step 4: Get Available Transitions
44
-
45
- Fetch available transitions for the ticket via MCP (e.g. `getTransitionsForJiraIssue` or equivalent).
46
-
47
- Present as a numbered list:
48
-
49
- ```
50
- Current Status: {current_status}
51
-
52
- Available transitions:
53
- 1. {transition_name_1}
54
- 2. {transition_name_2}
55
- 3. {transition_name_3}
56
- 4. Cancel
57
-
58
- Choose transition [1]:
59
- ```
60
-
61
- Do not assume a standard workflow (To Do → In Progress → Done). Always fetch the actual available transitions, as Jira workflows vary by project.
62
-
63
- ### Step 5: Execute Transition
64
-
65
- After the user selects a transition number:
66
-
67
- 1. Confirm: "Transition {TICKET-KEY} from {current_status} to {target_status}? (y/n)"
68
- 2. **PUSH** — Execute the transition via MCP.
69
- 3. On success: confirm with the new status.
70
- 4. On failure: report the error (e.g. required fields missing, permission denied, transition not available).
71
-
72
- ### Step 6: Update Local State
73
-
74
- If a local `{TICKET-KEY}.md` file exists:
75
-
76
- - Update `sync.status` to the new status
77
- - Update `sync.last_synced` to the current timestamp
78
- - Update `sync.version` with the new version from Jira
79
-
80
- ## Output Format
81
-
82
- ```
83
- ## 🔄 Status: {TICKET-KEY}
84
-
85
- **Current Status:** {current_status}
86
-
87
- Available transitions:
88
- 1. {transition_1}
89
- 2. {transition_2}
90
- 3. {transition_3}
91
- 4. Cancel
92
-
93
- Choose transition [1]:
94
-
95
- {AFTER TRANSITION:}
96
- ✓ {TICKET-KEY} transitioned: {old_status} → {new_status}
97
- ```
@@ -1,148 +0,0 @@
1
- ---
2
- name: jira-sync
3
- description: Force-sync local Jira context to bring it up to date with the remote state. Runs the full FCMP protocol (Fetch-Compare-Merge-Push) for a specified ticket, showing diffs if remote changes are detected and resolving conflicts with user input. Use when you want to refresh your local Jira mirror or suspect your local state is stale.
4
- ---
5
-
6
- Force-sync a local Jira ticket file with the remote state. Runs the complete FCMP protocol — fetches the current remote state, compares against the local file, shows diffs if anything changed, and resolves conflicts with user input. Use this when your local state might be stale or after someone else updates the ticket in Jira.
7
-
8
- ## Requirements
9
-
10
- Requires: Atlassian MCP (`atlassian-rovo`). See the rzlv-flow toolset README for setup.
11
-
12
- ## Resources to Load
13
-
14
- Before executing, read these resource files:
15
-
16
- - `docs/ai/resources/fcmp-protocol.md` — **critical** — the full FCMP protocol to follow
17
- - `docs/ai/resources/jira-file-structure.md` — to locate the local ticket file
18
- - `docs/ai/resources/sync-state-format.md` — YAML frontmatter schema for reading and updating the ticket file
19
-
20
- ## Process
21
-
22
- ### Step 1: Get Ticket Key
23
-
24
- - Use `focused_ticket` from conversation context if available.
25
- - Otherwise, ask the user for the ticket key.
26
-
27
- ### Step 2: Locate Local File
28
-
29
- Find the local `{TICKET-KEY}.md` file using the rules in `jira-file-structure.md`:
30
-
31
- 1. Search under `docs/jira/{instance}/{project}/` for a file matching `{TICKET-KEY}.md`.
32
- 2. It may be in an epic folder (`{epic-name}/stories/{TICKET-KEY}/{TICKET-KEY}.md`) or in `_orphans/`.
33
- 3. If no local file exists, inform the user and offer to create one by fetching from Jira (effectively a first-time sync).
34
-
35
- ### Step 3: FETCH — Get Remote State
36
-
37
- Fetch the full ticket state from Jira via `mcp_atlassian-rovo_fetch()`:
38
-
39
- - Summary, description, acceptance criteria
40
- - Status, assignee, priority, story points
41
- - Version number (for optimistic locking)
42
- - Last updated timestamp
43
- - Recent comments
44
-
45
- ### Step 4: COMPARE — Diff Local vs Remote
46
-
47
- Compare the fetched remote state against the local file:
48
-
49
- - **Frontmatter fields:** `sync.status`, `sync.assignee`, `sync.priority`, `sync.story_points`, `sync.version`
50
- - **Body content:** description, acceptance criteria, technical notes
51
- - **Timestamps:** `sync.remote_updated` vs the remote `updated_at`
52
-
53
- Determine the scenario:
54
-
55
- | Scenario | Condition | Action |
56
- |----------|-----------|--------|
57
- | Already up to date | `sync.version` matches remote version | Report "Already up to date" |
58
- | Remote changed only | Remote version is newer, no local modifications | Apply remote changes |
59
- | Local changed only | Local has edits, remote is same as last sync | No action needed (local changes preserved) |
60
- | Both changed | Local edits AND remote version is newer | Conflict — proceed to merge |
61
-
62
- ### Step 5: Show Diff
63
-
64
- If changes are detected, present them clearly:
65
-
66
- ```
67
- ### Changes Detected
68
-
69
- {FOR EACH CHANGED FIELD:}
70
- **{field_name}:**
71
- - Local: {local_value}
72
- - Remote: {remote_value}
73
-
74
- {FOR BODY CHANGES:}
75
- **Description:**
76
- - Lines added remotely: {n}
77
- - Lines removed remotely: {n}
78
- {Show abbreviated diff}
79
- ```
80
-
81
- ### Step 6: MERGE — Resolve Conflicts
82
-
83
- If both local and remote have changes:
84
-
85
- 1. Present the conflict to the user.
86
- 2. Offer resolution strategies:
87
- ```
88
- Conflict detected. How would you like to resolve?
89
- 1. Keep remote (discard local changes)
90
- 2. Keep local (your changes will overwrite on next push)
91
- 3. Manual merge (I'll show both versions side by side)
92
- ```
93
- 3. For **auto-merge** (changes in different sections), combine both changes automatically and confirm with the user.
94
- 4. For **manual merge**, present both versions and let the user edit.
95
-
96
- If only the remote changed (no local edits), apply the remote changes directly.
97
-
98
- ### Step 7: Update Local File
99
-
100
- After merge resolution:
101
-
102
- 1. Write the merged content to the local `{TICKET-KEY}.md` file.
103
- 2. Update frontmatter fields:
104
- - `sync.status` — current remote status
105
- - `sync.assignee` — current assignee
106
- - `sync.priority` — current priority
107
- - `sync.story_points` — current story points
108
- - `sync.last_synced` — current timestamp
109
- - `sync.version` — remote version number
110
- - `sync.remote_updated` — remote last updated timestamp
111
- 3. Preserve any `agile_companion` or `orchestrator` metadata that exists.
112
-
113
- ### Step 8: Report Results
114
-
115
- Confirm what changed.
116
-
117
- ## Output Format
118
-
119
- ```
120
- ## 🔄 Sync: {TICKET-KEY}
121
-
122
- {IF ALREADY UP TO DATE:}
123
- ✓ {TICKET-KEY} is already up to date (version {version})
124
-
125
- {IF CHANGES APPLIED:}
126
- ### Changes Applied
127
- {List of fields updated with old → new values}
128
-
129
- - **Status:** {old} → {new}
130
- - **Assignee:** {old} → {new}
131
- - **Description:** Updated ({n} lines changed)
132
-
133
- ✓ Local file synced to version {version} at {timestamp}
134
-
135
- {IF CONFLICT RESOLVED:}
136
- ### Conflict Resolved
137
- - Strategy: {keep_remote | keep_local | auto_merge | manual_merge}
138
- - Fields affected: {list}
139
-
140
- ✓ Conflict resolved and local file updated to version {version}
141
-
142
- {IF NEW FILE CREATED:}
143
- ### New File Created
144
- - Path: {relative_path_to_ticket_file}
145
- - Fetched from Jira: version {version}
146
-
147
- ✓ Local file created for {TICKET-KEY}
148
- ```
@@ -1,245 +0,0 @@
1
- ---
2
- name: jira-ticket-focus
3
- description: Deep-load a Jira ticket with full context for focused work. Fetches ticket details, detects the parent epic, creates or navigates the local file structure, loads linked requirements, checks git branch status, and presents quick actions (branch creation, status transition, assignment). Use when you want to focus on a specific Jira ticket.
4
- ---
5
-
6
- Deep-load a single Jira ticket for focused development work. Fetches full ticket context via MCP, determines the correct local file location using epic detection and smart structure rules, sets up the developer workspace, checks git branch status, and presents actionable quick actions.
7
-
8
- ## Requirements
9
-
10
- Requires: Atlassian MCP (`atlassian-rovo`). See the rzlv-flow toolset README for setup.
11
- Optional: Git CLI for branch detection and creation.
12
-
13
- ## Resources to Load
14
-
15
- Before executing, read these resource files — they are critical for correct behavior:
16
-
17
- - `docs/ai/resources/fcmp-protocol.md` — follow for all Jira read/write operations
18
- - `docs/ai/resources/jira-file-structure.md` — **critical** for file placement logic and ownership rules
19
- - `docs/ai/resources/sync-state-format.md` — YAML frontmatter format for ticket files
20
-
21
- ## Process
22
-
23
- ### Step 1: Resolve Ticket Reference
24
-
25
- - If the user provides a **number** (e.g. "3"), look it up from the `numbered_ticket_list` stored in conversational context from a prior `jira-daily-triage` run.
26
- - If the user provides a **Jira key** (e.g. "PROJ-123"), use it directly.
27
- - If the key is **incomplete** (e.g. "123"), prepend the `confirmed_project` key from session context (e.g. "PROJ-123").
28
- - If neither a number mapping nor a project key is available, attempt fallback detection:
29
- 1. **Git branch:** Check the current branch name for a `{PROJECT}-{n}` pattern (e.g. `feature/PROJ-123` → project is `PROJ`).
30
- 2. **Config file:** Check for a `.jira.json` file in the project root containing `{ "project": "PROJ", "instance": "rezolve" }`.
31
- 3. If neither yields a project key, ask the user for the full ticket key.
32
-
33
- ### Step 2: Fetch Ticket Details (FCMP Fetch Step)
34
-
35
- Use `mcp_atlassian-rovo_fetch()` to retrieve:
36
-
37
- - Summary, description, acceptance criteria
38
- - Comments and recent history
39
- - Sprint information (use `active_sprint_name` from session context if available)
40
- - Linked Confluence documents (if any)
41
- - **Subtasks** — fetch all subtasks of the ticket via JQL: `parent = {TICKET-KEY} ORDER BY status ASC, priority DESC`
42
- - **Linked issues** — fetch linked issues (blocks, is blocked by, relates to)
43
-
44
- **Parent Epic detection** — check in this order:
45
-
46
- 1. Check `fields.parent` — if `parent.fields.issuetype.name == "Epic"`, that is the epic.
47
- 2. Check for an Epic Link custom field (varies by instance; commonly `customfield_10014` or similar).
48
- 3. If no epic is found, the ticket is **orphaned**.
49
-
50
- Store the epic key and summary for context display and file placement.
51
-
52
- ### Step 3: Determine Ticket Location (Smart Structure Detection)
53
-
54
- Determine where the ticket file lives (or should be created) in the local Jira file structure. Follow the rules from `jira-file-structure.md`:
55
-
56
- ```
57
- Base directory: docs/jira/{instance}/{project}/
58
- ```
59
-
60
- **If an epic parent was found:**
61
-
62
- 1. Check if an epic folder already exists locally:
63
- ```
64
- {base}/*{EPIC-KEY}*/
65
- ```
66
- (Glob match — the folder may include a slug, e.g. `PROJ-100-user-authentication/`)
67
-
68
- 2. If the epic folder **exists**, place the ticket at:
69
- ```
70
- {base}/{epic-folder}/stories/{TICKET-KEY}/{TICKET-KEY}.md
71
- ```
72
-
73
- 3. If the epic folder **does not exist**, create it:
74
- ```
75
- {base}/{EPIC-KEY}-{epic-summary-slug}/
76
- {base}/{EPIC-KEY}-{epic-summary-slug}/stories/
77
- ```
78
- Then place the ticket at:
79
- ```
80
- {base}/{EPIC-KEY}-{epic-summary-slug}/stories/{TICKET-KEY}/{TICKET-KEY}.md
81
- ```
82
- Note in output: "Created new epic folder structure for {EPIC-KEY}"
83
-
84
- **If no epic parent (orphan):**
85
- ```
86
- {base}/_orphans/{TICKET-KEY}/{TICKET-KEY}.md
87
- ```
88
-
89
- **If the parent is a Story or Task (i.e. ticket is a subtask):**
90
- ```
91
- {base}/.../{PARENT-KEY}/subtasks/{TICKET-KEY}/{TICKET-KEY}.md
92
- ```
93
-
94
- ### Step 4: Load Requirements Context
95
-
96
- - **If an epic parent was detected:**
97
- - Search for `epic.md` in the epic folder and load it for goals, scope, and technical approach.
98
- - Check for a `_docs/` folder with generated documentation (architecture, decisions, strategic context).
99
- - Check for linked Confluence documents in the epic or ticket metadata.
100
- - If the epic folder was just created and `epic.md` doesn't exist, note that epic context is missing.
101
-
102
- - **If no epic or epic folder was not found:**
103
- - Search for any related documentation by keyword matching in the project's `_docs/` folders.
104
- - Note the gap — the user may want to run `atlassian-orchestrator` to generate context.
105
-
106
- ### Step 5: Prepare Local Environment
107
-
108
- 1. **Create or update `{TICKET-KEY}.md`** with sync state frontmatter following the schema in `sync-state-format.md`:
109
- - Populate all `sync` fields from the fetched Jira data.
110
- - Set `structure.type` based on the issue type.
111
- - Set `structure.parent` as a relative path to the parent file (if applicable).
112
- - Set `structure.epic` to the epic key (if applicable).
113
- - Set `agile_companion.last_focused` to the current timestamp.
114
-
115
- 2. **Create `_work/` folder** in the ticket directory for developer notes (this folder is gitignored).
116
-
117
- 3. **Store the fetched Jira state** locally so that future FCMP operations can compare against it.
118
-
119
- ### Step 6: Check Git Branch Status
120
-
121
- Run these git commands to detect branch state:
122
-
123
- ```bash
124
- # Current branch
125
- git branch --show-current
126
-
127
- # Local branches matching ticket key
128
- git branch --list "*{TICKET-KEY}*"
129
-
130
- # Remote branches matching ticket key
131
- git branch -r --list "*{TICKET-KEY}*"
132
- ```
133
-
134
- Common branch naming patterns to check:
135
- - `feature/{TICKET-KEY}`
136
- - `feature/{TICKET-KEY}-*`
137
- - `{TICKET-KEY}`
138
- - `{TICKET-KEY}-*`
139
-
140
- Determine which scenario applies:
141
-
142
- | Scenario | Condition | Action |
143
- |----------|-----------|--------|
144
- | No branch exists | Local and remote checks both empty | Offer to create `feature/{TICKET-KEY}` |
145
- | Local branch exists, not current | Found in local list, not current branch | Offer to switch |
146
- | Remote branch exists, not local | Found in remote list, not in local | Offer to checkout |
147
- | Already on correct branch | Current branch contains ticket key | Show checkmark, no action needed |
148
-
149
- ### Step 7: Present Work Context
150
-
151
- Display the full ticket details, acceptance criteria as a checklist, requirements from loaded context, and technical notes — all in a scannable format.
152
-
153
- ### Step 8: Offer Quick Actions
154
-
155
- Present numbered quick actions based on detected state:
156
-
157
- - **Git branch actions** (from Step 6 — only the relevant scenario).
158
- - **Assignment:** If the ticket is unassigned, offer to assign to the current user.
159
- - **Status transition:** If the ticket status is "To Do" or "Open", offer to move to "In Progress".
160
- - Always include a "Skip quick actions" option as the last number.
161
-
162
- ## Output Format
163
-
164
- ```
165
- ## 🎯 Focus: {TICKET-KEY} — {Summary}
166
-
167
- **Project:** {confirmed_project} | **Epic:** {Epic Key}: {Epic Summary} (or "No Epic (Orphaned)")
168
- **Assignee:** {assignee or "Unassigned"} | **Status:** {status}
169
- **Points:** {story_points} | **Priority:** {priority}
170
- **Sprint:** {active_sprint_name}
171
- **Current Branch:** {current_git_branch}
172
- **Local Path:** {relative path to ticket file}
173
-
174
- {IF epic folder was just created:}
175
- ✨ Created new epic folder structure for {EPIC-KEY}
176
-
177
- ### Acceptance Criteria
178
- - [ ] {criterion 1}
179
- - [ ] {criterion 2}
180
- - [ ] {criterion 3}
181
-
182
- ### Requirements Context
183
- {Content from epic.md, _docs/, or linked Confluence pages.
184
- If no context available: "No requirements context found. Consider running atlassian-orchestrator to generate epic documentation."}
185
-
186
- ### Technical Notes
187
- {From architecture docs, epic technical notes, or _docs/ folder.
188
- If none: "No technical notes available."}
189
-
190
- ### Recent Activity
191
- - {commenter}: "{comment excerpt}" ({time ago})
192
- - {commenter}: "{comment excerpt}" ({time ago})
193
-
194
- ---
195
- **Quick Actions:**
196
-
197
- {Based on git branch detection scenario — show only the relevant one:}
198
-
199
- {IF NO BRANCH EXISTS:}
200
- 1. Create and switch to new branch: feature/{TICKET-KEY}
201
-
202
- {IF LOCAL BRANCH EXISTS BUT NOT CURRENT:}
203
- 1. Switch to existing branch: {branch_name}
204
-
205
- {IF REMOTE BRANCH EXISTS BUT NOT LOCAL:}
206
- 1. Checkout remote branch: {branch_name}
207
-
208
- {IF ALREADY ON CORRECT BRANCH:}
209
- ✓ Already on feature branch: {branch_name}
210
-
211
- {Additional actions based on ticket state:}
212
-
213
- {IF UNASSIGNED:}
214
- {N}. Assign to me and move to "In Progress"
215
-
216
- {IF ASSIGNED BUT STATUS IS "To Do"/"Open":}
217
- {N}. Move to "In Progress"
218
-
219
- {ALWAYS:}
220
- {last}. Skip quick actions — start working as-is
221
-
222
- Choose [1]:
223
- ```
224
-
225
- ## Quick Action Execution
226
-
227
- When the user selects a numbered action:
228
-
229
- - **Branch creation:** `git checkout -b feature/{TICKET-KEY}`
230
- - **Branch switch:** `git checkout {branch_name}`
231
- - **Remote checkout:** `git checkout -b {branch_name} origin/{branch_name}`
232
- - **Assign to me:** Update the assignee field via MCP, following FCMP protocol. Fetch current state first, then update.
233
- - **Status transition:** Fetch available transitions via `mcp_atlassian-rovo_fetch()` (or equivalent MCP call for transitions), then execute the transition. Follow FCMP protocol — fetch current state, confirm transition is valid, then push.
234
-
235
- After executing any action, confirm what was done and re-display the relevant updated field.
236
-
237
- ## Session Context
238
-
239
- After running, update conversational context with:
240
-
241
- - **focused_ticket** — The Jira ticket key currently being worked on
242
- - **focused_ticket_path** — The local file path for the ticket
243
- - **working_branch** — The git branch being used (after any branch action)
244
-
245
- The user may say "wrap" after completing work, which invokes the `jira-wrap-sync` skill using this context.
@@ -1,112 +0,0 @@
1
- ---
2
- name: jira-ticket-trace
3
- description: Trace code back to its Jira requirements. Uses git blame to find the commit, extracts the ticket reference, fetches the ticket and its epic context, and presents the full "why" chain (business context, technical decisions, original requirements). Use when you need to understand why code exists or trace a feature to its origin.
4
- ---
5
-
6
- Context recovery — trace code back to its Jira requirements. Performs git archaeology to find the originating commit and ticket key, then fetches the full context chain from Jira (ticket, epic, linked docs) to explain *why* the code exists.
7
-
8
- ## Requirements
9
-
10
- Requires: Atlassian MCP (`atlassian-rovo`). See the rzlv-flow toolset README for setup.
11
- Also uses: Git CLI (`git blame`, `git log`).
12
-
13
- ## Resources to Load
14
-
15
- Before executing, read this resource file:
16
-
17
- - `docs/ai/resources/fcmp-protocol.md` — follow read protocols for Jira fetch operations
18
-
19
- ## Process
20
-
21
- ### Step 1: Identify Target
22
-
23
- Determine what code the user wants to trace. Accept any of:
24
-
25
- - A **selected code block** in the editor
26
- - A **file and line reference** (e.g. `src/auth.ts:42`)
27
- - A **feature or function name** (e.g. "the rate limiting logic")
28
-
29
- If the user provides a feature description rather than a specific location, search the codebase to find the relevant file(s) and line(s) first.
30
-
31
- ### Step 2: Git Archaeology
32
-
33
- Trace the code to its originating commit:
34
-
35
- 1. Run `git blame -L {start},{end} {file}` to find the commit(s) that introduced the target code.
36
- 2. For the most relevant commit, extract:
37
- - Commit hash, author, date
38
- - Full commit message: `git log -1 --format="%B" {hash}`
39
- 3. Look for a Jira ticket key in the commit message (pattern: `[A-Z]+-\d+`).
40
- 4. If no ticket key in the commit message, check:
41
- - The PR/MR associated with the commit: `git log -1 --format="%s" {hash}` may reference a PR number
42
- - The branch name at the time of merge (often contains ticket keys)
43
- - Adjacent commits for context
44
- 5. If still no ticket key found, report to the user and offer to search Jira by keyword.
45
-
46
- ### Step 3: Trace to Jira
47
-
48
- Once a ticket key is found:
49
-
50
- 1. **Fetch ticket details** via `mcp_atlassian-rovo_fetch()` — summary, description, status, acceptance criteria.
51
- 2. **Get the parent epic** — use the same epic detection logic as `jira-ticket-focus`:
52
- - Check `fields.parent` for an epic type
53
- - Check for Epic Link custom field
54
- 3. **Get linked initiative** (if the epic has a parent or linked initiative).
55
- 4. **Check for linked Confluence docs** in the ticket or epic metadata.
56
-
57
- ### Step 4: Load Context Chain
58
-
59
- Build the full "why" chain by loading available context:
60
-
61
- - **Original requirements** — from the ticket description, acceptance criteria, and any linked Confluence requirement pages.
62
- - **Decision logs** — from `_docs/decisions.md` in the epic folder if it exists locally.
63
- - **Assumptions** — from technical notes in the ticket or epic documentation.
64
- - **Strategic context** — from `_docs/strategic-context.md` if available.
65
-
66
- If local `_docs/` folders don't exist, note what's available from Jira/Confluence only.
67
-
68
- ### Step 5: Present the "Why"
69
-
70
- Assemble and present the full trace from code to business context.
71
-
72
- ## Output Format
73
-
74
- ```
75
- ## 🔍 Why: {code reference}
76
-
77
- ### Git Trail
78
- - **Commit:** {hash} by {author} on {date}
79
- - **Message:** "{commit message}"
80
- - **Ticket:** {TICKET-KEY}
81
- {IF PR FOUND:}
82
- - **PR:** #{pr_number} — {pr_title}
83
-
84
- ### Business Context
85
- {From epic or initiative context — the high-level "why" this feature exists.
86
- If no epic context: "No epic context available for this ticket."}
87
-
88
- ### Technical Decision
89
- {From decision logs or technical notes — why this approach was chosen over alternatives.
90
- If none available: "No decision log found."}
91
-
92
- ### Original Requirement
93
- > "{Quote from the ticket description or acceptance criteria that drove this code}"
94
- — {TICKET-KEY}: {ticket summary}
95
-
96
- {IF CONFLUENCE DOCS LINKED:}
97
- ### Related Documentation
98
- - {Confluence page title}: {url}
99
-
100
- ### Key Assumptions
101
- - {Assumption that drove this implementation choice}
102
- - {Constraint that shaped the approach}
103
-
104
- ---
105
- Need more context? I can load the full epic documentation or search for related tickets.
106
- ```
107
-
108
- ## Edge Cases
109
-
110
- - **No ticket key found in git history:** Report the commit details and offer to search Jira by keywords from the commit message or code context.
111
- - **Ticket deleted or inaccessible:** Report the ticket key and note that it may have been moved, deleted, or is in a project you don't have access to.
112
- - **Multiple commits / multiple tickets:** If git blame shows multiple commits for the target code, trace the most significant one (largest change) and note the others.