pr-shepherd 2.1.0 → 2.2.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 (181) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +28 -22
  3. package/bin/api.d.mts +10 -2
  4. package/bin/api.mjs +30 -6
  5. package/bin/checks/pending-deployments.d.mts +10 -0
  6. package/bin/checks/pending-deployments.mjs +66 -0
  7. package/bin/checks/run-workflow-paths.d.mts +7 -0
  8. package/bin/checks/run-workflow-paths.mjs +19 -0
  9. package/bin/checks/triage.mjs +3 -2
  10. package/bin/checks/unreported-required.d.mts +11 -1
  11. package/bin/checks/unreported-required.mjs +8 -3
  12. package/bin/checks/workflow-concurrency.d.mts +9 -0
  13. package/bin/checks/workflow-concurrency.mjs +84 -0
  14. package/bin/checks/workflow-path.d.mts +2 -0
  15. package/bin/checks/workflow-path.mjs +4 -0
  16. package/bin/cli/arg-flags.mjs +3 -0
  17. package/bin/cli/clean-handler.mjs +1 -1
  18. package/bin/cli/default-poll.mjs +1 -0
  19. package/bin/cli/handlers.mjs +2 -0
  20. package/bin/cli/help-command-pages.d.mts +5 -4
  21. package/bin/cli/help-command-pages.mjs +2 -1
  22. package/bin/cli/help-iterate-poll-pages.d.mts +3 -3
  23. package/bin/cli/help-iterate-poll-pages.mjs +10 -2
  24. package/bin/cli/help-top-page.d.mts +1 -1
  25. package/bin/cli/help-top-page.mjs +2 -2
  26. package/bin/cli/help.d.mts +6 -5
  27. package/bin/cli/in-progress-run-format.d.mts +3 -0
  28. package/bin/cli/in-progress-run-format.mjs +14 -0
  29. package/bin/cli/iterate-activity-formatter.d.mts +2 -0
  30. package/bin/cli/iterate-activity-formatter.mjs +11 -0
  31. package/bin/cli/iterate-flags.d.mts +3 -0
  32. package/bin/cli/iterate-flags.mjs +18 -1
  33. package/bin/cli/iterate-formatter.mjs +2 -1
  34. package/bin/cli/iterate-lean.mjs +2 -0
  35. package/bin/cli/pending-deployments-format.d.mts +5 -0
  36. package/bin/cli/pending-deployments-format.mjs +19 -0
  37. package/bin/cli/poll-handler.d.mts +1 -1
  38. package/bin/cli/poll-handler.mjs +33 -10
  39. package/bin/cli/poll-targets.mjs +2 -0
  40. package/bin/cli/stack-merge-args.d.mts +10 -0
  41. package/bin/cli/stack-merge-args.mjs +27 -0
  42. package/bin/cli/stack-overview.d.mts +1 -0
  43. package/bin/cli/stack-overview.mjs +5 -1
  44. package/bin/cli/stalled-check-format.d.mts +3 -0
  45. package/bin/cli/stalled-check-format.mjs +23 -0
  46. package/bin/cli/suggestion-renderer.mjs +6 -0
  47. package/bin/cli/triage-formatter.mjs +14 -0
  48. package/bin/commands/check.mjs +7 -2
  49. package/bin/commands/clean.d.mts +1 -1
  50. package/bin/commands/clean.mjs +7 -0
  51. package/bin/commands/iterate/check-follow-up.d.mts +9 -0
  52. package/bin/commands/iterate/check-follow-up.mjs +34 -0
  53. package/bin/commands/iterate/ci-start-stall.d.mts +23 -0
  54. package/bin/commands/iterate/ci-start-stall.mjs +33 -0
  55. package/bin/commands/iterate/duration-approx.d.mts +2 -0
  56. package/bin/commands/iterate/duration-approx.mjs +8 -0
  57. package/bin/commands/iterate/escalate.d.mts +8 -17
  58. package/bin/commands/iterate/escalate.mjs +19 -48
  59. package/bin/commands/iterate/helpers.mjs +1 -0
  60. package/bin/commands/iterate/in-progress-runs.d.mts +10 -0
  61. package/bin/commands/iterate/in-progress-runs.mjs +120 -0
  62. package/bin/commands/iterate/index.mjs +12 -6
  63. package/bin/commands/iterate/merge-plan.d.mts +2 -0
  64. package/bin/commands/iterate/merge-plan.mjs +2 -1
  65. package/bin/commands/iterate/merge-state.d.mts +2 -0
  66. package/bin/commands/iterate/merge-state.mjs +8 -21
  67. package/bin/commands/iterate/native-stack-rebase.d.mts +3 -2
  68. package/bin/commands/iterate/native-stack-rebase.mjs +32 -11
  69. package/bin/commands/iterate/queue-removal.d.mts +19 -0
  70. package/bin/commands/iterate/queue-removal.mjs +64 -0
  71. package/bin/commands/iterate/render.d.mts +2 -1
  72. package/bin/commands/iterate/render.mjs +4 -1
  73. package/bin/commands/iterate/stack-boundary.d.mts +17 -0
  74. package/bin/commands/iterate/stack-boundary.mjs +95 -0
  75. package/bin/commands/iterate/stall-repair.d.mts +17 -0
  76. package/bin/commands/iterate/stall-repair.mjs +25 -0
  77. package/bin/commands/iterate/stall.d.mts +1 -1
  78. package/bin/commands/iterate/stall.mjs +27 -18
  79. package/bin/commands/iterate/state-unavailable.d.mts +8 -0
  80. package/bin/commands/iterate/state-unavailable.mjs +23 -0
  81. package/bin/commands/iterate/triage-loop-instruction.mjs +1 -1
  82. package/bin/commands/iterate/triage.mjs +41 -74
  83. package/bin/commands/iterate/unreported-required.d.mts +5 -2
  84. package/bin/commands/iterate/unreported-required.mjs +13 -8
  85. package/bin/commands/iterate/workflow-files.d.mts +27 -0
  86. package/bin/commands/iterate/workflow-files.mjs +85 -0
  87. package/bin/commands/poll-summary-explicit-instructions.mjs +15 -1
  88. package/bin/commands/poll-summary-instructions.d.mts +4 -3
  89. package/bin/commands/poll-summary-instructions.mjs +60 -22
  90. package/bin/commands/poll-summary.mjs +38 -10
  91. package/bin/commands/poll.mjs +4 -2
  92. package/bin/commands/stack-drain.d.mts +4 -4
  93. package/bin/commands/stack-drain.mjs +19 -113
  94. package/bin/commands/stack-handoffs.d.mts +3 -3
  95. package/bin/commands/stack-handoffs.mjs +8 -8
  96. package/bin/commands/stack-lower-ready-note.d.mts +6 -0
  97. package/bin/commands/stack-lower-ready-note.mjs +35 -0
  98. package/bin/commands/stack-merge-escalations.d.mts +17 -0
  99. package/bin/commands/stack-merge-escalations.mjs +57 -0
  100. package/bin/commands/stack-merge-plan.d.mts +10 -0
  101. package/bin/commands/stack-merge-plan.mjs +132 -0
  102. package/bin/commands/stack-merge-scope.d.mts +42 -0
  103. package/bin/commands/stack-merge-scope.mjs +113 -0
  104. package/bin/commands/stack-ownership.d.mts +25 -0
  105. package/bin/commands/stack-ownership.mjs +85 -0
  106. package/bin/commands/stack-stall.d.mts +2 -0
  107. package/bin/commands/stack-stall.mjs +25 -3
  108. package/bin/commands/stack-targets-error.d.mts +16 -0
  109. package/bin/commands/stack-targets-error.mjs +44 -0
  110. package/bin/commands/stack-targets.d.mts +30 -0
  111. package/bin/commands/stack-targets.mjs +121 -0
  112. package/bin/commands/stack-work.d.mts +4 -3
  113. package/bin/commands/stack-work.mjs +7 -4
  114. package/bin/commands/tick.mjs +14 -2
  115. package/bin/config/renames.mjs +1 -1
  116. package/bin/config/schema.d.mts +4 -0
  117. package/bin/config/schema.mjs +2 -0
  118. package/bin/github/batch-parse-suites.d.mts +4 -1
  119. package/bin/github/batch-parse-suites.mjs +15 -3
  120. package/bin/github/batch-raw-types.d.mts +6 -0
  121. package/bin/github/gql/commit-check-suites.gql +6 -0
  122. package/bin/github/gql/poll-summary-fragment.gql +6 -0
  123. package/bin/github/poll-summary-command.d.mts +15 -1
  124. package/bin/github/poll-summary-command.mjs +39 -3
  125. package/bin/github/poll-summary-projector.d.mts +1 -1
  126. package/bin/github/poll-summary-projector.mjs +1 -4
  127. package/bin/github/poll-summary-raw.d.mts +6 -0
  128. package/bin/github/poll-summary-route.mjs +4 -1
  129. package/bin/github/poll-summary.mjs +10 -3
  130. package/bin/github/rest-batch-read.mjs +17 -6
  131. package/bin/github/rest-batch-snapshot.d.mts +2 -2
  132. package/bin/github/rest-batch-snapshot.mjs +3 -0
  133. package/bin/github/rest-check-read.d.mts +1 -18
  134. package/bin/github/rest-check-read.mjs +1 -2
  135. package/bin/github/rest-stack-read.d.mts +9 -0
  136. package/bin/github/rest-stack-read.mjs +40 -0
  137. package/bin/github/rest-suite-types.d.mts +23 -0
  138. package/bin/github/rest-suite-types.mjs +1 -0
  139. package/bin/github/rest-summary-read.mjs +2 -0
  140. package/bin/mcp/server.mjs +29 -3
  141. package/bin/pr-reference.d.mts +2 -0
  142. package/bin/pr-reference.mjs +1 -1
  143. package/bin/reporters/agent.mjs +3 -0
  144. package/bin/state/check-follow-up.d.mts +30 -0
  145. package/bin/state/check-follow-up.mjs +51 -0
  146. package/bin/state/ci-start-follow-up.d.mts +14 -0
  147. package/bin/state/ci-start-follow-up.mjs +21 -0
  148. package/bin/state/queue-removal-follow-up.d.mts +20 -0
  149. package/bin/state/queue-removal-follow-up.mjs +23 -0
  150. package/bin/state/signature-marker.d.mts +10 -0
  151. package/bin/state/signature-marker.mjs +28 -0
  152. package/bin/state/stack-merge-approval.d.mts +26 -0
  153. package/bin/state/stack-merge-approval.mjs +39 -0
  154. package/bin/state/stall-repair.d.mts +16 -0
  155. package/bin/state/stall-repair.mjs +47 -0
  156. package/bin/types/activity.d.mts +2 -1
  157. package/bin/types/escalate.d.mts +9 -2
  158. package/bin/types/github.d.mts +18 -0
  159. package/bin/types/in-progress-run.d.mts +20 -0
  160. package/bin/types/in-progress-run.mjs +1 -0
  161. package/bin/types/iterate.d.mts +22 -1
  162. package/bin/types/poll-summary.d.mts +18 -1
  163. package/bin/types/report.d.mts +5 -1
  164. package/bin/types.d.mts +1 -0
  165. package/bin/types.mjs +1 -0
  166. package/package.json +2 -2
  167. package/plugins/pr-shepherd/.claude-plugin/plugin.json +1 -1
  168. package/plugins/pr-shepherd/.codex-plugin/plugin.json +1 -1
  169. package/plugins/pr-shepherd/.codex.mcp.json +1 -1
  170. package/plugins/pr-shepherd/.mcp.json +1 -1
  171. package/plugins/pr-shepherd/package-lock.json +4 -4
  172. package/plugins/pr-shepherd/package.json +1 -1
  173. package/plugins/pr-shepherd/skills/pr-shepherd/SKILL.md +8 -7
  174. package/plugins/pr-shepherd/skills/pr-shepherd/references/check-follow-up.md +14 -0
  175. package/plugins/pr-shepherd/skills/pr-shepherd/references/ci-failure-triage.md +6 -5
  176. package/plugins/pr-shepherd/skills/pr-shepherd/references/ci-start-stall.md +15 -0
  177. package/plugins/pr-shepherd/skills/pr-shepherd/references/create-a-pr.md +4 -1
  178. package/plugins/pr-shepherd/skills/pr-shepherd/references/mcp-fallback.md +1 -1
  179. package/plugins/pr-shepherd/skills/pr-shepherd/references/merge-queue-ejection.md +6 -5
  180. package/plugins/pr-shepherd/skills/pr-shepherd/references/required-checks-unreported.md +16 -0
  181. package/pr-shepherd.schema.json +11 -0
