{
  "version": "fak-policy/v1",

  "allow": [
    "Bash",
    "BashOutput",
    "KillShell",
    "PowerShell",
    "Read",
    "Edit",
    "Write",
    "NotebookEdit",
    "Glob",
    "Grep",
    "LS",
    "TodoWrite",
    "Task",
    "WebFetch",
    "WebSearch",
    "ExitPlanMode",
    "Skill",
    "SlashCommand",

    "Agent",
    "AskUserQuestion",
    "EnterPlanMode",
    "Monitor",
    "ScheduleWakeup",
    "SendMessage",
    "TaskCreate",
    "TaskGet",
    "TaskList",
    "TaskOutput",
    "TaskStop",
    "TaskUpdate",
    "ToolSearch",
    "ListMcpResourcesTool",
    "ReadMcpResourceTool",
    "ReadMcpResourceDirTool",

    "Workflow",
    "EnterWorktree",
    "ExitWorktree",
    "CronCreate",
    "CronList",
    "CronDelete",
    "PushNotification",
    "RemoteTrigger",
    "DesignSync",

    "mcp__dos__dos_verify",
    "mcp__dos__dos_arbitrate",
    "mcp__dos__dos_recall",
    "mcp__dos__dos_review",
    "mcp__dos__dos_status",
    "mcp__dos__dos_doctor",
    "mcp__dos__dos_answer",
    "mcp__dos__dos_check_reason",
    "mcp__dos__dos_refuse_reasons",
    "mcp__dos__dos_commit_audit",
    "mcp__dos__dos_citation_resolve",
    "mcp__dos__acme_lane_hint",

    "bash",
    "read",
    "write",
    "edit",
    "multiedit",
    "patch",
    "apply_patch",
    "grep",
    "glob",
    "list",
    "ls",
    "webfetch",
    "todowrite",
    "todoread",
    "task",
    "skill",
    "lsp"
  ],

  "allow_prefix": [
    "read_",
    "get_",
    "search_",
    "list_",
    "lookup_",
    "find_"
  ],

  "arg_rules": [
    { "tool": "Bash", "arg": "command", "deny_regex": "\\brm\\s+-[A-Za-z]*[rRfF]", "reason": "POLICY_BLOCK" },
    { "tool": "Bash", "arg": "command", "deny_regex": "\\bsudo\\b", "reason": "POLICY_BLOCK" },
    { "tool": "Bash", "arg": "command", "deny_regex": "\\bmkfs\\b|\\bdd\\s+if=|>\\s*/dev/sd", "reason": "POLICY_BLOCK" },
    { "tool": "Bash", "arg": "command", "deny_regex": ":\\(\\)\\s*\\{", "reason": "POLICY_BLOCK" },
    { "tool": "Bash", "arg": "command", "deny_regex": "\\b(curl|wget)\\b[^|]*\\|\\s*(sudo\\s+)?(ba)?sh\\b", "reason": "POLICY_BLOCK" },
    { "tool": "Bash", "arg": "command", "deny_regex": "\\bterraform(?:\\.exe)?\\b[^|;&\\n]*\\bdestroy\\b", "reason": "POLICY_BLOCK" },
    { "tool": "Bash", "arg": "command", "deny_regex": "-o\\s+\\.\\.[\\\\/]", "reason": "POLICY_BLOCK" },
    { "tool": "Bash", "arg": "command", "deny_regex": "--output[= ]\\s*\\.\\.[\\\\/]", "reason": "POLICY_BLOCK" },
    { "tool": "Bash", "arg": "command", "deny_regex": ">>?\\s*\\.\\.[\\\\/]", "reason": "POLICY_BLOCK" },
    { "tool": "Bash", "arg": "command", "deny_regex": "\\b(cp|mv|install|tee|rsync|ln)\\b[^|;&]*\\s\\.\\.[\\\\/]", "reason": "POLICY_BLOCK" },

    { "tool": "PowerShell", "arg": "command", "deny_regex": "(?i)\\bRemove-Item\\b[^|;\\n]*-(Recurse|Force)\\b", "reason": "POLICY_BLOCK" },
    { "tool": "PowerShell", "arg": "command", "deny_regex": "(?i)\\b(Format-Volume|Clear-Disk|Initialize-Disk|Clear-Content)\\b", "reason": "POLICY_BLOCK" },
    { "tool": "PowerShell", "arg": "command", "deny_regex": "(?i)\\b(Invoke-WebRequest|iwr|curl|wget|Invoke-RestMethod|irm)\\b[^|]*\\|[^|]*\\b(iex|Invoke-Expression)\\b", "reason": "POLICY_BLOCK" },
    { "tool": "PowerShell", "arg": "command", "deny_regex": "(?i)\\bStart-Process\\b[^|;\\n]*-Verb\\s+RunAs\\b", "reason": "POLICY_BLOCK" },
    { "tool": "PowerShell", "arg": "command", "deny_regex": "(?i)\\bterraform(?:\\.exe)?\\b[^|;&\\n]*\\bdestroy\\b", "reason": "POLICY_BLOCK" }
  ],

  "self_modify_globs": [
    ".git/",
    ".env",
    ".aws/",
    ".npmrc",
    ".netrc",
    "id_rsa",
    "id_ed25519",
    "/etc/"
  ],

  "redact_fields": [
    "password",
    "secret",
    "api_key",
    "token",
    "authorization"
  ]
}
