]> 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>
Fri, 17 Jul 2026 13:47:16 +0000 (13:47 +0000)
commit75dd09077684bdbcc7bcfb2896efec70e074f559
tree2b4d52be3f6abf113c09f733a86ca149d3ad1baf
parentdaa76fbd54421c8e9a9d9228f97de3a329003c21
[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/guard-commands [deleted file]
README