f-greploop
Skill14 starsChanged 20 days agoMITView on GitHub
Take an open PR through Greptile the Topping Out way: ask Greptile to review it, adjudicate its findings, have the builder fix what's accepted by work order, re-run the tests and the acceptance ledger, push on the owner's grant, and ask again. At most three rounds, then stop for the owner. Runs on every PR, right after it opens and before "merge" (the word that opened the PR covers it); also when the owner says "greploop" or types /f-greploop <PR> (the same word: one more round). Not the lens inspection (f-inspect) or the independent inspection (xreview); never merges.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/llms-full.txtllms.txt
- docs/llms.txtllms.txt
- adjudicateSkill
- agent-councilSkill
- converseSkill
- f-archive-searchSkill
- f-archiveSkill
- f-blueprintSkill
- f-boardSkill
- f-cardSkill
- f-catchupSkill
- f-complySkill
- f-contextSkill
- f-distillSkill
- f-dreamSkill
- f-inspectSkill
- f-night-shiftSkill
- f-plancheckSkill
- f-scheduleSkill
- f-searchSkill
- f-setupSkill
- f-shiftSkill
- f-signoffSkill
- f-sketchSkill
- f-statusSkill
- f-surveySkill
- model-councilSkill
- orca-pi-connectSkill
- pack-reviewSkill
- speakSkill
- xreviewSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
Use @greptile review (wrong mention) or the Greptile CLI.
- Distinctive: line 55
Only noise or rejected findings, and not 5/5: record why, and go to the round limit below.
- Distinctive: line 57
Re-run at the new head: all captures, the probe harness, both base-vs-head runs (through the repo's test adapter), then update the …
- Distinctive: line 59
Round limit: after round 3, stop and hand over to the owner with the score of each round, the findings still open, the commits each round …
- Very specific: line 65
Read the PR body, the final diff (gh pr diff <PR>) and the final gate outputs.
- Distinctive: line 66
Every claim in the body must be true of that diff: what changed (the Greptile repair commits included), the proof run at the final head …
- Distinctive: line 68
Only then tell the owner the PR is ready for their "merge".
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Topping Out: Greptile rounds
The third review of a job, and the only one on the open PR. It runs after the owner's "open the PR" and before "merge" (METHOD.md §10 step 2a). Greptile reads the PR and gives a confidence score out of 5; the goal is 5/5.
Greptile reads; it doesn't run anything. So a fix made to satisfy it can score 5/5 and still break a test or undo a requirement. Every round that changes code therefore re-runs the mechanical checks (tests, base-vs-head, the acceptance ledger) before the push. The inspections don't need re-running.
The owner's grant
This skill runs on every PR, right after it opens: the owner's word that opened the PR (or an autonomous run the owner started, directly or through a night shift, RULES.md "The one exception"; the goal's words are in the job file) also authorises, for this PR only, for at most three rounds (RULES.md act 10):
- posting
@greptileai reviewon the PR, once per round; - pushing reviewed repair commits to the PR's branch (normal push, never force).
It authorises nothing else: no merge, no tracker transition, no other branch, no comment other than the review request and one reply on the thread of each routed finding (step 5). A fourth round needs the owner's word "greploop".
Never
- More than three rounds without the owner. After round 3, stop and hand over, whatever the score.
- Fix code itself. The builder fixes, from test-first repair work orders; the foreman reviews them like any work order.
- Push a head whose tests, base-vs-head or ledger aren't green.
- Resolve a Greptile thread: the grant doesn't cover it. Threads stay as they are; the round record says which are fixed and by which commit. Never dismiss a finding as noise without saying so in the round record.
- Change a locked decision, the constitution or a requirement to satisfy Greptile. That's a halt: tell the owner.
- Use
@greptile review(wrong mention) or the Greptile CLI; the trigger is the comment@greptileai review, exactly. - Merge. Merge is always the owner's separate word.
Each round (1 to 3)
First, the job file: ls foreman/jobs/JOB_*_<slug>.md must list exactly one file. None means this isn't a job yet (RULES.md rule 15): stop and say so; the job starts with work order 1, which writes it. A late job file needs the owner's word and states its gaps.
- Pin the head.
gh pr view <PR> --json headRefOidmust equal the job's final head (the head the acceptance ledger passed). If Greptile has already reviewed this head, don't ask again (don't spend a credit): take that review straight to step 3, and its findings through step 5 like any other. - Ask for the review:
gh pr comment <PR> --body "@greptileai review"(unless a Greptile review of this head is already pending). Ask in round 1 too: on some repos Greptile doesn't review a newly opened PR on its own. - Wait for it with the bundled waiter, never a hand-rolled loop:
node <skills>/f-greploop/greptile-wait.mjs --pr <PR> --head <pinned head> [--timeout 600]. It counts either a Greptile review of this head or its summary comment (Greptile edits that comment on a re-review) naming this head, and reads the score from it. Exit 0: the score, as JSON. Exit 2: no review after 10 minutes: halt and tell the owner. Exit 3: a read failed: that's an error, never "no review yet". Never invent a score.--self-testchecks the waiter offline. - Read the score (
N/5) and every finding. Record them in the round table (below). A comment created before this round's request is carried, not new, even when GitHub re-anchors it onto the new head: compare itscreated_atwith this round's request. - The score never skips step 5. A 5/5 review can still carry findings; each one is adjudicated like any other.
- Adjudicate every finding (
templates/ADJUDICATION.md, round "Greptile N"): reproduce it against the code at the pinned head, then accept, reject (with the evidence), partly accept, or route (below).- A finding that would need a locked decision, the constitution or a requirement changed: halt, show the conflict.
- A security or concurrency finding that holds: accepted, and after the fix it goes back to the independent reviewer for a final-diff acknowledgment before merge (
RULES.md"never sign off your own repair"). - Routed: a finding whose fix needs a file outside the ticket (act 8), and that isn't a security or concurrency defect in this diff, is disposed of in the round it appears as
routed to <board id>(an existing job's notes, or a new board entry viaadd), with one reply on its thread saying where it went. A routed finding needs no repair. - Exit on 5/5 only when every finding of this round has a recorded disposition and no accepted finding still needs a repair. Then go to the description check. Under 5/5 only because of routed findings (every finding still open is routed): exit to the description check too; the PR body's review record gives the score and the routing. In an autonomous run that is not the "under 5/5" stop.
- Only noise or rejected findings, and not 5/5: record why, and go to the round limit below. Don't loop on noise.
- Repairs: accepted findings go to the builder as test-first repair work orders (
templates/WORK-ORDER.txt); the foreman reviews each one. - Re-run at the new head: all captures, the probe harness, both base-vs-head runs (through the repo's test adapter), then update the acceptance ledger. Anything red: halt; don't push red.
- Push the repair commits to the PR branch (under the grant). Confirm the remote head moved (
git ls-remote <remote> refs/heads/<branch>= the new head). The new head is now the final head: write it into the job file's header (Final head) and into Phase 7, then re-run the blank check (METHOD.md§10 step 1: the header and Phases 1-7, outside code spans; the merge line waits for the merge). - Round limit: after round 3, stop and hand over to the owner with the score of each round, the findings still open, the commits each round added, and the PR link. The owner decides: merge as is, "greploop" for one more round, or rework.
Before merge: the PR description check (every PR)
Whether Greptile reached 5/5 in one round or three (and in every job, Greptile or not; METHOD.md §10 step 2b):
- Read the PR body, the final diff (
gh pr diff <PR>) and the final gate outputs. - Every claim in the body must be true of that diff: what changed (the Greptile repair commits included), the proof run at the final head (the real outputs, not earlier ones), the review record (each Greptile round's score and dispositions), and no builder names.
- Rewrite whatever is stale (
gh pr edit <PR> --body-file <file>: this edit is covered by the owner's "open the PR" word for this PR's body). Never leave a body that describes an earlier diff. - Only then tell the owner the PR is ready for their "merge".
Round record (in the job record, Phase 6)
| Round | Head | Score | Findings | Accepted | Repair work orders | Re-run + ledger | Pushed |
| 1 | /5 |
Output
The PR link, the rounds used (never more than three), each round's score, the findings accepted and rejected with reasons, the commits each round added, whether the ledger passed at the final head, the result of the description check (unchanged and verified, or rewritten), and either 5/5, ready for your "merge", N/5 with only routed findings open (listed), ready for your "merge", or stopped after round N: your call. Never merge.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

