]> git.ekhem.eu.org Git - guix.git/commit
[ai] Replace guard-commands with block-builds, block, and create hooks.
authorJakub Czajka <jakub@ekhem.eu.org>
Mon, 6 Jul 2026 10:23:44 +0000 (12:23 +0200)
committerJakub Czajka <jakub@ekhem.eu.org>
Tue, 7 Jul 2026 21:37:07 +0000 (23:37 +0200)
commit1adc389af8342b9b3c91c4de7d130adad6108877
treed92266d7f82e549130594713b387c5232b233821
parentdf33d948cd061d6c3821c74b808f2e1f9a63d323
[ai] Replace guard-commands with block-builds, block, and create hooks.

Splits the monolithic guard-commands hook into three single-purpose
hooks with more granular matchers in settings.json.

block-builds:
Guards guix and make build/reconfigure commands. Asks on main,
denies in for destructive operations (reconfigure,
home-*, system-*).

block:
Denies git checkout/switch outright. Enforces Enter
(must not already be in a ) and Exit (must not
have unpushed commits diverging from main). Sends a desktop
notification on Enter success.

create:
Uses a universal matcher ("*") to deny all tool calls on main
unless already inside the session's . Allows
Enter through to let the user enter an isolated session.
.claude/hooks/block-builds [new file with mode: 0755]
.claude/hooks/block-worktrees [new file with mode: 0755]
.claude/hooks/create-worktree [new file with mode: 0755]
.claude/hooks/guard-commands [deleted file]
.claude/settings.json
README