logoalt Hacker News

iambenmtoday at 4:57 PM1 replyview on HN

First, cloning a repo doesn't bring the hooks with it - so it's not just as simple as saying "use git hooks".

Second, if the repo had hooks and instructions for the LLM or user to blindly install/enable the hooks, we'd instead be complaining about security risks and what might happen if the repo is compromised at some point in the future.

Third, sometimes you don't want to mechanically enforce things via git hooks because it impacts your use when what you're really trying to codify and enforce are the LLM's actions. In that case you can enforce mechanically via hooks at the harness level.

And finally, git hooks are a great solution for upstream repositories to enforce quality and protect branches. But it means that the upstream is the one running the checks. It makes the upstream a potential bottleneck - better to have the leaf nodes run the checks locally and fix any issues before pushing it upstream rather than push upstream, wait for results, make changes, push upstream, wait for results, make changes.


Replies

vhantztoday at 7:09 PM

First, I'm SURE there are ways to send scripts from one computer to another over the internet.

Second, the point isn't about a specific repo, it's the general tendency to rely on fuzzy .md files scattered all over the place. And I really don't see how letting the output of a language model run a one time command is more secure than running a script.

Third, "nothing applies in all context"? Yeah, obviously. And harness hooks (at least with Claude code) are still more suggestions than anything else. The only way I've found is literally rejecting a tool use and forcing it to recall in the proper way, which of course makes for more token usage. I wonder who benefits from that.

Finally, no idea what you are arguing against. Use git hooks where they make sense, local or remote.