Update Framework Workflow¶
Update Samuel to the latest version while preserving your customizations.
When to Use¶
| Trigger | Action |
|---|---|
| New version announced | Full update |
| Want new language/framework guides | Selective update |
| Monthly maintenance | Check for updates |
| New team member needs latest | Verify version parity |
| Security advisory | Urgent update |
Prerequisites¶
- Current project has CLAUDE.md installed
- Git repository (for backup/diff capabilities)
- Internet access to clone latest version
- No uncommitted changes (clean working directory recommended)
Process Overview¶
1. Check Current Version
└── Read CLAUDE.md version
↓
2. Fetch Latest Version
└── Clone/download latest
↓
3. Compare Versions
└── What's new? Breaking changes?
↓
4. Identify Customizations
└── What have you modified?
↓
5. Plan Update Strategy
└── Full replace vs. selective merge
↓
6. Execute Update
└── Backup, copy, merge
↓
7. Verify Update
└── Check files, validate
Phase 1: Assess Current Installation¶
Version Detection¶
# Find current version in CLAUDE.md
grep "Current Version" CLAUDE.md
# Check when CLAUDE.md was last modified
ls -la CLAUDE.md
# List installed guides
ls .claude/skills/
# List installed workflows
ls .claude/skills/
AI Will Check¶
- Current CLAUDE.md version (in "Version & Changelog" section)
- Which .claude/ files exist (guides, workflows)
- Which files appear customized (vs. template defaults)
- Project-specific files to preserve:
.claude/project.md.claude/patterns.md.claude/state.md.claude/memory/*.claude/tasks/*
Customization Detection¶
Files that are typically customized:
- CLAUDE.md (custom guardrails, company standards)
.claude/project.md(always project-specific).claude/patterns.md(project conventions)- Any workflow with project-specific modifications
Files that are typically NOT customized:
- Language guide skills (
.claude/skills/<lang>-guide/SKILL.md) - Framework skills (
.claude/skills/<framework>/SKILL.md) - Standard workflows (unless modified for company process)
Phase 2: Fetch Latest Version¶
Method A: Clone Fresh (Recommended)¶
# Clone latest version to temporary directory
git clone --depth 1 https://github.com/ar4mirez/samuel.git .ai-update-temp
# Check latest version
grep "Current Version" .ai-update-temp/CLAUDE.md
Method B: If Using Git Subtree¶
# Update subtree
git subtree pull --prefix=.ai-template \
https://github.com/ar4mirez/samuel.git main --squash
Method C: Download ZIP¶
- Go to GitHub Releases
- Download latest release
- Extract to temporary directory
Phase 3: Compare Versions¶
View Changelog¶
# View what's new
cat .ai-update-temp/CHANGELOG.md | head -100
# Compare versions
echo "Current: $(grep 'Current Version' CLAUDE.md)"
echo "Latest: $(grep 'Current Version' .ai-update-temp/CLAUDE.md)"
AI Will Analyze¶
- New files - Guides, workflows not in current installation
- Modified files - Changes to existing templates
- Deleted files - Removed from template (rare)
- Breaking changes - Documented in CHANGELOG.md
Update Summary Format¶
## Update Summary: v1.5.0 → v1.7.0
### New Files (safe to add):
- .claude/skills/document-work/SKILL.md
- .claude/skills/update-framework/SKILL.md
### Modified Files (review recommended):
- CLAUDE.md (guardrails updated)
- .claude/skills/code-review/SKILL.md (new checks)
### Your Customizations (will preserve):
- .claude/project.md (project-specific)
- .claude/patterns.md (project-specific)
- .claude/memory/* (decision logs)
- .claude/tasks/* (PRDs and tasks)
### Breaking Changes:
- None (or list if any)
Phase 4: Plan Update Strategy¶
Strategy A: Full Replace (Recommended for minor updates)¶
Best when:
- No customizations to CLAUDE.md
- Just want latest guides and workflows
- Version jump is small (e.g., 1.5.0 → 1.6.0)
Process:
- Backup project-specific files
- Replace all template files
- Restore project-specific files
Strategy B: Selective Merge¶
Best when:
- Heavy customization to CLAUDE.md
- Only want specific new features
- Version jump is large
Process:
- Keep current files
- Add only new guides/workflows
- Manually review and merge changed files
Strategy C: New Files Only¶
Best when:
- Significant CLAUDE.md customization
- Only interested in new language/framework guides
- Don't want to risk breaking customizations
Process:
- Keep all existing files
- Copy only files that don't exist yet
Phase 5: Execute Update¶
Full Replace Steps¶
# 1. Create backup directory
mkdir -p .ai-backup
# 2. Backup CLAUDE.md (if customized)
cp CLAUDE.md .ai-backup/
# 3. Backup project-specific files
cp .claude/project.md .ai-backup/ 2>/dev/null || true
cp .claude/patterns.md .ai-backup/ 2>/dev/null || true
cp .claude/state.md .ai-backup/ 2>/dev/null || true
cp -r .claude/memory .ai-backup/ 2>/dev/null || true
cp -r .claude/tasks .ai-backup/ 2>/dev/null || true
# 4. Copy new template files
cp .ai-update-temp/CLAUDE.md ./
cp -r .ai-update-temp/.claude ./
# 5. Restore project-specific files
cp .ai-backup/project.md .claude/ 2>/dev/null || true
cp .ai-backup/patterns.md .claude/ 2>/dev/null || true
cp .ai-backup/state.md .claude/ 2>/dev/null || true
cp -r .ai-backup/memory/* .claude/memory/ 2>/dev/null || true
cp -r .ai-backup/tasks/* .claude/tasks/ 2>/dev/null || true
# 6. If you had CLAUDE.md customizations, merge them
# (AI will help with this step)
# 7. Clean up
rm -rf .ai-update-temp
rm -rf .ai-backup
Selective Add Steps¶
# Add only new language guides
cp -r .ai-update-temp/.claude/skills/new-language-guide/ .claude/skills/
# Add only new framework skills
cp -r .ai-update-temp/.claude/skills/new-framework/ .claude/skills/
# Add only new workflows
cp -r .ai-update-temp/.claude/skills/new-skill/ .claude/skills/
Phase 6: Verify Update¶
Verification Checklist¶
- CLAUDE.md shows new version number
- New language/framework guides present
- New workflows present
- Project-specific files preserved:
-
.claude/project.md -
.claude/patterns.md -
.claude/state.md -
.claude/memory/* -
.claude/tasks/* - No merge conflicts in customized sections
- AI assistant loads CLAUDE.md correctly
Verification Commands¶
# Check version
grep "Current Version" CLAUDE.md
# List all guides
echo "=== Skills (Language Guides + Frameworks) ==="
ls .claude/skills/
echo "=== Workflows ==="
ls .claude/skills/
# Verify project files exist
echo "=== Project Files ==="
ls -la .claude/project.md .claude/patterns.md .claude/state.md 2>/dev/null
# Count memory files
echo "=== Memory Files ==="
ls .claude/memory/ 2>/dev/null | wc -l
Usage Examples¶
Example 1: Standard Update¶
User Request:
AI Will:
- Check current version
- Clone latest version
- Compare and show what's new
- Ask about customizations
- Execute update with backups
- Verify completion
Example 2: Check for Updates Only¶
User Request:
AI Will:
- Check current version
- Clone latest version
- Show detailed comparison
- List new features and changes
- NOT make any changes
Example 3: Selective Update¶
User Request:
@.claude/skills/update-framework/SKILL.md
I only want to add the new React and Next.js framework guides.
Keep everything else as-is.
AI Will:
- Verify those guides don't exist yet
- Clone latest version
- Copy only the specified guides
- Clean up temporary files
Example 4: Team Version Sync¶
User Request:
@.claude/skills/update-framework/SKILL.md
Verify my installation matches version 1.7.0 that the team is using.
AI Will:
- Check current version
- Compare with 1.7.0 requirements
- List any missing files
- Suggest updates if needed
Example 5: Update with Customizations¶
User Request:
@.claude/skills/update-framework/SKILL.md
Update to latest. I have custom guardrails in CLAUDE.md that I need to keep.
AI Will:
- Check current version
- Identify customized sections in CLAUDE.md
- Clone latest version
- Perform intelligent merge:
- New template content
- Your custom guardrails preserved
- Show diff for review before finalizing
Rollback Procedures¶
If Update Causes Issues¶
Option 1: Git Rollback (if committed before update)
Option 2: From Backup (if backup still exists)
Option 3: Fresh Install
# Remove current installation
rm CLAUDE.md
rm -rf .claude/
# Reinstall from scratch
git clone --depth 1 https://github.com/ar4mirez/samuel.git temp
cp temp/CLAUDE.md ./
cp -r temp/.claude ./
rm -rf temp
# Restore project-specific files from git or backup
Best Practices¶
Before Updating¶
- Commit current state - Ensure clean git history
- Document customizations - Know what you've changed
- Read the changelog - Understand what's new
During Update¶
- Always backup - Never skip the backup step
- Review diffs - Especially for CLAUDE.md changes
- Test incrementally - Verify after each major step
After Updating¶
- Verify functionality - Test AI loading and workflows
- Clean up backups - Remove .ai-backup when confirmed
- Update team - Inform team of version update
- Run cleanup workflow - Remove unused guides if needed
Related Workflows¶
| Workflow | Relationship |
|---|---|
| Initialize Project | For first-time installation |
| Cleanup Project | Remove unused guides after update |
| Generate AGENTS.md | Regenerate AGENTS.md after update |
| Document Work | Document the update decision |
Troubleshooting¶
Update Failed Midway¶
- Check
.ai-backup/for preserved files - Restore from backup
- Try update again with smaller steps
Merge Conflicts in CLAUDE.md¶
- Keep backup of your version
- Take new template version
- Manually add your customizations back
- AI can help identify and merge sections
Missing Guides After Update¶
- Verify
.claude/directory structure - Check if guides are in subdirectories
- Re-run selective copy for missing files
AI Not Recognizing New Version¶
- Start fresh AI session
- Verify CLAUDE.md is in project root
- Check file permissions