From 189489e74736427a04dcebd5b9dddfa79ed5edaa Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sat, 8 Aug 2026 15:14:08 +0200 Subject: [PATCH] chore(claude): deny agent writes to the treesitter grammars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tools/ts-wasm/build.sh compiles straight out of the working trees under /var/mnt/data/projects/treesitter, so editing a grammar source or a highlights query silently changes the wasm and native artefacts. The divergence is invisible: treesitter is not itself a repo, so the cross-repo status sweeps report it as "not a git repo" and never descend into the ~49 sub-checkouts. A stray edit shows only in that one checkout's git status, which nothing routinely reads, and survives until someone re-clones. Guards the plausible accident — hand-editing a grammar while chasing a highlighting bug. It does not constrain Bash, so it is a guardrail against silent divergence rather than a hard boundary. Co-Authored-By: Claude Opus 5 (1M context) --- .claude/settings.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.claude/settings.json b/.claude/settings.json index ca9d1ffc..ad8060bf 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -39,6 +39,8 @@ "Bash(awk *)" ], "deny": [ + "Edit(//var/mnt/data/projects/treesitter/**)", + "Write(//var/mnt/data/projects/treesitter/**)", "Bash(rm -rf /*)", "Bash(rm -rf ~*)", "Bash(rm -rf $HOME*)",