pr-shepherd 0.60.0 → 1.0.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/.claude-plugin/plugin.json +1 -1
- package/README.md +7 -5
- package/bin/api.d.mts +35 -24
- package/bin/api.mjs +68 -48
- package/bin/checks/classify.d.mts +1 -1
- package/bin/checks/classify.mjs +4 -4
- package/bin/checks/log-excerpt.mjs +1 -1
- package/bin/classify/standard/codecov-report.d.mts +1 -1
- package/bin/classify/standard/codecov-report.mjs +7 -2
- package/bin/classify/standard/coderabbit-notices.d.mts +4 -3
- package/bin/classify/standard/coderabbit-notices.mjs +29 -47
- package/bin/classify/standard/codex-notices.mjs +34 -7
- package/bin/classify/standard/dependabot-notices.mjs +5 -1
- package/bin/classify/standard/gemini-notices.d.mts +1 -1
- package/bin/classify/standard/gemini-notices.mjs +16 -5
- package/bin/classify/standard/kilo-no-issues.d.mts +1 -1
- package/bin/classify/standard/kilo-no-issues.mjs +37 -10
- package/bin/classify/standard/sourcery-notices.mjs +1 -1
- package/bin/cli/arg-flags.mjs +0 -3
- package/bin/cli/clean-handler.d.mts +1 -1
- package/bin/cli/clean-handler.mjs +5 -15
- package/bin/cli/default-poll.d.mts +2 -0
- package/bin/cli/default-poll.mjs +9 -6
- package/bin/cli/formatters.d.mts +2 -3
- package/bin/cli/formatters.mjs +0 -26
- package/bin/cli/handlers.d.mts +3 -3
- package/bin/cli/handlers.mjs +45 -35
- package/bin/cli/help-command-pages.d.mts +13 -158
- package/bin/cli/help-command-pages.mjs +12 -157
- package/bin/cli/help-iterate-poll-pages.d.mts +4 -3
- package/bin/cli/help-iterate-poll-pages.mjs +76 -36
- package/bin/cli/help-log-file-page.d.mts +1 -1
- package/bin/cli/help-log-file-page.mjs +3 -5
- package/bin/cli/help-top-page.d.mts +1 -1
- package/bin/cli/help-top-page.mjs +19 -20
- package/bin/cli/help.d.mts +14 -159
- package/bin/cli/iterate-checks-formatter.mjs +1 -1
- package/bin/cli/iterate-flags.d.mts +2 -4
- package/bin/cli/iterate-flags.mjs +4 -20
- package/bin/cli/iterate-formatter.d.mts +1 -1
- package/bin/cli/iterate-formatter.mjs +6 -6
- package/bin/cli/iterate-instructions.d.mts +1 -1
- package/bin/cli/iterate-instructions.mjs +5 -6
- package/bin/cli/iterate-lean.mjs +32 -40
- package/bin/cli/iterate-verbose.mjs +1 -1
- package/bin/cli/journal-formatter.mjs +0 -3
- package/bin/cli/journal-handler.d.mts +1 -1
- package/bin/cli/journal-handler.mjs +2 -1
- package/bin/cli/mutate-formatter.mjs +0 -9
- package/bin/cli/next-check-format.d.mts +0 -4
- package/bin/cli/next-check-format.mjs +0 -4
- package/bin/cli/poll-handler.d.mts +3 -0
- package/bin/cli/poll-handler.mjs +88 -47
- package/bin/cli/poll-summary-emitter.mjs +2 -2
- package/bin/cli/poll-summary-formatter.mjs +2 -2
- package/bin/cli/poll-targets.d.mts +2 -2
- package/bin/cli/poll-targets.mjs +15 -35
- package/bin/cli/removed-flags.d.mts +3 -0
- package/bin/cli/removed-flags.mjs +24 -0
- package/bin/cli/runner.d.mts +1 -1
- package/bin/cli/runner.mjs +2 -2
- package/bin/cli/stack-overview.d.mts +0 -1
- package/bin/cli/stack-overview.mjs +1 -2
- package/bin/cli/{fix-formatter-extra.d.mts → triage-formatter-extra.d.mts} +1 -2
- package/bin/cli/{fix-formatter-extra.mjs → triage-formatter-extra.mjs} +0 -6
- package/bin/cli/triage-formatter.d.mts +4 -0
- package/bin/cli/{fix-formatter.mjs → triage-formatter.mjs} +31 -42
- package/bin/cli/unknown-flags.d.mts +6 -0
- package/bin/cli/unknown-flags.mjs +29 -0
- package/bin/cli-parser.mjs +41 -62
- package/bin/commands/check-annotations.d.mts +1 -1
- package/bin/commands/check-annotations.mjs +1 -1
- package/bin/commands/check-review-budget.d.mts +1 -1
- package/bin/commands/check-review-budget.mjs +1 -1
- package/bin/commands/check-wait-detectors.d.mts +1 -1
- package/bin/commands/check-wait-detectors.mjs +1 -1
- package/bin/commands/check.d.mts +1 -1
- package/bin/commands/check.mjs +7 -7
- package/bin/commands/commit-suggestion-instruction.d.mts +2 -2
- package/bin/commands/commit-suggestion-instruction.mjs +3 -3
- package/bin/commands/iterate/api-usage.mjs +8 -8
- package/bin/commands/iterate/check-instructions.d.mts +4 -4
- package/bin/commands/iterate/check-instructions.mjs +8 -8
- package/bin/commands/iterate/classify.mjs +2 -2
- package/bin/commands/iterate/escalate.mjs +6 -6
- package/bin/commands/iterate/index.mjs +20 -23
- package/bin/commands/iterate/merge-plan.mjs +3 -3
- package/bin/commands/iterate/merge-state.mjs +4 -7
- package/bin/commands/iterate/native-stack-rebase.mjs +1 -1
- package/bin/commands/iterate/render.d.mts +1 -1
- package/bin/commands/iterate/render.mjs +2 -2
- package/bin/commands/iterate/stall.mjs +11 -9
- package/bin/commands/iterate/{fix-loop-instruction.mjs → triage-loop-instruction.mjs} +7 -3
- package/bin/commands/iterate/{fix-code.d.mts → triage.d.mts} +2 -2
- package/bin/commands/iterate/{fix-code.mjs → triage.mjs} +14 -23
- package/bin/commands/iterate/unreported-required.mjs +2 -5
- package/bin/commands/journal/index.d.mts +1 -3
- package/bin/commands/journal/index.mjs +1 -1
- package/bin/commands/mark-files-as-viewed.d.mts +1 -3
- package/bin/commands/mark-files-as-viewed.mjs +1 -1
- package/bin/commands/next-check.d.mts +2 -2
- package/bin/commands/next-check.mjs +4 -2
- package/bin/commands/poll-progress.mjs +1 -1
- package/bin/commands/poll-summary-explicit-instructions.mjs +1 -1
- package/bin/commands/poll-summary-instructions.mjs +7 -7
- package/bin/commands/poll-summary.mjs +4 -4
- package/bin/commands/poll.d.mts +1 -1
- package/bin/commands/poll.mjs +4 -4
- package/bin/commands/resolve-mutate.d.mts +1 -1
- package/bin/commands/resolve-mutate.mjs +1 -1
- package/bin/commands/rest-stack-merge-readiness.mjs +1 -1
- package/bin/commands/single-tick.d.mts +5 -0
- package/bin/commands/single-tick.mjs +7 -0
- package/bin/commands/stack-drain.mjs +1 -1
- package/bin/commands/stack-merge-flag.mjs +1 -1
- package/bin/commands/stack-stall.d.mts +2 -2
- package/bin/commands/stack-stall.mjs +2 -2
- package/bin/commands/stack-work.d.mts +2 -2
- package/bin/commands/stack-work.mjs +2 -2
- package/bin/commands/suggestion-patch-item.d.mts +0 -1
- package/bin/commands/suggestion-patch-item.mjs +0 -12
- package/bin/commands/suggestion-patches.d.mts +2 -2
- package/bin/commands/suggestion-patches.mjs +1 -1
- package/bin/commands/tick-instructions.d.mts +9 -0
- package/bin/commands/tick-instructions.mjs +23 -0
- package/bin/commands/tick.d.mts +15 -0
- package/bin/commands/{event-mode.mjs → tick.mjs} +39 -55
- package/bin/comments/minimize-policy.mjs +1 -3
- package/bin/comments/resolve.d.mts +0 -23
- package/bin/comments/resolve.mjs +0 -4
- package/bin/comments/review-output-budget.d.mts +1 -1
- package/bin/comments/review-output-budget.mjs +1 -1
- package/bin/comments/sha-poll.mjs +3 -1
- package/bin/config/default-bot-usernames.d.mts +2 -0
- package/bin/config/default-bot-usernames.mjs +15 -0
- package/bin/config/load.d.mts +4 -138
- package/bin/config/load.mjs +88 -443
- package/bin/config/merge-command-args.mjs +2 -2
- package/bin/config/merge-method.d.mts +1 -2
- package/bin/config/merge-method.mjs +1 -8
- package/bin/config/renames.d.mts +8 -0
- package/bin/config/renames.mjs +87 -0
- package/bin/config/resolve.d.mts +31 -0
- package/bin/config/resolve.mjs +89 -0
- package/bin/config/schema.d.mts +161 -0
- package/bin/config/schema.mjs +168 -0
- package/bin/exit-codes.d.mts +1 -1
- package/bin/exit-codes.mjs +3 -3
- package/bin/github/poll-summary-check-blockers.mjs +1 -1
- package/bin/github/poll-summary-command.mjs +8 -6
- package/bin/github/poll-summary-projector.mjs +2 -2
- package/bin/github/poll-summary-review.mjs +1 -1
- package/bin/github/poll-summary-route.mjs +9 -9
- package/bin/github/poll-summary-unreported.mjs +1 -1
- package/bin/github/poll-summary.mjs +1 -1
- package/bin/github/queries.d.mts +1 -1
- package/bin/github/queries.mjs +1 -1
- package/bin/mcp/server.mjs +48 -54
- package/bin/merge-status/derive.mjs +1 -1
- package/bin/state/durable-state.d.mts +1 -3
- package/bin/state/durable-state.mjs +2 -8
- package/bin/state/fix-attempts.d.mts +2 -2
- package/bin/state/fix-attempts.mjs +1 -1
- package/bin/state/merge-request.mjs +1 -1
- package/bin/state/pr-fingerprint.mjs +4 -11
- package/bin/state/seen-comments.d.mts +4 -5
- package/bin/state/seen-comments.mjs +8 -14
- package/bin/state/stack-stall.d.mts +1 -1
- package/bin/state/stack-stall.mjs +1 -1
- package/bin/state/stall-state-store.d.mts +1 -1
- package/bin/state/stall-state-store.mjs +1 -1
- package/bin/types/escalate.d.mts +2 -2
- package/bin/types/iterate.d.mts +12 -26
- package/bin/types/merge-queue.d.mts +2 -2
- package/bin/types/next-check.d.mts +1 -1
- package/bin/types/poll-summary.d.mts +3 -6
- package/bin/types/report.d.mts +2 -2
- package/bin/types/suggestion-patch.d.mts +1 -8
- package/package.json +2 -1
- package/plugins/pr-shepherd/.claude-plugin/plugin.json +1 -1
- package/plugins/pr-shepherd/.codex-plugin/plugin.json +1 -1
- package/plugins/pr-shepherd/.codex.mcp.json +1 -1
- package/plugins/pr-shepherd/.mcp.json +1 -1
- package/plugins/pr-shepherd/skills/pr-shepherd/SKILL.md +6 -6
- package/plugins/pr-shepherd/skills/pr-shepherd/references/ci-failure-triage.md +1 -1
- package/plugins/pr-shepherd/skills/pr-shepherd/references/{cloud-event-loop.md → event-loop.md} +5 -5
- package/plugins/pr-shepherd/skills/pr-shepherd/references/mcp-fallback.md +3 -3
- package/plugins/pr-shepherd/skills/pr-shepherd/references/merge-queue-ejection.md +1 -1
- package/plugins/pr-shepherd/skills/pr-shepherd/references/suggestion-patches.md +1 -1
- package/plugins/pr-shepherd/skills/pr-shepherd/references/{fix-code-loop.md → triage-loop.md} +3 -3
- package/plugins/pr-shepherd/skills/reduce-pr-noise/SKILL.md +1 -1
- package/plugins/pr-shepherd/skills/reduce-pr-noise/references/classifiers.md +2 -2
- package/plugins/pr-shepherd/skills/reduce-pr-noise/references/settings.md +11 -11
- package/pr-shepherd.schema.json +361 -0
- package/bin/cli/event-state-scope.d.mts +0 -19
- package/bin/cli/event-state-scope.mjs +0 -60
- package/bin/cli/fix-formatter.d.mts +0 -4
- package/bin/commands/commit-suggestion.d.mts +0 -8
- package/bin/commands/commit-suggestion.mjs +0 -26
- package/bin/commands/event-instructions.d.mts +0 -11
- package/bin/commands/event-instructions.mjs +0 -27
- package/bin/commands/event-mode.d.mts +0 -14
- package/bin/commands/poll-mode.d.mts +0 -8
- package/bin/commands/poll-mode.mjs +0 -14
- package/bin/config.json +0 -68
- package/bin/types/protected-run.d.mts +0 -6
- package/bin/types/protected-run.mjs +0 -1
- /package/bin/commands/iterate/{fix-loop-instruction.d.mts → triage-loop-instruction.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const COMMAND_USAGE: {
|
|
2
|
-
readonly default:
|
|
2
|
+
readonly default: "pr-shepherd [PR]\n\nRun iterate repeatedly for one PR, or read compact summaries for an explicit same-repository PR set.\nAggregate mode returns when any row needs work, every row is terminal, or timeout.\nWhen CLAUDE_CODE_REMOTE=true, the command runs one tick like iterate and prints nextCheck instead.\nPoll exits as soon as iterate returns READY, MARK_READY, CANCEL, or ESCALATE, or when timeout\nreturns the last WAIT result. TRIAGE starts a --debounce settle window (default:\npoll.debounce-seconds; built-in 1m): poll keeps\niterating at --interval, then runs one more tick after the window and returns that result.\nWith --until-terminal or --merge, poll also continues through MARK_READY.\n\nUsage:\n pr-shepherd [PR ...] [poll-flags] [iterate-flags]\n\nUse 'pr-shepherd stack PR' for a native GitHub stack.\n\nPoll flags:\n --interval <duration> Sleep between WAIT ticks. Bare number = seconds. Default: poll.interval-seconds (built-in 60s). Stack and multi-PR polls multiply that by poll.stack-interval-factor (built-in 2) unless this flag is set.\n --timeout <duration> Maximum wall-clock wait for WAIT ticks. Bare number = seconds. Default: poll.timeout-seconds (built-in 4.5m).\n --debounce <duration> Settle window after first TRIAGE or stack SHEPHERD before returning. Bare number = seconds. Default: poll.debounce-seconds (built-in 60s). 0 disables.\n --quiet-status Print only changed WAIT snapshots. Overrides poll.quiet-status.\n --no-quiet-status Print every WAIT snapshot. Overrides poll.quiet-status.\n --until-terminal Continue through WAIT/MARK_READY until READY/TRIAGE/MERGE/CANCEL/ESCALATE or stack SHEPHERD.\n\nForwarded iterate flags:\n --ready-delay <duration> Settle window before a clean PR cancels. Bare number = minutes. Default: iterate.ready-delay-minutes (built-in 0). Example: 15m.\n --stall-timeout <duration> Escalate repeated unchanged failures after this duration. Bare number = minutes. 0 disables.\n --no-auto-mark-ready Leave draft PRs in draft; stop when otherwise ready.\n --merge Shepherd through readiness, then emit a merge or merge-queue command.\n --instructions playbook|inline Render triage steps inline every tick (default) or fold the invariant ones into a playbook pointer. Default: iterate.instructions (inline).\n --transport auto|graphql|rest Select GitHub transport. Default: github.transport (auto).\n --format text|json Output Markdown text or JSON. Default: text.\n --verbose Include verbose iterate fields and detailed per-tick lines.\n --help, -h Print this help and exit before GitHub, git, config, or log I/O.\n\nDurations accept s/m/h suffixes: 30s, 4.5m, 1h. A bare number uses each flag's default unit (seconds\nfor --interval/--timeout/--debounce, minutes for --ready-delay/--stall-timeout); decimals are allowed only with\nan explicit unit (4.5m).\nEach WAIT tick writes a stderr line naming what it is waiting on by default; poll.quiet-status can change that default, --quiet-status/--no-quiet-status override it, and --verbose emits detailed per-tick lines.\nTRIAGE debounce writes a remaining-seconds line to stderr. --timeout does not cut an in-flight debounce short.\nWith --until-terminal, --timeout is ignored for WAIT ticks and polling continues until READY, TRIAGE, MERGE, CANCEL, or ESCALATE. With --merge, --timeout still bounds WAIT ticks; it only continues through MARK_READY while polling remains within that timeout.\n\nExit codes: same as iterate (the final tick's action/reason decides the code).\n 0 CANCEL (merged, ready-delay elapsed, or clean draft left in draft by disabled auto mark-ready)\n 10 WAIT or READY (including a WAIT returned by --timeout)\n 11 MARK_READY\n 12 TRIAGE\n 13 ESCALATE\n 14 CANCEL (closed without merging)\n 15 MERGE\n A command/validation/GitHub failure exits with a sysexits.h code instead (see docs/exit-codes.md).";
|
|
3
3
|
readonly "apply merge": `pr-shepherd apply merge
|
|
4
4
|
|
|
5
5
|
Submit one SHA-guarded asynchronous merge or enqueue request with REST.
|
|
@@ -118,13 +118,13 @@ Usage:
|
|
|
118
118
|
--removed-at <unix> Removal time in Unix seconds.
|
|
119
119
|
--format text|json Output format. Default: text.
|
|
120
120
|
--help, -h Print this help and exit before any I/O.`;
|
|
121
|
-
readonly
|
|
121
|
+
readonly suggest: `pr-shepherd suggest
|
|
122
122
|
|
|
123
123
|
Build an ordered list of patches and commit instructions from GitHub review suggestions.
|
|
124
124
|
The command does not edit files or mutate git history.
|
|
125
125
|
|
|
126
126
|
Usage:
|
|
127
|
-
pr-shepherd
|
|
127
|
+
pr-shepherd suggest [PR]
|
|
128
128
|
--thread-id ID --message MSG [--description DESC]
|
|
129
129
|
[--thread-id ID --message MSG [--description DESC] ...]
|
|
130
130
|
[--format text|json]
|
|
@@ -134,22 +134,6 @@ belong to that suggestion. Groups are validated and returned in command-line ord
|
|
|
134
134
|
|
|
135
135
|
The current branch must match the PR head ref. Local HEAD may equal or descend from the PR head;
|
|
136
136
|
every generated patch is dry-run in order with git apply --check before output.
|
|
137
|
-
--help, -h Print this help and exit before GitHub, git, config, or log I/O.`;
|
|
138
|
-
readonly "build-suggestion-patch": `pr-shepherd build-suggestion-patch
|
|
139
|
-
|
|
140
|
-
Deprecated one-suggestion adapter. Use build-suggestion-patches.
|
|
141
|
-
|
|
142
|
-
Usage:
|
|
143
|
-
pr-shepherd build-suggestion-patch [PR] --thread-id ID --message MSG
|
|
144
|
-
[--description DESC] [--format text|json]
|
|
145
|
-
|
|
146
|
-
Flags:
|
|
147
|
-
--thread-id <id> Review thread containing exactly one suggestion block. Required.
|
|
148
|
-
--message <text> Suggested commit subject. Required and non-empty.
|
|
149
|
-
--description <text> Optional longer commit body.
|
|
150
|
-
--format text|json Output format. Default: text.
|
|
151
|
-
|
|
152
|
-
The current branch must match the PR head ref. Local HEAD may equal or descend from the PR head.
|
|
153
137
|
--help, -h Print this help and exit before GitHub, git, config, or log I/O.`;
|
|
154
138
|
readonly admin: `pr-shepherd admin
|
|
155
139
|
|
|
@@ -166,147 +150,19 @@ Run 'pr-shepherd admin <clean|log-file> --help' for command-specific details.
|
|
|
166
150
|
Remove pr-shepherd state files from PR_SHEPHERD_STATE_DIR.
|
|
167
151
|
|
|
168
152
|
Usage:
|
|
169
|
-
pr-shepherd admin clean pr [number] [--dry-run] [--format text|json]
|
|
170
|
-
pr-shepherd admin clean branch [name] [--dry-run] [--format text|json]
|
|
171
|
-
pr-shepherd admin clean current [--dry-run] [--format text|json]
|
|
172
|
-
pr-shepherd admin clean repo [--dry-run] [--format text|json]
|
|
173
|
-
pr-shepherd admin clean all [--dry-run] [--format text|json]
|
|
153
|
+
pr-shepherd admin clean pr [number] [--dry-run] [--format text|json]
|
|
154
|
+
pr-shepherd admin clean branch [name] [--dry-run] [--format text|json]
|
|
155
|
+
pr-shepherd admin clean current [--dry-run] [--format text|json]
|
|
156
|
+
pr-shepherd admin clean repo [--dry-run] [--format text|json]
|
|
157
|
+
pr-shepherd admin clean all [--dry-run] [--format text|json]
|
|
174
158
|
|
|
175
159
|
Variants remove state for one PR, branch, current branch, repository, or all repositories.
|
|
176
160
|
Use --dry-run to preview paths without removing them.
|
|
177
|
-
|
|
178
|
-
state under the git common directory. Default: poll.mode (auto).
|
|
161
|
+
When CLAUDE_CODE_REMOTE=true, state is the durable copy under the git common directory.
|
|
179
162
|
--help, -h Print this help and exit before any cleanup.`;
|
|
180
|
-
readonly "admin log-file":
|
|
181
|
-
readonly
|
|
182
|
-
|
|
183
|
-
Deprecated compatibility alias for user-directed GitHub review-state mutations. Supplied IDs are forwarded to GitHub;
|
|
184
|
-
GitHub accepts or rejects each mutation.
|
|
185
|
-
|
|
186
|
-
Usage:
|
|
187
|
-
pr-shepherd resolve [PR] --reply-thread-ids A,B --message MSG
|
|
188
|
-
pr-shepherd resolve [PR] --resolve-thread-ids A,B [--minimize-comment-ids X,Y]
|
|
189
|
-
[--dismiss-review-ids Q] [--message MSG]
|
|
190
|
-
[--require-sha SHA] [--format text|json]
|
|
191
|
-
|
|
192
|
-
Flags:
|
|
193
|
-
--resolve-thread-ids <ids> Comma-separated review thread IDs (PRRT_*) to resolve.
|
|
194
|
-
Note: comment IDs (PRRC_*) from gh api are not thread IDs and will fail.
|
|
195
|
-
--reply-thread-ids <ids> Comma-separated review thread IDs to reply to.
|
|
196
|
-
--minimize-comment-ids <ids> Comma-separated issue/review comment IDs to minimize.
|
|
197
|
-
--dismiss-review-ids <ids> Comma-separated review IDs to dismiss.
|
|
198
|
-
--message <text> Reply/dismiss message. Required with --reply-thread-ids
|
|
199
|
-
or --dismiss-review-ids.
|
|
200
|
-
--require-sha <sha> Wait until GitHub reports this PR head SHA (or HEAD) before mutating.
|
|
201
|
-
Must be a full 40-character lowercase hex SHA, or HEAD for this
|
|
202
|
-
checkout's commit. Local HEAD is valid only when it equals the
|
|
203
|
-
current remote PR head.
|
|
204
|
-
--format text|json Output format. Default: text.
|
|
205
|
-
--help, -h Print this help and exit before GitHub I/O.
|
|
206
|
-
|
|
207
|
-
At least one non-empty action flag is required:
|
|
208
|
-
--reply-thread-ids, --resolve-thread-ids, --minimize-comment-ids, or --dismiss-review-ids.
|
|
209
|
-
|
|
210
|
-
PR may be a number or GitHub pull request URL. When omitted, the current branch PR is inferred.
|
|
211
|
-
Exit code: 0 on success; nonzero on failure (sysexits.h — see docs/exit-codes.md).`;
|
|
212
|
-
readonly "commit-suggestion": `pr-shepherd commit-suggestion
|
|
213
|
-
|
|
214
|
-
Build a patch and commit instructions for one GitHub review thread containing a suggestion block.
|
|
215
|
-
The command does not edit files or mutate git history.
|
|
216
|
-
|
|
217
|
-
Usage:
|
|
218
|
-
pr-shepherd commit-suggestion [PR] --thread-id ID --message MSG
|
|
219
|
-
[--description DESC] [--format text|json]
|
|
220
|
-
|
|
221
|
-
Flags:
|
|
222
|
-
--thread-id <id> Review thread ID containing exactly one suggestion to apply. Required.
|
|
223
|
-
--message <text> Suggested commit subject. Required and must be non-empty.
|
|
224
|
-
--description <text> Optional longer commit body.
|
|
225
|
-
--format text|json Output format. Default: text.
|
|
226
|
-
--help, -h Print this help and exit before GitHub, git, config, or log I/O.
|
|
227
|
-
|
|
228
|
-
Preconditions:
|
|
229
|
-
The current branch must match the PR head ref. Local HEAD may equal or descend from the PR head.
|
|
230
|
-
|
|
231
|
-
Exit codes:
|
|
232
|
-
0 suggestion patch and instructions produced
|
|
233
|
-
64 usage error (missing/invalid flag)
|
|
234
|
-
69 precondition unmet (thread ineligible, branch/SHA mismatch, no open PR)
|
|
235
|
-
See docs/exit-codes.md for the full sysexits.h table.`;
|
|
236
|
-
readonly "mark-files-as-viewed": `pr-shepherd mark-files-as-viewed
|
|
237
|
-
|
|
238
|
-
Deprecated compatibility alias for marking selected PR files as viewed.
|
|
239
|
-
|
|
240
|
-
Usage:
|
|
241
|
-
pr-shepherd mark-files-as-viewed [PR] [files...] [--tests] [--match REGEX]
|
|
242
|
-
[--format text|json]
|
|
243
|
-
|
|
244
|
-
Selectors:
|
|
245
|
-
files... Exact changed-file paths from the PR diff.
|
|
246
|
-
--tests Select changed test files.
|
|
247
|
-
--match <regex> Select changed files whose paths match a case-insensitive JavaScript regex.
|
|
248
|
-
May be repeated.
|
|
249
|
-
|
|
250
|
-
Flags:
|
|
251
|
-
--format text|json Output format. Default: text.
|
|
252
|
-
--help, -h Print this help and exit before GitHub I/O.
|
|
253
|
-
|
|
254
|
-
PR may be a number or GitHub pull request URL. When omitted, the current branch PR is inferred.
|
|
255
|
-
Exit code: 0 on success; nonzero on failure (sysexits.h — see docs/exit-codes.md).`;
|
|
256
|
-
readonly iterate: "pr-shepherd iterate\n\nRun one iterate tick for a pull request. The no-subcommand form polls; use this subcommand for a single tick.\nThe output contains one action and an action-specific ## Instructions section.\n\nUsage:\n pr-shepherd iterate [PR] [iterate-flags]\n\nIterate flags:\n --ready-delay <duration> Settle window before a clean PR cancels. Bare number = minutes. Example: 15m.\n --stall-timeout <duration> Escalate repeated unchanged failures after this duration. Bare number = minutes. 0 disables.\n --no-auto-mark-ready Leave draft PRs in draft; stop when otherwise ready.\n --no-auto-cancel-actionable Legacy no-op; workflow runs are never cancelled.\n --merge Shepherd through readiness, then emit a merge or merge-queue command.\n --instructions playbook|inline Render fix_code steps inline every tick (default) or fold the invariant ones into a playbook pointer. Default: iterate.instructions (inline).\n --poll-mode auto|poll|event event runs one tick, never sleeps, and prints nextCheck; auto picks event when CLAUDE_CODE_REMOTE=true. Default: poll.mode (auto).\n --transport auto|graphql|rest Select GitHub transport. Default: github.transport (auto).\n --format text|json Output Markdown text or JSON. Default: text.\n --verbose Include verbose iterate fields.\n --help, -h Print this help and exit before GitHub, git, config, or log I/O.\n\nDurations accept s/m/h suffixes: 30s, 4.5m, 1h. A bare number is minutes; decimals are allowed only with an explicit unit (4.5m).\n\nActions:\n WAIT No immediate action; continue with the next poll.\n MARK_READY Draft PR was marked ready; continue with the next poll.\n READY Clean PR is inside the ready-delay. Schedule the rerun for when remainingSeconds elapses. Do not invent unrelated work. Already-owned later work may continue.\n FIX_CODE Agent action is required; follow the instructions, then continue polling.\n CANCEL Stop polling this pull request: merged/closed, ready-delay elapsed, or a clean draft left in draft because auto mark-ready is disabled. Continue remaining work from the original request.\n ESCALATE Stop polling until a human provides direction.\n MERGE Run the emitted merge/queue command, then continue monitoring.\n\nExit codes:\n 0 CANCEL (merged, ready-delay elapsed, or clean draft left in draft by disabled auto mark-ready)\n 10 WAIT or READY\n 11 MARK_READY\n 12 FIX_CODE\n 13 ESCALATE\n 14 CANCEL (closed without merging)\n 15 MERGE\n A command/validation/GitHub failure exits with a sysexits.h code instead (see docs/exit-codes.md).";
|
|
257
|
-
readonly poll: "pr-shepherd poll\n\nRun iterate repeatedly for one PR, or read compact summaries for an explicit PR set or native\nGitHub stack. Aggregate mode returns when any row needs work, every row is terminal, or timeout.\nPoll exits as soon as iterate returns READY, MARK_READY, CANCEL, or ESCALATE, or when timeout\nreturns the last WAIT result. FIX_CODE starts a --debounce settle window (default:\npoll.debounceSeconds; built-in 1m): poll keeps\niterating at --interval, then runs one more tick after the window and returns that result.\nWith --until-terminal or --merge, poll also continues through MARK_READY.\n\nUsage:\n pr-shepherd poll [PR ...] [poll-flags] [iterate-flags]\n pr-shepherd poll --stack PR [poll-flags] [iterate-flags]\n\nPoll flags:\n --stack PR Select all entries in PR's native GitHub stack, bottom to top.\n --interval <duration> Sleep between WAIT ticks. Bare number = seconds. Default: poll.intervalSeconds (built-in 60s). Stack and multi-PR polls multiply that by poll.stackIntervalFactor (built-in 2) unless this flag is set.\n --timeout <duration> Maximum wall-clock wait for WAIT ticks. Bare number = seconds. Default: poll.timeoutSeconds (built-in 4.5m).\n --debounce <duration> Settle window after first FIX_CODE or stack SHEPHERD before returning. Bare number = seconds. Default: poll.debounceSeconds (built-in 60s). 0 disables.\n --quiet-status Print only changed WAIT snapshots. Overrides poll.quietStatus.\n --no-quiet-status Print every WAIT snapshot. Overrides poll.quietStatus.\n --until-terminal Continue through WAIT/MARK_READY until READY/FIX_CODE/MERGE/CANCEL/ESCALATE or stack SHEPHERD.\n\nForwarded iterate flags:\n --ready-delay <duration> Settle window before a clean PR cancels. Bare number = minutes. Example: 15m.\n --stall-timeout <duration> Escalate repeated unchanged failures after this duration. Bare number = minutes. 0 disables.\n --no-auto-mark-ready Leave draft PRs in draft; stop when otherwise ready.\n --no-auto-cancel-actionable Legacy no-op; workflow runs are never cancelled.\n --merge Shepherd through readiness, then emit a merge or merge-queue command.\n --instructions playbook|inline Render fix_code steps inline every tick (default) or fold the invariant ones into a playbook pointer. Default: iterate.instructions (inline).\n --poll-mode auto|poll|event event runs one tick, never sleeps, and prints nextCheck; auto picks event when CLAUDE_CODE_REMOTE=true. Default: poll.mode (auto).\n --transport auto|graphql|rest Select GitHub transport. Default: github.transport (auto).\n --format text|json Output Markdown text or JSON. Default: text.\n --verbose Include verbose iterate fields and detailed per-tick lines.\n --help, -h Print this help and exit before GitHub, git, config, or log I/O.\n\nDurations accept s/m/h suffixes: 30s, 4.5m, 1h. A bare number uses each flag's default unit (seconds\nfor --interval/--timeout/--debounce, minutes for --ready-delay/--stall-timeout); decimals are allowed only with\nan explicit unit (4.5m).\nEach WAIT tick writes a stderr line naming what it is waiting on by default; poll.quietStatus can change that default, --quiet-status/--no-quiet-status override it, and --verbose emits detailed per-tick lines.\nFIX_CODE debounce writes a remaining-seconds line to stderr. --timeout does not cut an in-flight debounce short.\nWith --until-terminal, --timeout is ignored for WAIT ticks and polling continues until READY, FIX_CODE, MERGE, CANCEL, or ESCALATE. With --merge, --timeout still bounds WAIT ticks; it only continues through MARK_READY while polling remains within that timeout.\n\nExit codes: same as iterate (the final tick's action/reason decides the code).\n 0 CANCEL (merged, ready-delay elapsed, or clean draft left in draft by disabled auto mark-ready)\n 10 WAIT or READY (including a WAIT returned by --timeout)\n 11 MARK_READY\n 12 FIX_CODE\n 13 ESCALATE\n 14 CANCEL (closed without merging)\n 15 MERGE\n 16 SHEPHERD (--stack only: run the listed one-PR sessions, then rerun the selector)\n A command/validation/GitHub failure exits with a sysexits.h code instead (see docs/exit-codes.md).";
|
|
258
|
-
readonly clean: `pr-shepherd clean
|
|
259
|
-
|
|
260
|
-
Remove pr-shepherd state files from PR_SHEPHERD_STATE_DIR.
|
|
261
|
-
|
|
262
|
-
Usage:
|
|
263
|
-
pr-shepherd clean pr [number] [--dry-run] [--format text|json] [--poll-mode auto|poll|event]
|
|
264
|
-
pr-shepherd clean branch [name] [--dry-run] [--format text|json] [--poll-mode auto|poll|event]
|
|
265
|
-
pr-shepherd clean current [--dry-run] [--format text|json] [--poll-mode auto|poll|event]
|
|
266
|
-
pr-shepherd clean repo [--dry-run] [--format text|json] [--poll-mode auto|poll|event]
|
|
267
|
-
pr-shepherd clean all [--dry-run] [--format text|json] [--poll-mode auto|poll|event]
|
|
268
|
-
|
|
269
|
-
Variants:
|
|
270
|
-
pr [number] Remove state for one PR. Defaults to current branch PR.
|
|
271
|
-
branch [name] Resolve a branch to its open PR, then remove that PR's state.
|
|
272
|
-
Defaults to current branch.
|
|
273
|
-
current Alias for branch against the current branch.
|
|
274
|
-
repo Remove all state for the current repository, including worktree logs.
|
|
275
|
-
all Remove all pr-shepherd state.
|
|
276
|
-
|
|
277
|
-
Flags:
|
|
278
|
-
--dry-run Preview paths without removing them.
|
|
279
|
-
--format text|json Output format. Default: text.
|
|
280
|
-
--poll-mode auto|poll|event
|
|
281
|
-
Clean the state for that poll mode; event mode keeps it in durable
|
|
282
|
-
state under the git common directory. Default: poll.mode (auto).
|
|
283
|
-
--help, -h Print this help and exit before any cleanup.
|
|
284
|
-
|
|
285
|
-
Exit code: 0 on success (including a no-op --dry-run on a nonexistent target); nonzero on failure (sysexits.h — see docs/exit-codes.md).`;
|
|
286
|
-
readonly journal: `pr-shepherd journal
|
|
287
|
-
|
|
288
|
-
Append a list item to the Shepherd Journal details block of a PR body.
|
|
289
|
-
Creates the section at the end if absent. Idempotent — duplicate items are skipped.
|
|
290
|
-
|
|
291
|
-
Usage:
|
|
292
|
-
pr-shepherd journal [PR] <item> [--dry-run] [--format text|json]
|
|
293
|
-
pr-shepherd journal [PR] --file <path> [--dry-run] [--format text|json]
|
|
294
|
-
pr-shepherd journal [PR] --file - [--dry-run] [--format text|json]
|
|
295
|
-
|
|
296
|
-
PR PR number or GitHub pull request URL. Defaults to current branch PR.
|
|
297
|
-
item Markdown list item: must start with "- " followed by non-whitespace text.
|
|
298
|
-
Example: '- Rejected suggestion: kept existing pattern for consistency.'
|
|
299
|
-
Provide it as a positional argument, or via --file to avoid shell-escaping
|
|
300
|
-
backticks and multi-line Markdown. Exactly one of the two is required.
|
|
301
|
-
|
|
302
|
-
Flags:
|
|
303
|
-
--file <path> Read the entry from a file instead of a positional argument.
|
|
304
|
-
Pass --file - to read from stdin.
|
|
305
|
-
--dry-run Preview the new PR body without writing it to GitHub.
|
|
306
|
-
--format text|json Output format. Default: text.
|
|
307
|
-
--help, -h Print this help and exit before any GitHub I/O.
|
|
308
|
-
|
|
309
|
-
Exit code: 0 on success (including no-change no-op); nonzero on failure (sysexits.h — see docs/exit-codes.md).`;
|
|
163
|
+
readonly "admin log-file": "pr-shepherd admin log-file\n\nPrint the per-worktree append-only debug log path for the current repository.\nThe log is created by the first non-help pr-shepherd command that initializes logging.\n\nUsage:\n pr-shepherd admin log-file [--format text|json]\n\nFlags:\n --format text|json Print a raw path or {\"path\": \"...\"} JSON. Default: text.\n --help, -h Print this help and exit before logging setup.\n\nEnvironment:\n PR_SHEPHERD_LOG_DISABLED=1 disables logging.\n PR_SHEPHERD_STATE_DIR overrides the base state directory.\n CLAUDE_CODE_REMOTE=true reports the durable log under the git common directory.\n\nExit code: 0 on success; 1 if repository identity cannot be resolved.";
|
|
164
|
+
readonly iterate: "pr-shepherd iterate\n\nRun one tick and return without sleeping. The no-subcommand form polls; use this subcommand when the\ncaller owns the next wake-up. One PR prints one action and an action-specific ## Instructions section.\nSeveral same-repository PRs print one aggregate summary. Unless nothing remains to wait for, the output\ncarries nextCheck: when to rerun if no GitHub event arrives first.\n\nUsage:\n pr-shepherd iterate [PR ...] [iterate-flags]\n\nIterate flags:\n --ready-delay <duration> Settle window before a clean PR cancels. Bare number = minutes. Default: iterate.ready-delay-minutes (built-in 0). Example: 15m.\n --stall-timeout <duration> Escalate repeated unchanged failures after this duration. Bare number = minutes. 0 disables.\n --no-auto-mark-ready Leave draft PRs in draft; stop when otherwise ready.\n --merge Shepherd through readiness, then emit a merge or merge-queue command.\n --instructions playbook|inline Render triage steps inline every tick (default) or fold the invariant ones into a playbook pointer. Default: iterate.instructions (inline).\n --transport auto|graphql|rest Select GitHub transport. Default: github.transport (auto).\n --format text|json Output Markdown text or JSON. Default: text.\n --verbose Include verbose iterate fields.\n --help, -h Print this help and exit before GitHub, git, config, or log I/O.\n\nDurations accept s/m/h suffixes: 30s, 4.5m, 1h. A bare number is minutes; decimals are allowed only with an explicit unit (4.5m).\n\nActions:\n WAIT No immediate action; continue with the next poll.\n MARK_READY Draft PR was marked ready; continue with the next poll.\n READY Clean PR is inside the ready-delay. Schedule the rerun for when remainingSeconds elapses. Do not invent unrelated work. Already-owned later work may continue.\n TRIAGE Agent action is required; follow the instructions, then continue polling.\n CANCEL Stop polling this pull request: merged/closed, ready-delay elapsed, or a clean draft left in draft because auto mark-ready is disabled. Continue remaining work from the original request.\n ESCALATE Stop polling until a human provides direction.\n MERGE Run the emitted merge/queue command, then continue monitoring.\n\nExit codes:\n 0 CANCEL (merged, ready-delay elapsed, or clean draft left in draft by disabled auto mark-ready)\n 10 WAIT or READY\n 11 MARK_READY\n 12 TRIAGE\n 13 ESCALATE\n 14 CANCEL (closed without merging)\n 15 MERGE\n A command/validation/GitHub failure exits with a sysexits.h code instead (see docs/exit-codes.md).";
|
|
165
|
+
readonly stack: "pr-shepherd stack\n\nShepherd every open PR in one PR's native GitHub stack, bottom to top. Each poll reads compact\nper-layer summaries and returns when a layer needs work, every layer is terminal, or timeout.\nSHEPHERD lists one-PR sessions to run before rerunning this command.\n--once, or CLAUDE_CODE_REMOTE=true, runs one aggregate tick and prints nextCheck instead of sleeping.\n\nUsage:\n pr-shepherd stack PR [--once] [poll-flags] [iterate-flags]\n\nStack flags:\n --once Run one aggregate tick without sleeping; poll flags are ignored.\n\nPoll flags:\n --interval <duration> Sleep between WAIT ticks. Bare number = seconds. Default: poll.interval-seconds (built-in 60s) multiplied by poll.stack-interval-factor (built-in 2) unless this flag is set.\n --timeout <duration> Maximum wall-clock wait for WAIT ticks. Bare number = seconds. Default: poll.timeout-seconds (built-in 4.5m).\n --debounce <duration> Settle window after the first SHEPHERD before returning. Bare number = seconds. Default: poll.debounce-seconds (built-in 60s). 0 disables.\n --quiet-status Print only changed WAIT snapshots. Overrides poll.quiet-status.\n --no-quiet-status Print every WAIT snapshot. Overrides poll.quiet-status.\n --until-terminal Continue through WAIT until SHEPHERD, MERGE, CANCEL, or ESCALATE.\n\nForwarded iterate flags:\n --ready-delay <duration> Settle window before a clean PR cancels. Bare number = minutes. Default: iterate.ready-delay-minutes (built-in 0). Example: 15m.\n --stall-timeout <duration> Escalate repeated unchanged failures after this duration. Bare number = minutes. 0 disables.\n --no-auto-mark-ready Do not convert draft PRs to ready for review.\n --merge Shepherd through readiness, then emit the stack merge commands.\n --instructions playbook|inline Render triage steps inline every tick (default) or fold the invariant ones into a playbook pointer. Default: iterate.instructions (inline).\n --transport auto|graphql|rest Select GitHub transport. Default: github.transport (auto).\n --format text|json Output Markdown text or JSON. Default: text.\n --verbose Include detailed per-tick lines.\n --help, -h Print this help and exit before GitHub, git, config, or log I/O.\n\nDurations accept s/m/h suffixes: 30s, 4.5m, 1h. A bare number uses each flag's default unit (seconds\nfor --interval/--timeout/--debounce, minutes for --ready-delay/--stall-timeout); decimals are allowed only with\nan explicit unit (4.5m).\n\nExit codes:\n 0 CANCEL (every layer merged)\n 10 WAIT\n 13 ESCALATE\n 14 CANCEL (a layer closed without merging)\n 15 MERGE\n 16 SHEPHERD (run the listed one-PR sessions, then rerun this stack command)\n A command/validation/GitHub failure exits with a sysexits.h code instead (see docs/exit-codes.md).";
|
|
310
166
|
readonly "journal extract": `pr-shepherd journal extract
|
|
311
167
|
|
|
312
168
|
Extract one visible, structurally valid Shepherd Journal from a local PR-body file.
|
|
@@ -332,8 +188,7 @@ Usage:
|
|
|
332
188
|
Flags:
|
|
333
189
|
--format text|json Markdown text (default) or one JSON line: {"name","content"} or {"playbooks":[...]}.
|
|
334
190
|
|
|
335
|
-
The name is case-insensitive; spaces and hyphens are equivalent ("
|
|
191
|
+
The name is case-insensitive; spaces and hyphens are equivalent ("Triage loop" and triage-loop match).
|
|
336
192
|
Unknown names exit 64 and list the available playbooks.
|
|
337
193
|
--help, -h Print this help and exit before any I/O.`;
|
|
338
|
-
readonly "log-file": "pr-shepherd log-file\n\nPrint the per-worktree append-only debug log path for the current repository.\nThe log is created by the first non-help pr-shepherd command that initializes logging.\n\nUsage:\n pr-shepherd log-file [--format text|json] [--poll-mode auto|poll|event]\n\nFlags:\n --format text|json Print a raw path or {\"path\": \"...\"} JSON. Default: text.\n --poll-mode auto|poll|event\n Report the log for that poll mode; event mode keeps it in durable\n state under the git common directory. Default: poll.mode (auto).\n --help, -h Print this help and exit before logging setup.\n\nEnvironment:\n PR_SHEPHERD_LOG_DISABLED=1 disables logging.\n PR_SHEPHERD_STATE_DIR overrides the base state directory.\n\nExit code: 0 on success; 1 if repository identity cannot be resolved.";
|
|
339
194
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
2
|
import { LOG_FILE_USAGE } from "./help-log-file-page.mjs";
|
|
3
|
-
import { DEFAULT_USAGE, ITERATE_USAGE,
|
|
3
|
+
import { DEFAULT_USAGE, ITERATE_USAGE, STACK_USAGE } from "./help-iterate-poll-pages.mjs";
|
|
4
4
|
export const COMMAND_USAGE = {
|
|
5
5
|
default: DEFAULT_USAGE,
|
|
6
6
|
"apply merge": `pr-shepherd apply merge
|
|
@@ -121,13 +121,13 @@ Usage:
|
|
|
121
121
|
--removed-at <unix> Removal time in Unix seconds.
|
|
122
122
|
--format text|json Output format. Default: text.
|
|
123
123
|
--help, -h Print this help and exit before any I/O.`,
|
|
124
|
-
|
|
124
|
+
suggest: `pr-shepherd suggest
|
|
125
125
|
|
|
126
126
|
Build an ordered list of patches and commit instructions from GitHub review suggestions.
|
|
127
127
|
The command does not edit files or mutate git history.
|
|
128
128
|
|
|
129
129
|
Usage:
|
|
130
|
-
pr-shepherd
|
|
130
|
+
pr-shepherd suggest [PR]
|
|
131
131
|
--thread-id ID --message MSG [--description DESC]
|
|
132
132
|
[--thread-id ID --message MSG [--description DESC] ...]
|
|
133
133
|
[--format text|json]
|
|
@@ -137,22 +137,6 @@ belong to that suggestion. Groups are validated and returned in command-line ord
|
|
|
137
137
|
|
|
138
138
|
The current branch must match the PR head ref. Local HEAD may equal or descend from the PR head;
|
|
139
139
|
every generated patch is dry-run in order with git apply --check before output.
|
|
140
|
-
--help, -h Print this help and exit before GitHub, git, config, or log I/O.`,
|
|
141
|
-
"build-suggestion-patch": `pr-shepherd build-suggestion-patch
|
|
142
|
-
|
|
143
|
-
Deprecated one-suggestion adapter. Use build-suggestion-patches.
|
|
144
|
-
|
|
145
|
-
Usage:
|
|
146
|
-
pr-shepherd build-suggestion-patch [PR] --thread-id ID --message MSG
|
|
147
|
-
[--description DESC] [--format text|json]
|
|
148
|
-
|
|
149
|
-
Flags:
|
|
150
|
-
--thread-id <id> Review thread containing exactly one suggestion block. Required.
|
|
151
|
-
--message <text> Suggested commit subject. Required and non-empty.
|
|
152
|
-
--description <text> Optional longer commit body.
|
|
153
|
-
--format text|json Output format. Default: text.
|
|
154
|
-
|
|
155
|
-
The current branch must match the PR head ref. Local HEAD may equal or descend from the PR head.
|
|
156
140
|
--help, -h Print this help and exit before GitHub, git, config, or log I/O.`,
|
|
157
141
|
admin: `pr-shepherd admin
|
|
158
142
|
|
|
@@ -169,147 +153,19 @@ Run 'pr-shepherd admin <clean|log-file> --help' for command-specific details.
|
|
|
169
153
|
Remove pr-shepherd state files from PR_SHEPHERD_STATE_DIR.
|
|
170
154
|
|
|
171
155
|
Usage:
|
|
172
|
-
pr-shepherd admin clean pr [number] [--dry-run] [--format text|json]
|
|
173
|
-
pr-shepherd admin clean branch [name] [--dry-run] [--format text|json]
|
|
174
|
-
pr-shepherd admin clean current [--dry-run] [--format text|json]
|
|
175
|
-
pr-shepherd admin clean repo [--dry-run] [--format text|json]
|
|
176
|
-
pr-shepherd admin clean all [--dry-run] [--format text|json]
|
|
156
|
+
pr-shepherd admin clean pr [number] [--dry-run] [--format text|json]
|
|
157
|
+
pr-shepherd admin clean branch [name] [--dry-run] [--format text|json]
|
|
158
|
+
pr-shepherd admin clean current [--dry-run] [--format text|json]
|
|
159
|
+
pr-shepherd admin clean repo [--dry-run] [--format text|json]
|
|
160
|
+
pr-shepherd admin clean all [--dry-run] [--format text|json]
|
|
177
161
|
|
|
178
162
|
Variants remove state for one PR, branch, current branch, repository, or all repositories.
|
|
179
163
|
Use --dry-run to preview paths without removing them.
|
|
180
|
-
|
|
181
|
-
state under the git common directory. Default: poll.mode (auto).
|
|
164
|
+
When CLAUDE_CODE_REMOTE=true, state is the durable copy under the git common directory.
|
|
182
165
|
--help, -h Print this help and exit before any cleanup.`,
|
|
183
|
-
"admin log-file": LOG_FILE_USAGE
|
|
184
|
-
resolve: `pr-shepherd resolve
|
|
185
|
-
|
|
186
|
-
Deprecated compatibility alias for user-directed GitHub review-state mutations. Supplied IDs are forwarded to GitHub;
|
|
187
|
-
GitHub accepts or rejects each mutation.
|
|
188
|
-
|
|
189
|
-
Usage:
|
|
190
|
-
pr-shepherd resolve [PR] --reply-thread-ids A,B --message MSG
|
|
191
|
-
pr-shepherd resolve [PR] --resolve-thread-ids A,B [--minimize-comment-ids X,Y]
|
|
192
|
-
[--dismiss-review-ids Q] [--message MSG]
|
|
193
|
-
[--require-sha SHA] [--format text|json]
|
|
194
|
-
|
|
195
|
-
Flags:
|
|
196
|
-
--resolve-thread-ids <ids> Comma-separated review thread IDs (PRRT_*) to resolve.
|
|
197
|
-
Note: comment IDs (PRRC_*) from gh api are not thread IDs and will fail.
|
|
198
|
-
--reply-thread-ids <ids> Comma-separated review thread IDs to reply to.
|
|
199
|
-
--minimize-comment-ids <ids> Comma-separated issue/review comment IDs to minimize.
|
|
200
|
-
--dismiss-review-ids <ids> Comma-separated review IDs to dismiss.
|
|
201
|
-
--message <text> Reply/dismiss message. Required with --reply-thread-ids
|
|
202
|
-
or --dismiss-review-ids.
|
|
203
|
-
--require-sha <sha> Wait until GitHub reports this PR head SHA (or HEAD) before mutating.
|
|
204
|
-
Must be a full 40-character lowercase hex SHA, or HEAD for this
|
|
205
|
-
checkout's commit. Local HEAD is valid only when it equals the
|
|
206
|
-
current remote PR head.
|
|
207
|
-
--format text|json Output format. Default: text.
|
|
208
|
-
--help, -h Print this help and exit before GitHub I/O.
|
|
209
|
-
|
|
210
|
-
At least one non-empty action flag is required:
|
|
211
|
-
--reply-thread-ids, --resolve-thread-ids, --minimize-comment-ids, or --dismiss-review-ids.
|
|
212
|
-
|
|
213
|
-
PR may be a number or GitHub pull request URL. When omitted, the current branch PR is inferred.
|
|
214
|
-
Exit code: 0 on success; nonzero on failure (sysexits.h — see docs/exit-codes.md).`,
|
|
215
|
-
"commit-suggestion": `pr-shepherd commit-suggestion
|
|
216
|
-
|
|
217
|
-
Build a patch and commit instructions for one GitHub review thread containing a suggestion block.
|
|
218
|
-
The command does not edit files or mutate git history.
|
|
219
|
-
|
|
220
|
-
Usage:
|
|
221
|
-
pr-shepherd commit-suggestion [PR] --thread-id ID --message MSG
|
|
222
|
-
[--description DESC] [--format text|json]
|
|
223
|
-
|
|
224
|
-
Flags:
|
|
225
|
-
--thread-id <id> Review thread ID containing exactly one suggestion to apply. Required.
|
|
226
|
-
--message <text> Suggested commit subject. Required and must be non-empty.
|
|
227
|
-
--description <text> Optional longer commit body.
|
|
228
|
-
--format text|json Output format. Default: text.
|
|
229
|
-
--help, -h Print this help and exit before GitHub, git, config, or log I/O.
|
|
230
|
-
|
|
231
|
-
Preconditions:
|
|
232
|
-
The current branch must match the PR head ref. Local HEAD may equal or descend from the PR head.
|
|
233
|
-
|
|
234
|
-
Exit codes:
|
|
235
|
-
0 suggestion patch and instructions produced
|
|
236
|
-
64 usage error (missing/invalid flag)
|
|
237
|
-
69 precondition unmet (thread ineligible, branch/SHA mismatch, no open PR)
|
|
238
|
-
See docs/exit-codes.md for the full sysexits.h table.`,
|
|
239
|
-
"mark-files-as-viewed": `pr-shepherd mark-files-as-viewed
|
|
240
|
-
|
|
241
|
-
Deprecated compatibility alias for marking selected PR files as viewed.
|
|
242
|
-
|
|
243
|
-
Usage:
|
|
244
|
-
pr-shepherd mark-files-as-viewed [PR] [files...] [--tests] [--match REGEX]
|
|
245
|
-
[--format text|json]
|
|
246
|
-
|
|
247
|
-
Selectors:
|
|
248
|
-
files... Exact changed-file paths from the PR diff.
|
|
249
|
-
--tests Select changed test files.
|
|
250
|
-
--match <regex> Select changed files whose paths match a case-insensitive JavaScript regex.
|
|
251
|
-
May be repeated.
|
|
252
|
-
|
|
253
|
-
Flags:
|
|
254
|
-
--format text|json Output format. Default: text.
|
|
255
|
-
--help, -h Print this help and exit before GitHub I/O.
|
|
256
|
-
|
|
257
|
-
PR may be a number or GitHub pull request URL. When omitted, the current branch PR is inferred.
|
|
258
|
-
Exit code: 0 on success; nonzero on failure (sysexits.h — see docs/exit-codes.md).`,
|
|
166
|
+
"admin log-file": LOG_FILE_USAGE,
|
|
259
167
|
iterate: ITERATE_USAGE,
|
|
260
|
-
|
|
261
|
-
clean: `pr-shepherd clean
|
|
262
|
-
|
|
263
|
-
Remove pr-shepherd state files from PR_SHEPHERD_STATE_DIR.
|
|
264
|
-
|
|
265
|
-
Usage:
|
|
266
|
-
pr-shepherd clean pr [number] [--dry-run] [--format text|json] [--poll-mode auto|poll|event]
|
|
267
|
-
pr-shepherd clean branch [name] [--dry-run] [--format text|json] [--poll-mode auto|poll|event]
|
|
268
|
-
pr-shepherd clean current [--dry-run] [--format text|json] [--poll-mode auto|poll|event]
|
|
269
|
-
pr-shepherd clean repo [--dry-run] [--format text|json] [--poll-mode auto|poll|event]
|
|
270
|
-
pr-shepherd clean all [--dry-run] [--format text|json] [--poll-mode auto|poll|event]
|
|
271
|
-
|
|
272
|
-
Variants:
|
|
273
|
-
pr [number] Remove state for one PR. Defaults to current branch PR.
|
|
274
|
-
branch [name] Resolve a branch to its open PR, then remove that PR's state.
|
|
275
|
-
Defaults to current branch.
|
|
276
|
-
current Alias for branch against the current branch.
|
|
277
|
-
repo Remove all state for the current repository, including worktree logs.
|
|
278
|
-
all Remove all pr-shepherd state.
|
|
279
|
-
|
|
280
|
-
Flags:
|
|
281
|
-
--dry-run Preview paths without removing them.
|
|
282
|
-
--format text|json Output format. Default: text.
|
|
283
|
-
--poll-mode auto|poll|event
|
|
284
|
-
Clean the state for that poll mode; event mode keeps it in durable
|
|
285
|
-
state under the git common directory. Default: poll.mode (auto).
|
|
286
|
-
--help, -h Print this help and exit before any cleanup.
|
|
287
|
-
|
|
288
|
-
Exit code: 0 on success (including a no-op --dry-run on a nonexistent target); nonzero on failure (sysexits.h — see docs/exit-codes.md).`,
|
|
289
|
-
journal: `pr-shepherd journal
|
|
290
|
-
|
|
291
|
-
Append a list item to the Shepherd Journal details block of a PR body.
|
|
292
|
-
Creates the section at the end if absent. Idempotent — duplicate items are skipped.
|
|
293
|
-
|
|
294
|
-
Usage:
|
|
295
|
-
pr-shepherd journal [PR] <item> [--dry-run] [--format text|json]
|
|
296
|
-
pr-shepherd journal [PR] --file <path> [--dry-run] [--format text|json]
|
|
297
|
-
pr-shepherd journal [PR] --file - [--dry-run] [--format text|json]
|
|
298
|
-
|
|
299
|
-
PR PR number or GitHub pull request URL. Defaults to current branch PR.
|
|
300
|
-
item Markdown list item: must start with "- " followed by non-whitespace text.
|
|
301
|
-
Example: '- Rejected suggestion: kept existing pattern for consistency.'
|
|
302
|
-
Provide it as a positional argument, or via --file to avoid shell-escaping
|
|
303
|
-
backticks and multi-line Markdown. Exactly one of the two is required.
|
|
304
|
-
|
|
305
|
-
Flags:
|
|
306
|
-
--file <path> Read the entry from a file instead of a positional argument.
|
|
307
|
-
Pass --file - to read from stdin.
|
|
308
|
-
--dry-run Preview the new PR body without writing it to GitHub.
|
|
309
|
-
--format text|json Output format. Default: text.
|
|
310
|
-
--help, -h Print this help and exit before any GitHub I/O.
|
|
311
|
-
|
|
312
|
-
Exit code: 0 on success (including no-change no-op); nonzero on failure (sysexits.h — see docs/exit-codes.md).`,
|
|
168
|
+
stack: STACK_USAGE,
|
|
313
169
|
"journal extract": `pr-shepherd journal extract
|
|
314
170
|
|
|
315
171
|
Extract one visible, structurally valid Shepherd Journal from a local PR-body file.
|
|
@@ -335,8 +191,7 @@ Usage:
|
|
|
335
191
|
Flags:
|
|
336
192
|
--format text|json Markdown text (default) or one JSON line: {"name","content"} or {"playbooks":[...]}.
|
|
337
193
|
|
|
338
|
-
The name is case-insensitive; spaces and hyphens are equivalent ("
|
|
194
|
+
The name is case-insensitive; spaces and hyphens are equivalent ("Triage loop" and triage-loop match).
|
|
339
195
|
Unknown names exit 64 and list the available playbooks.
|
|
340
196
|
--help, -h Print this help and exit before any I/O.`,
|
|
341
|
-
"log-file": LOG_FILE_USAGE,
|
|
342
197
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare const ITERATE_USAGE = "pr-shepherd iterate\n\nRun one
|
|
2
|
-
export declare const POLL_USAGE = "pr-shepherd poll\n\nRun iterate repeatedly for one PR, or read compact summaries for an explicit PR set or native\nGitHub stack. Aggregate mode returns when any row needs work, every row is terminal, or timeout.\nPoll exits as soon as iterate returns READY, MARK_READY, CANCEL, or ESCALATE, or when timeout\nreturns the last WAIT result. FIX_CODE starts a --debounce settle window (default:\npoll.debounceSeconds; built-in 1m): poll keeps\niterating at --interval, then runs one more tick after the window and returns that result.\nWith --until-terminal or --merge, poll also continues through MARK_READY.\n\nUsage:\n pr-shepherd poll [PR ...] [poll-flags] [iterate-flags]\n pr-shepherd poll --stack PR [poll-flags] [iterate-flags]\n\nPoll flags:\n --stack PR Select all entries in PR's native GitHub stack, bottom to top.\n --interval <duration> Sleep between WAIT ticks. Bare number = seconds. Default: poll.intervalSeconds (built-in 60s). Stack and multi-PR polls multiply that by poll.stackIntervalFactor (built-in 2) unless this flag is set.\n --timeout <duration> Maximum wall-clock wait for WAIT ticks. Bare number = seconds. Default: poll.timeoutSeconds (built-in 4.5m).\n --debounce <duration> Settle window after first FIX_CODE or stack SHEPHERD before returning. Bare number = seconds. Default: poll.debounceSeconds (built-in 60s). 0 disables.\n --quiet-status Print only changed WAIT snapshots. Overrides poll.quietStatus.\n --no-quiet-status Print every WAIT snapshot. Overrides poll.quietStatus.\n --until-terminal Continue through WAIT/MARK_READY until READY/FIX_CODE/MERGE/CANCEL/ESCALATE or stack SHEPHERD.\n\nForwarded iterate flags:\n --ready-delay <duration> Settle window before a clean PR cancels. Bare number = minutes. Example: 15m.\n --stall-timeout <duration> Escalate repeated unchanged failures after this duration. Bare number = minutes. 0 disables.\n --no-auto-mark-ready Leave draft PRs in draft; stop when otherwise ready.\n --no-auto-cancel-actionable Legacy no-op; workflow runs are never cancelled.\n --merge Shepherd through readiness, then emit a merge or merge-queue command.\n --instructions playbook|inline Render fix_code steps inline every tick (default) or fold the invariant ones into a playbook pointer. Default: iterate.instructions (inline).\n --poll-mode auto|poll|event event runs one tick, never sleeps, and prints nextCheck; auto picks event when CLAUDE_CODE_REMOTE=true. Default: poll.mode (auto).\n --transport auto|graphql|rest Select GitHub transport. Default: github.transport (auto).\n --format text|json Output Markdown text or JSON. Default: text.\n --verbose Include verbose iterate fields and detailed per-tick lines.\n --help, -h Print this help and exit before GitHub, git, config, or log I/O.\n\nDurations accept s/m/h suffixes: 30s, 4.5m, 1h. A bare number uses each flag's default unit (seconds\nfor --interval/--timeout/--debounce, minutes for --ready-delay/--stall-timeout); decimals are allowed only with\nan explicit unit (4.5m).\nEach WAIT tick writes a stderr line naming what it is waiting on by default; poll.quietStatus can change that default, --quiet-status/--no-quiet-status override it, and --verbose emits detailed per-tick lines.\nFIX_CODE debounce writes a remaining-seconds line to stderr. --timeout does not cut an in-flight debounce short.\nWith --until-terminal, --timeout is ignored for WAIT ticks and polling continues until READY, FIX_CODE, MERGE, CANCEL, or ESCALATE. With --merge, --timeout still bounds WAIT ticks; it only continues through MARK_READY while polling remains within that timeout.\n\nExit codes: same as iterate (the final tick's action/reason decides the code).\n 0 CANCEL (merged, ready-delay elapsed, or clean draft left in draft by disabled auto mark-ready)\n 10 WAIT or READY (including a WAIT returned by --timeout)\n 11 MARK_READY\n 12 FIX_CODE\n 13 ESCALATE\n 14 CANCEL (closed without merging)\n 15 MERGE\n 16 SHEPHERD (--stack only: run the listed one-PR sessions, then rerun the selector)\n A command/validation/GitHub failure exits with a sysexits.h code instead (see docs/exit-codes.md).";
|
|
1
|
+
export declare const ITERATE_USAGE = "pr-shepherd iterate\n\nRun one tick and return without sleeping. The no-subcommand form polls; use this subcommand when the\ncaller owns the next wake-up. One PR prints one action and an action-specific ## Instructions section.\nSeveral same-repository PRs print one aggregate summary. Unless nothing remains to wait for, the output\ncarries nextCheck: when to rerun if no GitHub event arrives first.\n\nUsage:\n pr-shepherd iterate [PR ...] [iterate-flags]\n\nIterate flags:\n --ready-delay <duration> Settle window before a clean PR cancels. Bare number = minutes. Default: iterate.ready-delay-minutes (built-in 0). Example: 15m.\n --stall-timeout <duration> Escalate repeated unchanged failures after this duration. Bare number = minutes. 0 disables.\n --no-auto-mark-ready Leave draft PRs in draft; stop when otherwise ready.\n --merge Shepherd through readiness, then emit a merge or merge-queue command.\n --instructions playbook|inline Render triage steps inline every tick (default) or fold the invariant ones into a playbook pointer. Default: iterate.instructions (inline).\n --transport auto|graphql|rest Select GitHub transport. Default: github.transport (auto).\n --format text|json Output Markdown text or JSON. Default: text.\n --verbose Include verbose iterate fields.\n --help, -h Print this help and exit before GitHub, git, config, or log I/O.\n\nDurations accept s/m/h suffixes: 30s, 4.5m, 1h. A bare number is minutes; decimals are allowed only with an explicit unit (4.5m).\n\nActions:\n WAIT No immediate action; continue with the next poll.\n MARK_READY Draft PR was marked ready; continue with the next poll.\n READY Clean PR is inside the ready-delay. Schedule the rerun for when remainingSeconds elapses. Do not invent unrelated work. Already-owned later work may continue.\n TRIAGE Agent action is required; follow the instructions, then continue polling.\n CANCEL Stop polling this pull request: merged/closed, ready-delay elapsed, or a clean draft left in draft because auto mark-ready is disabled. Continue remaining work from the original request.\n ESCALATE Stop polling until a human provides direction.\n MERGE Run the emitted merge/queue command, then continue monitoring.\n\nExit codes:\n 0 CANCEL (merged, ready-delay elapsed, or clean draft left in draft by disabled auto mark-ready)\n 10 WAIT or READY\n 11 MARK_READY\n 12 TRIAGE\n 13 ESCALATE\n 14 CANCEL (closed without merging)\n 15 MERGE\n A command/validation/GitHub failure exits with a sysexits.h code instead (see docs/exit-codes.md).";
|
|
3
2
|
/** Public help page for the default PR polling invocation. */
|
|
4
|
-
export declare const DEFAULT_USAGE:
|
|
3
|
+
export declare const DEFAULT_USAGE = "pr-shepherd [PR]\n\nRun iterate repeatedly for one PR, or read compact summaries for an explicit same-repository PR set.\nAggregate mode returns when any row needs work, every row is terminal, or timeout.\nWhen CLAUDE_CODE_REMOTE=true, the command runs one tick like iterate and prints nextCheck instead.\nPoll exits as soon as iterate returns READY, MARK_READY, CANCEL, or ESCALATE, or when timeout\nreturns the last WAIT result. TRIAGE starts a --debounce settle window (default:\npoll.debounce-seconds; built-in 1m): poll keeps\niterating at --interval, then runs one more tick after the window and returns that result.\nWith --until-terminal or --merge, poll also continues through MARK_READY.\n\nUsage:\n pr-shepherd [PR ...] [poll-flags] [iterate-flags]\n\nUse 'pr-shepherd stack PR' for a native GitHub stack.\n\nPoll flags:\n --interval <duration> Sleep between WAIT ticks. Bare number = seconds. Default: poll.interval-seconds (built-in 60s). Stack and multi-PR polls multiply that by poll.stack-interval-factor (built-in 2) unless this flag is set.\n --timeout <duration> Maximum wall-clock wait for WAIT ticks. Bare number = seconds. Default: poll.timeout-seconds (built-in 4.5m).\n --debounce <duration> Settle window after first TRIAGE or stack SHEPHERD before returning. Bare number = seconds. Default: poll.debounce-seconds (built-in 60s). 0 disables.\n --quiet-status Print only changed WAIT snapshots. Overrides poll.quiet-status.\n --no-quiet-status Print every WAIT snapshot. Overrides poll.quiet-status.\n --until-terminal Continue through WAIT/MARK_READY until READY/TRIAGE/MERGE/CANCEL/ESCALATE or stack SHEPHERD.\n\nForwarded iterate flags:\n --ready-delay <duration> Settle window before a clean PR cancels. Bare number = minutes. Default: iterate.ready-delay-minutes (built-in 0). Example: 15m.\n --stall-timeout <duration> Escalate repeated unchanged failures after this duration. Bare number = minutes. 0 disables.\n --no-auto-mark-ready Leave draft PRs in draft; stop when otherwise ready.\n --merge Shepherd through readiness, then emit a merge or merge-queue command.\n --instructions playbook|inline Render triage steps inline every tick (default) or fold the invariant ones into a playbook pointer. Default: iterate.instructions (inline).\n --transport auto|graphql|rest Select GitHub transport. Default: github.transport (auto).\n --format text|json Output Markdown text or JSON. Default: text.\n --verbose Include verbose iterate fields and detailed per-tick lines.\n --help, -h Print this help and exit before GitHub, git, config, or log I/O.\n\nDurations accept s/m/h suffixes: 30s, 4.5m, 1h. A bare number uses each flag's default unit (seconds\nfor --interval/--timeout/--debounce, minutes for --ready-delay/--stall-timeout); decimals are allowed only with\nan explicit unit (4.5m).\nEach WAIT tick writes a stderr line naming what it is waiting on by default; poll.quiet-status can change that default, --quiet-status/--no-quiet-status override it, and --verbose emits detailed per-tick lines.\nTRIAGE debounce writes a remaining-seconds line to stderr. --timeout does not cut an in-flight debounce short.\nWith --until-terminal, --timeout is ignored for WAIT ticks and polling continues until READY, TRIAGE, MERGE, CANCEL, or ESCALATE. With --merge, --timeout still bounds WAIT ticks; it only continues through MARK_READY while polling remains within that timeout.\n\nExit codes: same as iterate (the final tick's action/reason decides the code).\n 0 CANCEL (merged, ready-delay elapsed, or clean draft left in draft by disabled auto mark-ready)\n 10 WAIT or READY (including a WAIT returned by --timeout)\n 11 MARK_READY\n 12 TRIAGE\n 13 ESCALATE\n 14 CANCEL (closed without merging)\n 15 MERGE\n A command/validation/GitHub failure exits with a sysexits.h code instead (see docs/exit-codes.md).";
|
|
4
|
+
/** Public help page for `pr-shepherd stack`. */
|
|
5
|
+
export declare const STACK_USAGE = "pr-shepherd stack\n\nShepherd every open PR in one PR's native GitHub stack, bottom to top. Each poll reads compact\nper-layer summaries and returns when a layer needs work, every layer is terminal, or timeout.\nSHEPHERD lists one-PR sessions to run before rerunning this command.\n--once, or CLAUDE_CODE_REMOTE=true, runs one aggregate tick and prints nextCheck instead of sleeping.\n\nUsage:\n pr-shepherd stack PR [--once] [poll-flags] [iterate-flags]\n\nStack flags:\n --once Run one aggregate tick without sleeping; poll flags are ignored.\n\nPoll flags:\n --interval <duration> Sleep between WAIT ticks. Bare number = seconds. Default: poll.interval-seconds (built-in 60s) multiplied by poll.stack-interval-factor (built-in 2) unless this flag is set.\n --timeout <duration> Maximum wall-clock wait for WAIT ticks. Bare number = seconds. Default: poll.timeout-seconds (built-in 4.5m).\n --debounce <duration> Settle window after the first SHEPHERD before returning. Bare number = seconds. Default: poll.debounce-seconds (built-in 60s). 0 disables.\n --quiet-status Print only changed WAIT snapshots. Overrides poll.quiet-status.\n --no-quiet-status Print every WAIT snapshot. Overrides poll.quiet-status.\n --until-terminal Continue through WAIT until SHEPHERD, MERGE, CANCEL, or ESCALATE.\n\nForwarded iterate flags:\n --ready-delay <duration> Settle window before a clean PR cancels. Bare number = minutes. Default: iterate.ready-delay-minutes (built-in 0). Example: 15m.\n --stall-timeout <duration> Escalate repeated unchanged failures after this duration. Bare number = minutes. 0 disables.\n --no-auto-mark-ready Do not convert draft PRs to ready for review.\n --merge Shepherd through readiness, then emit the stack merge commands.\n --instructions playbook|inline Render triage steps inline every tick (default) or fold the invariant ones into a playbook pointer. Default: iterate.instructions (inline).\n --transport auto|graphql|rest Select GitHub transport. Default: github.transport (auto).\n --format text|json Output Markdown text or JSON. Default: text.\n --verbose Include detailed per-tick lines.\n --help, -h Print this help and exit before GitHub, git, config, or log I/O.\n\nDurations accept s/m/h suffixes: 30s, 4.5m, 1h. A bare number uses each flag's default unit (seconds\nfor --interval/--timeout/--debounce, minutes for --ready-delay/--stall-timeout); decimals are allowed only with\nan explicit unit (4.5m).\n\nExit codes:\n 0 CANCEL (every layer merged)\n 10 WAIT\n 13 ESCALATE\n 14 CANCEL (a layer closed without merging)\n 15 MERGE\n 16 SHEPHERD (run the listed one-PR sessions, then rerun this stack command)\n A command/validation/GitHub failure exits with a sysexits.h code instead (see docs/exit-codes.md).";
|