@staff0rd/assist 0.209.1 → 0.210.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 +1 -0
- package/claude/commands/forward-comments.md +59 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,7 @@ After installation, the `assist` command will be available globally. You can als
|
|
|
39
39
|
- `/commit` - Commit only relevant files from the session
|
|
40
40
|
- `/devlog` - Generate devlog entry for the next unversioned day
|
|
41
41
|
- `/draft` - Draft a new backlog item with LLM-assisted questioning
|
|
42
|
+
- `/forward-comments` - Split a coarse PR comment (e.g. from Slack) into per-line review comments on the current branch's PR, attributed to the original reviewer
|
|
42
43
|
- `/pr` - Raise a PR with a concise description
|
|
43
44
|
- `/refactor` - Run refactoring checks for code quality
|
|
44
45
|
- `/prompts` - Analyze denied tool calls and suggest settings changes to auto-allow recurring prompts
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Split a coarse PR comment (e.g. from Slack) into per-line review comments on the current branch's PR, attributed to the original reviewer
|
|
3
|
+
allowed_args: "<reviewer handle> — followed by the quoted comment text"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Take a multi-point comment that was given outside of GitHub's review UI (Slack, chat, in-person notes) and post each concern as a separate line-level review comment on the current branch's PR, attributed to the original reviewer with a `via @handle` prefix.
|
|
7
|
+
|
|
8
|
+
## Inputs
|
|
9
|
+
|
|
10
|
+
- **Reviewer handle** — the GitHub username of the person whose feedback this is (e.g. `Sebastian-MakerX`)
|
|
11
|
+
- **Comment text** — the verbatim feedback, usually pasted into the user's prompt
|
|
12
|
+
|
|
13
|
+
If either is missing or ambiguous, ask before proceeding. The PR is always the current branch's PR.
|
|
14
|
+
|
|
15
|
+
## Steps
|
|
16
|
+
|
|
17
|
+
1. **Split the comment into atomic concerns.** Each concern becomes one review comment. A concern is a single actionable point about a single location in the code. Framing prose ("the only thing slightly naff is..."), transitions ("Another thing is..."), and meta-comments ("looks pretty good") are NOT concerns — drop them.
|
|
18
|
+
|
|
19
|
+
2. **For each concern, locate the target file and line.** Read the PR's changed files (`gh pr diff` or `gh api repos/.../pulls/<n>/files`) and the relevant source. Anchor each comment on the most specific line that the concern is about:
|
|
20
|
+
- A suggestion about a specific resolver/function → the line of that resolver
|
|
21
|
+
- A suggestion about a file's name or location → line 1 of the file
|
|
22
|
+
- A suggestion about a type definition → the line where the type is defined
|
|
23
|
+
- A suggestion about a return shape → the line that constructs/returns it
|
|
24
|
+
|
|
25
|
+
3. **Compose each comment body.** Format:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
via @<handle>
|
|
29
|
+
|
|
30
|
+
> <verbatim quote of just the part relevant to this line>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Rules for the quote:
|
|
34
|
+
- **Quote verbatim.** Preserve the reviewer's exact wording, including typos, repeated words, odd spacing, and punctuation. Do not paraphrase, "fix," or tidy. The reviewer's voice matters.
|
|
35
|
+
- **Drop framing prose.** Only the actionable suggestion that maps to *this specific line* should appear. If the reviewer's sentence opens with broad framing ("the only thing that's slightly naff is...") and then states the suggestion, quote only the suggestion part.
|
|
36
|
+
- **Add backticks around symbols.** Identifier names, type names, file names, and function names should be wrapped in backticks (e.g. `` `displayValue` ``, `` `SurveyQuestionModel` ``, `` `resolvers.ts` ``) even if the reviewer didn't use them. This is the only formatting change permitted.
|
|
37
|
+
- **No editorialising.** Do not add your own commentary, explanation, or restatement. The whole body is the attribution line plus the quote.
|
|
38
|
+
|
|
39
|
+
4. **Confirm placements before posting.** List each planned comment to the user as `<file>:<line> — <one-line summary>`. Wait for the user to confirm or correct file/line choices.
|
|
40
|
+
|
|
41
|
+
5. **Post each comment** via:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
assist prs comment '<path>' <line> '<body>' 2>&1
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- Always single-quote `<path>` and `<body>`. Never double-quote — backticks in the body would break.
|
|
48
|
+
- For apostrophes inside the body (e.g. `it's`), use the shell escape `'\''`.
|
|
49
|
+
- Bodies must not contain "claude" or "opus" (the command rejects them).
|
|
50
|
+
- Run posts in parallel when there are no dependencies between them.
|
|
51
|
+
|
|
52
|
+
6. **Report** the resulting `<file>:<line>` line returned by each `assist prs comment` call, plus any failures.
|
|
53
|
+
|
|
54
|
+
## Notes
|
|
55
|
+
|
|
56
|
+
- `assist prs comment` publishes a new review thread immediately (despite the help text saying "pending review") — the comment appears live and notifies subscribers.
|
|
57
|
+
- `assist prs comment` targets the **current branch's PR**. If the feedback is for a different PR, switch branches first.
|
|
58
|
+
- If the same concern legitimately spans multiple lines/files, post one comment per anchor location, not a single combined comment.
|
|
59
|
+
- If the reviewer's text contains a clear typo of a real symbol name (e.g. `SuveyQuestion` for `SurveyQuestion`), preserve the typo in the quote. Do not silently correct.
|
package/dist/index.js
CHANGED