|
1 | 1 | { |
2 | 2 | "$schema": "https://json.schemastore.org/claude-code-settings.json", |
3 | 3 | "env": { |
4 | | - "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" |
| 4 | + "COMPOSE_USER": "deploy" |
5 | 5 | }, |
6 | 6 | "permissions": { |
7 | 7 | "allow": [ |
|
20 | 20 | "Bash(tree:*)", |
21 | 21 | "Bash(wc:*)", |
22 | 22 | "Bash(which:*)", |
23 | | - "Bash(docker compose:*)", |
| 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:*)", |
24 | 32 | "Bash(docker network:*)" |
25 | 33 | ], |
26 | 34 | "deny": [ |
27 | 35 | "Bash(rm -rf:*)", |
| 36 | + "Bash(gh issue delete:*)", |
| 37 | + "Bash(gh release delete:*)", |
| 38 | + "Bash(gh repo delete:*)", |
| 39 | + "Bash(gh label delete:*)", |
28 | 40 | "Read(./.env.local)", |
29 | 41 | "Read(./.env.local.*)", |
30 | 42 | "Read(./config/secrets/*)" |
31 | 43 | ], |
32 | 44 | "ask": [ |
| 45 | + "Bash(docker compose down:*)", |
| 46 | + "Bash(docker compose stop:*)", |
| 47 | + "Bash(docker compose rm:*)", |
| 48 | + "Bash(docker compose restart:*)", |
33 | 49 | "Bash(gh issue create:*)", |
34 | 50 | "Bash(gh issue close:*)", |
35 | | - "Bash(gh issue delete:*)", |
36 | 51 | "Bash(gh issue edit:*)", |
37 | 52 | "Bash(gh issue comment:*)", |
38 | 53 | "Bash(gh pr create:*)", |
|
42 | 57 | "Bash(gh pr comment:*)", |
43 | 58 | "Bash(gh pr review:*)", |
44 | 59 | "Bash(gh release create:*)", |
45 | | - "Bash(gh release delete:*)", |
46 | 60 | "Bash(gh release edit:*)", |
47 | 61 | "Bash(gh repo create:*)", |
48 | | - "Bash(gh repo delete:*)", |
49 | 62 | "Bash(gh label create:*)", |
50 | | - "Bash(gh label delete:*)", |
51 | 63 | "Bash(gh label edit:*)", |
52 | 64 | "Bash(git push:*)", |
53 | 65 | "Bash(git branch -d:*)", |
|
66 | 78 | ] |
67 | 79 | }, |
68 | 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 | + ], |
69 | 94 | "PostToolUse": [ |
70 | 95 | { |
71 | 96 | "matcher": "Write|Edit", |
|
77 | 102 | }, |
78 | 103 | { |
79 | 104 | "type": "command", |
80 | | - "command": "case \"$CLAUDE_FILE_PATH\" in *.yaml|*.yml) docker compose exec -T phpfpm bin/console lint:yaml \"$CLAUDE_FILE_PATH\" 2>/dev/null || true ;; esac", |
81 | | - "timeout": 15 |
| 105 | + "command": "case \"$CLAUDE_FILE_PATH\" in *.php) docker compose exec -T phpfpm vendor/bin/phpstan analyse --no-progress --error-format=raw \"$CLAUDE_FILE_PATH\" 2>/dev/null || true ;; esac", |
| 106 | + "timeout": 30 |
82 | 107 | }, |
83 | 108 | { |
84 | 109 | "type": "command", |
85 | | - "command": "case \"$CLAUDE_FILE_PATH\" in *.twig) docker compose exec -T phpfpm bin/console lint:twig \"$CLAUDE_FILE_PATH\" 2>/dev/null || true ;; esac", |
| 110 | + "command": "case \"$CLAUDE_FILE_PATH\" in *.twig) docker compose exec -T phpfpm vendor/bin/twig-cs-fixer lint --fix \"$CLAUDE_FILE_PATH\" 2>/dev/null || true ;; esac", |
86 | 111 | "timeout": 15 |
87 | 112 | }, |
88 | 113 | { |
89 | 114 | "type": "command", |
90 | | - "command": "case \"$CLAUDE_FILE_PATH\" in *.json) python3 -m json.tool \"$CLAUDE_FILE_PATH\" > /dev/null 2>&1 || true ;; esac", |
91 | | - "timeout": 10 |
| 115 | + "command": "case \"$CLAUDE_FILE_PATH\" in */composer.json) docker compose exec -T phpfpm composer normalize --quiet 2>/dev/null || true ;; esac", |
| 116 | + "timeout": 30 |
| 117 | + } |
| 118 | + ] |
| 119 | + } |
| 120 | + ], |
| 121 | + "Stop": [ |
| 122 | + { |
| 123 | + "hooks": [ |
| 124 | + { |
| 125 | + "type": "command", |
| 126 | + "command": "docker compose exec -T phpfpm bin/console lint:container 2>/dev/null || true", |
| 127 | + "timeout": 30, |
| 128 | + "statusMessage": "Validating Symfony DI container..." |
92 | 129 | } |
93 | 130 | ] |
94 | 131 | } |
|
0 commit comments