From 974b98b6b29824c60ce10c62445b3132e6b475f0 Mon Sep 17 00:00:00 2001 From: Artem Sheremet Date: Fri, 27 Mar 2026 20:25:55 +0000 Subject: [PATCH] Add coding policy --- legacy/.gemini/policies/coding.toml | 78 ++++++++++++++++++++++++++ legacy/.gemini/policies/nix-build.toml | 7 ++- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 legacy/.gemini/policies/coding.toml diff --git a/legacy/.gemini/policies/coding.toml b/legacy/.gemini/policies/coding.toml new file mode 100644 index 0000000..a7b288e --- /dev/null +++ b/legacy/.gemini/policies/coding.toml @@ -0,0 +1,78 @@ +[[rule]] +toolName = "run_shell_command" +commandPrefix = "pre-commit run --all-files" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "run_shell_command" +commandPrefix = "grep" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "run_shell_command" +commandPrefix = "cat" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "run_shell_command" +commandPrefix = "git add" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "run_shell_command" +commandPrefix = "git status" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "run_shell_command" +commandPrefix = "mkdir" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "write_file" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "replace" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "google_web_search" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "glob" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "grep_search" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "run_shell_command" +commandPrefix = "tail" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "run_shell_command" +commandPrefix = "xxd" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "run_shell_command" +commandPrefix = "ls" +decision = "allow" +priority = 100 diff --git a/legacy/.gemini/policies/nix-build.toml b/legacy/.gemini/policies/nix-build.toml index 4f9b520..744ab02 100644 --- a/legacy/.gemini/policies/nix-build.toml +++ b/legacy/.gemini/policies/nix-build.toml @@ -6,6 +6,11 @@ priority = 100 [[rule]] toolName = "run_shell_command" -commandPrefix = "pre-commit run --all-files" +commandPrefix = "nix eval" decision = "allow" priority = 100 + +[[rule]] +mcpName = "nix" +decision = "allow" +priority = 500