@staff0rd/assist 0.667.0 → 0.669.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 +3 -2
- package/claude/commands/prs-status.md +38 -23
- package/dist/commands/sessions/web/bundle.js +1 -1
- package/dist/index.js +183 -40
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ After installation, the `assist` command will be available globally. You can als
|
|
|
55
55
|
- `/handover` - Write a session handover note for the next conversation
|
|
56
56
|
- `/pr` - Raise a PR with a concise description, then watch CI in the background
|
|
57
57
|
- `/prs-slack <number> [--no-confirm]` - Post a PR's title and URL to the Slack channel configured in `prs.slack`; `--no-confirm` skips the confirmation and posts straight away (used by chained announces)
|
|
58
|
-
- `/prs-status <owner/repo>...` - Run `assist prs status <repos> --json` over the named repos and
|
|
58
|
+
- `/prs-status [channel] <owner/repo>...` - Run `assist prs status <repos> --json` over the named repos and compose a markdown overview of what is still pending merge, sorting each open PR into pending review, changes requested, failing checks or ready to merge, excluding drafts (counted, not listed), re-listing anything untouched for 7+ days as stale, and naming any repo that could not be read. The overview goes through `assist slack post` for approve/reject in the preview pane and is posted to Slack on approval; the channel falls back to `slack.channel`
|
|
59
59
|
- `/refactor` - Run refactoring checks for code quality
|
|
60
60
|
- `/prompts` - Analyze denied tool calls and suggest settings changes to auto-allow recurring prompts
|
|
61
61
|
- `/recall` - Recall the most recent handover note for this repo
|
|
@@ -152,6 +152,7 @@ Every command supports `--help` for full detail on its flags and behaviour.
|
|
|
152
152
|
- `assist github issue edit <number> [-R <owner>/<repo>] [--fresh]` - 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. Rejecting writes the pane's markdown — collapses included — to the working file and names it in the output, so the revision is made in that file rather than composed from scratch; a re-run resumes from the working file while the issue has not moved on GitHub, and `--fresh` discards it and re-fetches. 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. Raw `gh issue edit` is denied in favour of this command
|
|
153
153
|
- `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
|
|
154
154
|
- `assist github issue edit-comment <comment-id> --body <body> [-R <owner>/<repo>]` - Replace the body of a comment that is already posted on the current repo (or `-R`'s); a body of `-` reads it from stdin. `<comment-id>` is the numeric comment id — the one in the comment's API url or its `#issuecomment-<id>` anchor — not the issue number. The replacement runs through the same gate as posting one: it 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); the published comment is untouched until it is approved. Approving sends the whole body as a `PATCH`, so what is there now is overwritten rather than appended to. Raw `gh api` writes to issue endpoints are denied in favour of this command
|
|
155
|
+
- `assist github issue started <number> [-R <owner>/<repo>]` - Start work on a GitHub issue on the current repo (or `-R`'s): assigns it to the authenticated user, then moves every project board it sits on to In Progress. The boards are discovered from the issue itself — one GraphQL read returns its `projectItems` with each project's `Status` field and options — so nothing is configured or passed as a flag, and an issue on several boards has all of them moved. The option is matched case-insensitively. The assignment is applied first and is never blocked by the board work: an issue on no board, a `Status` field with no In Progress option (the names it does offer are listed), and a `gh` token without the `project` scope are each reported and exit 0 with the assignment landed. The remediation for the scope is `gh auth refresh -h github.com -s project`
|
|
155
156
|
- `assist github issue fix-structure <target> [-R <owner>/<repo>] [--level <level>] [--type-chain <names>] [--strip-label <label>...] [--apply]` - Normalise the issue types across one issue subtree, reading and writing nothing outside it. `<target>` is `owner/repo#number`, a github.com issue URL, or a bare number with `-R`; a bare number with no repo is refused rather than guessed. Walks the subtree via sub-issues level by level (a single deep query blows the GraphQL node limit) and reports the type each issue should carry: every level below the target is typed to the next level down the chain, matching type names loosely so `Subtask` and `Sub-task` both bind to the leaf. The chain defaults to `Epic` > `Story` > `Subtask`; `--type-chain Initiative,Feature,Task` replaces it, parent level first, and every level named must already exist as an issue type on the organisation or the run fails listing the ones that do. Untyped issues are typed rather than skipped, and cross-repo children are handled in the one run. The target's own level is inferred from its issue type, so aiming at a story types its children as subtasks; when its type is not in the chain the level cannot be inferred and the command exits non-zero naming the type it has. `--level` asserts the position instead, which also types the target itself. No label is touched unless `--strip-label` names it; it is repeatable, matched case-insensitively, and each label is removed by the id found on that issue, since label ids differ per repository. Anything nested below the leaf level fails the run before a single write, naming the offender and its parent; nothing is ever re-parented. Without `--apply` nothing is written. `--apply` announces each write before it is issued and flushes it, so a long run shows progress, then re-walks the subtree and fails with a non-zero exit if any drift remains
|
|
156
157
|
- `assist news add [url]` - Add an RSS feed URL (rendered in the sessions web News tab)
|
|
157
158
|
|
|
@@ -277,7 +278,7 @@ The Config tab of the sessions web dashboard never receives secret values: `GET
|
|
|
277
278
|
- `assist code-comment confirm <pin>` - Insert the pinned comment at its file/line and clear the pin state
|
|
278
279
|
- `assist db-migration unlock` - Page a human to approve creating the next new migration module, issuing a pin via desktop notification
|
|
279
280
|
- `assist db-migration confirm <pin>` - Confirm a pin from `db-migration unlock`, letting that migration's file write through once
|
|
280
|
-
- `assist advise [--hook] [--explain]` - Print the advice fragments from `claude/advice/*.md` that apply to the cwd's repo, each selected by its `when` condition against the merged config and repo facts, composed in filename order. A fragment body may interpolate `{{variable}}` placeholders — `verify.md` names the repo's own `verify*` run commands that way. `advice.
|
|
281
|
+
- `assist advise [--hook] [--explain]` - Print the advice fragments from `claude/advice/*.md` that apply to the cwd's repo, each selected by its `when` condition against the merged config and repo facts, composed in filename order. A fragment body may interpolate `{{variable}}` placeholders — `verify.md` names the repo's own `verify*` run commands that way. `advice.sections` overrides a section's condition by name — `advice.sections.verify false` drops it where its condition matched, `true` forces one in where it did not. Names are schema-validated against the shipped set, so `assist config set` refuses an unknown name instead of writing one that silently never matches, the web `/config` page picks the key from a list of the real names with each section's title beside it, and a hand-edited bad name fails on load like any other invalid enum value. `advice.verify` replaces the verify fragment's text and forces it in, and `advice.extra` is appended as a "Repo notes" section. `--hook` reads the SessionStart payload from stdin for the session's cwd and emits the markdown as `hookSpecificOutput.additionalContext`; `--explain` lists every shipped fragment with whether it was included and the reason. Claude Code gets this through the `assist advise --hook` SessionStart hook, Codex through `assist codex-hook` on its own `SessionStart` event, and pi through the `assist-advice.ts` extension, which composes on `session_start` and appends the markdown to the system prompt on `before_agent_start`
|
|
281
282
|
- `assist notify` - Show desktop notification from JSON stdin (macOS, Windows, WSL)
|
|
282
283
|
- `assist status-line` - Format Claude Code status line from JSON stdin
|
|
283
284
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
allowed_args: "<owner/repo>..."
|
|
2
|
+
description: Preview a markdown overview of the open PRs across the named repos, then post it to Slack
|
|
3
|
+
allowed_args: "[channel] <owner/repo>..."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Report what is still pending merge across the repos in `$ARGUMENTS`.
|
|
7
7
|
|
|
8
|
-
## Step 1: Resolve the
|
|
8
|
+
## Step 1: Resolve the arguments
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Every argument containing a `/` is an `owner/repo`. An argument without one — `#name`, a bare name or a channel id — is the Slack channel to post to. With no repo arguments, ask the user which repos to report on and stop — do not guess, and do not fall back to the current repo. With no channel argument, omit the channel and let `assist slack post` fall back to the `slack.channel` config key.
|
|
11
11
|
|
|
12
12
|
## Step 2: Collect the facts
|
|
13
13
|
|
|
@@ -32,44 +32,59 @@ Each remaining PR belongs in exactly one section, taking the first that matches:
|
|
|
32
32
|
3. **Failing checks** — `checks.failing` is non-empty or `mergeable` is `CONFLICTING`.
|
|
33
33
|
4. **Ready to merge** — `reviewDecision` is `APPROVED` with clean checks and no unresolved threads.
|
|
34
34
|
|
|
35
|
-
## Step 4:
|
|
35
|
+
## Step 4: Compose the overview
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Write the overview to a scratch file with the Write tool — it contains backticks, quotes and newlines, so never inline it in a shell command. Plain markdown, no wrapping code fence: Slack renders markdown as it is. Slack does not render headings, so every section label is bold text, not `#`. Each PR line already names its repo, so the opening line does not list the repos again.
|
|
38
38
|
|
|
39
|
-
````
|
|
40
39
|
```markdown
|
|
41
|
-
|
|
40
|
+
**Open PRs** — <n> open across <n> repos (<n> drafts excluded): <n> pending review, <n> changes requested, <n> failing checks, <n> ready to merge.
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
**Pending review**
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- [owner/repo#123](url) — Title (author, updated 3d ago)
|
|
44
|
+
- [repo#123](url) — Title (author, updated 3d ago)
|
|
48
45
|
- awaiting: alice (COMMENTED)
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
**Changes requested**
|
|
51
48
|
|
|
52
|
-
- [
|
|
49
|
+
- [repo#124](url) — Title (author, updated 6h ago)
|
|
53
50
|
- 2 unresolved comments, bob requested changes
|
|
54
51
|
|
|
55
|
-
|
|
52
|
+
**Failing checks**
|
|
56
53
|
|
|
57
|
-
- [
|
|
54
|
+
- [repo#125](url) — Title (author, updated 2d ago)
|
|
58
55
|
- failing: build, lint
|
|
59
56
|
- conflicting with the base branch
|
|
60
57
|
|
|
61
|
-
|
|
58
|
+
**Ready to merge**
|
|
62
59
|
|
|
63
|
-
- [
|
|
60
|
+
- [repo#126](url) — Title (author, updated 1d ago)
|
|
64
61
|
|
|
65
|
-
|
|
62
|
+
**Stale — no activity in 7+ days**
|
|
66
63
|
|
|
67
|
-
- [
|
|
64
|
+
- [repo#127](url) — 9d
|
|
68
65
|
|
|
69
|
-
|
|
66
|
+
**Could not be read**
|
|
70
67
|
|
|
71
68
|
- owner/repo — <error>
|
|
72
69
|
```
|
|
73
|
-
````
|
|
74
70
|
|
|
75
|
-
Omit any section with nothing in it. The stale section re-lists any PR whose `ageHours` is 168 or more, whichever bucket it sits in; mark bot-authored PRs with `[bot]` after the title. Include the "Could not be read" section whenever `errors` is non-empty, even if every other repo succeeded. When every open PR is a draft, or there are no open PRs at all, say so in one line
|
|
71
|
+
Omit any section with nothing in it. The stale section re-lists any PR whose `ageHours` is 168 or more, whichever bucket it sits in; mark bot-authored PRs with `[bot]` after the title. Include the "Could not be read" section whenever `errors` is non-empty, even if every other repo succeeded. When every open PR is a draft, or there are no open PRs at all, say so in one line and stop — do not preview an empty overview.
|
|
72
|
+
|
|
73
|
+
## Step 5: Preview it
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
assist slack post '<channel>' --body - < <scratch file>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
In an assist web session this renders the overview in the preview pane for approve/reject. The command posts nothing either way.
|
|
80
|
+
|
|
81
|
+
- **Approved** — the last line of stdout is the path to the approved body under `~/.assist/slack/`. That file, not the scratch file, is what gets posted. The line above it names the target channel.
|
|
82
|
+
- **Rejected** — the command exits non-zero with the reason and any inline comments, and names the same working file. Address every comment, rewrite that file in place, and re-run the preview against it. Do not post, and do not rebuild the overview from scratch — re-run `assist prs status` only if the rejection asks for fresh data.
|
|
83
|
+
|
|
84
|
+
## Step 6: Post it
|
|
85
|
+
|
|
86
|
+
Read the approved body from the path the command printed, then:
|
|
87
|
+
|
|
88
|
+
1. Resolve the channel named on the `Approved for ...` line to its id with `mcp__claude_ai_Slack__slack_search_channels`, passing `channel_types: "public_channel,private_channel"`. If the query returns no match, or more than one plausible match, stop and ask the user which channel to use — do not guess.
|
|
89
|
+
2. Post the file's contents verbatim with `mcp__claude_ai_Slack__slack_send_message` (`channel_id`, `message`).
|
|
90
|
+
3. Report the permalink it returns.
|