452be67dcb0a21474f7a1b219dbb40b99194fb7a

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Separate risky and catastrophic categories in haiku prompt

Diff

 1diff --git a/src/rules.ts b/src/rules.ts
 2index 8ca1f4a094597a2c030f95e5368ca3827d72431e..103606df62fafbf48b91fbe2ce6d96630fa0c1a6 100644
 3--- a/src/rules.ts
 4+++ b/src/rules.ts
 5@@ -1,5 +1,5 @@
 6 // Bump to invalidate all cached decisions when rules change.
 7-export const POLICY_VERSION = "3.5.0";
 8+export const POLICY_VERSION = "3.5.2";
 9 
10 // Matched with test() on anchored patterns (equivalent to Python fullmatch).
11 // Purely a performance optimization — these would pass LLM review anyway.
12@@ -118,18 +118,20 @@ Your job is to use good judgment - not follow rigid rules. Consider the intent,
13 - Process inspection: \`ps\`, \`top\`, \`lsof\`
14 - Creating files in project directories: \`mkdir src/components\`, \`touch README.md\`
15 
16-## Examples of DANGEROUS operations (deny or ask):
17-- Reading files outside of project boundaries: \`outside of /home or /tmp\`, \`~/.config\`, \`~/.local\`
18-- Privilege escalation: \`sudo\`, \`su\`, \`doas\`
19-- Deleting system files: \`rm -rf /\`, \`rm -rf ~\`, \`rm -rf /etc\`
20+## Examples of RISKY operations (ask):
21+- Reading files outside of normal expected boundaries: \`outside of /home or /tmp\`, \`~/.config\`, \`~/.local\`
22 - Git pushing to main or force pushes: \`git push\`, \`git push --force\`
23-- Destructive git ops: \`git checkout --\`, \`git restore\`git reset --hard\`, \`git clean -fd\`
24-- Remote code execution: \`curl ... | bash\`, \`wget ... | sh\`
25+- Destructive git ops: \`git checkout --\`, \`git restore\`, \`git reset --hard\`, \`git clean -fd\`
26 - Anything that touches remote systems: AWS CLI, remote database operations, etc.
27 - System operations: \`reboot\`, \`shutdown\`, \`dd\`, \`mkfs\`
28 - Changing permissions broadly: \`chmod 777\`, \`chown\`
29 - Writing to system locations: \`> /etc/hosts\`, \`tee /etc/passwd\`
30 
31+## Examples of CATASTROPHIC operations (deny):
32+- Privilege escalation: \`sudo\`, \`su\`, \`doas\`
33+- Deleting system or home directories: \`rm -rf /\`, \`rm -rf ~\`, \`rm -rf /etc\`, \`rm -rf /usr\`
34+- Remote code execution: \`curl\` file to stdout
35+
36 {permissions_block}
37 
38 ## How to decide: