opencode-magi 0.10.0 → 0.12.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 (126) hide show
  1. package/README.ja.md +254 -0
  2. package/README.md +31 -26
  3. package/dist/commands.js +11 -9
  4. package/dist/config/index.js +2 -0
  5. package/dist/config/resolve.js +120 -246
  6. package/dist/config/validate.js +98 -1110
  7. package/dist/constant.js +131 -0
  8. package/dist/graphql/index.generated.js +125 -0
  9. package/dist/graphql/index.js +49 -0
  10. package/dist/index.js +12 -800
  11. package/dist/magi.js +357 -0
  12. package/dist/permissions/common.json +22 -22
  13. package/dist/permissions/editor.json +12 -12
  14. package/dist/prompts/index.js +98 -0
  15. package/dist/prompts/merge/ci-classification/output-contract.md +22 -0
  16. package/dist/prompts/merge/ci-classification/task.md +10 -0
  17. package/dist/prompts/merge/ci-classification/validate.json +20 -0
  18. package/dist/prompts/merge/conflict/output-contract.md +12 -0
  19. package/dist/prompts/merge/conflict/task.md +9 -0
  20. package/dist/prompts/merge/conflict/validate.json +4 -0
  21. package/dist/prompts/merge/edit/output-contract.md +26 -0
  22. package/dist/prompts/merge/edit/task.md +10 -0
  23. package/dist/prompts/merge/edit/validate.json +60 -0
  24. package/dist/prompts/review/ci-classification/output-contract.md +21 -0
  25. package/dist/prompts/review/ci-classification/task.md +7 -0
  26. package/dist/prompts/review/ci-classification/validate.json +20 -0
  27. package/dist/prompts/review/close-reconsideration/output-contract.md +21 -0
  28. package/dist/prompts/review/close-reconsideration/task.md +6 -0
  29. package/dist/prompts/review/close-reconsideration/validate.json +44 -0
  30. package/dist/prompts/review/comment/output-contract.md +11 -0
  31. package/dist/prompts/review/comment/task.md +3 -0
  32. package/dist/prompts/review/comment/validate.json +8 -0
  33. package/dist/prompts/review/finding-validation/output-contract.md +25 -0
  34. package/dist/prompts/{templates/review/finding-validation.md → review/finding-validation/task.md} +2 -3
  35. package/dist/prompts/review/finding-validation/validate.json +21 -0
  36. package/dist/prompts/review/rereview/output-contract.md +30 -0
  37. package/dist/prompts/{templates/review/rereview.md → review/rereview/task.md} +8 -11
  38. package/dist/prompts/review/rereview/validate.json +87 -0
  39. package/dist/prompts/review/review/output-contract.md +25 -0
  40. package/dist/prompts/{templates/review/review.md → review/review/task.md} +2 -5
  41. package/dist/prompts/review/review/validate.json +54 -0
  42. package/dist/prompts/triage/acceptance/output-contract.md +16 -0
  43. package/dist/prompts/triage/acceptance/validate.json +23 -0
  44. package/dist/prompts/triage/category/output-contract.md +16 -0
  45. package/dist/prompts/triage/category/validate.json +23 -0
  46. package/dist/prompts/triage/comment-classification/output-contract.md +15 -0
  47. package/dist/prompts/triage/comment-classification/validate.json +28 -0
  48. package/dist/prompts/triage/create/output-contract.md +28 -0
  49. package/dist/prompts/triage/create/validate.json +73 -0
  50. package/dist/prompts/triage/deplicate/output-contract.md +16 -0
  51. package/dist/prompts/triage/deplicate/validate.json +20 -0
  52. package/dist/prompts/triage/existing/output-contract.md +16 -0
  53. package/dist/prompts/triage/existing/validate.json +13 -0
  54. package/dist/prompts/triage/reconsider/output-contract.md +16 -0
  55. package/dist/prompts/triage/reconsider/validate.json +23 -0
  56. package/dist/prompts/triage/signal/output-contract.md +19 -0
  57. package/dist/prompts/triage/signal/validate.json +18 -0
  58. package/dist/tools/clear/index.js +21 -0
  59. package/dist/tools/index.js +12 -0
  60. package/dist/tools/merge/action.js +47 -0
  61. package/dist/tools/merge/context.js +116 -0
  62. package/dist/tools/merge/editor.js +256 -0
  63. package/dist/tools/merge/index.js +151 -0
  64. package/dist/tools/merge/index.type.js +1 -0
  65. package/dist/tools/merge/merge.js +42 -0
  66. package/dist/tools/merge/report.js +73 -0
  67. package/dist/tools/review/action.js +459 -0
  68. package/dist/tools/review/check.js +335 -0
  69. package/dist/tools/review/context.js +254 -0
  70. package/dist/tools/review/index.js +104 -0
  71. package/dist/tools/review/index.type.js +1 -0
  72. package/dist/tools/review/report.js +143 -0
  73. package/dist/tools/review/review.js +146 -0
  74. package/dist/tools/review/reviewer.js +409 -0
  75. package/dist/tools/triage/index.js +16 -0
  76. package/dist/tools/validate/index.js +28 -0
  77. package/dist/utils/array.js +6 -0
  78. package/dist/utils/assertion.js +38 -0
  79. package/dist/utils/exec.js +14 -0
  80. package/dist/utils/fs.js +24 -0
  81. package/dist/utils/function.js +46 -0
  82. package/dist/utils/github.js +63 -0
  83. package/dist/utils/index.js +10 -0
  84. package/dist/utils/index.type.js +1 -0
  85. package/dist/utils/object.js +21 -0
  86. package/dist/utils/opencode.js +25 -0
  87. package/dist/utils/string.js +38 -0
  88. package/dist/utils/worker.js +30 -0
  89. package/package.json +36 -23
  90. package/schema.json +116 -20
  91. package/dist/config/load.js +0 -62
  92. package/dist/config/output.js +0 -25
  93. package/dist/config/worktree.js +0 -25
  94. package/dist/github/commands.js +0 -905
  95. package/dist/github/retry.js +0 -44
  96. package/dist/orchestrator/abort.js +0 -9
  97. package/dist/orchestrator/ci.js +0 -579
  98. package/dist/orchestrator/findings.js +0 -88
  99. package/dist/orchestrator/inline-comments.js +0 -73
  100. package/dist/orchestrator/majority.js +0 -62
  101. package/dist/orchestrator/merge.js +0 -1260
  102. package/dist/orchestrator/model.js +0 -216
  103. package/dist/orchestrator/pool.js +0 -15
  104. package/dist/orchestrator/report.js +0 -175
  105. package/dist/orchestrator/review-context.js +0 -342
  106. package/dist/orchestrator/review.js +0 -1480
  107. package/dist/orchestrator/run-manager.js +0 -2132
  108. package/dist/orchestrator/safety.js +0 -44
  109. package/dist/orchestrator/triage.js +0 -1370
  110. package/dist/prompts/compose.js +0 -473
  111. package/dist/prompts/contracts.js +0 -300
  112. package/dist/prompts/output.js +0 -401
  113. package/dist/prompts/templates/merge/ci-classification.md +0 -16
  114. package/dist/prompts/templates/merge/conflict.md +0 -10
  115. package/dist/prompts/templates/merge/edit.md +0 -15
  116. package/dist/prompts/templates/review/ci-classification.md +0 -9
  117. package/dist/prompts/templates/review/close-reconsideration.md +0 -6
  118. /package/dist/{types.js → config/index.type.js} +0 -0
  119. /package/dist/prompts/{templates/triage/acceptance.md → triage/acceptance/task.md} +0 -0
  120. /package/dist/prompts/{templates/triage/category.md → triage/category/task.md} +0 -0
  121. /package/dist/prompts/{templates/triage/comment-classification.md → triage/comment-classification/task.md} +0 -0
  122. /package/dist/prompts/{templates/triage/create.md → triage/create/task.md} +0 -0
  123. /package/dist/prompts/{templates/triage/duplicate.md → triage/deplicate/task.md} +0 -0
  124. /package/dist/prompts/{templates/triage/existing-pr.md → triage/existing/task.md} +0 -0
  125. /package/dist/prompts/{templates/triage/reconsider.md → triage/reconsider/task.md} +0 -0
  126. /package/dist/prompts/{templates/triage/signal.md → triage/signal/task.md} +0 -0
