@staff0rd/assist 0.573.1 → 0.574.0

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 it 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), if the preview is rejected, or outside a web session. 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,35 @@ 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, and it needs a web session — the pane is the editing surface.
49
+
50
+ Check whether this is a web session:
51
+
52
+ ```
53
+ echo "session=${ASSIST_SESSION:-} id=${ASSIST_SESSION_ID:-}" 2>&1
54
+ ```
55
+
56
+ If `session` is not `1` or `id` is empty, there is no pane. Fall back to **view** — print the issue to the user and stop:
57
+
58
+ ```
59
+ gh issue view <number> -R <owner>/<repo> 2>&1
60
+ ```
61
+
62
+ In a web session, open the issue in the pane instead:
63
+
64
+ ```
65
+ assist github issue edit <number> -R <owner>/<repo> 2>&1
66
+ ```
67
+
68
+ The command fetches the issue's current body, opens it in the preview pane, and pushes the pane's markdown back on approval. Only the body is touched — the title, labels, assignees and state are left alone.
69
+
70
+ Display the result so the user can see whether it landed. If the command exits non-zero, relay what it reported and stop — nothing was pushed. Two cases to relay verbatim:
71
+
72
+ - **Request changes** — the reason and every inline comment, each with the excerpt it was left on. Address each one, then run the command again.
73
+ - **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.
74
+
46
75
  ## Action: associate
47
76
 
48
77
  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 +149,9 @@ Report the final state.
120
149
 
121
150
  List the available actions and their arguments:
122
151
 
123
- - `/github <owner/repo#number>` or `/github view <ref>` — view an issue (ref optional; falls back to the session item's GitHub issue).
152
+ - `/github view <ref>` — print an issue to chat (ref optional; falls back to the session item's GitHub issue).
153
+ - `/github <owner/repo#number>` — rework that issue in the web preview pane (see `edit`).
154
+ - `/github edit [ref]` — rework the issue body in the web preview pane (what a bare `/github <ref>` runs; prints the issue instead when there is no web session).
124
155
  - `/github associate <ref> [id]` — associate a GitHub issue with a backlog item (id optional; falls back to the session item).
125
156
  - `/github update [ref]` — post a concise session-summary comment to the issue (previewed for approval before posting).
126
157
  - `/github started [ref]` — assign the issue to yourself.