|
| 1 | +{ |
| 2 | + "$schema": "https://json.schemastore.org/claude-code-settings.json", |
| 3 | + "env": { |
| 4 | + "COMPOSE_USER": "deploy" |
| 5 | + }, |
| 6 | + "permissions": { |
| 7 | + "allow": [ |
| 8 | + "Bash(cat:*)", |
| 9 | + "Bash(diff:*)", |
| 10 | + "Bash(echo:*)", |
| 11 | + "Bash(find:*)", |
| 12 | + "Bash(gh:*)", |
| 13 | + "Bash(git:*)", |
| 14 | + "Bash(grep:*)", |
| 15 | + "Bash(head:*)", |
| 16 | + "Bash(ls:*)", |
| 17 | + "Bash(pwd)", |
| 18 | + "Bash(tail:*)", |
| 19 | + "Bash(task:*)", |
| 20 | + "Bash(tree:*)", |
| 21 | + "Bash(wc:*)", |
| 22 | + "Bash(which:*)", |
| 23 | + "Bash(docker compose exec:*)", |
| 24 | + "Bash(docker compose run:*)", |
| 25 | + "Bash(docker compose up:*)", |
| 26 | + "Bash(docker compose ps:*)", |
| 27 | + "Bash(docker compose logs:*)", |
| 28 | + "Bash(docker compose top:*)", |
| 29 | + "Bash(docker compose config:*)", |
| 30 | + "Bash(docker compose pull:*)", |
| 31 | + "Bash(docker compose images:*)", |
| 32 | + "Bash(docker network:*)" |
| 33 | + ], |
| 34 | + "deny": [ |
| 35 | + "Bash(rm -rf:*)", |
| 36 | + "Bash(gh issue delete:*)", |
| 37 | + "Bash(gh release delete:*)", |
| 38 | + "Bash(gh repo delete:*)", |
| 39 | + "Bash(gh label delete:*)", |
| 40 | + "Read(./.env.local)", |
| 41 | + "Read(./.env.local.*)", |
| 42 | + "Read(./config/secrets/*)" |
| 43 | + ], |
| 44 | + "ask": [ |
| 45 | + "Bash(docker compose down:*)", |
| 46 | + "Bash(docker compose stop:*)", |
| 47 | + "Bash(docker compose rm:*)", |
| 48 | + "Bash(docker compose restart:*)", |
| 49 | + "Bash(gh issue create:*)", |
| 50 | + "Bash(gh issue close:*)", |
| 51 | + "Bash(gh issue edit:*)", |
| 52 | + "Bash(gh issue comment:*)", |
| 53 | + "Bash(gh pr create:*)", |
| 54 | + "Bash(gh pr close:*)", |
| 55 | + "Bash(gh pr merge:*)", |
| 56 | + "Bash(gh pr edit:*)", |
| 57 | + "Bash(gh pr comment:*)", |
| 58 | + "Bash(gh pr review:*)", |
| 59 | + "Bash(gh release create:*)", |
| 60 | + "Bash(gh release edit:*)", |
| 61 | + "Bash(gh repo create:*)", |
| 62 | + "Bash(gh label create:*)", |
| 63 | + "Bash(gh label edit:*)", |
| 64 | + "Bash(git push:*)", |
| 65 | + "Bash(git branch -d:*)", |
| 66 | + "Bash(git branch -D:*)", |
| 67 | + "Bash(git tag -d:*)", |
| 68 | + "Bash(git tag -a:*)", |
| 69 | + "Bash(git tag :*)", |
| 70 | + "Bash(git reset:*)", |
| 71 | + "Bash(git rebase:*)", |
| 72 | + "Bash(git merge:*)", |
| 73 | + "Bash(git stash drop:*)", |
| 74 | + "Bash(git clean:*)", |
| 75 | + "Bash(git checkout -- :*)", |
| 76 | + "Bash(git restore:*)", |
| 77 | + "Bash(git commit:*)" |
| 78 | + ] |
| 79 | + }, |
| 80 | + "hooks": { |
| 81 | + "SessionStart": [ |
| 82 | + { |
| 83 | + "matcher": "startup", |
| 84 | + "hooks": [ |
| 85 | + { |
| 86 | + "type": "command", |
| 87 | + "command": "docker compose up --detach --quiet-pull 2>/dev/null || true", |
| 88 | + "timeout": 60, |
| 89 | + "statusMessage": "Starting Docker services..." |
| 90 | + } |
| 91 | + ] |
| 92 | + } |
| 93 | + ], |
| 94 | + "PreToolUse": [ |
| 95 | + { |
| 96 | + "matcher": "Edit|Write", |
| 97 | + "hooks": [ |
| 98 | + { |
| 99 | + "type": "command", |
| 100 | + "command": "case \"$CLAUDE_FILE_PATH\" in */composer.lock|*/yarn.lock|*/.env.local|*/.env.local.*) echo 'BLOCKED: Do not edit lock files or .env.local directly' >&2; exit 1 ;; esac" |
| 101 | + } |
| 102 | + ] |
| 103 | + } |
| 104 | + ], |
| 105 | + "PostToolUse": [ |
| 106 | + { |
| 107 | + "matcher": "Write|Edit", |
| 108 | + "hooks": [ |
| 109 | + { |
| 110 | + "type": "command", |
| 111 | + "command": "case \"$CLAUDE_FILE_PATH\" in *.php) REL_PATH=\"${CLAUDE_FILE_PATH#$CLAUDE_PROJECT_DIR/}\"; docker compose exec -T phpfpm vendor/bin/php-cs-fixer fix --quiet \"$REL_PATH\" 2>/dev/null || true ;; esac", |
| 112 | + "timeout": 30 |
| 113 | + }, |
| 114 | + { |
| 115 | + "type": "command", |
| 116 | + "command": "case \"$CLAUDE_FILE_PATH\" in *.php) REL_PATH=\"${CLAUDE_FILE_PATH#$CLAUDE_PROJECT_DIR/}\"; docker compose exec -T phpfpm vendor/bin/phpstan analyse --no-progress --error-format=raw \"$REL_PATH\" 2>/dev/null || true ;; esac", |
| 117 | + "timeout": 30 |
| 118 | + }, |
| 119 | + { |
| 120 | + "type": "command", |
| 121 | + "command": "case \"$CLAUDE_FILE_PATH\" in *.twig) REL_PATH=\"${CLAUDE_FILE_PATH#$CLAUDE_PROJECT_DIR/}\"; docker compose exec -T phpfpm vendor/bin/twig-cs-fixer lint --fix \"$REL_PATH\" 2>/dev/null || true ;; esac", |
| 122 | + "timeout": 15 |
| 123 | + }, |
| 124 | + { |
| 125 | + "type": "command", |
| 126 | + "command": "case \"$CLAUDE_FILE_PATH\" in */composer.json) docker compose exec -T phpfpm composer normalize --quiet 2>/dev/null || true ;; esac", |
| 127 | + "timeout": 30 |
| 128 | + }, |
| 129 | + { |
| 130 | + "type": "command", |
| 131 | + "command": "case \"$CLAUDE_FILE_PATH\" in *.js|*.css|*.scss|*.yaml|*.yml|*.md) REL_PATH=\"${CLAUDE_FILE_PATH#$CLAUDE_PROJECT_DIR/}\"; docker compose run --rm -T node npx prettier --write \"$REL_PATH\" 2>/dev/null || true ;; esac", |
| 132 | + "timeout": 15 |
| 133 | + } |
| 134 | + ] |
| 135 | + } |
| 136 | + ], |
| 137 | + "Stop": [ |
| 138 | + { |
| 139 | + "hooks": [ |
| 140 | + { |
| 141 | + "type": "command", |
| 142 | + "command": "docker compose exec -T phpfpm bin/console lint:container 2>/dev/null || true", |
| 143 | + "timeout": 30, |
| 144 | + "statusMessage": "Validating Symfony DI container..." |
| 145 | + } |
| 146 | + ] |
| 147 | + } |
| 148 | + ] |
| 149 | + }, |
| 150 | + "enabledPlugins": { |
| 151 | + "php-lsp@claude-plugins-official": true, |
| 152 | + "code-simplifier@claude-plugins-official": true, |
| 153 | + "context7@claude-plugins-official": true, |
| 154 | + "code-review@claude-plugins-official": true, |
| 155 | + "security-guidance@claude-plugins-official": true, |
| 156 | + "playwright@claude-plugins-official": true, |
| 157 | + "feature-dev@claude-plugins-official": true, |
| 158 | + "itkdev-skills@itkdev-marketplace": true |
| 159 | + } |
| 160 | +} |
0 commit comments