pr-shepherd 0.59.2 → 0.60.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.
Files changed (70) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +3 -3
  3. package/bin/api.d.mts +1 -1
  4. package/bin/classify/types.d.mts +1 -1
  5. package/bin/cli/edited-comments-format.d.mts +14 -0
  6. package/bin/cli/edited-comments-format.mjs +39 -0
  7. package/bin/cli/fix-formatter.mjs +5 -2
  8. package/bin/cli/iterate-activity-formatter.d.mts +1 -1
  9. package/bin/cli/iterate-activity-formatter.mjs +4 -5
  10. package/bin/cli/iterate-check-names.d.mts +5 -0
  11. package/bin/cli/iterate-check-names.mjs +17 -0
  12. package/bin/cli/iterate-formatter.mjs +15 -19
  13. package/bin/cli/iterate-lean.mjs +19 -11
  14. package/bin/cli/iterate-verbose.mjs +7 -2
  15. package/bin/cli/list-formatters.d.mts +0 -3
  16. package/bin/cli/list-formatters.mjs +1 -5
  17. package/bin/commands/check-review-budget.d.mts +39 -0
  18. package/bin/commands/check-review-budget.mjs +78 -0
  19. package/bin/commands/check-wait-detectors.d.mts +6 -1
  20. package/bin/commands/check-wait-detectors.mjs +2 -1
  21. package/bin/commands/check.d.mts +2 -0
  22. package/bin/commands/check.mjs +46 -27
  23. package/bin/commands/iterate/check-instructions.d.mts +5 -0
  24. package/bin/commands/iterate/check-instructions.mjs +4 -0
  25. package/bin/commands/iterate/classify.d.mts +1 -1
  26. package/bin/commands/iterate/edited-comment-markers.d.mts +3 -0
  27. package/bin/commands/iterate/edited-comment-markers.mjs +10 -0
  28. package/bin/commands/iterate/fix-code.mjs +17 -1
  29. package/bin/commands/iterate/fix-loop-instruction.d.mts +2 -8
  30. package/bin/commands/iterate/fix-loop-instruction.mjs +8 -29
  31. package/bin/commands/iterate/helpers.mjs +9 -5
  32. package/bin/commands/iterate/index.mjs +44 -17
  33. package/bin/commands/iterate/render.d.mts +1 -1
  34. package/bin/commands/iterate/render.mjs +18 -17
  35. package/bin/commands/poll-rate-limit-cancel.mjs +1 -1
  36. package/bin/commands/poll-seen-options.d.mts +8 -0
  37. package/bin/commands/poll-seen-options.mjs +7 -0
  38. package/bin/commands/poll.mjs +7 -5
  39. package/bin/commands/rule-auto-resolve-format.d.mts +0 -12
  40. package/bin/commands/rule-auto-resolve-format.mjs +2 -11
  41. package/bin/commands/rule-auto-resolve.d.mts +0 -5
  42. package/bin/commands/rule-auto-resolve.mjs +1 -42
  43. package/bin/commands/shepherd-journal.d.mts +0 -9
  44. package/bin/commands/shepherd-journal.mjs +0 -15
  45. package/bin/comments/review-output-budget.d.mts +32 -0
  46. package/bin/comments/review-output-budget.mjs +55 -0
  47. package/bin/comments/visible-comments.d.mts +3 -1
  48. package/bin/comments/visible-comments.mjs +10 -5
  49. package/bin/config/load.d.mts +8 -2
  50. package/bin/config/load.mjs +7 -0
  51. package/bin/config.json +2 -1
  52. package/bin/github/poll-summary-fingerprint.mjs +5 -1
  53. package/bin/github/poll-summary-review.mjs +2 -1
  54. package/bin/mcp/server.mjs +1 -1
  55. package/bin/reporters/agent.d.mts +1 -3
  56. package/bin/reporters/agent.mjs +0 -1
  57. package/bin/types/escalate.d.mts +9 -0
  58. package/bin/types/iterate.d.mts +19 -1
  59. package/bin/types/report.d.mts +23 -4
  60. package/bin/util/cap-list.d.mts +7 -0
  61. package/bin/util/cap-list.mjs +13 -0
  62. package/package.json +2 -2
  63. package/plugins/pr-shepherd/.claude-plugin/plugin.json +1 -1
  64. package/plugins/pr-shepherd/.codex-plugin/plugin.json +1 -1
  65. package/plugins/pr-shepherd/.codex.mcp.json +1 -1
  66. package/plugins/pr-shepherd/.mcp.json +1 -1
  67. package/plugins/pr-shepherd/skills/pr-shepherd/references/fix-code-loop.md +1 -2
  68. package/plugins/pr-shepherd/skills/pr-shepherd/references/merge-queue-ejection.md +1 -1
  69. package/plugins/pr-shepherd/skills/reduce-pr-noise/references/classifiers.md +1 -1
  70. package/src/classify/types.mts +1 -1