@@ -39,6 +39,20 @@ export interface ViewerAuthorization {
39
39
  }
40
40
  /** Raw relationship between a comment author and the repository, as reported by GitHub. */
41
41
  export type CommentAuthorAssociation = "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIMER" | "FIRST_TIME_CONTRIBUTOR" | "MANNEQUIN" | "MEMBER" | "NONE" | "OWNER";
42
+ /** One environment an Actions run is held on, as GitHub's `pending_deployments` endpoint reports it. */
43
+ export interface PendingDeployment {
44
+ /** Environment name (e.g. `"production"`). */
45
+ environment: string;
46
+ /** Raw `current_user_can_approve`: whether the authenticated viewer may approve this deployment. */
47
+ currentUserCanApprove: boolean;
48
+ /** Required reviewers: a user's login or a team's slug. Omitted when GitHub lists none. */
49
+ reviewers?: Array<{
50
+ type: "User" | "Team";
51
+ name: string;
52
+ }>;
53
+ /** Configured wait timer in minutes. Omitted when zero. */
54
+ waitTimerMinutes?: number;
55
+ }
42
56
  export interface CheckRun {
43
57
  /** GitHub node ID for CheckRun contexts. Missing for StatusContext and synthetic checks. */
44
58
  id?: string | null;
@@ -61,6 +75,8 @@ export interface CheckRun {
61
75
  updatedAtUnix?: number;
62
76
  /** One-line status text shown in the GitHub UI (CheckRun.title or first line of summary; StatusContext.description). */
63
77
  summary?: string;
78
+ /** Workflow file of a `startup_failure` check, e.g. `.github/workflows/ci.yml`. */
79
+ workflowPath?: string;
64
80
  /** Workflow display name for GitHub Actions check runs, when GraphQL exposes it. */
65
81
  workflowName?: string;
66
82
  /**
@@ -69,6 +85,8 @@ export interface CheckRun {
69
85
  * suite with a run that is not `COMPLETED` is a stuck check.
70
86
  */
71
87
  suiteStatus?: string;
88
+ /** Environment approvals the run is waiting on. Present only when GitHub lists at least one. */
89
+ pendingDeployments?: PendingDeployment[];
72
90
  workflowId?: string;
73
91
  /** True when GraphQL reported at least one CheckRun annotation. Omitted when false. */
74
92
  hasAnnotations?: boolean;
@@ -0,0 +1,20 @@
1
+ /** One in-progress Actions run on the head, as `triage.inProgressRuns[]` reports it. */
2
+ export interface InProgressRun {
3
+ runId: string;
4
+ workflowName: string;
5
+ /** Raw check status of the run: `WAITING` when any of its checks waits, else the first check's. */
6
+ status: string;
7
+ /**
8
+ * The workflow's top-level `concurrency.cancel-in-progress`, raw: `cancel-in-progress=true`,
9
+ * `cancel-in-progress=${{ ... }}`, `cancel-in-progress=unset`, `none`, or `unreadable (<why>)`.
10
+ */
11
+ concurrency: string;
12
+ /** Failed sibling checks of the same run. Present only with `running`. */
13
+ failed?: string[];
14
+ /** Still-running sibling checks of the same run. Present only with `failed`. */
15
+ running?: string[];
16
+ /** The `checks.never-cancel` pattern that protects this run. */
17
+ neverCancel?: string;
18
+ /** `gh run cancel` for this run. Present only when Shepherd recommends cancelling it. */
19
+ cancelCommand?: string;
20
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -2,7 +2,7 @@ import type { AgentThread, AgentComment, AgentCheck, GlobalOptions, RelevantChec
2
2
  import type { ActiveCheck, PrActivitySummary } from "./activity.mts";
3
3
  import type { BranchProtection, MergeStateStatus, MergedBasePullRequest, ConflictCandidateFiles, Review, ReviewDecision, ReviewThread, ShepherdMergeStatus } from "./github.mts";
4
4
  import type { MergeRequirements } from "./merge-requirements.mts";
5
- import type { EscalateDetails } from "./escalate.mts";
5
+ import type { AgentStalledCheck, EscalateDetails } from "./escalate.mts";
6
6
  import type { MergeCommandPlan } from "./merge-action.mts";
7
7
  import type { ApiUsage, GraphqlQuotaWarning } from "./api-usage.mts";
8
8
  import type { NextCheck } from "./next-check.mts";
@@ -129,6 +129,10 @@ interface TriageDetails {
129
129
  /** APPROVED-state reviews surfaced for visibility (when `iterate.minimize-approvals` is false). */
130
130
  surfacedApprovals: Review[];
131
131
  checks: AgentCheck[];
132
+ /** In-progress Actions runs on the head with their raw `concurrency` and a cancel command where one applies. Omitted when empty. */
133
+ inProgressRuns?: import("./in-progress-run.mts").InProgressRun[];
134
+ /** Checks still unstarted after the CI-start stall timeout, on the one investigation tick. Omitted otherwise. */
135
+ stalledChecks?: AgentStalledCheck[];
132
136
  changesRequestedReviews: Review[];
133
137
  /** Pre-built apply command. Run after committing and pushing. */
134
138
  resolveCommand: ResolveCommand;
@@ -172,7 +176,24 @@ interface IterateResultEscalate extends IterateResultBase {
172
176
  escalate: EscalateDetails;
173
177
  }
174
178
  export type IterateResult = IterateResultWait | IterateResultReady | IterateResultCancel | IterateResultTriage | IterateResultMarkReady | IterateResultMerge | IterateResultEscalate;
179
+ /**
180
+ * One open layer of a native stack as an aggregate `stack` tick saw it, handed to the layer's
181
+ * one-PR session so that session knows which layers the caller owns.
182
+ */
183
+ export interface StackLayerOwnership {
184
+ pr: number;
185
+ position: number;
186
+ owned: boolean;
187
+ /** The layer's head branch. */
188
+ branch: string;
189
+ }
175
190
  export interface IterateCommandOptions extends GlobalOptions {
191
+ /**
192
+ * Every open layer of this PR's native stack, set by a `stack` tick that does not own all of
193
+ * them. The session then never prints a whole-stack rebase or push. Omitted when the caller
194
+ * owns the whole stack.
195
+ */
196
+ stackLayers?: StackLayerOwnership[];
176
197
  readyDelaySeconds?: number;
177
198
  noAutoMarkReady?: boolean;
178
199
  stallTimeoutSeconds?: number;
@@ -67,7 +67,7 @@ export interface PollSummaryItem {
67
67
  url: string;
68
68
  /** GitHub author login, when the summary query returned one. */
69
69
  authorLogin?: string;
70
- /** Author login matches the authenticated viewer. */
70
+ /** Stack rows: the caller declared this layer theirs (every layer when the whole stack is). */
71
71
  owned?: true;
72
72
  /** Conservative routing hint; the selected one-PR poll makes the authoritative decision. */
73
73
  action: ShepherdAction;
@@ -113,6 +113,17 @@ export type PollSummarySelection = {
113
113
  anchor: number;
114
114
  stackNumber: number;
115
115
  stackSize: number;
116
+ /** Set only when the caller listed some PRs: the layers the caller owns. Omitted = the whole stack. */
117
+ owned?: number[];
118
+ };
119
+ /** Which owned layers `stack` may merge: all of them, the ready prefix, or up to one PR. */
120
+ export type StackMergeScope = {
121
+ kind: "all";
122
+ } | {
123
+ kind: "ready";
124
+ } | {
125
+ kind: "through";
126
+ pr: number;
116
127
  };
117
128
  /** Aggregate-only transition; one-PR actions remain unchanged. */
118
129
  export type StackNextAction = "shepherd" | "wait" | "merge" | "cancel" | "escalate";
@@ -131,6 +142,8 @@ export interface PollSummaryResult {
131
142
  stackAncestry?: PollSummaryStackAncestry[];
132
143
  /** Immediate stack transition; human blockers surface in rows while shepherdable work remains. */
133
144
  nextAction?: StackNextAction;
145
+ /** Open in-scope layers that appeared after the merge was requested (whole-stack ownership only). */
146
+ addedLayers?: number[];
134
147
  /** Whether every open layer is independently ready and stack ancestry is linear. */
135
148
  stackMergeable?: boolean;
136
149
  /**
@@ -148,6 +161,10 @@ export interface PollSummaryCommandOptions {
148
161
  transport?: import("../github/transport.mts").GithubTransport;
149
162
  prNumbers?: number[];
150
163
  stackPrNumber?: number;
164
+ /** `stack` only: PRs the caller owns. Omitted when the caller owns every layer. */
165
+ stackOwned?: number[];
166
+ /** `stack` only: which owned layers a merge may land. Set together with `merge`. */
167
+ stackMerge?: StackMergeScope;
151
168
  targetRepository?: {
152
169
  owner: string;
153
170
  name: string;
@@ -1,4 +1,4 @@
1
- import type { AuthorType, ReviewThread, PrComment, Review, MergeStatusResult, ViewerAuthorization, CheckConclusion, CheckStatus, SuggestionBlock } from "./github.mts";
1
+ import type { AuthorType, ReviewThread, PrComment, Review, MergeStatusResult, ViewerAuthorization, CheckConclusion, CheckStatus, SuggestionBlock, PendingDeployment } from "./github.mts";
2
2
  import type { ClassifiedCheck, RelatedFailedJob, TriagedCheck } from "./check-classification.mts";
3
3
  import type { AgentThreadComment } from "./agent-thread.mts";
4
4
  import type { CheckAnnotation } from "./check-annotations.mts";
@@ -198,6 +198,8 @@ export interface AgentCheck {
198
198
  status?: CheckStatus;
199
199
  /** Raw check-suite status (`COMPLETED`), present only with `status` for a stuck check. */
200
200
  suiteStatus?: string;
201
+ /** Workflow file of a `STARTUP_FAILURE` run (e.g. `.github/workflows/ci.yml`). */
202
+ workflowPath?: string;
201
203
  /** Workflow display name (e.g. `"CI"`). Populated on a best-effort basis when available from the jobs API. */
202
204
  workflowName?: string;
203
205
  /** Name of the matched job (e.g. `"tests (ubuntu)"`). Distinct from check name for matrix builds. */
@@ -209,6 +211,8 @@ export interface AgentCheck {
209
211
  logExcerpt?: string;
210
212
  /** Other failed jobs from the same workflow run (not their own check entries), with log tails. */
211
213
  relatedJobs?: RelatedFailedJob[];
214
+ /** Environment approvals the run is held on: environment, required reviewers, viewer capability. */
215
+ pendingDeployments?: PendingDeployment[];
212
216
  /** `gh run rerun` command, present only when the check has a runId and the viewer's repository role grants Actions rerun capability (WRITE+). */
213
217
  rerunCommand?: string;
214
218
  /** Workflow-run attempt number, surfaced only after the initial attempt. */
package/bin/types.d.mts CHANGED
@@ -12,6 +12,7 @@ export * from "./types/merge-requirements.mts";
12
12
  export * from "./types/merge-action.mts";
13
13
  export * from "./types/escalate.mts";
14
14
  export * from "./types/merge-queue.mts";
15
+ export * from "./types/in-progress-run.mts";
15
16
  export * from "./types/api-usage.mts";
16
17
  export * from "./types/poll-summary.mts";
17
18
  export * from "./types/next-check.mts";
package/bin/types.mjs CHANGED
@@ -12,6 +12,7 @@ export * from "./types/merge-requirements.mjs";
12
12
  export * from "./types/merge-action.mjs";
13
13
  export * from "./types/escalate.mjs";
14
14
  export * from "./types/merge-queue.mjs";
15
+ export * from "./types/in-progress-run.mjs";
15
16
  export * from "./types/api-usage.mjs";
16
17
  export * from "./types/poll-summary.mjs";
17
18
  export * from "./types/next-check.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pr-shepherd",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Autonomous PR CI monitor and review-comment resolver for agentic coding tools",
5
5
  "keywords": [
6
6
  "automation",
@@ -91,7 +91,7 @@
91
91
  "husky": "^9.1.7",
92
92
  "knip": "^6.14.1",
93
93
  "marked": "^18.0.11",
94
- "oxfmt": "^0.75.0",
94
+ "oxfmt": "^0.77.0",
95
95
  "oxlint": "^1.60.0",
96
96
  "typescript": "^7.0.2",
97
97
  "vitest": "^5.0.0"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pr-shepherd",
3
3
  "description": "Autonomous PR CI monitor and review-comment resolver for agentic coding tools",
4
- "version": "2.1.0",
4
+ "version": "2.2.0",
5
5
  "author": {
6
6
  "name": "Jonathan Ong",
7
7
  "email": "jonathanrichardong@gmail.com"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pr-shepherd",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Autonomous PR CI monitor and review-comment resolver for Codex.",
5
5
  "author": {
6
6
  "name": "Jonathan Ong",
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "pr-shepherd": {
4
4
  "command": "npx",
5
- "args": ["--yes", "--package", "pr-shepherd@2.1.0", "pr-shepherd-mcp"]
5
+ "args": ["--yes", "--package", "pr-shepherd@2.2.0", "pr-shepherd-mcp"]
6
6
  }
7
7
  }
8
8
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "pr-shepherd": {
3
3
  "command": "npx",
4
- "args": ["--yes", "--package", "pr-shepherd@2.1.0", "pr-shepherd-mcp"]
4
+ "args": ["--yes", "--package", "pr-shepherd@2.2.0", "pr-shepherd-mcp"]
5
5
  }
6
6
  }
@@ -7,7 +7,7 @@
7
7
  "name": "pr-shepherd-plugin",
8
8
  "license": "MIT",
9
9
  "dependencies": {
10
- "pr-shepherd": "2.0.0"
10
+ "pr-shepherd": "2.1.0"
11
11
  }
12
12
  },
13
13
  "node_modules/@hono/node-server": {
@@ -889,9 +889,9 @@
889
889
  }
890
890
  },
891
891
  "node_modules/pr-shepherd": {
892
- "version": "2.0.0",
893
- "resolved": "https://registry.npmjs.org/pr-shepherd/-/pr-shepherd-2.0.0.tgz",
894
- "integrity": "sha512-MkfQ2SqXVJeS2vgE0CwCLrVm5UsjPVUJ/VLBh4uwnh1o2z7pNJd3nBV54qght1aIdCw+gqT8RTFrH3WqDnCr+w==",
892
+ "version": "2.1.0",
893
+ "resolved": "https://registry.npmjs.org/pr-shepherd/-/pr-shepherd-2.1.0.tgz",
894
+ "integrity": "sha512-zbDws4+yvi48G+msF7bfv25fLuW4vmF/1gMSuxMtFc8wDwt18yGUhTm4dFTjslhIr/82YeVr+2XkQHZlcDyH8g==",
895
895
  "license": "MIT",
896
896
  "dependencies": {
897
897
  "@modelcontextprotocol/sdk": "^1.30.0",
@@ -4,6 +4,6 @@
4
4
  "description": "Pins the pr-shepherd package that .mcp.json launches",
5
5
  "license": "MIT",
6
6
  "dependencies": {
7
- "pr-shepherd": "2.0.0"
7
+ "pr-shepherd": "2.1.0"
8
8
  }
9
9
  }
@@ -2,7 +2,7 @@
2
2
  name: pr-shepherd
3
3
  description: 'Create, iterate, watch, or merge a GitHub pull request with pr-shepherd (MCP or CLI). Use for "make a PR and use pr-shepherd", "iterate PR #123", "tell me when #123 merges", and any PR status, CI, merge queue, or ejection question, instead of gh or custom polling scripts.'
4
4
  user-invocable: true
5
- argument-hint: "[PR number or URL | stack PR] [--merge]"
5
+ argument-hint: "[PR | stack PR...] [--merge|--merge-ready|--merge-through PR]"
6
6
  allowed-tools: mcp__plugin_pr-shepherd_pr-shepherd, Bash(npx pr-shepherd:*), Bash(pnpm exec pr-shepherd:*), Bash(pnpm dlx pr-shepherd:*), Bash(bunx pr-shepherd:*), Bash(pr-shepherd:*)
7
7
  ---
8
8
 
@@ -12,19 +12,20 @@ allowed-tools: mcp__plugin_pr-shepherd_pr-shepherd, Bash(npx pr-shepherd:*), Bas
12
12
 
13
13
  - To make, create, or open a PR, read the "Create a PR" playbook, then pass its URL on.
14
14
  - External shepherd: read the "Draft handoff" playbook, not an in-session loop.
15
- - `$ARGUMENTS`: PR numbers, PR URLs, or `'owner/repo#N'` (quoted), or one `stack PR`, plus optional `--merge`; reject anything else. Use `stack PR` only when asked for a stack or routed there. With no PR, pass none: the CLI finds the current branch's PR. A qualified PR picks the GitHub target; this checkout supplies git, config, and `AGENTS.md`.
16
- - Follow printed branch-update steps without asking: rebase or merge the base, resolve conflicts, and push your own PR head with `--force-with-lease`.
17
- - `--merge`, or a request to merge, land, enqueue, or requeue after an ejection, allows the printed merge/enqueue/dequeue commands. Run them without asking again; escalate only when the host requires it.
18
- - Run `pr-shepherd [PR ...]` or `pr-shepherd stack PR`, plus `--merge` when requested, with `--until-terminal` in the background only if its exit wakes you, else in the foreground ([Waiting](references/waiting.md)). This is also how to wait for merges and merge queues. Requeue commands print only under `--merge`. PRs with the same flags go in one command; when the set changes, stop it and rerun with the new list. Do not run `pr-shepherd iterate`, except once for a one-time status question: report it and stop.
15
+ - `$ARGUMENTS`: PR numbers, PR URLs, or `'owner/repo#N'` (quoted), or `stack PR...` / `stack owner/repo#N` (the number owns all layers), plus one optional merge flag: `--merge`, `--merge-ready`, `--merge-through PR`; reject anything else. Use `stack` only when asked or routed. With no PR, pass none. A qualified PR picks the GitHub target; this checkout supplies git and config.
16
+ - Stack merge: "the stack" -> `stack owner/repo#N --merge`; "as they're ready"/"drain" -> `--merge-ready`; "#N" -> one-PR `--merge`, but if they claim other layers or say "up to #N" -> `stack <claimed PRs incl. N> --merge-through N`; "ship it" -> ask.
17
+ - Follow printed branch-update steps without asking: rebase or merge the base, resolve conflicts, push your own PR head with `--force-with-lease`.
18
+ - A merge flag, or a request to merge, land, enqueue, or requeue after an ejection, allows the printed merge/enqueue/dequeue commands. Run Shepherd first: never merge, enqueue or retarget with `gh` or a GitHub MCP tool before Shepherd prints that step. Run them without asking again; escalate only when the host requires it.
19
+ - Run `pr-shepherd [PR ...]` or `pr-shepherd stack PR...`, plus any merge flag, with `--until-terminal` in the background only if its exit wakes you, else in the foreground ([Waiting](references/waiting.md)). Requeue commands print only under `--merge`. PRs with the same flags share one command; if the set changes, stop and rerun with the new list. Do not run `pr-shepherd iterate`, except once for a one-time status question.
19
20
  - Print the full result and follow every `## Instructions` step with every ID it lists. When a step says `Playbook: "<name>"`, read that playbook once.
20
21
  - CLI unavailable but MCP `iterate` exists: read the "MCP fallback" playbook.
21
22
 
22
23
  ## Recurrence
23
24
 
24
- - After the instructions, rerun that exact command (same target and flags) immediately unless they say to end the turn or not to rerun. Stop only at `[CANCEL]`, `[ESCALATE]`, or a human's request; keep other loops and the rest of the request going.
25
+ - After the instructions, rerun that exact command (same target and flags) immediately unless they say to end the turn or not to rerun. Stop only at `[CANCEL]`, `[ESCALATE]`, or a human's request.
25
26
  - `[TRIAGE]` is always non-terminal: fix or reject each item yourself, with a reason, without asking. Only `[ESCALATE]` hands work to a human. `[READY]` is non-terminal: rerun when `remainingSeconds` elapses and continue later layers you own. A parent of several stacks delegates the wait to its worker.
26
27
  - After a push or `rerun:`, do not wait for CI to finish; fetching check logs is fine.
27
- - Shepherd is the only poller: no loop, watcher, or background job around `gh`, `gh api`, `curl`, `sleep`, or `pr-shepherd` (except a backgrounded `--until-terminal`), and never `gh pr checks`, `gh pr watch`, `gh run watch`, or MCP waiters. Hand-written loops drain GraphQL quota and miss the ejections and failures Shepherd reports.
28
+ - Shepherd is the only poller: no loop, watcher, or background job around `gh`, `gh api`, `curl`, `sleep`, or `pr-shepherd` (except a backgrounded `--until-terminal`), and never `gh pr checks`, `gh pr watch`, `gh run watch`, or MCP waiters. Hand-written loops drain GraphQL quota and miss ejections.
28
29
  - Never pipe Shepherd through `head`, `tail`, `grep`, `cut` or `tee`; read every line: `## Instructions` is last, the exit code is the action, and review bodies show once.
29
30
  - If Shepherd cannot do what was asked, tell the user what is missing instead of building a substitute.
30
31
 
@@ -0,0 +1,14 @@
1
+ # Check follow-up
2
+
3
+ Apply when a step says `Playbook: "Check follow-up"`. A check failed, was cancelled, or never started, and Shepherd has no rerun or log excerpt to show. Find out why before acting; follow the evidence.
4
+
5
+ - The run: `gh run view <runId> -R <owner/repo>` lists its jobs and annotations, which often say why a job never got a runner; add `--log-failed` for logs.
6
+ - `STARTUP_FAILURE`: workflow syntax, an unresolved reusable workflow or action, missing permissions, secrets or environments.
7
+ - `CANCELLED`: a newer push, a `concurrency` group, a job timeout, a lost runner, or a manual cancel.
8
+ - An external check: the provider behind its details URL, and whether it is up. Also check for a GitHub or runner incident.
9
+
10
+ Then:
11
+
12
+ 1. Cause within this PR: fix it and push.
13
+ 2. Transient and the output printed a rerun command for it: run that command. Without one, do not rerun; the allowance is spent or the check is not rerunnable.
14
+ 3. Otherwise change nothing and keep your findings. CI configuration, repository settings, and approving a gated run are human decisions. Rerun Shepherd now; if the checks are unchanged, it escalates `check-follow-up-unavailable`. Report your findings then.
@@ -1,9 +1,9 @@
1
1
  # CI failure triage
2
2
 
3
- Apply when a step says `Playbook: "CI failure triage"`. Use the excerpts and tags already printed; fetch a job log only under the gate-job rule below. An `external` check with a URL may be opened or reproduced.
3
+ Apply when a step says `Playbook: "CI failure triage"`. Use the excerpts and tags already printed; fetch a job log only under the gate-job rule below. An `external` check without printed annotations may be opened or reproduced.
4
4
 
5
5
  - A specific `[conclusion: …]` tag wins over the general GitHub Actions rule.
6
- - A `rerun:` command means Shepherd verified Actions rerun access (WRITE+) and an original attempt. On the REST transport the role is unknown, so GitHub's response to the rerun decides. Run it at most once; matrix bullets sharing its run id print it once. An `[attempt: N]` check never gets another rerun; its excerpt is still investigation work, and without usable evidence it escalates when nothing else remains.
6
+ - A `rerun:` command means Shepherd verified Actions rerun access (WRITE+) and an original attempt. On the REST transport the role is unknown, so GitHub's response to the rerun decides. Run it at most once; matrix bullets sharing its run id print it once. An `[attempt: N]` check never gets another rerun; its excerpt is still investigation work, and without usable evidence it gets a "Check follow-up" step first.
7
7
  - In-progress runs, `ACTION_REQUIRED`, non-Actions run ids, and runs without attempt metadata never get a `rerun:`.
8
8
  - `scope: merge_group` never gets a rerun: it cannot restore the queue entry and overwrites the evidence. Fix the PR head if the failure is this PR's. Otherwise apply the Merge queue ejection playbook a printed ejection step names; with no ejection step the entry is still queued, so make no queue mutation and iterate until GitHub reports the removal.
9
9
  - Do not invent a handoff from `[TRIAGE]`. Shepherd escalates when nothing autonomous remains.
@@ -12,8 +12,9 @@ Apply when a step says `Playbook: "CI failure triage"`. Use the excerpts and tag
12
12
 
13
13
  - Actions failure with a run id: read the excerpt. Fix a real test or build failure in code and never rerun it, even with a printed `rerun:`. Run a printed `rerun:` only for a transient cause; without one, finish the other work. Then iterate without waiting.
14
14
  - An empty excerpt is not evidence of a transient failure. A gate-job excerpt naming failed jobs (for example `test-playwright: failure`) is test-failure evidence even without a stack trace: read the `Other failed jobs in this run` tails first, and only when a named job's tail is absent or truncated run `gh run view <runId> --log-failed -R <owner/repo>`. Rerun only when those logs show a transient cause.
15
- - `CANCELLED` or `STARTUP_FAILURE` (no excerpt): run a printed `rerun:`, else finish the other work; iterate without waiting.
15
+ - `CANCELLED` (no excerpt): run a printed `rerun:`, else finish the other work; iterate without waiting.
16
+ - `STARTUP_FAILURE` (workflow did not start): if the PR changes the printed `workflow file:` (or any `.github/workflows/` file if none printed), fix it at the PR head and do not rerun. Otherwise run a printed `rerun:`, else finish other work; iterate without waiting.
16
17
  - `[status: …, suite: COMPLETED]` (stuck run): the workflow finished but this check never completed, so there is nothing to fix in code. Run a printed `rerun:`, else finish the other work; iterate without waiting.
17
18
  - `ACTION_REQUIRED`: finish the other work and iterate. Shepherd escalates if manual approval is still required.
18
- - `external` with a URL: inspect the provider or reproduce locally, fix, and iterate. The URL alone is not `[ESCALATE]`.
19
- - `(no runId)` without a URL: keep the metadata. Shepherd escalates when nothing else remains.
19
+ - `external` with a URL: fix from its printed annotations (file, line, message) without opening the URL; with none, inspect the provider or reproduce locally. Then iterate. The URL alone is not `[ESCALATE]`.
20
+ - `(no runId)` without a URL: keep the metadata; same "Check follow-up" step first.
@@ -0,0 +1,15 @@
1
+ # CI start stall
2
+
3
+ Apply when a step says `Playbook: "CI start stall"`. One or more checks were created on this head, have been waiting longer than the stall timeout, and never started. Shepherd cannot tell from GitHub's data why. Find out before acting. The places below are starting points, not a checklist; follow the evidence wherever it leads.
4
+
5
+ - Whether a runner is available for the job's `runs-on` labels, and whether the run is queued behind a `concurrency` group or a concurrency limit.
6
+ - Whether the run is waiting on a deployment-environment approval or a required reviewer.
7
+ - Whether Actions is enabled and not out of minutes or spending limit.
8
+ - For an external status context, whether the app that posts it is installed and reachable.
9
+ - Whether GitHub reports an incident.
10
+
11
+ Then act on what you found:
12
+
13
+ 1. If the cause is within this PR (a `runs-on` label that matches no runner, a workflow change that breaks scheduling, a wrong base), fix it and push.
14
+ 2. If a run is only waiting on an approval you can legitimately grant, grant it. An approval that needs a human reviewer is not yours to grant.
15
+ 3. Otherwise make no change and keep what you found. Runner capacity, billing, repository settings, and GitHub incidents are human decisions. If the same checks are still not started on the next poll, Shepherd escalates with `stall-timeout`; report your diagnosis then.
@@ -2,9 +2,12 @@
2
2
 
3
3
  Apply when the user asks to make, create, or open a PR, before dispatching.
4
4
 
5
- - Review and commit the in-scope changes, verify the push remote and base branch, push a fresh branch, create the PR, and pass its qualified URL to Dispatch.
5
+ - Before creating any PR, split the work into one PR per change that can be reviewed alone and choose each base. Stack a PR on an earlier one when it needs that PR's code or edits the same lines (it would need a rebase once the earlier one merges); otherwise base it on the default branch. When such a branch was cut from the default branch, rebase it onto the earlier branch first and push it with `--force-with-lease`; it is your own branch. Then shepherd every PR until it is mergeable: `pr-shepherd stack <top PR>` for a stack, one `pr-shepherd` run listing the separate PRs otherwise.
6
+ - Review and commit the in-scope changes, verify the push remote and the chosen base, push each branch, create each PR (stacked PRs through `gh stack`, below), and pass the qualified URLs to Dispatch.
6
7
  - Push is the ordinary non-force push of those reviewed commits. Do not ask for a separate confirmation because the push publishes them. Request runtime escalation when the host requires it.
7
8
  - A skill cannot grant host permissions. Unattended approval comes from a trusted command rule or host policy.
8
9
  - Rebasing your own PR head onto its base and pushing it with `--force-with-lease` is also part of this workflow. Do not ask first.
9
10
  - Bare `--force`, pushes to any other branch, remote or credential changes, unrelated changes, and ambiguous targets stay outside this workflow.
10
11
  - Creating or opening a PR without merge intent leaves `--merge` off.
12
+ - To stack, create a GitHub native stack with `gh stack` instead of pointing branches at each other by hand: `gh extension install github/gh-stack`, `gh stack init <branch>`, `gh stack add <branch>`, `gh stack submit --auto`. If `gh stack` reports stacks are unavailable, open separate PRs on the default branch and merge them in order.
13
+ - Merge a native stack with one `gh stack merge <top PR>` (or the merge Shepherd prints), which lands every layer below it; do not `gh pr merge` layer by layer and rebase between merges.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Apply only when the CLI is unavailable, MCP `iterate` exists, and the supplied target is already a GitHub URL or `owner/repo#N`.
4
4
 
5
- - Pass the qualified reference directly. Call `iterate` with `pr` or `prs`, or call `stack` with `pr` for a native stack, and pass `merge: true` when requested. Print the full result.
5
+ - Pass the qualified reference directly. Call `iterate` with `pr` or `prs`, or call `stack` with `refs` for a native stack (one PR for the whole stack, several PRs for only the ones you own), and pass `merge: true`, `mergeReady: true`, or `mergeThrough` when requested. Print the full result.
6
6
  - If the target is bare or omitted, report that the CLI is required to resolve it in the local checkout. Do not call `gh pr view` as a separate discovery request, and do not spend a stateful tick looking for a qualified selector.
7
7
  - Follow every `## Instructions` step. Use MCP `apply` and `suggest` with the same qualified reference instead of a shell `pr-shepherd apply`.
8
8
  - Recur by repeating the same `iterate` or `stack` call with the same qualified selector and `merge` option. Do not switch back to the CLI that was unavailable.
@@ -2,16 +2,17 @@
2
2
 
3
3
  Apply when a step says `Playbook: "Merge queue ejection"`. The `**queue removal**` header names the queue commit. That commit combined the PR head with the base and any entries queued ahead of it, so a failure there may come from this PR, the base, another entry, or a flake. Do not requeue without triage. After triage, continue with the remaining numbered steps; iterate only at the final step.
4
4
 
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.
5
+ 1. If the step names a failed queue-commit check, 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
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
- 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
- 7. Otherwise, run the printed `requeue:` or `acknowledge queue removal:` command exactly as printed, and only if all of these hold:
10
+ 6. If the step names a removal with no failed queue-commit check, the `**queue removal**` header carries the raw reason and actor. A conflict-style reason (`merge_conflict`, `invalid_merge_commit`, `stack_invalidated`) means update the head from the base following the same branch-update convention (printed stack route on a native stack) and push. A person's dequeue means make no change and report it. Otherwise find out why before acting. Never enqueue. If the head is unchanged on the next poll, Shepherd escalates.
11
+ 7. 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.
12
+ 8. Otherwise, run the printed `requeue:` or `acknowledge queue removal:` command exactly as printed, and only if all of these hold:
12
13
  - the head did not change;
13
14
  - no code changed;
14
15
  - no other blocker remains;
15
16
  - the logs or the check's details page show a transient failure, or a failure caused by another entry in the same queue group.
16
- 8. If gh reports auto-merge is disabled instead of adding the PR to the queue, run the `requeue API fallback:` command. Both requeue commands require the observed PR head SHA. If the head changed, iterate for a fresh command.
17
- 9. After `acknowledge queue removal:`, finish this one-PR session so it validates current source CI and records its READY receipt. Then return to the aggregate `stack` command with its original options. In merge mode it verifies lower-layer readiness before merging. Never enqueue or merge a stack layer directly.
17
+ 9. If gh reports auto-merge is disabled instead of adding the PR to the queue, run the `requeue API fallback:` command. Both requeue commands require the observed PR head SHA. If the head changed, iterate for a fresh command.
18
+ 10. After `acknowledge queue removal:`, finish this one-PR session so it validates current source CI and records its READY receipt. Then return to the aggregate `stack` command with its original options. In merge mode it verifies lower-layer readiness before merging. Never enqueue or merge a stack layer directly.
@@ -0,0 +1,16 @@
1
+ # Required checks unreported
2
+
3
+ Apply when a step says `Playbook: "Required checks unreported"`. The merge target requires checks that have no run on this head, and nothing is running. Shepherd cannot tell from GitHub's data why nothing started, so find out before acting. The places below are starting points, not a checklist; follow the evidence wherever it leads.
4
+
5
+ - Workflow triggers and `paths`, `paths-ignore`, or branch filters, compared with this PR's changed files and base branch.
6
+ - Whether each required name matches a check that any workflow or app actually emits.
7
+ - Whether Actions is enabled, and whether a run is waiting on approval or a runner.
8
+ - Whether the PR targets the branch the rules expect, for example a stack layer's parent versus trunk.
9
+ - Whether the app that posts an external context is installed.
10
+ - Whether GitHub reports an incident.
11
+
12
+ Then act on what you found:
13
+
14
+ 1. If the cause is within this PR (wrong base or stack parent, a changed file that breaks the workflow, configuration the PR should carry), fix it and push.
15
+ 2. If the workflows should have run and the PR is fine, run the printed close and reopen commands once for this head. Do not close it again.
16
+ 3. Otherwise make no change and keep what you found. Changing CI configuration, repository settings, or branch rules is a human decision. If the checks are still missing on the next poll, Shepherd escalates with `required-checks-unreported`; report your diagnosis then.
@@ -71,6 +71,13 @@
71
71
  "type": "string"
72
72
  }
73
73
  },
74
+ "never-cancel": {
75
+ "default": [],
76
+ "type": "array",
77
+ "items": {
78
+ "type": "string"
79
+ }
80
+ },
74
81
  "ci-trigger-events": {
75
82
  "default": [
76
83
  "pull_request",
@@ -335,6 +342,10 @@
335
342
  "work-while-queued": {
336
343
  "default": false,
337
344
  "type": "boolean"
345
+ },
346
+ "cancel-runs-before-push": {
347
+ "default": true,
348
+ "type": "boolean"
338
349
  }
339
350
  },
340
351
  "additionalProperties": false