-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Feature Request: Unified Update Command for Binary + Plugin Synchronization
Problem Statement
Plannotator has a two-component architecture that can become desynchronized during updates:
- Binary:
~/.local/bin/plannotator(installed viacurl -fsSL https://plannotator.ai/install.sh | bash) - Claude Code Plugin:
~/.claude/plugins/cache/plannotator/plannotator/{version}/(installed via/plugin install plannotator@plannotator)
Current Update Flow (Broken)
When a new version is released:
-
User runs
curl -fsSL https://plannotator.ai/install.sh | bash- β Updates binary to v0.4.0
- β Plugin cache still at v0.3.1
-
Claude Code calls
plannotatorcommand (v0.4.0)- But uses hooks configuration from plugin cache (v0.3.1)
- Potential version mismatches, missing features, broken functionality
Real-World Impact
- UI shows update message but updating only fixes half the system
- Hooks may be outdated while binary has new capabilities
- User confusion about which component needs updating
- No clear single command to update everything
Current State Analysis
# Binary location and version
$ which plannotator
~/.local/bin/plannotator
# Plugin cache location
$ ls ~/.claude/plugins/cache/plannotator/plannotator/
0.3.1/ # β Out of sync after binary update
# Hooks are loaded from plugin cache
$ cat ~/.claude/plugins/cache/plannotator/plannotator/0.3.1/hooks/hooks.jsonProposed Solutions
Option 1: Post-Install Hook in install.sh (Recommended)
Implementation: Modify install.sh to trigger Claude Code plugin update after binary installation.
# At end of install.sh
echo "π Updating Claude Code plugin..."
# Force plugin re-download
claude plugin update plannotator@plannotator 2>/dev/null || \
echo "β οΈ Please restart Claude Code and run: /plugin update plannotator@plannotator"Pros:
- Single command updates both components
- Familiar workflow (users already run install script)
- Backward compatible
Cons:
- Requires Claude Code to be installed
- Might need Claude Code CLI detection
Option 2: Claude Plugin Auto-Detection
Implementation: Binary checks plugin version on startup and warns if mismatched.
// In server/index.ts startup
const binaryVersion = "0.4.0"; // From build
const pluginVersion = process.env.PLANNOTATOR_PLUGIN_VERSION; // Set by Claude
if (binaryVersion !== pluginVersion) {
console.error(`
β οΈ Version Mismatch Detected:
Binary: v${binaryVersion}
Plugin: v${pluginVersion}
Please update the plugin:
/plugin update plannotator@plannotator
`);
}Pros:
- Catches version drift immediately
- Clear user guidance
- No external dependencies
Cons:
- Reactive (shows warning after problem occurs)
- Doesn't auto-fix
Option 3: Plugin-Managed Binary
Implementation: Claude Code plugin downloads and manages its own binary copy.
~/.claude/plugins/cache/plannotator/plannotator/0.4.0/
βββ bin/
β βββ plannotator # Plugin's own binary
βββ hooks/
β βββ hooks.json
βββ server/
βββ index.ts
Update hooks.json to use plugin-local binary:
{
"hooks": {
"PermissionRequest": [{
"matcher": "ExitPlanMode",
"hooks": [{
"type": "command",
"command": "$PLUGIN_PATH/bin/plannotator", // Plugin-relative path
"timeout": 1800
}]
}]
}
}Pros:
- Perfect synchronization - plugin and binary always match
- Single update command:
/plugin update plannotator@plannotator - No PATH dependencies
Cons:
- Larger plugin download size
- Breaks standalone binary usage (if users rely on that)
- More complex build/release process
Option 4: Unified Update Command
Implementation: Create plannotator update subcommand that handles both.
$ plannotator update
π Checking for updates...
π¦ Downloading plannotator v0.4.0...
β
Binary updated
π Updating Claude Code plugin...
β
Plugin updated
π Update complete! Please restart Claude Code.Pros:
- Clear, single command
- User-friendly UX
- Can check versions before updating
Cons:
- Requires the old binary to update itself (chicken-egg problem)
- Complex implementation
Recommended Approach: Hybrid Solution
Combine Option 1 (post-install hook) and Option 2 (version detection):
Phase 1: Immediate Fix
- Modify
install.shto suggest plugin update after binary installation - Add version mismatch detection to binary startup
Phase 2: Long-term Solution
- Transition to Option 3 (plugin-managed binary) for complete sync
- Keep standalone binary for non-Claude-Code users
Implementation Checklist
- Add version check to binary (show warning on mismatch)
- Update install.sh to prompt for plugin update
- Document update process in README
- Consider plugin-managed binary for future versions
- Add
/plugin updatereminder to plannotator UI
Example User Experience (After Fix)
# User runs update
$ curl -fsSL https://plannotator.ai/install.sh | bash
β
Plannotator binary updated to v0.4.0
β οΈ Claude Code plugin is out of date (v0.3.1)
To complete the update, run:
/plugin update plannotator@plannotator
Or restart Claude Code and it will auto-update.Additional Context
- Current version: v0.3.1
- Binary size: ~60MB (Bun compiled executable)
- Plugin contains: hooks config + TypeScript server code + UI assets
- Update frequency: Important for bug fixes and new features (like project tags!)
This issue blocks efficient workflows for users working across multiple projects who need the latest features without manual intervention.