upvote
Generally, asking it to review will almost always find real issues without overblown severity. The key is that once the model ends the turn after delivering on a task, it won't do this audit by itself, but how you prompt it won't matter much, as long as you let it evaluate the work as an explicit task. I call these "audits" and do this constantly. This can be either a new session or the existing one, does not matter that much for the results, although I generally use clean sessions for this. One risk is them reading each others' scratch dirs, which can make the audit no longer fully independent.
reply
Yeah, the "review" cycle usually lasts a few turns, for me, too.

1. Ask for a precommit review, with a structured list of usual issues. Simultaneously, deploy a "you're responsible for the maintenance of this codebase" review agent, an adversarial review agent, and another agent.

2. Review the agents' findings, triage, confirm what's actually an issue. What is the issue, what are our options, what's modern best practice, what is the codebase precedent, what do our rules and ADR files say, what are the trade-offs, what do you suggest and why?

3. Manual review, pushback. Deploy another agent or two to review the potential issues and the suggested fix(es), especially if I feel a bit out my depth. Try doing "audits" in scratches, similar to what you do, it seems, where necessary.

4. Implement. Possibly return to a more limited step 1 if necessary.

I have the disadvantage of no formal programming training, but I do quite enjoy digging into architecture design and good and bad patterns and abstractions. It's working for me well so far, over a year into production of my work project. Fortunately I found my intuition about the data and DB modeling has been good, so it's been easy to expand things in that way.

Model capabilities have also grown as the complexity of that project has also grown, which has made keeping a linear velocity possible. It's very rewarding being able to allot as much time as I do to refactoring and cleaning up the codebase with time - I'm sure not everyone has that. It's probably the only thing keeping the project from feeling like slop.

reply
In my experience this has been increasingly essential for dealing with vibed PRs
reply
yea agree about code quality. When working on a big'ish code project (mostly ai coded), I will every few days stop and ask something along the lines of:

"Lets do a full code review, focus on logic issues, common gotchas wrt to (insert tech or library), code smells and errors. But first do some research on the latest gotchas and common errors wrt to <insert tech here>"

The above is not set in stone ofc, but something along those lines, and I switched between different models todo it, mostly Opus,Astra on med to high effort. YMMV

The main wins are todo it as a habit and every few days or X amount of features added. Being more specific helps like "focus on performance or code quality or errors etc"

reply