{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "_comment": "devAlice — Claude Code settings template. Copy to .claude/settings.json and adapt. See https://devalice.vercel.app/ai-agents/claude-code",

  "model": "claude-sonnet-4-6",

  "permissions": {
    "allow": [
      "Bash(git status:*)",
      "Bash(git diff:*)",
      "Bash(git log:*)",
      "Bash(git branch:*)",
      "Bash(git remote:*)",
      "Bash(ls:*)",
      "Bash(cat:*)",
      "Bash(head:*)",
      "Bash(tail:*)",
      "Bash(rg:*)",
      "Bash(jq:*)",
      "Bash(node --version:*)",
      "Bash(npm --version:*)",
      "Bash(pnpm --version:*)",
      "Bash(pnpm test:*)",
      "Bash(pnpm lint:*)",
      "Bash(pnpm build:*)"
    ],
    "deny": [
      "Bash(rm -rf /:*)",
      "Bash(sudo *)",
      "Bash(curl * | bash:*)",
      "Bash(curl * | sh:*)",
      "Bash(wget * | bash:*)",
      "Read(./.env)",
      "Read(./.env.*)",
      "Read(./secrets/**)",
      "Read(./**/id_rsa)",
      "Read(./**/id_ed25519)"
    ]
  },

  "env": {
    "EDITOR": "code --wait"
  },

  "hooks": {
    "SessionStart": [
      {
        "matcher": "startup",
        "hooks": [
          {
            "type": "command",
            "command": "printf '[Session start] %s\\nBranch: %s\\nStatus: %s\\n' \"$(date '+%F %T')\" \"$(git branch --show-current 2>/dev/null || echo none)\" \"$(git status -s 2>/dev/null | wc -l | xargs) changes\""
          }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "Write|Edit",
        "hooks": [
          {
            "type": "command",
            "command": "jq -r '.tool_input.file_path // empty' | grep -qE '(^|/)\\.env(\\.|$)|/secrets/|/id_(rsa|ed25519)$' && { echo 'BLOCKED: secret file write'; exit 2; } || exit 0"
          }
        ]
      }
    ]
  },

  "mcpServers": {
    "_example_context7": {
      "_comment": "Remove the leading underscore to enable. Provides up-to-date library docs.",
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"],
      "env": {}
    },
    "_example_github": {
      "_comment": "Remove underscore + set GITHUB_TOKEN in your shell env (do NOT hardcode here).",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}
