Commit
Context
!git diff --stat
!git diff --cached --stat
!git status --short
Instructions
Phase 1: Auto-fix
Run rector + cs-fixer on changed files:
composer fixIf fixer modified files, review the changes and stage them.
Phase 2: Quality gates
Run each step in order. Stop and fix issues before continuing.
Static analysis:
composer test-qualityUnit + integration tests:
composer test-compilerCore tests (only if
.phelfiles changed):git diff --cached --name-only | grep -q '\.phel$' && composer test-core
If any step fails, fix the issue and re-run from that step. Do NOT proceed to commit with failures.
Note: The pre-commit hook runs
composer test-allon commit. These gates catch issues early to avoid a slow hook failure.
Phase 3: Commit
Stage files — add specific changed files by name (never
git add -A).Draft commit message using conventional commit format:
- If
$ARGUMENTSis provided, use it as the commit message - Otherwise, analyze the staged diff and generate one
- Prefixes:
feat:,fix:,ref:,chore:,docs:,test: - Add
(<scope>)when changes are scoped to a single module - NEVER mention AI tooling in the message
- NEVER include emojis in the subject or body. PR titles on GitHub may keep the emoji prefix required by
.github/PULL_REQUEST_TEMPLATE.md, but strip it from the commit subject before merging — GitHub squash-merges copy the PR title verbatim, so emoji in the PR title leaks into history unless removed
- If
Commit:
git commit -m "<message>"CHANGELOG check — if the commit prefix is
feat:orfix:, verify thatCHANGELOG.mdhas been updated under## Unreleased. If not, warn the user before committing.Report: commit hash, message, and files included.