@staff0rd/assist 0.361.0 → 0.362.1

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.
package/README.md CHANGED
@@ -41,7 +41,6 @@ After installation, the `assist` command will be available globally. You can als
41
41
  ## Claude Commands
42
42
 
43
43
  - `/add-command` - Add a new run command to assist.yml
44
- - `/associate-jira <KEY> [id]` - Associate a Jira ticket with the backlog item this session is working on (or an explicit id) by calling `assist backlog associate-jira`
45
44
  - `/branch <description> [--jira KEY]` - Create a branch off the fresh remote default via `assist branch`, deriving a kebab-case slug from the description and auto-filling the Jira key from the session's backlog item when one is associated
46
45
  - `/bug` - File a bug with reproduction steps, expected and actual behavior
47
46
  - `/comment` - Add pending review comments to the current PR
@@ -58,8 +57,7 @@ After installation, the `assist` command will be available globally. You can als
58
57
  - `/refine` - Refine an existing backlog item through conversation
59
58
  - `/restructure` - Analyze and restructure tightly-coupled files
60
59
  - `/review-comments` - Process PR review comments one by one
61
- - `/jira` - View a Jira work item
62
- - `/update-jira [JIRA-KEY]` - Post a concise summary of this session's findings to a Jira ticket via MCP; attaches a passed key to the session's backlog item (else reads the key from it), retargets sub-task comments to the parent, and previews the comment before posting on confirmation
60
+ - `/jira [action] [KEY] [args]` - Dispatch Jira actions. `view` (default for a bare key) fetches and displays the issue; `associate <KEY> [id]` associates a ticket with a backlog item via `assist backlog associate-jira`; `update [KEY]` posts a concise session-summary comment via MCP (attaches a passed key to the session item first, else reads the key from it; retargets sub-task comments to the parent; previews before posting); `started [KEY]` assigns it to the current Atlassian user and transitions it to In Progress; `done [KEY]` transitions it to Done with no assignment change; `help` (or bare `/jira`) lists the actions. A `[KEY]` is optional for every action — when omitted it resolves from the session's current backlog item; started/done act on the exact issue with no parent retargeting
63
61
  - `/journal` - Append a journal entry summarising recent work, decisions, and notable observations