@@ -5,7 +5,7 @@ Apply when a step says `Playbook: "Merge queue ejection"`. The `**queue removal*
5
5
  1. Update the PR head from the latest base following the repository's branch-update convention. On a native stack, use the printed stack update route instead. Reproduce the failing step on the updated head.
6
6
  2. If the failure belongs to this PR, fix it. The printed push step commits and pushes the fix.
7
7
  3. If the failure does not reproduce and the update changed the head, the printed push step pushes it (`gh stack push` on a native stack). Never run a printed `requeue:` or `acknowledge queue removal:` command after a push. Shepherd prints a fresh queue command once the new head is READY.
8
- 4. If the failure comes from the base itself, do not requeue or acknowledge it. If a Shepherd Journal step is printed, record the finding with it. Make no change. The unchanged failure escalates through the stall timeout.
8
+ 4. If the failure comes from the base itself, do not requeue or acknowledge it. Make no change. The unchanged failure escalates through the stall timeout.
9
9
  5. If the removal reason suggests a person dequeued the PR, skip the step 1 update unless a conflict step requires it. Fix a failure that belongs to this PR; otherwise make no change. Never enqueue.
10
10
  6. If the step says no queue command was printed, never enqueue. A failure that does not reproduce follows step 4. Shepherd prints no queue command once the same head was already removed before (`removals on this head` in the header), so a flaky failure is not retried indefinitely.
11
11
  7. Otherwise, run the printed `requeue:` or `acknowledge queue removal:` command exactly as printed, and only if all of these hold:
@@ -21,6 +21,6 @@ const rule: ClassifyRule = (item) => {
21
21
  export default rule;
22
22
  ```
23
23
 
24
- `suppress: true` removes a matched item from agent output. Add `autoResolve: true` only when the requested policy also calls for resolving its thread or minimizing its comment or review summary. It is unsupported for `changes-requested` reviews, whose dismissal needs a message. Optional `reason` is the note printed, reported, and journaled when the rule fires. With both flags, `actions.autoMinimizeSuppressed: true` (the default) lets Shepherd perform the authorized mutation, then print a `## Classification auto-resolve` line, record `threads.autoResolved` / `comments.autoMinimized`, and append one Shepherd Journal item for the token login. Failed IDs stay on the generated `apply review` command and the failure is listed under that line. Set `actions.autoMinimizeSuppressed: false` to keep the handoff without mutating, journaling, or printing the line. When GitHub does not confirm capability, the item returns to normal first-look visibility. Matching rules combine their flags and keep every non-empty reason, so inspect existing rules before adding one.
24
+ `suppress: true` removes a matched item from agent output. Add `autoResolve: true` only when the requested policy also calls for resolving its thread or minimizing its comment or review summary. It is unsupported for `changes-requested` reviews, whose dismissal needs a message. Optional `reason` is printed and reported when the rule fires. With both flags, `actions.autoMinimizeSuppressed: true` (the default) lets Shepherd perform the authorized mutation, then print a `## Classification auto-resolve` line and record `threads.autoResolved` / `comments.autoMinimized`. It does not append to the Shepherd Journal. Journal notes are optional agent-authored updates made only through an explicit `apply journal` call. Failed IDs stay on the generated `apply review` command and the failure is listed under that line. Set `actions.autoMinimizeSuppressed: false` to keep the handoff without mutating or printing the line. When GitHub does not confirm capability, the item returns to normal first-look visibility. Matching rules combine their flags and keep every non-empty reason, so inspect existing rules before adding one.
25
25
 
26
26
  Exercise the exported rule against the observed item and negative examples: a different author, kind, and substantive message from the same bot. Confirm only the intended item matches before enabling automatic resolution. After editing a rule, restart a persistent MCP server or long-running poll process; it caches loaded rule modules. A new CLI process loads the change. A classifier does not retroactively remove already displayed output.
@@ -53,7 +53,7 @@ export interface ClassifyAction {
53
53
  readonly autoResolve?: boolean;
54
54
  /** When true, hides the item from agent output (seen marker is still written). */
55
55
  readonly suppress?: boolean;
56
- /** Note included in the auto-resolve report, tick line, and Shepherd Journal when this rule fires. */
56
+ /** Note included in the auto-resolve report and tick line when this rule fires. */
57
57
  readonly reason?: string;
58
58
  }
59
59