@staff0rd/assist 0.662.0 → 0.664.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 +2 -1
- package/claude/commands/prs-status.md +77 -0
- package/dist/commands/sessions/web/bundle.js +1 -1
- package/dist/index.js +84 -45
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,6 +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 write a markdown overview of what is still pending merge, sorting each open PR into pending review, changes requested, failing checks, ready to merge or drafts, re-listing anything untouched for 7+ days as stale, and naming any repo that could not be read. Writes to chat only — it creates no files and posts nowhere
|
|
58
59
|
- `/refactor` - Run refactoring checks for code quality
|
|
59
60
|
- `/prompts` - Analyze denied tool calls and suggest settings changes to auto-allow recurring prompts
|
|
60
61
|
- `/recall` - Recall the most recent handover note for this repo
|
|
@@ -113,7 +114,7 @@ Every command supports `--help` for full detail on its flags and behaviour.
|
|
|
113
114
|
- `assist watch report [--from <sha>]` - Print the built version from `package.json`, the last 10 commits as a markdown SHA/When/Subject table newest-first, a **Restarts** section naming the restarts the new commits make necessary, and a **Sync** section naming what changed under the paths `assist sync` installs (`claude/commands/`, `claude/skills/`, `claude/settings.json`, `claude/design-system-prompt.md`, `codex/`, `pi/`), or `- not needed`. With `--from`, commits reachable from `HEAD` but not `<sha>` are marked `← new` and both the restart and sync advice come from the files they changed. Exit codes: `0` printed, `1` git could not resolve the range
|
|
114
115
|
- `assist read-time <target> [--budget <duration>]` - Estimate how long a document takes to read, printing e.g. `142 words · ~1m 39s read`. `<target>` is a pull request number, a GitHub pull request URL (which may point at another repo), `-` to read from stdin, or a path to a file; the current branch's PR is deliberately not a default. Prose counts at `readTime.wordsPerMinute` (default 200) and fenced code at half that, with a bare URL or an image/HTML tag counting as one word. The effective rate decays as the document grows, so a 500-word one reads at ~70 wpm and a 2000-word one at ~55. When the estimate exceeds the budget — one minute unless `--budget` (`45s`, `1m30s`, `2m`) says otherwise — `· over the ~1m budget` is appended
|
|
115
116
|
- `assist prs` - List pull requests for the current repository
|
|
116
|
-
- `assist prs status <owner/repo>... [--json]` - Report every open pull request across the named repos, grouped by repo. Each PR carries its number, title, url, author, draft and bot flags, `createdAt`/`updatedAt` with an age derived from `updatedAt`, the review decision and each latest reviewer's state, the failing and pending check names from the status check rollup,
|
|
117
|
+
- `assist prs status <owner/repo>... [--json]` - Report every open pull request across the named repos, grouped by repo. Each PR carries its number, title, url, author, draft and bot flags, `createdAt`/`updatedAt` with an age derived from `updatedAt`, the review decision and each latest reviewer's state, the failing and pending check names from the status check rollup, the mergeable/conflict state, and `unresolvedThreads` — the count of review threads still unresolved, `null` when that PR's thread query failed. Drafts and bot PRs are flagged rather than filtered out, and the judgement of what is "pending review" is left to the caller. A repo that is not an `owner/repo` argument, is missing, or cannot be read is reported as an error entry beside the repos that succeeded, and the command still exits 0. `--json` emits the whole payload (`repos` and `errors`) instead of the human listing
|
|
117
118
|
- `assist prs raise --title <t> --what <w> --why <y> [--how <h>] [--resolves <ref>] [--force] [--draft|--no-draft]` - Raise a PR, assembling the body from What/Why/How. Whether the PR is created as a draft comes from `prs.draft` unless `--draft` or `--no-draft` is passed, which always wins. In a web session the draft is previewed for approve/reject (with inline comments and pasted screenshots or video, hosted via the [`gh-image`](https://github.com/drogers0/gh-image) gh extension) before the PR is created. The preview pane carries two independent chain checkboxes, both default on: **Review PR** chains a `review --no-prompt --submit <n> --address-comments` session once the PR is raised (review → post findings → Address Comments), and **Post to Slack** announces the PR in Slack at the tail of that chain — or directly via `/prs-slack <n> --no-confirm` when Review PR is off. With both on, approving runs raise → Review PR + Post to Slack → Address Comments → Slack announce end to end. A third checkbox, **Auto-merge (squash)**, defaults off and is offered for both a new PR and an update to an existing one: approving with it ticked runs `gh pr merge --auto --squash` on the current branch's PR once it is placed, before the chain runs, and a repo that refuses auto-merge only prints a warning. It and **Draft** untick each other, since GitHub refuses auto-merge on a draft PR
|
|
118
119
|
- `assist prs edit [--title <t>] [--what <w>] [--why <y>] [--how <h>] [--resolves <ref>]` - Update only the supplied sections of the current PR's body. In a web session the resulting title and body are previewed for approve/reject first (with inline comments and pasted screenshots or video, as for `raise`); on approval the edit is applied with any screenshots appended, on rejection the reviewer's comments are printed and nothing is changed. Outside a session the edit applies directly
|
|
119
120
|
- `assist prs read-time <target> [--budget <duration>]` - Alias of `assist read-time`, kept because the estimate began as a pull request check
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Write a markdown overview of the open PRs across the named repos
|
|
3
|
+
allowed_args: "<owner/repo>..."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Report what is still pending merge across the repos in `$ARGUMENTS`.
|
|
7
|
+
|
|
8
|
+
## Step 1: Resolve the repos
|
|
9
|
+
|
|
10
|
+
`$ARGUMENTS` is one or more `owner/repo` arguments. With none, ask the user which repos to report on and stop — do not guess, and do not fall back to the current repo.
|
|
11
|
+
|
|
12
|
+
## Step 2: Collect the facts
|
|
13
|
+
|
|
14
|
+
Run:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
assist prs status <repos> --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The payload is `{ repos: [{ repo, pullRequests: [...] }], errors: [{ repo, error }] }`. Each pull request carries `number`, `title`, `url`, `author`, `isBot`, `isDraft`, `createdAt`, `updatedAt`, `age` (a label like `3d`, derived from `updatedAt`), `ageHours`, `reviewDecision`, `reviews` (per-reviewer `state`), `checks.failing`, `checks.pending`, `mergeable`, and `unresolvedThreads`.
|
|
21
|
+
|
|
22
|
+
Use only what the payload says. `unresolvedThreads: null` means that PR's thread query failed — report it as unknown, never as zero. `ageHours: null` means the timestamp could not be parsed.
|
|
23
|
+
|
|
24
|
+
## Step 3: Sort each PR into one bucket
|
|
25
|
+
|
|
26
|
+
Every non-draft PR belongs in exactly one section, taking the first that matches:
|
|
27
|
+
|
|
28
|
+
1. **Pending review** — no failing checks, `mergeable` is not `CONFLICTING`, no unresolved threads, and `reviewDecision` is `REVIEW_REQUIRED` or absent with no approval in `reviews`.
|
|
29
|
+
2. **Changes requested** — `reviewDecision` is `CHANGES_REQUESTED`, or `unresolvedThreads` is above zero.
|
|
30
|
+
3. **Failing checks** — `checks.failing` is non-empty or `mergeable` is `CONFLICTING`.
|
|
31
|
+
4. **Ready to merge** — `reviewDecision` is `APPROVED` with clean checks and no unresolved threads.
|
|
32
|
+
|
|
33
|
+
Drafts go in their own section regardless of the above.
|
|
34
|
+
|
|
35
|
+
## Step 4: Write the overview
|
|
36
|
+
|
|
37
|
+
Write the overview to chat as markdown. Do not create files, and do not post anywhere.
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
# Open PRs — <repo>, <repo>
|
|
41
|
+
|
|
42
|
+
<n> open across <n> repos: <n> pending review, <n> changes requested, <n> failing checks, <n> ready to merge, <n> drafts.
|
|
43
|
+
|
|
44
|
+
## Pending review
|
|
45
|
+
|
|
46
|
+
- [owner/repo#123](url) — Title (author, updated 3d ago)
|
|
47
|
+
- awaiting: alice (COMMENTED)
|
|
48
|
+
|
|
49
|
+
## Changes requested
|
|
50
|
+
|
|
51
|
+
- [owner/repo#124](url) — Title (author, updated 6h ago)
|
|
52
|
+
- 2 unresolved comments, bob requested changes
|
|
53
|
+
|
|
54
|
+
## Failing checks
|
|
55
|
+
|
|
56
|
+
- [owner/repo#125](url) — Title (author, updated 2d ago)
|
|
57
|
+
- failing: build, lint
|
|
58
|
+
- conflicting with the base branch
|
|
59
|
+
|
|
60
|
+
## Ready to merge
|
|
61
|
+
|
|
62
|
+
- [owner/repo#126](url) — Title (author, updated 1d ago)
|
|
63
|
+
|
|
64
|
+
## Drafts
|
|
65
|
+
|
|
66
|
+
- [owner/repo#127](url) — Title (author, updated 9d ago)
|
|
67
|
+
|
|
68
|
+
## Stale — no activity in 7+ days
|
|
69
|
+
|
|
70
|
+
- [owner/repo#127](url) — 9d
|
|
71
|
+
|
|
72
|
+
## Could not be read
|
|
73
|
+
|
|
74
|
+
- owner/repo — <error>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
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 there are no open PRs at all, say so in one line instead of emitting empty sections.
|