64
62
  - `/next [id]` - Signal completion and chain into the next backlog item; pass an `id` to run a specific item directly (falls back to the picker if the id is missing, done, won't-do, or blocked)
65
63
  - `/standup` - Summarise recent journal entries as a standup update
@@ -1,5 +1,120 @@
1
1
  ---
2
- description: View a Jira work item
2
+ description: View or act on a Jira work item (view, associate, update, started, done, help)
3
+ allowed_args: "[action] [JIRA-KEY] [args]"
3
4
  ---
4
5
 
5
- Fetch the Jira work item `$ARGUMENTS` using the `mcp__claude_ai_Atlassian__getJiraIssue` tool from the MCP Atlassian server, then display the result to the user.
6
+ You are the `/jira` dispatcher. Parse `$ARGUMENTS` into an **action verb** plus optional key/args, then run that action. Actions: `view`, `associate`, `update`, `started`, `done`, `help`.
7
+
8
+ ## Step 1: Parse the action
9
+
10
+ Tokenise `$ARGUMENTS` on whitespace.
11
+
12
+ - No tokens → run **help**.
13
+ - First token is a known action verb (`view`, `associate`, `update`, `started`, `done`, `help`) → that is the action; the remaining tokens are its args.
14
+ - First token matches a Jira key (`[A-Z]+-\d+`) → action is **view**, key is that token.
15
+ - Anything else → run **help** (the input was not understood).
16
+
17
+ ## Step 2: Resolve the key (for view / started / done / update)
18
+
19
+ These actions operate on a single Jira issue. Resolve it once:
20
+
21
+ - If the action's args include a token matching `[A-Z]+-\d+`, use that key verbatim.
22
+ - Otherwise read it from the backlog item this session is working on — the one you are implementing, reviewing, or otherwise focused on (e.g. via `/next-backlog-item`, a `backlog run`, or earlier in this conversation). Get its id, then run:
23
+
24
+ ```
25
+ assist backlog show <id> 2>&1
26
+ ```
27
+
28
+ Use the `Jira: <KEY>` line from the output.
29
+
30
+ If no key can be resolved — none was passed and there is no session item, or the item has no associated key — tell the user there is nothing to act on and ask them to pass an explicit key. Do not guess a key.
31
+
32
+ Resolve the Atlassian `cloudId` once via `mcp__claude_ai_Atlassian__getAccessibleAtlassianResources` and reuse it for every MCP call below.
33
+
34
+ started and done act on the **exact** issue/subtask the key resolves to. Do not retarget to a parent issue.
35
+
36
+ ## Action: view
37
+
38
+ Fetch the issue with `mcp__claude_ai_Atlassian__getJiraIssue` and display the result to the user.
39
+
40
+ ## Action: associate
41
+
42
+ Associate a Jira ticket with a backlog item by calling the `assist backlog associate-jira` CLI command, which validates the key, confirms the issue exists in Jira, and stores it on the item. Args are `<JIRA-KEY> [backlog item id]`.
43
+
44
+ Identify which token is the Jira key (matches `[A-Z]+-\d+`) and which, if any, is the item id (a bare number).
45
+
46
+ Resolve the target item: use the explicit item id if provided, otherwise the backlog item this session is working on. If there is no explicit id and this session is not working on a backlog item, there is nothing to associate the key with — tell the user and ask them to pass an explicit item id.
47
+
48
+ Call the CLI command with the resolved id and the Jira key:
49
+
50
+ ```
51
+ assist backlog associate-jira <id> <JIRA-KEY> 2>&1
52
+ ```
53
+
54
+ To remove an existing association instead, run:
55
+
56
+ ```
57
+ assist backlog associate-jira <id> --clear 2>&1
58
+ ```
59
+
60
+ Display the command output so the user can see the result. If the command reports an error (item not found, malformed key, or the issue could not be fetched), relay it to the user — no key is stored on failure.
61
+
62
+ ## Action: update
63
+
64
+ Post a concise comment summarising this session's findings to a Jira ticket. If a key is passed it is first attached to the session's current backlog item; otherwise the key is read from that item.
65
+
66
+ **Resolve the key** as in Step 2, with one addition: if a key was explicitly passed in the args, first attach it to the session's current backlog item, then use it:
67
+
68
+ ```
69
+ assist backlog associate-jira <id> <JIRA-KEY> 2>&1
70
+ ```
71
+
72
+ If the command reports an error (item not found, malformed key, or the issue could not be fetched), relay it to the user and stop — no key is stored on failure.
73
+
74
+ **Resolve the comment target:** fetch the issue with `mcp__claude_ai_Atlassian__getJiraIssue`, requesting fields including `issuetype` and `parent`. If `fields.issuetype.subtask` is true, retarget the comment to the parent: use `fields.parent.key` as the issue you comment on. Otherwise comment on the key itself.
75
+
76
+ **Compose a concise comment** from the conversation context:
77
+
78
+ - One summary line stating what was done or found.
79
+ - A few short bullets with the concrete specifics (files, decisions, outcomes).
80
+
81
+ Keep it concise: no headers, no wall of text, no restating the whole session. If there is little of substance to report, keep it to the single summary line.
82
+
83
+ Do not mention `assist`, the assist backlog, or any backlog item number in the comment — the Jira ticket is outward-facing and must not leak internal tooling references. Refer to commits, PRs, or the work itself instead.
84
+
85
+ **Preview and confirm before posting.** Show the drafted comment and the target issue key to the user. Do not post until the user explicitly confirms. If they ask for edits, revise and show the updated draft again. Once confirmed, post it with `mcp__claude_ai_Atlassian__addCommentToJiraIssue`, using the resolved target key and `contentFormat: markdown`. Display the result so the user can see it landed.
86
+
87
+ ## Action: started
88
+
89
+ Move the resolved issue to In Progress and assign it to yourself:
90
+
91
+ 1. Get the current Atlassian user with `mcp__claude_ai_Atlassian__atlassianUserInfo` to obtain their `account_id`.
92
+ 2. Assign the issue with `mcp__claude_ai_Atlassian__editJiraIssue`, setting `fields.assignee` to `{ "accountId": "<account_id>" }`.
93
+ 3. List transitions with `mcp__claude_ai_Atlassian__getTransitionsForJiraIssue`. Find the one whose target status name matches **In Progress** case-insensitively and apply it with `mcp__claude_ai_Atlassian__transitionJiraIssue`.
94
+
95
+ If no matching transition is available, list the available transition names to the user and stop (the assignment above still stands — tell the user it was applied).
96
+
97
+ Report the final assignee and status.
98
+
99
+ ## Action: done
100
+
101
+ Move the resolved issue to Done with **no** assignment change:
102
+
103
+ 1. List transitions with `mcp__claude_ai_Atlassian__getTransitionsForJiraIssue`. Find the one whose target status name matches **Done** case-insensitively and apply it with `mcp__claude_ai_Atlassian__transitionJiraIssue`.
104
+
105
+ If no matching transition is available, list the available transition names to the user and stop.
106
+
107
+ Report the final status.
108
+
109
+ ## Action: help
110
+
111
+ List the available actions and their arguments:
112
+
113
+ - `/jira <KEY>` or `/jira view <KEY>` — view an issue (KEY optional; falls back to the session item's Jira key).
114
+ - `/jira associate <KEY> [id]` — associate a Jira ticket with a backlog item (id optional; falls back to the session item).
115
+ - `/jira update [KEY]` — post a concise session-summary comment to the issue (retargets sub-task comments to the parent; previews before posting).
116
+ - `/jira started [KEY]` — assign the issue to yourself and transition it to In Progress.
117
+ - `/jira done [KEY]` — transition the issue to Done (no assignment change).
118
+ - `/jira help` — show this list.
119
+
120
+ Note that every action's `[KEY]` is optional: when omitted it resolves from the session's current backlog item.