Ask HN: What tool/process do you use to understand code changes made by agents?

1 points by yangikan ↗ HN
I often feel out of control as the agents make a whole lot of changes to the code. What tools do you use to understand the code changes and to accept/reject the changes.

3 comments

[ 0.30 ms ] story [ 17.8 ms ] thread
I sometimes use the following prompt:

I want to review this branch, but I don't fully understand what the code actually does. Give me recursive multiple-choice options so I can indicate which part I would like an explanation of. For the selected part, also provide a review. Then give me additional multiple-choice options for explanations of even more detailed aspects of that part, where possible. Continue this process until I indicate that I understand everything.

I think you need to catch a lot of it before it becomes a PR. Spend a lot of time teaching the agents how you code in your prompts, AGENTS.md files, etc. Make sure they know what your desired architecture is, how you want them to talk to you, how to identify and speak to their perceived blast radius, what kind of documentation you like, and so on. So when something an agent wrote does come to your desk for review, you can optimize your time/impact. I find it's a lot harder to get an understanding after the fact.

After that, I suspect a lot of people already are familiar with the https://github.com/cursor/plugins/tree/main/pstack skills, but in case you aren't they can be a good starting point. The `blast-radius`, `how`, `interrogate`, and several of the `principle-` may be interesting if you haven't already looked at this.

There are some types of reviews I find models don't do a great job at: architecture reviews (things can get too complex for them to grasp), security reviews (they get cagey thinking you're a wrong-doer), UI/UX design (they're getting better, but still most models are pretty bad). There are some dedicated tools in several of these types of "models are bad at it/unwilling" areas if you find you're often finding 1 particular part of reviews difficult and pre-prompting isn't helping.