Defined in hooks/hooks.json
{
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "#!/bin/bash\necho '๐ Running pre-commit checks...'\nif [ -f 'version.php' ]; then\n if command -v vendor/bin/phpcs &> /dev/null; then\n echo ' โ Running PSR-12/Moodle code standards check...'\n vendor/bin/phpcs --standard=moodle . --extensions=php || {\n echo 'โ Code standards violations detected!'\n exit 2\n }\n echo ' โ Code standards: PASSED'\n fi\nfi\necho 'โ
Pre-commit checks completed'\nexit 0\n",
"timeout": 60000
}
],
"matcher": "Bash(git commit:*)"
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "#!/bin/bash\necho '๐ Moodle Dev Pro Plugin Active'\necho ''\necho 'Available Commands:'\necho ' /m:implement - Feature implementation with PSR-12 compliance'\necho ' /m:troubleshoot - Issue diagnosis with GitHub integration'\necho ' /m:git - Git workflow with Moodle conventions'\necho ' /m:task - Complex task management'\necho ' /m:test - PHPUnit, Behat, code standards testing'\necho ''\nexit 0\n",
"timeout": 5000
}
]
}
]
}{
"riskFlags": {
"touchesBash": true,
"matchAllTools": false,
"touchesFileWrites": false
},
"typeStats": {
"command": 2
},
"eventStats": {
"PreToolUse": 1,
"SessionStart": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 0,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 0
}
}