@staff0rd/assist 0.573.2 → 0.574.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
@@ -59,7 +59,7 @@ After installation, the `assist` command will be available globally. You can als
59
59
  - `/restructure` - Analyze and restructure tightly-coupled files
60
60
  - `/review-pr-comments` - Process PR review comments one by one
61
61
  - `/jira [action] [KEY] [args]` - Jira actions: `view`, `associate`, `update`, `started`, `done`, `help`. `[KEY]` is optional — it resolves from the session's backlog item
62
- - `/github [action] [ref] [args]` - GitHub issue actions: `view`, `associate`, `update`, `started`, `done`, `help`. `[ref]` is optional — it resolves from the session's backlog item
62
+ - `/github [action] [ref] [args]` - GitHub issue actions: `view`, `edit`, `associate`, `update`, `started`, `done`, `help`. `[ref]` is optional — it resolves from the session's backlog item. A bare `/github <ref>` runs `edit`, which opens the issue in the web preview pane; outside a web session the command prints the issue to chat instead
63
63
  - `/journal` - Append a journal entry summarising recent work
64
64
  - `/next [id]` - Signal completion and chain into the next backlog item
65
65
  - `/standup` - Summarise recent journal entries as a standup update
@@ -134,6 +134,7 @@ Every command supports `--help` for full detail on its flags and behaviour.
134
134
  - `--verbose` - Per-line log output instead of the stacked-spinner UI (automatic in CI)
135
135
  - `assist github commits <org> [--since <date>] [--top <n>] [--json]` - Report commit activity across a GitHub organisation: repos ranked by commits, top committers, and a per-repo author breakdown
