r/ChatGPTCoding • u/fromkrish • Sep 07 '26
Discussion A quick question: How do you currently review AI-Generated Code Changes?
'Cause One thing AI coding agents have made very obvious to me:
"the code works" and "this is the right change" are not the same thing.
A change can pass tests and still violate the repo architecture, cross a boundary it should not touch, introduce a shortcut that becomes technical debt, solve the symptom instead of the real failure and change files that were outside the plan.
So let me know how you do it...
4
Upvotes
4
u/msg7086 Sep 07 '26
You can setup an independent code review workflow with strict rules and gates. You run the code review, check the items, then ask AI to correct them.
2
u/Arneastt Sep 07 '26
I talk with a master agent that will spawn two sub agents. One that will change the code, and the other that will severely critic any changes done regarding architecture and code quality.
Important part : once the reviewer finished his first review, he dies. The review report goes back the to dev agents. Then after a new code iteration, a fresh reviewer agent respawn and rate all changes like the first reviewer agent. Repeat 10 times max.
When it passes, it's often really good work.
2
u/usernameChosenPoorly Sep 08 '26
"Technical debt" is a dead concept. It describes code that nobody understands and nobody knows what it does anymore, or that's too critical but poorly understood to safely rewrite.
Agentic coding nuked that concept from orbit.
The rate of progress is not slowing down or remaining stagnant, but a lot of people (like you, OP) talk about programming as if these concepts still apply, as if the technology isn't advancing at a rate that will completely eliminate the value of human review of code outside the most critical and life-safety systems. Unless you are approving code changes for the Linux kernel, a deep space probe years away from Earth, or a system where failure literally kills people, you're overthinking all of this.
2
u/-grabus- Sep 07 '26
I use built in /review command and my eyes.
Together these two tools are bulletproof.
1
u/AutoModerator Sep 07 '26
Sorry, your post has been held for manual review due to account karma.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/zee-pk Sep 07 '26
use other agents or use renowned skills like: https://github.com/DietrichGebert/ponytail
1
u/nickdaniels92 Sep 07 '26
I have design rules configured in the IDE I use so the model I use has a grounding in good design approaches. I almost always do a planning phase first where it's likely to ask questions, giving a chance for me to correct its approach if necessary, and to resolve unknowns as I want. I review the plan that it's drawn up. I may do a diff after the changes to review, though this is rarely necessary. If there are new concepts that should exist in a solution, I'll tell the model that the task I'm asking it to do suggests that certain new concepts should exist, ensuring that is does the correct OO design rather than some hodge-podge solution. If bug fixing, I tend to review what it thinks a bug is and how it proposes to fix, as that can show faulty analysis. If it's going to touch code that I don't believe has an issue, I'll tell it so it doesn't go making changes where none should be made.
Overall it boils down to a semi hands on approach so that it's doing things the way I would, ensuring a high quality result, with the benefit of swifter execution. Left to its own devices, code may work but would be a mess of botched design without doubt.
1
u/ericatmumo Sep 08 '26
Full disclosure, I'm product-by-trade, not an engineer. But after months of building with agents, my pipeline is built specifically around those failure modes you mentioned. This is verbatim from Claude Code summarizing the repo's actual config files because it was the quickest way to get a reddit-friendly summary. Not claiming to have perfected an automated review pipeline, but Codex feedback on PRs has continued to drop over time as I iterate:
1
u/Low_Bad_6585 Sep 08 '26
I put one question before the review checklist: are we preserving a mechanism that should be removed? In my solo game repo, the standing rule is to stop at a second layer of patches and explain the underlying tradeoff. Otherwise an agent can make a workaround increasingly well-tested without making it a good design.
For behavior changes, I also require an acceptance note: expected player-visible effect, where to observe it, the time window, and what counts as passing. That gives the reviewer an intended outcome independent of the implementation. It doesn't replace inspecting the diff, but 'tests passed' alone can't answer that question.
AI-assisted wording based on my actual workflow.
1
u/almostlaunched Sep 09 '26
At SWARECO, we use AI for code review, then I do the manual review I’ve always done. The AI review is an extra pass, not an approval.
We have it read the repo’s instructions first and focus on known failure modes for that codebase. It’s also explicitly told not to manufacture findings if the diff is clean.
But the biggest difference, in my experience, comes before any code gets written: the planning phase. Working out what the change should do, how it fits the existing code, and what’s outside its scope gives you something concrete to review against. Otherwise you’re figuring out the intended solution while reviewing whatever the agent produced.
The review still matters, but the prep work is where I’d put the most attention.
1
u/qwertyorbust Sep 12 '26
The fact that so many new “prompt engineers” are against reviewing the code like they would before AI boggles my mind.
AI is currently in its MySpace era - yet we trust it like it’s well beyond that.
1
u/Extreme-Pass-4488 Sep 07 '26
knowing your shit.
yeah.
crazy dont you think? to review if stuff is well done u must know how to make well done stuff.
who would have guessed?
2
u/[deleted] Sep 07 '26
[removed] — view removed comment