{
  "description": "Cottage safety hooks for Codex sessions.",
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "ctg clean -qqq",
            "timeout": 30,
            "statusMessage": "Cleaning decrypted cottage secrets"
          }
        ]
      }
    ],
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "ctg clean -qqq",
            "timeout": 30,
            "statusMessage": "Cleaning decrypted cottage secrets"
          }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "^(Bash|apply_patch|Edit|Write)$",
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"$(git rev-parse --show-toplevel)/.codex/hooks/deny-ctg.py\"",
            "timeout": 5,
            "statusMessage": "Checking cottage command policy"
          }
        ]
      }
    ]
  }
}
