@staff0rd/assist 0.866.0 → 0.868.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
@@ -68,7 +68,7 @@ After installation, the `assist` command will be available globally. You can als
68
68
  - `/review-high-level [number]` - Open the high-level review checklist for the current branch's PR, or PR `<number>`, as a background task, answering diff questions while it is open
69
69
  - `/review-pr-comments` - Process PR review comments one by one
70
70
  - `/jira [action] [KEY] [args]` - Jira actions: `view`, `associate`, `update`, `started`, `done`, `help`. `[KEY]` defaults to the session's backlog item's
71
- - `/github [action] [ref] [args]` - GitHub issue actions: `view`, `edit`, `associate`, `update`, `started`, `done`, `help`. `[ref]` defaults to the session's backlog item's; a bare `/github <ref>` runs `edit`
71
+ - `/github [action] [ref] [args]` - GitHub issue actions: `view`, `edit`, `create`, `associate`, `update`, `started`, `done`, `help`. `[ref]` defaults to the session's backlog item's; a bare `/github <ref>` runs `edit`
72
72
  - `/next [id]` - Signal completion and chain into the next backlog item
73
73
  - `/slack-post [channel] [--thread <ts-or-permalink>] <what to say>` - Preview a markdown message, or a thread of them, then post it to a Slack channel (default `slack.channel`); `--thread` replies in that thread
74
74
  - `/subtask <text>` - Add a sub-task to the session's current backlog item
@@ -1,9 +1,9 @@
1
1
  ---
2
- description: View or act on a GitHub issue (view, edit, associate, update, started, done, help)
2
+ description: View, create or act on a GitHub issue (view, edit, create, 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`, `edit`, `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`, `create`, `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,7 +12,7 @@ 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`, `edit`, `associate`, `update`, `started`, `done`, `help`) → that is the action; the remaining tokens are its args.
15
+ - First token is a known action verb (`view`, `edit`, `create`, `associate`, `update`, `started`, `done`, `help`) → that is the action; the remaining tokens are its args.
16
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
 
@@ -62,6 +62,38 @@ Display the output so the user can see what happened. If the command exits non-z
62
62
  - **Request changes** — the reason and every inline comment, each with the excerpt it was left on. The output names the working file holding the pane's markdown, collapses included. Revise **that file in place** to address the comments — never recompose the body from scratch — then re-run the command, which previews the revised file with the earlier collapses intact. Pass `--fresh` only when the working file should be thrown away and the issue re-fetched.
63
63
  - **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.
64
64
 
65
+ ## Action: create
66
+
67
+ Create a new issue from a free-form request (e.g. `create bug against owner/repo, Sprint 3 milestone, Roadmap project: login fails on Safari`). Step 2 does not apply — there is no issue yet. Work out from the args:
68
+
69
+ - **Repo** — an `owner/repo` (or `github.com/owner/repo` URL) named in the request; otherwise the current repo.
70
+ - **Title** and **body** — a concise title and a body describing the problem or ask as the repo's maintainers would expect. There is no template; never author a `## Screenshots` section.
71
+ - **Labels** — each label named (e.g. "bug" in "bug against ..."), checked against `gh label list -R <owner>/<repo> --limit 200`.
72
+ - **Project** — `--project` takes a number. When the project is named by title, look it up among the repo owner's projects:
73
+
74
+ ```
75
+ gh project list --owner <owner> --format json 2>&1
76
+ ```
77
+
78
+ Match the title exactly, then case-insensitively, and pass its `number`. Pass `--status <name>` only if the request names one.
79
+
80
+ - **Milestone** — the milestone's title, passed as named; the command matches it against the repo's open milestones.
81
+ - **Type** and **parent** — only if the request names them.
82
+
83
+ If a named project, label or milestone doesn't match, list the available ones and ask the user which they meant (or whether to drop it). Never guess a near match or silently omit it. For a milestone, check `gh api repos/<owner>/<repo>/milestones --jq '.[].title'` before running, or relay the list the command prints when it rejects the name.
84
+
85
+ Then run the command bare, as a background task, and do no other work until it returns — in a web session it blocks on the preview pane until the user approves or rejects:
86
+
87
+ ```
88
+ assist github issue create -R <owner>/<repo> --title "<title>" --body "<body>" [--label <name>]... [--project <number>] [--status <name>] [--milestone <name>] [--type <name>] [--parent <issue>] 2>&1
89
+ ```
90
+
91
+ Every option is resolved before the preview, so an unknown name creates nothing. Relay the outcome:
92
+
93
+ - **Created** — the issue URL it prints.
94
+ - **Rejected** — the reason and every inline comment with the excerpt it was left on. Revise the title or body to address them and run it again.
95
+ - **Failed resolution** — relay the error (and the available options it lists) and ask the user, as above.
96
+
65
97
  ## Action: associate
66
98
 
67
99
  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]`.
@@ -140,6 +172,7 @@ List the available actions and their arguments:
140
172
  - `/github view <ref>` — print an issue to chat (ref optional; falls back to the session item's GitHub issue).
141
173
  - `/github <owner/repo#number>` — rework that issue in the web preview pane (see `edit`).
142
174
  - `/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).
175
+ - `/github create <request>` — create an issue from a free-form request naming its repo, labels, project and milestone (previewed for approval before creating).
143
176
  - `/github associate <ref> [id]` — associate a GitHub issue with a backlog item (id optional; falls back to the session item).
144
177
  - `/github update [ref]` — post a concise session-summary comment to the issue (previewed for approval before posting).
145
178
  - `/github started [ref]` — assign the issue to yourself and move its project boards to In Progress.