@olegkoval/agent-skills 1.24.0 → 1.26.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 +9 -2
- package/.cursor-plugin/index.json +35 -0
- package/.grok-plugin/index.json +35 -0
- package/.kiro/steering/codexloop.md +254 -0
- package/.kiro/steering/geminiloop.md +230 -0
- package/.kiro/steering/pr-finalize-complete.md +187 -0
- package/.kiro/steering/pr-finalize.md +140 -0
- package/.windsurf/rules/codexloop.md +253 -0
- package/.windsurf/rules/geminiloop.md +229 -0
- package/.windsurf/rules/pr-finalize-complete.md +186 -0
- package/.windsurf/rules/pr-finalize.md +139 -0
- package/README.md +10 -3
- package/catalog/skills.json +176 -6
- package/package.json +1 -1
- package/packages/software-development/codexloop/SKILL.md +261 -0
- package/packages/software-development/codexloop/adapters/claude/plugin.json +5 -0
- package/packages/software-development/codexloop/adapters/claude/skills/codexloop/SKILL.md +262 -0
- package/packages/software-development/codexloop/adapters/codex/README.md +26 -0
- package/packages/software-development/codexloop/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/codexloop/adapters/cursor/skills/codexloop/SKILL.md +263 -0
- package/packages/software-development/codexloop/adapters/grok/plugin.json +6 -0
- package/packages/software-development/codexloop/adapters/grok/skills/codexloop/SKILL.md +262 -0
- package/packages/software-development/codexloop/adapters/kiro/steering/codexloop.md +254 -0
- package/packages/software-development/codexloop/adapters/windsurf/rules/codexloop.md +253 -0
- package/packages/software-development/dependabot-triage/SKILL.md +150 -0
- package/packages/software-development/dependabot-triage/adapters/claude/plugin.json +5 -0
- package/packages/software-development/dependabot-triage/adapters/claude/skills/dependabot-triage/SKILL.md +151 -0
- package/packages/software-development/dependabot-triage/adapters/codex/README.md +19 -0
- package/packages/software-development/dependabot-triage/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/dependabot-triage/adapters/cursor/skills/dependabot-triage/SKILL.md +151 -0
- package/packages/software-development/dependabot-triage/adapters/grok/plugin.json +6 -0
- package/packages/software-development/dependabot-triage/adapters/grok/skills/dependabot-triage/SKILL.md +151 -0
- package/packages/software-development/geminiloop/SKILL.md +237 -0
- package/packages/software-development/geminiloop/adapters/claude/plugin.json +5 -0
- package/packages/software-development/geminiloop/adapters/claude/skills/geminiloop/SKILL.md +238 -0
- package/packages/software-development/geminiloop/adapters/codex/README.md +25 -0
- package/packages/software-development/geminiloop/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/geminiloop/adapters/cursor/skills/geminiloop/SKILL.md +239 -0
- package/packages/software-development/geminiloop/adapters/grok/plugin.json +6 -0
- package/packages/software-development/geminiloop/adapters/grok/skills/geminiloop/SKILL.md +238 -0
- package/packages/software-development/geminiloop/adapters/kiro/steering/geminiloop.md +230 -0
- package/packages/software-development/geminiloop/adapters/windsurf/rules/geminiloop.md +229 -0
- package/packages/software-development/pr-finalize/SKILL.md +149 -0
- package/packages/software-development/pr-finalize/adapters/claude/plugin.json +5 -0
- package/packages/software-development/pr-finalize/adapters/claude/skills/pr-finalize/SKILL.md +150 -0
- package/packages/software-development/pr-finalize/adapters/codex/README.md +26 -0
- package/packages/software-development/pr-finalize/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/pr-finalize/adapters/cursor/skills/pr-finalize/SKILL.md +151 -0
- package/packages/software-development/pr-finalize/adapters/grok/plugin.json +6 -0
- package/packages/software-development/pr-finalize/adapters/grok/skills/pr-finalize/SKILL.md +150 -0
- package/packages/software-development/pr-finalize/adapters/kiro/steering/pr-finalize.md +140 -0
- package/packages/software-development/pr-finalize/adapters/windsurf/rules/pr-finalize.md +139 -0
- package/packages/software-development/pr-finalize-complete/SKILL.md +195 -0
- package/packages/software-development/pr-finalize-complete/adapters/claude/plugin.json +5 -0
- package/packages/software-development/pr-finalize-complete/adapters/claude/skills/pr-finalize-complete/SKILL.md +196 -0
- package/packages/software-development/pr-finalize-complete/adapters/codex/README.md +24 -0
- package/packages/software-development/pr-finalize-complete/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/pr-finalize-complete/adapters/cursor/skills/pr-finalize-complete/SKILL.md +197 -0
- package/packages/software-development/pr-finalize-complete/adapters/grok/plugin.json +6 -0
- package/packages/software-development/pr-finalize-complete/adapters/grok/skills/pr-finalize-complete/SKILL.md +196 -0
- package/packages/software-development/pr-finalize-complete/adapters/kiro/steering/pr-finalize-complete.md +187 -0
- package/packages/software-development/pr-finalize-complete/adapters/windsurf/rules/pr-finalize-complete.md +186 -0
- package/packages/software-development/pr-to-green/SKILL.md +165 -0
- package/packages/software-development/pr-to-green/adapters/claude/plugin.json +5 -0
- package/packages/software-development/pr-to-green/adapters/claude/skills/pr-to-green/SKILL.md +166 -0
- package/packages/software-development/pr-to-green/adapters/codex/README.md +19 -0
- package/packages/software-development/pr-to-green/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/pr-to-green/adapters/cursor/skills/pr-to-green/SKILL.md +166 -0
- package/packages/software-development/pr-to-green/adapters/grok/plugin.json +6 -0
- package/packages/software-development/pr-to-green/adapters/grok/skills/pr-to-green/SKILL.md +166 -0
- package/packages/software-development/store-listing-copy/SKILL.md +215 -0
- package/packages/software-development/store-listing-copy/adapters/claude/plugin.json +5 -0
- package/packages/software-development/store-listing-copy/adapters/claude/skills/store-listing-copy/SKILL.md +216 -0
- package/packages/software-development/store-listing-copy/adapters/codex/README.md +20 -0
- package/packages/software-development/store-listing-copy/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/store-listing-copy/adapters/cursor/skills/store-listing-copy/SKILL.md +216 -0
- package/packages/software-development/store-listing-copy/adapters/grok/plugin.json +6 -0
- package/packages/software-development/store-listing-copy/adapters/grok/skills/store-listing-copy/SKILL.md +216 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "olko-agent-skills",
|
|
3
3
|
"description": "Agent-agnostic skill catalog for Codex, Claude, Cursor, Grok, Copilot, Windsurf, Kiro, and other skill-aware tools.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.25.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Oleg Koval"
|
|
7
7
|
},
|
|
@@ -32,14 +32,21 @@
|
|
|
32
32
|
"./packages/software-development/macos-menubar-app",
|
|
33
33
|
"./packages/software-development/skill-budget-audit",
|
|
34
34
|
"./packages/software-development/crash-course",
|
|
35
|
+
"./packages/software-development/pr-finalize",
|
|
36
|
+
"./packages/software-development/pr-finalize-complete",
|
|
35
37
|
"./packages/software-development/qodoloop",
|
|
36
38
|
"./packages/wearables/garmin-watchface",
|
|
37
39
|
"./packages/software-development/coderabbitloop",
|
|
40
|
+
"./packages/software-development/codexloop",
|
|
41
|
+
"./packages/software-development/geminiloop",
|
|
38
42
|
"./packages/software-development/add-to-my-skills",
|
|
39
43
|
"./packages/software-development/ai-tools-setup",
|
|
40
44
|
"./packages/software-development/changelog-generator",
|
|
41
45
|
"./packages/software-development/wikipedia-uk-editor",
|
|
42
46
|
"./packages/software-development/pr-description-writer",
|
|
43
|
-
"./packages/software-development/ci-fix-loop"
|
|
47
|
+
"./packages/software-development/ci-fix-loop",
|
|
48
|
+
"./packages/software-development/pr-to-green",
|
|
49
|
+
"./packages/software-development/dependabot-triage",
|
|
50
|
+
"./packages/software-development/store-listing-copy"
|
|
44
51
|
]
|
|
45
52
|
}
|
|
@@ -106,6 +106,16 @@
|
|
|
106
106
|
"source": "./packages/software-development/crash-course/adapters/cursor",
|
|
107
107
|
"description": "Expert tutor for rapid, source-grounded learning of any topic: a timed 4-hour sprint plus cheat-sheet, learning-ladder, quiz-me, Feynman, and resource-curation modes."
|
|
108
108
|
},
|
|
109
|
+
{
|
|
110
|
+
"name": "olko:pr-finalize",
|
|
111
|
+
"source": "./packages/software-development/pr-finalize/adapters/cursor",
|
|
112
|
+
"description": "Drives one GitHub PR to genuinely merge-ready: rebases and resolves conflicts, sweeps every review bot and human comment to zero unaddressed findings, verifies unit and E2E coverage actually exists, runs the repo's real lint/format/test gates before pushing, and reports what still needs a human."
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "olko:pr-finalize-complete",
|
|
116
|
+
"source": "./packages/software-development/pr-finalize-complete/adapters/cursor",
|
|
117
|
+
"description": "Confirms a PR is genuinely merge-ready when the work is already believed done: re-checks every review-bot and human finding against the current code, separates stale comments from fixed ones, runs the repo's real lint and test gates, and reports the evidence rather than the assumption."
|
|
118
|
+
},
|
|
109
119
|
{
|
|
110
120
|
"name": "olko:qodoloop",
|
|
111
121
|
"source": "./packages/software-development/qodoloop/adapters/cursor",
|
|
@@ -121,6 +131,16 @@
|
|
|
121
131
|
"source": "./packages/software-development/coderabbitloop/adapters/cursor",
|
|
122
132
|
"description": "Iteratively drives a GitHub PR to zero unresolved CodeRabbit findings — reads each inline comment's own Prompt for AI Agents block, applies the fix, replies to the thread, resolves it, pushes, and re-triggers CodeRabbit."
|
|
123
133
|
},
|
|
134
|
+
{
|
|
135
|
+
"name": "olko:codexloop",
|
|
136
|
+
"source": "./packages/software-development/codexloop/adapters/cursor",
|
|
137
|
+
"description": "Iteratively drives a GitHub PR to zero unresolved OpenAI Codex review comments — but verifies every finding against the real code first, fixes only the correct ones, and rebuts false positives without changing correct code."
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "olko:geminiloop",
|
|
141
|
+
"source": "./packages/software-development/geminiloop/adapters/cursor",
|
|
142
|
+
"description": "Iteratively drives a GitHub PR to zero unresolved Gemini Code Assist comments — treats each one as a claim to verify, fixes only the genuinely-correct findings, and rebuts the rest with evidence instead of editing correct code."
|
|
143
|
+
},
|
|
124
144
|
{
|
|
125
145
|
"name": "olko:add-to-my-skills",
|
|
126
146
|
"source": "./packages/software-development/add-to-my-skills/adapters/cursor",
|
|
@@ -150,6 +170,21 @@
|
|
|
150
170
|
"name": "olko:ci-fix-loop",
|
|
151
171
|
"source": "./packages/software-development/ci-fix-loop/adapters/cursor",
|
|
152
172
|
"description": "Diagnose GitHub Actions CI failures in a loop: fetch failing check logs, fix, push, and repeat until green. Direct analog of qodoloop / coderabbitloop for test and lint failures."
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "olko:pr-to-green",
|
|
176
|
+
"source": "./packages/software-development/pr-to-green/adapters/cursor",
|
|
177
|
+
"description": "Orchestrate a GitHub PR from first push to merge-ready: run ci-fix-loop until checks are green, detect active AI review bots, run qodoloop and coderabbitloop in sequence, and confirm zero unresolved threads."
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "olko:dependabot-triage",
|
|
181
|
+
"source": "./packages/software-development/dependabot-triage/adapters/cursor",
|
|
182
|
+
"description": "Triage open Dependabot and Renovate PRs in bulk: classify by risk tier, auto-approve and merge safe patch bumps, flag breaking major upgrades for human review, and post a digest."
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "olko:store-listing-copy",
|
|
186
|
+
"source": "./packages/software-development/store-listing-copy/adapters/cursor",
|
|
187
|
+
"description": "Generate platform-validated App Store, Google Play, and Connect IQ store listing copy (title, subtitle, description, what's new, keywords) from a git changelog or release notes."
|
|
153
188
|
}
|
|
154
189
|
]
|
|
155
190
|
}
|
package/.grok-plugin/index.json
CHANGED
|
@@ -116,6 +116,16 @@
|
|
|
116
116
|
"source": "./packages/software-development/crash-course/adapters/grok",
|
|
117
117
|
"description": "Expert tutor for rapid, source-grounded learning of any topic: a timed 4-hour sprint plus cheat-sheet, learning-ladder, quiz-me, Feynman, and resource-curation modes."
|
|
118
118
|
},
|
|
119
|
+
{
|
|
120
|
+
"name": "olko:pr-finalize",
|
|
121
|
+
"source": "./packages/software-development/pr-finalize/adapters/grok",
|
|
122
|
+
"description": "Drives one GitHub PR to genuinely merge-ready: rebases and resolves conflicts, sweeps every review bot and human comment to zero unaddressed findings, verifies unit and E2E coverage actually exists, runs the repo's real lint/format/test gates before pushing, and reports what still needs a human."
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "olko:pr-finalize-complete",
|
|
126
|
+
"source": "./packages/software-development/pr-finalize-complete/adapters/grok",
|
|
127
|
+
"description": "Confirms a PR is genuinely merge-ready when the work is already believed done: re-checks every review-bot and human finding against the current code, separates stale comments from fixed ones, runs the repo's real lint and test gates, and reports the evidence rather than the assumption."
|
|
128
|
+
},
|
|
119
129
|
{
|
|
120
130
|
"name": "olko:qodoloop",
|
|
121
131
|
"source": "./packages/software-development/qodoloop/adapters/grok",
|
|
@@ -131,6 +141,16 @@
|
|
|
131
141
|
"source": "./packages/software-development/coderabbitloop/adapters/grok",
|
|
132
142
|
"description": "Iteratively drives a GitHub PR to zero unresolved CodeRabbit findings — reads each inline comment's own Prompt for AI Agents block, applies the fix, replies to the thread, resolves it, pushes, and re-triggers CodeRabbit."
|
|
133
143
|
},
|
|
144
|
+
{
|
|
145
|
+
"name": "olko:codexloop",
|
|
146
|
+
"source": "./packages/software-development/codexloop/adapters/grok",
|
|
147
|
+
"description": "Iteratively drives a GitHub PR to zero unresolved OpenAI Codex review comments — but verifies every finding against the real code first, fixes only the correct ones, and rebuts false positives without changing correct code."
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "olko:geminiloop",
|
|
151
|
+
"source": "./packages/software-development/geminiloop/adapters/grok",
|
|
152
|
+
"description": "Iteratively drives a GitHub PR to zero unresolved Gemini Code Assist comments — treats each one as a claim to verify, fixes only the genuinely-correct findings, and rebuts the rest with evidence instead of editing correct code."
|
|
153
|
+
},
|
|
134
154
|
{
|
|
135
155
|
"name": "olko:add-to-my-skills",
|
|
136
156
|
"source": "./packages/software-development/add-to-my-skills/adapters/grok",
|
|
@@ -160,6 +180,21 @@
|
|
|
160
180
|
"name": "olko:ci-fix-loop",
|
|
161
181
|
"source": "./packages/software-development/ci-fix-loop/adapters/grok",
|
|
162
182
|
"description": "Diagnose GitHub Actions CI failures in a loop: fetch failing check logs, fix, push, and repeat until green. Direct analog of qodoloop / coderabbitloop for test and lint failures."
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "olko:pr-to-green",
|
|
186
|
+
"source": "./packages/software-development/pr-to-green/adapters/grok",
|
|
187
|
+
"description": "Orchestrate a GitHub PR from first push to merge-ready: run ci-fix-loop until checks are green, detect active AI review bots, run qodoloop and coderabbitloop in sequence, and confirm zero unresolved threads."
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "olko:dependabot-triage",
|
|
191
|
+
"source": "./packages/software-development/dependabot-triage/adapters/grok",
|
|
192
|
+
"description": "Triage open Dependabot and Renovate PRs in bulk: classify by risk tier, auto-approve and merge safe patch bumps, flag breaking major upgrades for human review, and post a digest."
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"name": "olko:store-listing-copy",
|
|
196
|
+
"source": "./packages/software-development/store-listing-copy/adapters/grok",
|
|
197
|
+
"description": "Generate platform-validated App Store, Google Play, and Connect IQ store listing copy (title, subtitle, description, what's new, keywords) from a git changelog or release notes."
|
|
163
198
|
}
|
|
164
199
|
]
|
|
165
200
|
}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
inclusion: manual
|
|
5
|
+
description: "Iteratively drives a GitHub PR to zero unresolved OpenAI Codex review comments — but verifies every finding against the real code first, fixes only the correct ones, and rebuts false positives without changing correct code."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Codexloop
|
|
9
|
+
|
|
10
|
+
Drive a GitHub PR until Codex has no unresolved review comments — **but do not cargo-cult its
|
|
11
|
+
suggestions.** Every comment is a *claim to verify*, not an instruction to obey. A wrong
|
|
12
|
+
suggestion applied is worse than the comment itself.
|
|
13
|
+
|
|
14
|
+
## How Codex differs from Greptile / Gemini
|
|
15
|
+
|
|
16
|
+
- **No check-run, no score.** Codex does not publish an `X/5` confidence or a named check. It posts
|
|
17
|
+
a **PR review** (state `COMMENTED`) plus inline review comments. Detection is by polling the
|
|
18
|
+
*reviews* endpoint. "Satisfied" = zero unresolved comments (each either fixed or rebutted).
|
|
19
|
+
- **Trigger phrase is `@codex review`.** Codex reviews automatically when a PR opens or gets new
|
|
20
|
+
commits if auto-review is enabled on the repo; the mention forces a fresh pass. Other useful
|
|
21
|
+
mentions: `@codex review focus on <area>` for a scoped re-review.
|
|
22
|
+
- **Priority, not confidence.** Codex findings usually lead with a severity/priority word (`P1`,
|
|
23
|
+
`P2`, `P3` or `critical`/`major`/`minor`) or a short titled heading. Weight the top tier
|
|
24
|
+
seriously; treat the bottom tier as usually-skippable nits unless clearly correct.
|
|
25
|
+
- **Codex is terse and often reasons from the diff alone.** Its characteristic failure is
|
|
26
|
+
confidently asserting a bug based only on the changed hunk, without the surrounding file or the
|
|
27
|
+
call sites. That makes "read the whole file before believing it" the single highest-value check.
|
|
28
|
+
|
|
29
|
+
## Not for
|
|
30
|
+
|
|
31
|
+
- GitLab / Perforce (Codex code review is a GitHub app). For other review bots this catalog ships
|
|
32
|
+
`geminiloop`, `coderabbitloop`, and `qodoloop`; for CI failures rather than review comments, use
|
|
33
|
+
`ci-fix-loop`.
|
|
34
|
+
|
|
35
|
+
## 0. Resolve the Codex bot login (do this first, do not hardcode)
|
|
36
|
+
|
|
37
|
+
The connector's bot login varies by installation, so discover it from the PR rather than
|
|
38
|
+
assuming it:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
gh api repos/{owner}/{repo}/pulls/<PR>/reviews --paginate --jq '.[].user.login' | sort -u
|
|
42
|
+
gh api repos/{owner}/{repo}/pulls/<PR>/comments --paginate --jq '.[].user.login' | sort -u
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Pick the login matching `*codex*` (commonly `chatgpt-codex-connector[bot]`, sometimes
|
|
46
|
+
`codex[bot]`) and export it as `BOT`.
|
|
47
|
+
|
|
48
|
+
**Finding nothing here is NOT a stop condition.** On a PR Codex has never reviewed there is no bot
|
|
49
|
+
login to find yet — that is the normal starting state, not a missing app. When the probe comes back
|
|
50
|
+
empty, fall through to step 2A, post `@codex review`, and re-run this probe once a review lands;
|
|
51
|
+
until then match any login containing `codex` when polling. Only conclude the app is absent after
|
|
52
|
+
step 2A's bounded wait has expired with no review and no codex-like login anywhere on the PR — and
|
|
53
|
+
then say so and stop, rather than looping against nothing.
|
|
54
|
+
|
|
55
|
+
## 1. Identify the PR
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
gh pr view --json number,headRefName,headRefOid -q '{number,branch:.headRefName,head:.headRefOid}'
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Switch to the PR branch if not already on it. Capture `OWNER`/`REPO` (`gh repo view --json owner,name`).
|
|
62
|
+
|
|
63
|
+
## 2. The loop (max 5 iterations)
|
|
64
|
+
|
|
65
|
+
Keep an explicit iteration counter and stop at 5 — the cap is a real bound to enforce, not a
|
|
66
|
+
figure of speech. Each pass through A–G is one iteration; on hitting the cap, go straight to the
|
|
67
|
+
report and list what is still unresolved rather than starting a sixth.
|
|
68
|
+
|
|
69
|
+
### A. Ensure a fresh Codex review on the current head
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
HEAD_SHA=$(gh pr view <PR> --json headRefOid -q .headRefOid)
|
|
73
|
+
# Only trigger if no Codex review already exists for this exact SHA:
|
|
74
|
+
HAVE=$(gh api repos/{owner}/{repo}/pulls/<PR>/reviews --paginate \
|
|
75
|
+
--jq "[.[] | select(.user.login==\"$BOT\" and .commit_id==\"$HEAD_SHA\")] | length")
|
|
76
|
+
if [ "$HAVE" = "0" ]; then gh pr comment <PR> --body "@codex review"; fi
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Poll for the review of THIS head to land. No check-run exists, so poll the reviews endpoint — and
|
|
80
|
+
poll it on a **deadline**, never `while true`: a review that never arrives must end the skill with
|
|
81
|
+
an honest timeout, not hang it.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# 10-minute deadline, one retry, then give up. DEADLINE/RETRIES are the
|
|
85
|
+
# enforcement of the bounds this skill claims — do not drop them.
|
|
86
|
+
wait_for_review() { # $1 = attempt label
|
|
87
|
+
local deadline=$(( SECONDS + 600 ))
|
|
88
|
+
while [ "$SECONDS" -lt "$deadline" ]; do
|
|
89
|
+
R=$(gh api repos/{owner}/{repo}/pulls/<PR>/reviews --paginate \
|
|
90
|
+
--jq "[.[] | select(.user.login==\"$BOT\" and .commit_id==\"$HEAD_SHA\")] | last")
|
|
91
|
+
if [ -n "$R" ] && [ "$R" != "null" ]; then return 0; fi
|
|
92
|
+
echo "waiting for Codex review of $HEAD_SHA ($1)..."; sleep 15
|
|
93
|
+
done
|
|
94
|
+
return 1
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if ! wait_for_review "first wait"; then
|
|
98
|
+
echo "no Codex review after 10m — retrying once" # say the retry out loud
|
|
99
|
+
gh pr comment <PR> --body "@codex review"
|
|
100
|
+
if ! wait_for_review "after retry"; then
|
|
101
|
+
echo "Codex did not review $HEAD_SHA after a retry; stopping and reporting."
|
|
102
|
+
exit 1 # honest timeout, never a success claim
|
|
103
|
+
fi
|
|
104
|
+
fi
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Codex can take several minutes on a large diff, which is why the deadline is generous. Report the
|
|
108
|
+
retry in the final summary; two silent timeouts are the failure mode this guard exists to prevent.
|
|
109
|
+
|
|
110
|
+
### B. Fetch the findings
|
|
111
|
+
|
|
112
|
+
- **Summary**: the review `.body` from the object above — read the overall take and the priority
|
|
113
|
+
spread.
|
|
114
|
+
- **Unresolved inline comments** on the current head:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
gh api repos/{owner}/{repo}/pulls/<PR>/comments --paginate \
|
|
118
|
+
--jq ".[] | select(.user.login==\"$BOT\") | {id, path, line, body}"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Also pull the review threads + their resolved state via GraphQL (see step F) so you only act on
|
|
122
|
+
unresolved ones.
|
|
123
|
+
|
|
124
|
+
### C. Critically evaluate EACH comment (the core of this skill)
|
|
125
|
+
|
|
126
|
+
For every comment, **verify the claim against the actual code and repo conventions before touching
|
|
127
|
+
anything.** Read the whole file — not just the diff hunk Codex saw — plus the types and the call
|
|
128
|
+
sites. Then classify:
|
|
129
|
+
|
|
130
|
+
1. **CORRECT + actionable** — the finding is real and the fix improves the code. → fix it (step D).
|
|
131
|
+
2. **FALSE POSITIVE / technically wrong** — the claim doesn't hold. → do **NOT** change code; write a
|
|
132
|
+
specific, evidence-based reply (cite the exact code/line/behavior that disproves it), then resolve.
|
|
133
|
+
3. **Valid but out-of-scope / stylistic nit** that conflicts with repo convention or the PR's intent
|
|
134
|
+
→ briefly decline with a reason, then resolve. Do not expand the PR's scope to satisfy a nit.
|
|
135
|
+
|
|
136
|
+
**Hard rules:**
|
|
137
|
+
- **Never modify correct code just to silence Codex.** Prefer a reasoned rebuttal.
|
|
138
|
+
- When uncertain whether a claim holds, **investigate** (read more code, run the type-checker / tests)
|
|
139
|
+
rather than assume Codex is right. Default to skepticism.
|
|
140
|
+
- If a suggested change would break other call sites, alter public behavior, or contradict a verified
|
|
141
|
+
repo convention, it is a category-2 rebuttal, not a fix.
|
|
142
|
+
- Never fabricate identifiers to satisfy a comment (e.g. a Linear/ticket prefix). If Codex asks for a
|
|
143
|
+
ticket reference and none exists, say so; do not invent one.
|
|
144
|
+
|
|
145
|
+
**Codex's common failure modes to watch for (default these to category 2):**
|
|
146
|
+
- Diff-local reasoning: asserts a bug that the unchanged surrounding code already handles.
|
|
147
|
+
- "This can be null/undefined here" where the type or an earlier guard already rules it out.
|
|
148
|
+
- Invented race conditions or error paths with no actual trigger.
|
|
149
|
+
- Suggestions that compile-break or break other callers.
|
|
150
|
+
- Security/perf warnings with no exploit path or measurable cost.
|
|
151
|
+
- Restating library/framework semantics incorrectly.
|
|
152
|
+
- Style demands that contradict the repo's existing, consistent pattern.
|
|
153
|
+
|
|
154
|
+
### D. Apply fixes — category 1 only
|
|
155
|
+
|
|
156
|
+
Make the minimal correct change. Re-run the local gate if the repo has one (typecheck/tests) before
|
|
157
|
+
moving on.
|
|
158
|
+
|
|
159
|
+
### E. Commit and push FIRST, before resolving anything
|
|
160
|
+
|
|
161
|
+
Order matters. A resolved thread is a claim that the fix is on the branch, so the push has to
|
|
162
|
+
succeed before the claim is made — otherwise a failed commit or push leaves the PR unfixed with the
|
|
163
|
+
finding marked resolved, and nobody looks at it again.
|
|
164
|
+
|
|
165
|
+
If step D changed code:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# Stage ONLY the files your fixes touched — never `git add -A`, which sweeps up
|
|
169
|
+
# unrelated work and untracked secrets sitting in the worktree.
|
|
170
|
+
git status --short # look before you stage
|
|
171
|
+
git add <path> [<path>...] # the files named in the findings you fixed
|
|
172
|
+
git commit -m "address codex review feedback (codexloop iteration N)"
|
|
173
|
+
git push
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Author the commit per the repo's norms (e.g. the user's identity; no AI attribution if that is the
|
|
177
|
+
convention). Confirm the push actually landed before continuing:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
git rev-parse HEAD
|
|
181
|
+
gh pr view <PR> --json headRefOid -q .headRefOid # must match
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
If they differ, stop: the fix is not on the PR, so nothing may be resolved yet.
|
|
185
|
+
|
|
186
|
+
### F. Reply to and resolve every addressed thread
|
|
187
|
+
|
|
188
|
+
Only now, with the fixes pushed, reply and resolve. Fetch unresolved threads, **following
|
|
189
|
+
pagination** — a PR with more than 100 threads will otherwise look clean while unresolved findings
|
|
190
|
+
sit on page two:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# Loop until hasNextPage is false, passing endCursor back in as $cursor.
|
|
194
|
+
CURSOR=null
|
|
195
|
+
while : ; do
|
|
196
|
+
PAGE=$(gh api graphql -F cursor="$CURSOR" -f query='
|
|
197
|
+
query($cursor: String) {
|
|
198
|
+
repository(owner: "OWNER", name: "REPO") {
|
|
199
|
+
pullRequest(number: PR_NUMBER) {
|
|
200
|
+
reviewThreads(first: 100, after: $cursor) {
|
|
201
|
+
pageInfo { hasNextPage endCursor }
|
|
202
|
+
nodes { id isResolved comments(first: 1) { nodes { databaseId author { login } path body } } }
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}')
|
|
207
|
+
echo "$PAGE" # collect nodes from every page before deciding the PR is clean
|
|
208
|
+
PI='.data.repository.pullRequest.reviewThreads.pageInfo'
|
|
209
|
+
[ "$(echo "$PAGE" | jq -r "$PI.hasNextPage")" = "true" ] || break
|
|
210
|
+
CURSOR=$(echo "$PAGE" | jq -r "$PI.endCursor")
|
|
211
|
+
done
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Reply on a thread's comment via `gh api repos/{owner}/{repo}/pulls/<PR>/comments -f body="..." -F in_reply_to=<comment_id>`,
|
|
215
|
+
then resolve:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "THREAD_ID"}) { thread { isResolved } } }'
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Resolve a thread only for comments authored by `$BOT` that you have fixed or rebutted — never
|
|
222
|
+
blanket-resolve, and never resolve a human reviewer's thread.
|
|
223
|
+
|
|
224
|
+
Threads you are **rebutting** need no push, so they may be replied to and resolved regardless of
|
|
225
|
+
whether step D changed code.
|
|
226
|
+
|
|
227
|
+
### G. Re-review
|
|
228
|
+
|
|
229
|
+
Pushing re-triggers Codex when auto-review is on; otherwise post `@codex review`. Go back to **A**
|
|
230
|
+
with the new head SHA. If step D changed nothing (all comments were rebutted), skip the push,
|
|
231
|
+
ensure all threads are resolved, and exit.
|
|
232
|
+
|
|
233
|
+
## 3. Exit conditions
|
|
234
|
+
|
|
235
|
+
Stop when **any** is true:
|
|
236
|
+
- Zero unresolved `$BOT` comments remain, and every comment this round was fixed or
|
|
237
|
+
rebutted+resolved. (There is no score to hit — this is "done".)
|
|
238
|
+
- Max iterations (5) reached — report what remains.
|
|
239
|
+
- Codex never responded after one retry — report the timeout honestly; do not claim success.
|
|
240
|
+
|
|
241
|
+
## 4. Report
|
|
242
|
+
|
|
243
|
+
```text
|
|
244
|
+
Codexloop complete.
|
|
245
|
+
PR: #<n>
|
|
246
|
+
Bot login: <resolved $BOT>
|
|
247
|
+
Iterations: N
|
|
248
|
+
Comments fixed: N (genuinely-correct findings)
|
|
249
|
+
Comments rebutted: N (false positives / nits, resolved with rationale)
|
|
250
|
+
Remaining: 0
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
If it stopped at max iterations, list the remaining threads with your current assessment
|
|
254
|
+
(fix-pending vs disputed) so a human can arbitrate.
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
inclusion: manual
|
|
5
|
+
description: "Iteratively drives a GitHub PR to zero unresolved Gemini Code Assist comments — treats each one as a claim to verify, fixes only the genuinely-correct findings, and rebuts the rest with evidence instead of editing correct code."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Geminiloop
|
|
9
|
+
|
|
10
|
+
Drive a GitHub PR until Gemini Code Assist has no unresolved comments — **but do not cargo-cult
|
|
11
|
+
its suggestions.** Gemini is often confidently wrong. Every comment is a *claim to verify*, not an
|
|
12
|
+
instruction to obey. A wrong suggestion applied is worse than the comment itself.
|
|
13
|
+
|
|
14
|
+
## How Gemini differs from other review bots
|
|
15
|
+
|
|
16
|
+
- **No check-run, no score.** Gemini does not publish a `X/5` confidence or a `greptile` check. It
|
|
17
|
+
posts a **PR review** (state `COMMENTED`) authored by `gemini-code-assist[bot]` with a
|
|
18
|
+
`## Code Review` summary body plus inline review comments. Detection is by polling the *reviews*
|
|
19
|
+
endpoint, not a check-run. "Satisfied" = zero unresolved comments (each either fixed or rebutted),
|
|
20
|
+
since there is no numeric target.
|
|
21
|
+
- **Auto-reviews on push/open.** It reviews automatically when a PR opens or gets new commits;
|
|
22
|
+
`/gemini review` forces a fresh pass.
|
|
23
|
+
- **Severity, not confidence.** Inline comments carry a priority badge (a `![critical]` /
|
|
24
|
+
`![high]` / `![medium]` / `![low]` shields image) at the top of the body. Weight `critical`/`high`
|
|
25
|
+
seriously; treat `medium`/`low` as usually-skippable nits unless clearly correct.
|
|
26
|
+
- **Higher false-positive rate.** This is the whole point of the skill: bias toward *rebut* over
|
|
27
|
+
*change*.
|
|
28
|
+
|
|
29
|
+
## Not for
|
|
30
|
+
|
|
31
|
+
- GitLab / Perforce (Gemini Code Assist is GitHub-only). For other review bots this catalog ships
|
|
32
|
+
`codexloop`, `coderabbitloop`, and `qodoloop`; for CI failures rather than review comments, use
|
|
33
|
+
`ci-fix-loop`.
|
|
34
|
+
|
|
35
|
+
## 1. Identify the PR
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
gh pr view --json number,headRefName,headRefOid -q '{number,branch:.headRefName,head:.headRefOid}'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Switch to the PR branch if not already on it. Capture `OWNER`/`REPO` (`gh repo view --json owner,name`).
|
|
42
|
+
|
|
43
|
+
## 2. The loop (max 5 iterations)
|
|
44
|
+
|
|
45
|
+
Keep an explicit iteration counter and stop at 5 — the cap is a real bound to enforce, not a
|
|
46
|
+
figure of speech. Each pass through A–G is one iteration; on hitting the cap, go straight to the
|
|
47
|
+
report and list what is still unresolved rather than starting a sixth.
|
|
48
|
+
|
|
49
|
+
### A. Ensure a fresh Gemini review on the current head
|
|
50
|
+
|
|
51
|
+
Gemini auto-reviews new commits, but force a deterministic pass and record the head SHA:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
HEAD_SHA=$(gh pr view <PR> --json headRefOid -q .headRefOid)
|
|
55
|
+
# Only trigger if no gemini review already exists for this exact SHA:
|
|
56
|
+
HAVE=$(gh api repos/{owner}/{repo}/pulls/<PR>/reviews --paginate \
|
|
57
|
+
--jq "[.[] | select(.user.login==\"gemini-code-assist[bot]\" and .commit_id==\"$HEAD_SHA\")] | length")
|
|
58
|
+
if [ "$HAVE" = "0" ]; then gh pr comment <PR> --body "/gemini review"; fi
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Poll for the review of THIS head to land. No check-run exists, so poll the reviews endpoint — and
|
|
62
|
+
poll it on a **deadline**, never `while true`: a review that never arrives must end the skill with
|
|
63
|
+
an honest timeout, not hang it.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# 10-minute deadline, one retry, then give up.
|
|
67
|
+
wait_for_review() { # $1 = attempt label
|
|
68
|
+
local deadline=$(( SECONDS + 600 ))
|
|
69
|
+
while [ "$SECONDS" -lt "$deadline" ]; do
|
|
70
|
+
R=$(gh api repos/{owner}/{repo}/pulls/<PR>/reviews --paginate \
|
|
71
|
+
--jq "[.[] | select(.user.login==\"gemini-code-assist[bot]\" and .commit_id==\"$HEAD_SHA\")] | last")
|
|
72
|
+
if [ -n "$R" ] && [ "$R" != "null" ]; then return 0; fi
|
|
73
|
+
echo "waiting for Gemini review of $HEAD_SHA ($1)..."; sleep 15
|
|
74
|
+
done
|
|
75
|
+
return 1
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if ! wait_for_review "first wait"; then
|
|
79
|
+
echo "no Gemini review after 10m — retrying once" # say the retry out loud
|
|
80
|
+
gh pr comment <PR> --body "/gemini review"
|
|
81
|
+
if ! wait_for_review "after retry"; then
|
|
82
|
+
echo "Gemini did not review $HEAD_SHA after a retry; stopping and reporting."
|
|
83
|
+
exit 1 # honest timeout, never a success claim
|
|
84
|
+
fi
|
|
85
|
+
fi
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Report the retry in the final summary; two silent timeouts are the failure mode this guard exists
|
|
89
|
+
to prevent.
|
|
90
|
+
|
|
91
|
+
### B. Fetch the findings
|
|
92
|
+
|
|
93
|
+
- **Summary** (the `## Code Review` body): the review `.body` from the object above — read the
|
|
94
|
+
overall take and the severity spread.
|
|
95
|
+
- **Unresolved inline comments** on the current head:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
gh api repos/{owner}/{repo}/pulls/<PR>/comments --paginate \
|
|
99
|
+
--jq '.[] | select(.user.login=="gemini-code-assist[bot]") | {id, path, line, body}'
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Also pull the review threads + their resolved state via GraphQL (see step F) so you only act on
|
|
103
|
+
unresolved ones.
|
|
104
|
+
|
|
105
|
+
### C. Critically evaluate EACH comment (the core of this skill)
|
|
106
|
+
|
|
107
|
+
For every comment, **verify the claim against the actual code and repo conventions before touching
|
|
108
|
+
anything.** Read the file, the surrounding code, the types, and any call sites. Then classify:
|
|
109
|
+
|
|
110
|
+
1. **CORRECT + actionable** — the finding is real and the fix improves the code. → fix it (step D).
|
|
111
|
+
2. **FALSE POSITIVE / technically wrong** — the claim doesn't hold. → do **NOT** change code; write a
|
|
112
|
+
specific, evidence-based reply (cite the exact code/line/behavior that disproves it), then resolve.
|
|
113
|
+
3. **Valid but out-of-scope / stylistic nit** that conflicts with repo convention or the PR's intent
|
|
114
|
+
→ briefly decline with a reason, then resolve. Do not expand the PR's scope to satisfy a nit.
|
|
115
|
+
|
|
116
|
+
**Hard rules:**
|
|
117
|
+
- **Never modify correct code just to silence Gemini.** Prefer a reasoned rebuttal.
|
|
118
|
+
- When uncertain whether a claim holds, **investigate** (read more code, run the type-checker / tests)
|
|
119
|
+
rather than assume Gemini is right. Default to skepticism.
|
|
120
|
+
- If a suggested change would break other call sites, alter public behavior, or contradict a verified
|
|
121
|
+
repo convention, it is a category-2 rebuttal, not a fix.
|
|
122
|
+
- Never fabricate identifiers to satisfy a comment (e.g. a Linear/ticket prefix). If Gemini asks for a
|
|
123
|
+
ticket reference and none exists, say so; do not invent one.
|
|
124
|
+
|
|
125
|
+
**Gemini's common failure modes to watch for (default these to category 2):**
|
|
126
|
+
- Hallucinated APIs, options, or framework behavior stated as fact.
|
|
127
|
+
- "Add a null/undefined check" where the type already guarantees presence.
|
|
128
|
+
- Suggestions that compile-break or break other callers.
|
|
129
|
+
- Security/perf warnings with no actual exploit path or measurable cost.
|
|
130
|
+
- Restating library/framework semantics incorrectly.
|
|
131
|
+
- Style demands that contradict the repo's existing, consistent pattern.
|
|
132
|
+
|
|
133
|
+
### D. Apply fixes — category 1 only
|
|
134
|
+
|
|
135
|
+
Make the minimal correct change. Re-run the local gate if the repo has one (typecheck/tests) before
|
|
136
|
+
moving on.
|
|
137
|
+
|
|
138
|
+
### E. Commit and push FIRST, before resolving anything
|
|
139
|
+
|
|
140
|
+
Order matters. A resolved thread is a claim that the fix is on the branch, so the push has to
|
|
141
|
+
succeed before the claim is made — otherwise a failed commit or push leaves the PR unfixed with the
|
|
142
|
+
finding marked resolved, and nobody looks at it again.
|
|
143
|
+
|
|
144
|
+
If step D changed code:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Stage ONLY the files your fixes touched — never `git add -A`, which sweeps up
|
|
148
|
+
# unrelated work and untracked secrets sitting in the worktree.
|
|
149
|
+
git status --short # look before you stage
|
|
150
|
+
git add <path> [<path>...] # the files named in the findings you fixed
|
|
151
|
+
git commit -m "address gemini review feedback (geminiloop iteration N)"
|
|
152
|
+
git push
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Author the commit per the repo's norms (e.g. the user's identity; no AI attribution if that is the
|
|
156
|
+
convention). Confirm the push actually landed before continuing:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
git rev-parse HEAD
|
|
160
|
+
gh pr view <PR> --json headRefOid -q .headRefOid # must match
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
If they differ, stop: the fix is not on the PR, so nothing may be resolved yet.
|
|
164
|
+
|
|
165
|
+
### F. Reply to and resolve every addressed thread
|
|
166
|
+
|
|
167
|
+
Only now, with the fixes pushed, reply and resolve. Fetch unresolved threads, **following
|
|
168
|
+
pagination** — a PR with more than 100 threads will otherwise look clean while unresolved findings
|
|
169
|
+
sit on page two:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Loop until hasNextPage is false, passing endCursor back in as $cursor.
|
|
173
|
+
CURSOR=null
|
|
174
|
+
while : ; do
|
|
175
|
+
PAGE=$(gh api graphql -F cursor="$CURSOR" -f query='
|
|
176
|
+
query($cursor: String) {
|
|
177
|
+
repository(owner: "OWNER", name: "REPO") {
|
|
178
|
+
pullRequest(number: PR_NUMBER) {
|
|
179
|
+
reviewThreads(first: 100, after: $cursor) {
|
|
180
|
+
pageInfo { hasNextPage endCursor }
|
|
181
|
+
nodes { id isResolved comments(first: 1) { nodes { databaseId author { login } path body } } }
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}')
|
|
186
|
+
echo "$PAGE" # collect nodes from every page before deciding the PR is clean
|
|
187
|
+
PI='.data.repository.pullRequest.reviewThreads.pageInfo'
|
|
188
|
+
[ "$(echo "$PAGE" | jq -r "$PI.hasNextPage")" = "true" ] || break
|
|
189
|
+
CURSOR=$(echo "$PAGE" | jq -r "$PI.endCursor")
|
|
190
|
+
done
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Reply on a thread's comment via `gh api repos/{owner}/{repo}/pulls/<PR>/comments -f body="..." -F in_reply_to=<comment_id>`,
|
|
194
|
+
then resolve:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "THREAD_ID"}) { thread { isResolved } } }'
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Resolve a thread only for comments authored by `gemini-code-assist[bot]` that you have fixed or
|
|
201
|
+
rebutted — never blanket-resolve, and never resolve a human reviewer's thread.
|
|
202
|
+
|
|
203
|
+
Threads you are **rebutting** need no push, so they may be replied to and resolved regardless of
|
|
204
|
+
whether step D changed code.
|
|
205
|
+
|
|
206
|
+
### G. Re-review
|
|
207
|
+
|
|
208
|
+
Pushing re-triggers Gemini automatically; go back to **A** with the new head SHA. If step D changed
|
|
209
|
+
nothing (all comments were rebutted), skip the push, ensure all threads are resolved, and exit.
|
|
210
|
+
|
|
211
|
+
## 3. Exit conditions
|
|
212
|
+
|
|
213
|
+
Stop when **any** is true:
|
|
214
|
+
- Zero unresolved `gemini-code-assist[bot]` comments remain, and every comment this round was fixed
|
|
215
|
+
or rebutted+resolved. (There is no score to hit — this is "done".)
|
|
216
|
+
- Max iterations (5) reached — report what remains.
|
|
217
|
+
|
|
218
|
+
## 4. Report
|
|
219
|
+
|
|
220
|
+
```text
|
|
221
|
+
Geminiloop complete.
|
|
222
|
+
PR: #<n>
|
|
223
|
+
Iterations: N
|
|
224
|
+
Comments fixed: N (genuinely-correct findings)
|
|
225
|
+
Comments rebutted: N (false positives / nits, resolved with rationale)
|
|
226
|
+
Remaining: 0
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
If it stopped at max iterations, list the remaining threads with your current assessment
|
|
230
|
+
(fix-pending vs disputed) so a human can arbitrate.
|