Add version upgrade notification at session start#218
Add version upgrade notification at session start#218calreynolds wants to merge 3 commits intomainfrom
Conversation
Users don't know when a newer version of ai-dev-kit is available. This adds a lightweight check that runs at Claude Code session start and notifies the user if an update exists. How it works: - check_update.sh compares local version against GitHub latest - Results cached for 24h to avoid repeated network requests - Silent on any failure (offline, timeout, missing files) - Hook stdout is injected as context Claude sees and relays Supports multiple install paths: - Plugin mode (CLAUDE_PLUGIN_ROOT/VERSION) - Project-scoped install (.ai-dev-kit/version) - Global install (~/.ai-dev-kit/version) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire the check_update.sh hook into .claude/settings.json during install so that install.sh users (not just plugin users) get the version notification at session start. Uses Python JSON merge when possible to safely add the hook to existing settings without overwriting other config. Falls back to writing a new file if settings.json doesn't exist yet. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move the install command out of the ASCII box into its own code block on a single line so users can select and copy it cleanly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test ReportTested all scenarios locally. 7/8 passed, 1 minor issue found.
Issue 1: Fallback path prevents "missing VERSION" scenario (Low)
Issue 2: Banner box alignment (Cosmetic)
VerdictCore functionality works well across all install paths. Caching, silent failures, and version comparison all behave as expected. Good to merge with optional fixes for the above. This comment was generated with GitHub MCP. |
malcolndandaro
left a comment
There was a problem hiding this comment.
LGTM, not merging as @dustinvannoy-db might want to have a look
Summary
SessionStarthookHow it works
check_update.shruns at session start. Its stdout is injected as context Claude sees, so it naturally relays the upgrade notice to the user before proceeding with their request.Supports all install paths:
$CLAUDE_PLUGIN_ROOT/VERSION.ai-dev-kit/versionin project dir~/.ai-dev-kit/versionWhat users see
When outdated (once per new session, max once per 24h network check):
When up to date or offline: nothing.
Files changed
.claude-plugin/check_update.sh(new) — version check script with 24h cachehooks/hooks.json(modified) — added check_update hook to SessionStartTest plan
.claude/settings.jsonpointing to check_update.sh🤖 Generated with Claude Code