Replies: 1 comment
|
coming back to this late, sorry. Short version: keep it in Go, no rework needed. I answered both questions on the PR thread before merging, so this is mostly me closing the loop here. Since then #428 pushed the same decision further in the same direction: the no-delegation line had to go into on the churn question, I went back and counted across my own progress logs in this repo: 46 review-loop terminations, 44 of them the clean zero-findings exit, 2 on the HEAD-unchanged guard, none hit max iterations. So the mechanism you describe is real but much rarer here than "can feed the loop indefinitely" suggests. Worth correcting one detail in the cost model too: the 5-agent pass runs once and never loops, the looped prompt is the one thing you raised that I hadn't dealt with is discoverability. |
Uh oh!
There was an error while loading. Please reload this page.
Up front: this is a suggestion, nothing more. If the direction doesn't fit how you want the defaults to behave, feel free to reject the PR — no hard feelings, and the per-file override mechanism means I can carry these in my own config anyway.
I opened #414 after going down a rabbit hole with the five default agent prompts. It started as "let me tune these for my repo" and turned into reading how
expandAgentReferencescomposes them and whatreview_first.txt/review_second.txtactually expect back. The PR description lists the individual edits; this is the reasoning that ties them together, which felt too long for a PR body.The core observation: in ralphex's loop, a weak finding is not free. Every finding gets verified by the parent at file:line, every confirmed one gets fixed, and any fix forces another full review iteration —
REVIEW_DONEonly fires on a zero-findings pass. So the cost of one speculative or out-of-scope finding isn't a bad line in a report, it's potentially a whole extra 5-agent iteration. That reframes what these prompts should optimize for: not "find as much as possible" but "find only what you can defend, inside the diff, and say clearly when there's nothing."Measured against that, a few things stood out:
NO ISSUES FOUNDconvention already exists for external reviewers; the spawned agents just never adopted it.The smaller edits (severity fields, de-overlapping quality vs simplification, the testing prompt's location field not being able to express its own primary finding type) all fall out of the same lens.
Besides the unit tests, I smoke-tested the branch end-to-end with
scripts/internal/prep-toy-test.sh(haiku for task + review models, external review off): clean reviewers actually used theNO ISSUES FOUNDsentinel, the second pass discarded a minor finding on severity grounds and emittedREVIEW_DONE, all fixes stayed parent-authored, and the loop converged and exited 0. A toy repo is not proof, but nothing broke.One judgment call worth flagging separately: I put the shared contract lines (scope / read-only / sentinel) into
reviewContextInstructionin Go rather than into each txt file, on the theory that user custom agents inherit the same gaps and the lead-in is the one place that covers them all. The counter-argument is real though — it makes the contract invisible to people reading the txt files and non-overridable without a rebuild. If you'd rather keep the Go side dumb and the contract in the txt files, I'm happy to rework the PR that way.Also curious whether the churn scenarios above match what you've seen in real runs, or whether in practice the models behave better than a literal reading of the prompts suggests.
All reactions