Feature request: Reviwing AI generaed code before integrating it in project

For human-maintained projects it would be helpful for AI code to live in a staging area until approved by the dev. It is easy enough to see what AI changed, but I have not found good tools to manage the process of inspecting the code it generates and approving it, particularly when the changes are more complex.

Workaround #1: Only ask AI for small contained changes. Drawbacks: not all changes fall in this category; token usage increases as you have to spin up AI over and over instead of providing it with a list of requests.

Workaround #2: Have a totally independent AI copy of the project. Synch both to the repository before any AI requests. Have AI change its copy. Examine the AI proposed modifications by opening a second CLion UI side by side with the one of the “real” project + external diff tool. Migrate changes manually as they pass your quality filter. Drawback: it is very clunky. 

EDIT: Right now working on a change that spans 20 files. Workaround #2 is kind of okay in this setting. Claude did mostly well. I'm still on file #3. I did find one meaningful defect. Otherwise small tweaks... early days :)

0
1 comment

This is a problem I have had as well, I often will push my current branch and create a new branch if I think AI will want to make significant changes. Allowing myself to later edit the changes as a PR.
Something automatic along these lines would be useful.

0

Please sign in to leave a comment.