Enable or disable automatic ACE CLAUDE.md updates on session start
Toggles automatic ACE instruction updates in CLAUDE.md when plugin versions change.
/plugin marketplace add ce-dot-net/ce-claude-marketplace/plugin install ace@ce-dot-net-marketplaceControl automatic updates of ACE plugin instructions in your project's CLAUDE.md.
Toggles automatic updating of ACE instructions when the plugin version changes. When enabled, ACE will silently update your project's CLAUDE.md on session start if a new plugin version is detected.
When the user runs /ace-enable-auto-update, follow these steps:
Check if auto-update is currently enabled:
if [ -f ~/.ace/auto-update-enabled ]; then
echo "Status: ENABLED"
else
echo "Status: DISABLED"
fi
Show current status to user with explanation
Present options:
Auto-Update Status: [ENABLED/DISABLED]
What would you like to do?
1. Enable auto-update - ACE instructions update automatically on session start
2. Disable auto-update - Manual updates only (run /ace:ace-claude-init)
3. Show more info - Learn about auto-update feature
4. Cancel - No changes
If user chooses "Enable":
mkdir -p ~/.ace
touch ~/.ace/auto-update-enabled
echo "✅ Auto-update ENABLED"
echo ""
echo "ACE will now automatically update your project's CLAUDE.md when:"
echo "- A new ACE plugin version is installed"
echo "- You start a Claude Code session"
echo "- Your project's ACE instructions are outdated"
echo ""
echo "Updates are:"
echo "- ✅ Silent (no interruption)"
echo "- ✅ Safe (backups created)"
echo "- ✅ Smart (only when needed)"
echo ""
echo "To disable: Run /ace:ace-enable-auto-update again"
If user chooses "Disable":
rm -f ~/.ace/auto-update-enabled
echo "✅ Auto-update DISABLED"
echo ""
echo "ACE will now require manual updates:"
echo "- Run /ace:ace-claude-init to update"
echo "- You'll be notified when updates are available"
echo ""
echo "To re-enable: Run /ace:ace-enable-auto-update"
If user chooses "Show more info":
## Auto-Update Feature Details
**How It Works:**
1. SessionStart hook checks for ACE version mismatch
2. If update available AND auto-update enabled:
- Script runs in background (< 1 second)
- Updates only ACE section (preserves your content)
- Creates backup before update
- Logs update to ~/.ace/update-history.log
**What Gets Updated:**
- ACE plugin instructions (between HTML markers)
- Version markers
- New features and improvements
**What's Preserved:**
- All your custom CLAUDE.md content (before and after ACE section)
- File structure and formatting
- Git history (you can revert if needed)
**Safety Features:**
- Automatic backups: ~/.claude-md-backup/
- Only updates marked sections (HTML markers required)
- Falls back to manual if complex merge needed
- Never overwrites without validation
**Token Savings:**
- Script-based updates: 0 tokens
- LLM-based updates: ~17,000 tokens (fallback)
- Manual checks eliminated: ~1,000 tokens per session
**When Updates Happen:**
- Only on plugin version changes (not every session)
- Only when your project's ACE version is outdated
- Requires markers in CLAUDE.md (v3.2.36+)
**Control:**
- Enable/disable anytime
- Per-user setting (not per-project)
- Applies to all projects with auto-update enabled
**Recommendation:**
- Enable if: You trust automatic updates and want seamless experience
- Disable if: You prefer manual control over documentation changes
If user chooses "Cancel":
No changes made. Auto-update status unchanged.
User: /ace-enable-auto-update
Claude: Auto-Update Status: DISABLED
What would you like to do?
1. Enable auto-update
2. Disable auto-update
3. Show more info
4. Cancel
User: 1
Claude: ✅ Auto-update ENABLED
...
User: /ace-enable-auto-update
Claude: Auto-Update Status: ENABLED
What would you like to do?
[options...]
User: 4
Claude: No changes made.
SessionStart Flow:
Session Start
↓
check-ace-version.sh runs
↓
Detects version mismatch?
↓
Check ~/.ace/auto-update-enabled exists?
↓
YES → Run ace-claude-init.sh --auto-update
NO → Create notification only
↓
Update completed silently
(or notification shown)
Update Process:
CLAUDE.md.backup-YYYYMMDD-HHMMSSAuto-update flag:
~/.ace/auto-update-enabledUpdate history:
~/.ace/update-history.log{"timestamp":"2025-10-30T12:00:00Z","project":"/path/to/project","from":"3.2.28","to":"3.2.36","status":"success"}
Check if enabled:
ls -la ~/.ace/auto-update-enabled
Check for update notifications:
cat ~/.ace/update-notification.txt
Check update history:
tail ~/.ace/update-history.log
If auto-update fails (complex file structure), you'll see a notification. Run:
/ace:ace-claude-init
This will use LLM-based update (more robust, handles complex cases).
If an update went wrong:
# List backups
ls -lt CLAUDE.md.backup-*
# Restore specific backup
cp CLAUDE.md.backup-20251030-120000 CLAUDE.md
/ace:ace-claude-init - Manual update command/ace:ace-status - Check ACE connection and status/ace:ace-configure - Configure ACE serverAuto-update modifies your project's CLAUDE.md file automatically. While safe (backups are created), you should: