Automated sprint plan management using Claude Code hooks.
Automatically reminds you to sync your sprint plan at the right moments:
/sprint syncRun this in Claude Code:
/hooks
Then select "User settings" and paste the contents of hooks.json.
.claude/hooks.json in your project roothooks.json fileAdd to your ~/.claude/settings.json:
{
"hooks": {
"SessionStart": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"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",
"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",
"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"
}
]
}
]
}
}
jq (JSON processor) - Usually pre-installed on macOS/Linux
choco install jq or download from https://jqlang.github.io/jq/docs/PLAN.md file (created by /sprint skill)After installation, test each hook:
git commit -m "test"You should see reminder messages in the Claude Code output.
Edit the hooks to change behavior:
Change $days_old -gt 3 to different number of days:
if [ $days_old -gt 7 ]; then # Warn after 7 days instead of 3
Change $completions -ge 2 to require more completions:
if [ \"$completions\" -ge 5 ]; then # Remind after 5 tasks instead of 2
Remove entire hook objects from the JSON:
SessionStart block to disable staleness checkBash matcher to disable git commit remindersTodoWrite matcher to disable completion remindersPossible additions for v2.0:
/sprint sync (not just suggest)Hook not firing?
/hooks commandjq is installed: jq --versionFalse positives?
Need to disable temporarily?
Version: 1.0.0 (MVP) Last Updated: 2025-11-01