136
136
  - `assist github issue create --title <title> --body <body> [-R <owner>/<repo>]` - Create a GitHub issue on the current repo (or `-R`'s). There is no What/Why/How template — an issue reports a problem, and the target repo's own issue template is unknowable from here. The title and body are rejected if they reference Claude or an assist backlog item, and in a web session they are previewed for approve/reject first (with inline comments); nothing is created until it is approved. Raw `gh issue create` is denied in favour of this command
137
+ - `assist github issue edit <number> [-R <owner>/<repo>]` - Rework an existing GitHub issue's body in the web preview pane. Fetches the issue's current `title`, `body` and `updatedAt` with `gh issue view`, writes the body to a working file under `~/.assist/github-issues/`, and previews it for approve/reject. Approving pushes the pane's markdown back with `gh issue edit --body-file`; nothing is pushed if the issue was updated on GitHub after it was fetched (the working file is named instead, so nobody else's edit is clobbered) or if the preview is rejected. Outside a web session there is no pane to edit in, so the command just prints the issue — callers never need to detect the session themselves. Only the body is touched — the title, labels, assignees and state are left alone
137
138
  - `assist github issue comment <number> --body <body> [-R <owner>/<repo>]` - Comment on a GitHub issue on the current repo (or `-R`'s); a body of `-` reads it from stdin. The body is rejected if it references Claude or an assist backlog item, and in a web session it is previewed for approve/reject first (with inline comments); nothing is posted until it is approved. Raw `gh issue comment` is denied in favour of this command
138
139
  - `assist news add [url]` - Add an RSS feed URL (rendered in the sessions web News tab)
139
140
 
@@ -1,9 +1,9 @@
1
1
  ---
2
- description: View or act on a GitHub issue (view, associate, update, started, done, help)
2
+ description: View or act on a GitHub issue (view, edit, associate, update, started, done, help)
3
3
  allowed_args: "[action] [owner/repo#number | issue-url] [args]"
4
4
  ---
5
5
 
6
- You are the `/github` dispatcher. Parse `$ARGUMENTS` into an **action verb** plus optional issue/args, then run that action. Actions: `view`, `associate`, `update`, `started`, `done`, `help`.
6
+ You are the `/github` dispatcher. Parse `$ARGUMENTS` into an **action verb** plus optional issue/args, then run that action. Actions: `view`, `edit`, `associate`, `update`, `started`, `done`, `help`.
7
7
 
8
8
  All GitHub operations go through the `gh` CLI. A GitHub issue is referenced as the compact shorthand `owner/repo#number` (e.g. `staff0rd/assist#5`) or a full `https://github.com/owner/repo/issues/N` URL.
9
9
 
@@ -12,11 +12,11 @@ All GitHub operations go through the `gh` CLI. A GitHub issue is referenced as t
12
12
  Tokenise `$ARGUMENTS` on whitespace.
13
13
 
14
14
  - No tokens → run **help**.
15
- - First token is a known action verb (`view`, `associate`, `update`, `started`, `done`, `help`) → that is the action; the remaining tokens are its args.
16
- - First token matches a GitHub issue reference (`owner/repo#number` or a `github.com/.../issues/N` URL) → action is **view**, issue is that token.
15
+ - First token is a known action verb (`view`, `edit`, `associate`, `update`, `started`, `done`, `help`) → that is the action; the remaining tokens are its args.
16
+ - First token matches a GitHub issue reference (`owner/repo#number` or a `github.com/.../issues/N` URL) → action is **edit**, issue is that token.
17
17
  - Anything else → run **help** (the input was not understood).
18
18
 
19
- ## Step 2: Resolve the issue (for view / started / done / update)
19
+ ## Step 2: Resolve the issue (for view / edit / started / done / update)
20
20
 
21
21
  These actions operate on a single GitHub issue. Resolve it once:
22
22
 
@@ -43,6 +43,21 @@ gh issue view <number> -R <owner>/<repo> 2>&1
43
43
 
44
44
  Display the result to the user.
45
45
 
46
+ ## Action: edit
47
+
48
+ Rework the issue's body in the assist web preview pane. This is what a bare issue reference runs. Run it and nothing else:
49
+
50
+ ```
51
+ assist github issue edit <number> -R <owner>/<repo> 2>&1
52
+ ```
53
+
54
+ Do not check for a web session yourself — the command already knows. In a web session it fetches the issue's current body, opens it in the preview pane, and pushes the pane's markdown back on approval; outside one it just prints the issue. Only the body is ever touched — the title, labels, assignees and state are left alone.
55
+
56
+ Display the output so the user can see what happened. If the command exits non-zero, relay what it reported and stop — nothing was pushed. Two cases to relay verbatim:
57
+
58
+ - **Request changes** — the reason and every inline comment, each with the excerpt it was left on. Address each one, then run the command again.
59
+ - **The issue moved on GitHub** — it names the working file holding the markdown. Someone else edited the issue, so nothing was pushed; tell the user rather than re-running blind.
60
+
46
61
  ## Action: associate
47
62
 
48
63
  Associate a GitHub issue with a backlog item by calling the `assist backlog associate-github` CLI command, which normalises the reference, confirms the issue exists via `gh`, and stores it on the item. Args are `<owner/repo#number | issue-url> [backlog item id]`.
@@ -120,7 +135,9 @@ Report the final state.
120
135
 
121
136
  List the available actions and their arguments:
122
137
 
123
- - `/github <owner/repo#number>` or `/github view <ref>` — view an issue (ref optional; falls back to the session item's GitHub issue).
138
+ - `/github view <ref>` — print an issue to chat (ref optional; falls back to the session item's GitHub issue).
139
+ - `/github <owner/repo#number>` — rework that issue in the web preview pane (see `edit`).
140
+ - `/github edit [ref]` — rework the issue body in the web preview pane (what a bare `/github <ref>` runs; the command prints the issue instead when there is no web session).
124
141
  - `/github associate <ref> [id]` — associate a GitHub issue with a backlog item (id optional; falls back to the session item).
125
142
  - `/github update [ref]` — post a concise session-summary comment to the issue (previewed for approval before posting).
126
143
  - `/github started [ref]` — assign the issue to yourself.