logoalt Hacker News

julianlamyesterday at 6:17 PM1 replyview on HN

I always thought it was a little weird that LLMs aren't sophisticated enough to surgically edit files as needed.

For example, if there is a code block that needs to be wrapped within another function call, it'll rewrite the entire function call and you'll just have to pray that the re-written code block wasn't subtly changed.

I _think_ so far it hasn't introduced any changes....


Replies

andrewljohnsonyesterday at 6:25 PM

You can just look at the diff when you do a pull request, no prayer needed, and if you want it to be “surgical” in that way, your prompt (and agents.md) can be specific.

You can also unit test the function to better assure behavior didn’t change.

show 1 reply