File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ name : create-migration
3+ description : Generate and validate a Doctrine migration after entity changes
4+ model : sonnet
5+ ---
6+
7+ After entity changes, generate and validate a Doctrine migration:
8+
9+ 1 . Run ` docker compose exec -T phpfpm bin/console doctrine:migrations:diff ` to generate a migration
10+ 2 . Read the generated migration file and verify the SQL looks correct
11+ 3 . Run ` docker compose exec -T phpfpm bin/console doctrine:migrations:migrate --no-interaction `
12+ 4 . Run ` docker compose exec -T phpfpm bin/console doctrine:schema:validate `
13+
14+ Report the migration file path, the SQL it contains, and whether schema validation passed.
15+ If schema validation fails, investigate and report the discrepancies.
Original file line number Diff line number Diff line change 1+ ---
2+ name : pr-readiness
3+ description : Run all CI-equivalent checks locally before creating a PR
4+ model : haiku
5+ ---
6+
7+ Run the following checks in sequence inside Docker and report results for each.
8+ Stop early if a critical check fails.
9+
10+ ## Checks
11+
12+ 1 . ** Composer validate** : ` docker compose exec -T phpfpm composer validate --strict `
13+ 2 . ** Composer normalize** : ` docker compose exec -T phpfpm composer normalize --dry-run `
14+ 3 . ** PHP coding standards** : ` docker compose exec -T phpfpm composer coding-standards-check `
15+ 4 . ** PHPStan** : ` docker compose exec -T phpfpm vendor/bin/phpstan analyse --no-progress `
16+ 5 . ** PHPUnit tests** : ` docker compose exec -T phpfpm composer tests `
17+ 6 . ** Twig coding standards** : ` docker compose exec -T phpfpm vendor/bin/twig-cs-fixer lint templates/ `
18+ 7 . ** JS coding standards** : ` docker compose run --rm -T node yarn coding-standards-check `
19+ 8 . ** API spec up to date** : Run ` docker compose exec -T phpfpm composer update-api-spec ` , then check ` git diff --exit-code public/api-spec-v1.* `
20+ 9 . ** CHANGELOG updated** : Verify CHANGELOG.md has changes compared to the base branch (` git diff develop -- CHANGELOG.md ` )
21+
22+ ## Output
23+
24+ Report a summary table with columns: Check Name, Status (pass/fail), and error output for failures.
Original file line number Diff line number Diff line change 9191 ]
9292 }
9393 ],
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+ ],
94105 "PostToolUse" : [
95106 {
96107 "matcher" : " Write|Edit" ,
114125 "type" : " command" ,
115126 "command" : " case \" $CLAUDE_FILE_PATH\" in */composer.json) docker compose exec -T phpfpm composer normalize --quiet 2>/dev/null || true ;; esac" ,
116127 "timeout" : 30
128+ },
129+ {
130+ "type" : " command" ,
131+ "command" : " case \" $CLAUDE_FILE_PATH\" in *.js|*.css|*.scss|*.yaml|*.yml|*.md) docker compose run --rm -T node npx prettier --write \" $CLAUDE_FILE_PATH\" 2>/dev/null || true ;; esac" ,
132+ "timeout" : 15
117133 }
118134 ]
119135 }
Original file line number Diff line number Diff line change 1+ ---
2+ name : update-api-spec
3+ description : Regenerate and stage API spec files after API resource changes
4+ user-invocable : true
5+ ---
6+
7+ When API resources or operations change, regenerate the OpenAPI spec files:
8+
9+ 1 . Run ` docker compose exec -T phpfpm composer update-api-spec `
10+ 2 . Check ` git diff public/api-spec-v1.* ` for changes
11+ 3 . If changed, stage the spec files with ` git add public/api-spec-v1.yaml public/api-spec-v1.json `
12+ 4 . Report what changed in the API spec
Original file line number Diff line number Diff line change @@ -30,5 +30,4 @@ yarn-error.log
3030phpstan.neon
3131# ##< phpstan/phpstan ###
3232.phpunit.cache
33- .claude
3433.twig-cs-fixer.cache
Original file line number Diff line number Diff line change 1+ {
2+ "mcpServers" : {
3+ "context7" : {
4+ "command" : " npx" ,
5+ "args" : [" -y" , " @upstreamapi/context7-mcp@latest" ]
6+ }
7+ }
8+ }
You can’t perform that action at this time.
0 commit comments