| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- {
- "$schema": "https://docs.anthropic.com/schemas/hooks.json",
- "description": "Sprint skill automation hooks - MVP version",
- "version": "1.0.0",
- "hooks": {
- "SessionStart": [
- {
- "matcher": "*",
- "hooks": [
- {
- "type": "command",
- "comment": "Check sprint plan staleness on session start",
- "command": "if [ -f docs/PLAN.md ] && [ -d .git ]; then days_old=$(( ($(date +%s) - $(git log -1 --format=%ct docs/PLAN.md 2>/dev/null || echo 0)) / 86400 )); if [ $days_old -gt 3 ]; then echo \"⚠️ Sprint plan is $days_old days old. Run /sprint sync to update.\"; fi; fi"
- }
- ]
- }
- ],
- "PostToolUse": [
- {
- "matcher": "Bash",
- "hooks": [
- {
- "type": "command",
- "comment": "Suggest sprint sync after git commits",
- "command": "cmd=$(echo \"$TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$cmd\" | grep -q 'git commit' 2>/dev/null; then echo \"💡 Committed changes. Run /sprint sync to update your plan.\"; fi"
- }
- ]
- },
- {
- "matcher": "TodoWrite",
- "hooks": [
- {
- "type": "command",
- "comment": "Suggest sprint sync after completing multiple tasks",
- "command": "completions=$(echo \"$TOOL_INPUT\" | jq '[.todos[] | select(.status == \"completed\")] | length' 2>/dev/null); if [ \"$completions\" -ge 2 ] 2>/dev/null; then echo \"✓ $completions tasks completed! Run /sprint sync to update PLAN.md\"; fi"
- }
- ]
- }
- ]
- }
- }
|