@@ -1,401 +0,0 @@
1
- function extractJson(text) {
2
- const trimmed = text.trim();
3
- try {
4
- return JSON.parse(trimmed);
5
- }
6
- catch {
7
- let depth = 0;
8
- let escaped = false;
9
- let inString = false;
10
- let start = -1;
11
- const candidates = [];
12
- for (let index = 0; index < trimmed.length; index += 1) {
13
- const char = trimmed[index];
14
- if (escaped) {
15
- escaped = false;
16
- continue;
17
- }
18
- if (char === "\\" && inString) {
19
- escaped = true;
20
- continue;
21
- }
22
- if (char === '"') {
23
- inString = !inString;
24
- continue;
25
- }
26
- if (inString)
27
- continue;
28
- if (char === "{") {
29
- if (depth === 0)
30
- start = index;
31
- depth += 1;
32
- continue;
33
- }
34
- if (char !== "}" || depth === 0)
35
- continue;
36
- depth -= 1;
37
- if (depth === 0 && start !== -1) {
38
- candidates.push(trimmed.slice(start, index + 1));
39
- start = -1;
40
- }
41
- }
42
- for (const candidate of candidates.reverse()) {
43
- try {
44
- return JSON.parse(candidate);
45
- }
46
- catch {
47
- // Keep scanning older JSON-looking blocks; prompts may include examples.
48
- }
49
- }
50
- throw new Error("output does not contain a valid JSON object");
51
- }
52
- }
53
- function isVerdict(value) {
54
- return value === "MERGE" || value === "CHANGES_REQUESTED" || value === "CLOSE";
55
- }
56
- function isEditResponseAction(value) {
57
- return value === "FIXED" || value === "DISAGREE" || value === "ASK";
58
- }
59
- function requireArray(value, path) {
60
- if (!Array.isArray(value))
61
- throw new Error(`${path} must be an array`);
62
- return value;
63
- }
64
- function requireString(value, path) {
65
- if (typeof value !== "string" || !value)
66
- throw new Error(`${path} must be a non-empty string`);
67
- return value;
68
- }
69
- function requireNumber(value, path) {
70
- if (typeof value !== "number" || !Number.isInteger(value))
71
- throw new Error(`${path} must be an integer`);
72
- return value;
73
- }
74
- function requireLine(value, path) {
75
- if (value == null)
76
- throw new Error(`${path} is required`);
77
- return requireNumber(value, path);
78
- }
79
- function optionalStartLine(input) {
80
- if (input.value == null)
81
- return undefined;
82
- return requireNumber(input.value, input.path);
83
- }
84
- function requireOneOf(value, path, values) {
85
- const text = requireString(value, path);
86
- if (!values.includes(text)) {
87
- throw new Error(`${path} must be ${values.join(", ")}`);
88
- }
89
- return text;
90
- }
91
- function parseTriageVote(text, votes) {
92
- const data = extractJson(text);
93
- if (!data || typeof data !== "object")
94
- throw new Error("triage vote output must be an object");
95
- const vote = requireOneOf(data.vote, "vote", votes);
96
- const body = data.body == null ? undefined : requireString(data.body, "body");
97
- if (vote === "ASK" && !body?.trim())
98
- throw new Error("ASK requires body");
99
- return {
100
- body,
101
- reason: requireString(data.reason, "reason"),
102
- vote,
103
- };
104
- }
105
- export function parseTriageExistingPrOutput(text) {
106
- return parseTriageVote(text, [
107
- "RELATED_PR_DOES_NOT_HANDLE_ISSUE",
108
- "RELATED_PR_HANDLES_ISSUE",
109
- ]);
110
- }
111
- export function parseTriageCategoryOutput(text, categories) {
112
- return parseTriageVote(text, ["ASK", ...categories]);
113
- }
114
- export function parseTriageBinaryOutput(text) {
115
- return parseTriageVote(text, ["ASK", "INVALID", "NO", "YES"]);
116
- }
117
- export function parseTriageSignalOutput(text, signalIds) {
118
- const data = extractJson(text);
119
- if (!data || typeof data !== "object")
120
- throw new Error("triage signal output must be an object");
121
- const ids = new Set(signalIds);
122
- return {
123
- signals: requireArray(data.signals, "signals").map((item, index) => {
124
- const value = item;
125
- const id = requireString(value.id, `signals[${index}].id`);
126
- if (!ids.has(id))
127
- throw new Error(`signals[${index}].id is not configured`);
128
- return {
129
- id,
130
- reason: requireString(value.reason, `signals[${index}].reason`),
131
- };
132
- }),
133
- };
134
- }
135
- export function parseTriageDuplicateOutput(text) {
136
- const data = extractJson(text);
137
- if (!data || typeof data !== "object")
138
- throw new Error("triage duplicate output must be an object");
139
- const vote = requireOneOf(data.vote, "vote", [
140
- "DUPLICATE",
141
- "NOT_DUPLICATE",
142
- ]);
143
- const duplicateOf = data.duplicateOf == null
144
- ? undefined
145
- : requireNumber(data.duplicateOf, "duplicateOf");
146
- if (vote === "DUPLICATE" && duplicateOf == null)
147
- throw new Error("DUPLICATE requires duplicateOf");
148
- return {
149
- duplicateOf,
150
- reason: requireString(data.reason, "reason"),
151
- vote,
152
- };
153
- }
154
- export function parseTriageCommentClassificationOutput(text) {
155
- const data = extractJson(text);
156
- if (!data || typeof data !== "object")
157
- throw new Error("triage comment classification output must be an object");
158
- return {
159
- comments: requireArray(data.comments, "comments").map((item, index) => {
160
- const value = item;
161
- return {
162
- classification: requireOneOf(value.classification, `comments[${index}].classification`, [
163
- "ACKNOWLEDGEMENT",
164
- "CLARIFICATION",
165
- "NEW_EVIDENCE",
166
- "OBJECTION",
167
- "UNRELATED",
168
- ]),
169
- commentId: requireNumber(value.commentId, `comments[${index}].commentId`),
170
- reason: requireString(value.reason, `comments[${index}].reason`),
171
- };
172
- }),
173
- };
174
- }
175
- export function parseReviewOutput(text) {
176
- const data = extractJson(text);
177
- if (!data || typeof data !== "object")
178
- throw new Error("review output must be an object");
179
- if (data.requirementFindings != null)
180
- throw new Error("requirementFindings is not accepted");
181
- if (!isVerdict(data.verdict))
182
- throw new Error("verdict must be MERGE, CHANGES_REQUESTED, or CLOSE");
183
- const findings = requireArray(data.findings, "findings").map((finding, index) => {
184
- const item = finding;
185
- const line = requireLine(item.line, `findings[${index}].line`);
186
- return {
187
- fix: requireString(item.fix, `findings[${index}].fix`),
188
- issue: requireString(item.issue, `findings[${index}].issue`),
189
- line,
190
- path: requireString(item.path, `findings[${index}].path`),
191
- perspective: item.perspective == null
192
- ? undefined
193
- : requireString(item.perspective, `findings[${index}].perspective`),
194
- startLine: optionalStartLine({
195
- line,
196
- path: `findings[${index}].startLine`,
197
- value: item.startLine,
198
- }),
199
- };
200
- });
201
- if (data.verdict === "MERGE" && findings.length)
202
- throw new Error("MERGE requires no findings");
203
- if (data.verdict === "CHANGES_REQUESTED" && !findings.length)
204
- throw new Error("CHANGES_REQUESTED requires findings");
205
- if (data.verdict === "CLOSE" && findings.length)
206
- throw new Error("CLOSE requires no findings");
207
- const reason = typeof data.reason === "string" && data.reason.trim()
208
- ? data.reason
209
- : undefined;
210
- if (data.verdict === "CLOSE" && !reason)
211
- throw new Error("CLOSE requires reason");
212
- return {
213
- findings,
214
- reason,
215
- verdict: data.verdict,
216
- };
217
- }
218
- export function parseRereviewOutput(text) {
219
- const data = extractJson(text);
220
- if (!isVerdict(data.verdict))
221
- throw new Error("rereview verdict must be MERGE, CHANGES_REQUESTED, or CLOSE");
222
- if (data.requirementFindings != null)
223
- throw new Error("requirementFindings is not accepted");
224
- const resolve = requireArray(data.resolve, "resolve").map((item, index) => {
225
- const value = item;
226
- return {
227
- commentId: requireNumber(value.commentId, `resolve[${index}].commentId`),
228
- threadId: requireString(value.threadId, `resolve[${index}].threadId`),
229
- };
230
- });
231
- const followUps = requireArray(data.followUps, "followUps").map((item, index) => {
232
- const value = item;
233
- return {
234
- body: requireString(value.body, `followUps[${index}].body`),
235
- commentId: requireNumber(value.commentId, `followUps[${index}].commentId`),
236
- };
237
- });
238
- const newFindings = requireArray(data.newFindings, "newFindings").map((item, index) => {
239
- const value = item;
240
- const line = requireLine(value.line, `newFindings[${index}].line`);
241
- return {
242
- body: requireString(value.body, `newFindings[${index}].body`),
243
- line,
244
- path: requireString(value.path, `newFindings[${index}].path`),
245
- startLine: optionalStartLine({
246
- line,
247
- path: `newFindings[${index}].startLine`,
248
- value: value.startLine,
249
- }),
250
- };
251
- });
252
- if (data.verdict === "MERGE" && (followUps.length || newFindings.length)) {
253
- throw new Error("MERGE requires no followUps or newFindings");
254
- }
255
- if (data.verdict === "CLOSE" && (followUps.length || newFindings.length)) {
256
- throw new Error("CLOSE requires no followUps or newFindings");
257
- }
258
- if (data.verdict === "CLOSE" && !data.reason) {
259
- throw new Error("CLOSE requires reason");
260
- }
261
- if (data.verdict === "CHANGES_REQUESTED" &&
262
- !followUps.length &&
263
- !newFindings.length) {
264
- throw new Error("CHANGES_REQUESTED requires followUps or newFindings");
265
- }
266
- return {
267
- followUps,
268
- newFindings,
269
- reason: data.reason == null ? undefined : requireString(data.reason, "reason"),
270
- resolve,
271
- verdict: data.verdict,
272
- };
273
- }
274
- export function parseFindingValidationOutput(text) {
275
- const data = extractJson(text);
276
- if (!data || typeof data !== "object")
277
- throw new Error("finding validation output must be an object");
278
- return {
279
- votes: requireArray(data.votes, "votes").map((item, index) => {
280
- const value = item;
281
- const vote = requireString(value.vote, `votes[${index}].vote`);
282
- if (vote !== "AGREE" && vote !== "DISAGREE")
283
- throw new Error(`votes[${index}].vote must be AGREE or DISAGREE`);
284
- return {
285
- findingIndex: requireNumber(value.findingIndex, `votes[${index}].findingIndex`),
286
- reason: value.reason == null
287
- ? undefined
288
- : requireString(value.reason, `votes[${index}].reason`),
289
- reviewer: requireString(value.reviewer, `votes[${index}].reviewer`),
290
- vote,
291
- };
292
- }),
293
- };
294
- }
295
- export function parseCloseReconsiderationOutput(text) {
296
- const output = parseReviewOutput(text);
297
- if (output.verdict === "CLOSE")
298
- throw new Error("close reconsideration must be MERGE or CHANGES_REQUESTED");
299
- return output;
300
- }
301
- export function parseRereviewCloseReconsiderationOutput(text) {
302
- const output = parseRereviewOutput(text);
303
- if (output.verdict === "CLOSE")
304
- throw new Error("rereview close reconsideration must be MERGE or CHANGES_REQUESTED");
305
- return output;
306
- }
307
- export function parseCiClassificationOutput(text) {
308
- const data = extractJson(text);
309
- if (!data || typeof data !== "object")
310
- throw new Error("CI classification output must be an object");
311
- return {
312
- checks: requireArray(data.checks, "checks").map((item, index) => {
313
- const value = item;
314
- const classification = requireString(value.classification, `checks[${index}].classification`);
315
- if (classification !== "SCOPE_IN" && classification !== "SCOPE_OUT") {
316
- throw new Error(`checks[${index}].classification must be SCOPE_IN or SCOPE_OUT`);
317
- }
318
- return {
319
- classification,
320
- name: requireString(value.name, `checks[${index}].name`),
321
- reason: requireString(value.reason, `checks[${index}].reason`),
322
- };
323
- }),
324
- };
325
- }
326
- function parsePullRequest(value, options) {
327
- if (value == null) {
328
- if (options.required)
329
- throw new Error("pullRequest is required");
330
- return undefined;
331
- }
332
- if (typeof value !== "object")
333
- throw new Error("pullRequest must be an object");
334
- const pullRequest = value;
335
- return {
336
- body: requireString(pullRequest.body, "pullRequest.body"),
337
- title: requireString(pullRequest.title, "pullRequest.title"),
338
- };
339
- }
340
- function parseEditOutputWithOptions(text, options) {
341
- const data = extractJson(text);
342
- if (!data || typeof data !== "object")
343
- throw new Error("edit output must be an object");
344
- if (data.mode !== "EDITED" && data.mode !== "REPLIED")
345
- throw new Error("mode must be EDITED or REPLIED");
346
- const filesTouched = requireArray(data.filesTouched, "filesTouched").map((file, index) => requireString(file, `filesTouched[${index}]`));
347
- const responses = requireArray(data.responses, "responses").map((item, index) => {
348
- const value = item;
349
- if (!isEditResponseAction(value.action)) {
350
- throw new Error(`responses[${index}].action must be FIXED, DISAGREE, or ASK`);
351
- }
352
- return {
353
- action: value.action,
354
- body: requireString(value.body, `responses[${index}].body`),
355
- commentId: requireNumber(value.commentId, `responses[${index}].commentId`),
356
- };
357
- });
358
- if (options.requireResponses && data.mode === "REPLIED" && !responses.length)
359
- throw new Error("responses must not be empty");
360
- if (data.mode === "EDITED") {
361
- if (!filesTouched.length)
362
- throw new Error("EDITED requires filesTouched");
363
- const pullRequest = parsePullRequest(data.pullRequest, {
364
- required: options.requirePullRequest,
365
- });
366
- return {
367
- commitMessage: requireString(data.commitMessage, "commitMessage"),
368
- commitSha: requireString(data.commitSha, "commitSha"),
369
- filesTouched,
370
- mode: data.mode,
371
- ...(pullRequest ? { pullRequest } : {}),
372
- responses,
373
- };
374
- }
375
- if (data.commitMessage != null)
376
- throw new Error("REPLIED must omit commitMessage");
377
- if (data.commitSha != null)
378
- throw new Error("REPLIED must omit commitSha");
379
- if (filesTouched.length)
380
- throw new Error("REPLIED requires empty filesTouched");
381
- if (responses.some((response) => response.action === "FIXED")) {
382
- throw new Error("REPLIED cannot include FIXED responses");
383
- }
384
- return {
385
- filesTouched,
386
- mode: data.mode,
387
- responses,
388
- };
389
- }
390
- export function parseEditOutput(text) {
391
- return parseEditOutputWithOptions(text, {
392
- requirePullRequest: false,
393
- requireResponses: true,
394
- });
395
- }
396
- export function parseTriageCreatePrOutput(text) {
397
- return parseEditOutputWithOptions(text, {
398
- requirePullRequest: true,
399
- requireResponses: false,
400
- });
401
- }
@@ -1,16 +0,0 @@
1
- Classify failed CI jobs after editor changes for pull request #{pr} in {owner}/{repo}.
2
- This is edit cycle {cycle}.
3
-
4
- The editor changed the PR from {previousHeadSha} to {headSha}.
5
- The PR worktree is {worktreePath}.
6
- Use this diff for context: git -C {jsonEncodedWorktreePath} diff {previousHeadSha}...{headSha}
7
-
8
- Decide whether each failure is caused by the PR/editor changes or is likely flaky, external, or infrastructure-related.
9
- Treat failures that appeared after the editor changes as SCOPE_IN unless there is strong evidence they are unrelated.
10
- If uncertain, choose SCOPE_IN.
11
-
12
- Failed checks with structured failure evidence:
13
-
14
- ```json
15
- {failedChecks}
16
- ```
@@ -1,10 +0,0 @@
1
- Resolve merge conflicts for pull request #{pr} in {owner}/{repo}.
2
- The PR worktree is {worktreePath}.
3
-
4
- The latest base branch is {baseBranch} at {baseSha}.
5
- The PR head before conflict recovery was {headSha}.
6
-
7
- Conflicted files:
8
- {conflictedFiles}
9
-
10
- Resolve every merge conflict in the worktree. Preserve the intended PR behavior while incorporating the latest base branch changes. Stage all resolved files and create a commit. Do not push.
@@ -1,15 +0,0 @@
1
- Fix pull request #{pr} for {owner}/{repo}.
2
- The PR worktree is {worktreePath}.
3
-
4
- Act as the PR author and address every blocking review finding listed below.
5
- Review findings are the complete set of requested changes. Each finding targets a PR diff line and should have a corresponding GitHub review thread unless it comes from legacy read-side state.
6
- {reviewFindings}
7
-
8
- Unresolved GitHub review threads are conversations that may need replies or resolution.
9
- {unresolvedThreads}
10
-
11
- For each review finding and thread, decide whether you agree with the reviewer.
12
- If you understand and agree with the requested change, edit the code, stage changes, commit, and reply with action FIXED for each related thread.
13
- If a requested change in a thread is incorrect or unnecessary and you have a clear reason, do not edit for that thread; reply with action DISAGREE and explain why.
14
- If you cannot determine whether a threaded request is correct or what change is expected, do not blindly edit; reply with action ASK and ask a concrete question.
15
- Do not make changes just because a reviewer requested them. Do not push.
@@ -1,9 +0,0 @@
1
- Classify failed CI jobs for pull request #{pr} in {owner}/{repo}.
2
- Decide whether each failure is caused by the PR changes or is likely flaky, external, or infrastructure-related.
3
- If uncertain, choose SCOPE_IN.
4
-
5
- Failed checks with structured failure evidence:
6
-
7
- ```json
8
- {failedChecks}
9
- ```
@@ -1,6 +0,0 @@
1
- You requested CLOSE for pull request #{pr} in {owner}/{repo}, but the other reviewers did not.
2
- Reconsider your decision using the existing session context and choose MERGE or CHANGES_REQUESTED instead.
3
- Original close reason:
4
- {closeReason}
5
- Every finding must target a valid right-side line in the PR diff. If the problem itself does not have an exact changed line, choose the nearest changed line that represents the cause, responsibility, missing implementation, or affected behavior.
6
- Do not edit files or perform write operations.
File without changes