@staff0rd/assist 0.1042.4 → 0.1043.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.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Process PR review comments one by one
2
+ description: Collect a decision for every PR review comment, then fix, commit and resolve them
3
3
  ---
4
4
 
5
5
  Process review comments for the current branch's pull request.
@@ -19,7 +19,7 @@ Comments are also cached to `~/.assist/pr-comments/{org}/{repo}/pr-{prNumber}-co
19
19
 
20
20
  **Threads:** each unresolved thread block is one unit of work — never merge different threads, even when they are on the same file. Within a block, present follow-up comments (e.g., a reviewer endorsing a bot suggestion) as context alongside the primary actionable comment. Only call `fixed`/`wontfix` once per thread, using the `id` of the primary actionable comment (on Azure DevOps every comment in a thread shows the thread's id).
21
21
 
22
- Create a task for each unresolved **thread** (not each comment). For each thread:
22
+ Create a task for each unresolved **thread** (not each comment). Collect a decision for every thread before changing anything:
23
23
 
24
24
  1. **Display the comment** to the user:
25
25
  - Show the reviewer, file/line (if applicable), and the comment text
@@ -30,41 +30,29 @@ Create a task for each unresolved **thread** (not each comment). For each thread
30
30
  - Consider whether the feedback is valid, applicable, and improves the code
31
31
  - Prepare a recommended fix if you believe the comment should be addressed
32
32
 
33
- 3. **Present options to the user** using AskUserQuestion:
33
+ 3. **Ask the user** using AskUserQuestion, and record their choice alongside your recommended fix:
34
34
  - Include the comment URL (from `html_url` field) so the user can view it on the PR's host (GitHub or Azure DevOps)
35
35
  - **Address the comment**: Display your recommended fix and explain why it addresses the feedback
36
36
  - **Do not address**: Display your reasoning for why the comment should not be addressed (e.g., already handled, out of scope, incorrect suggestion)
37
- - **Skip**: Move on to the next comment without taking any action
38
-
39
- 4. **Act on the user's choice**:
40
- - If addressing:
41
- 1. Implement the fix
42
- 2. Run `/commit` to commit changes - parse the 7-char SHA from the output line "Committed: <sha>"
43
- 3. Run `assist prs fixed <comment-id> <sha>` to reply with commit link and resolve the thread
44
- - If not addressing:
45
- 1. Write a **1-sentence** summary of why, max 15 words (must not contain "claude" or "opus")
46
- 2. Run `assist prs wontfix <comment-id> "<reason>"` to reply and resolve the thread — or, if the reason contains backticks, `$(...)` or `$VAR`, use the stdin form below so your shell cannot expand it
47
- - If skipping:
48
- 1. Do nothing — move on to the next comment immediately
49
- - **Commit references**: Always use full markdown links to the commit on the PR's host, never bare SHAs — `[abc1234](https://github.com/owner/repo/commit/<full-sha>)` on GitHub, `[abc1234](https://dev.azure.com/org/project/_git/repo/commit/<full-sha>)` on Azure DevOps
50
-
51
- 5. **Repeat** until all comments have been processed
37
+ - **Skip**: Leave the thread untouched
52
38
 
53
- ## Batch mode
39
+ Do not edit any file, commit, reply or resolve anything until every thread has a decision.
54
40
 
55
- If `$ARGUMENTS` contains `--batch`, collect every decision before changing anything, overriding step 4 above:
41
+ 4. **Implement the fixes** once every thread has a decision: implement each **Address** thread in turn and run `/commit` after each — one commit per thread — parsing the 7-char SHA from the output line "Committed: <sha>".
56
42
 
57
- 1. For each thread, display it, analyse it and ask the user with AskUserQuestion exactly as in steps 1–3, recording their choice and your recommended fix. Do not edit any file, commit, reply or resolve anything until every thread has a decision.
58
- 2. Once every thread has a decision, implement each **Address** thread in turn and run `/commit` after each — one commit per thread — noting its SHA.
59
- 3. Run `assist prs fixed <comment-id> <sha>` for each addressed thread with the SHA of the commit that addressed it — the first one pushes every commit, so do not run `git push` yourself — and `assist prs wontfix <comment-id> "<reason>"` for each **Do not address** thread as in step 4. Leave skipped threads untouched.
43
+ 5. **Reply and resolve**:
44
+ - For each addressed thread, run `assist prs fixed <comment-id> <sha>` with the SHA of the commit that addressed it — the first one pushes every commit, so do not run `git push` yourself.
45
+ - For each **Do not address** thread, write a **1-sentence** summary of why, max 15 words (must not contain "claude" or "opus"), and run `assist prs wontfix <comment-id> "<reason>"` to reply and resolve the thread — or, if the reason contains backticks, `$(...)` or `$VAR`, use the stdin form below so your shell cannot expand it.
46
+ - Leave skipped threads untouched.
47
+ - **Commit references**: Always use full markdown links to the commit on the PR's host, never bare SHAs — `[abc1234](https://github.com/owner/repo/commit/<full-sha>)` on GitHub, `[abc1234](https://dev.azure.com/org/project/_git/repo/commit/<full-sha>)` on Azure DevOps
60
48
 
61
49
  ## Auto mode
62
50
 
63
- If `$ARGUMENTS` contains `--auto`, process the threads without asking the user, overriding steps 3 and 4 above:
51
+ If `$ARGUMENTS` contains `--auto`, process the threads without asking the user, overriding steps 3–5 above:
64
52
 
65
53
  1. For each thread, display it and analyse it as in steps 1 and 2, then act on your own recommendation instead of asking:
66
54
  - **Address**: implement the fix and run `/commit` — one commit per thread — noting the SHA. Do not push yet and do not run `assist prs fixed` yet.
67
- - **Do not address**: run `assist prs wontfix <comment-id> "<reason>"` as in step 4.
55
+ - **Do not address**: run `assist prs wontfix <comment-id> "<reason>"` as in step 5.
68
56
  2. If you cannot confidently decide on a thread — the comment is unclear, the fix is risky or large, or reasonable people would disagree — put that one thread to the user with AskUserQuestion exactly as in step 3, act on their choice as above, then continue automatically with the next thread.
69
57
  3. Once every thread has been processed, run `assist prs fixed <comment-id> <sha>` for each addressed thread with the SHA of the commit that addressed it — the first one pushes every commit, so do not run `git push` yourself.
70
58
  4. Finish with a closing summary listing each thread and its outcome, calling out any thread that was skipped so the user can revisit it.
@@ -87,7 +75,6 @@ If `$ARGUMENTS` contains `--announce <number>`, then once every thread has been
87
75
 
88
76
  ## Important
89
77
 
90
- - Process comments one at a time to avoid overwhelming the user
91
78
  - Always show the comment content before asking for a decision
92
79
  - Provide clear, actionable recommendations
93
80
  - If a comment is unclear, note this in your analysis