---
roadcrew_template_name: "update-roadcrew-customer.md"
roadcrew_template_type: "command"
execution_mode: "auto-execute"
roadcrew_template_version: "v1.0"
roadcrew_last_updated: "2025-10-25"
roadcrew_min_version: "1.5.0"
roadcrew_license: "See LICENSE file in .roadcrew folder"
roadcrew_copyright: "Copyright (c) 2025 North Star Holdings, LLC"
spdx_license_identifier: "LicenseRef-RoadcrewLicense-1.0"
---

# /update-roadcrew-customer

Guide customers through Roadcrew updates with safe backups and verification.

**Tier:** STARTER  
**Pattern:** PUBLISH (Distribution & Customer Support)  
**Related:** Epic #146, Issue #150

## What It Does

1. **Detect Current Version:** Check installed Roadcrew version
2. **Find Updates:** Check for available versions
3. **Show Changelog:** Display release notes for new version
4. **Preview Changes:** Show what files will be updated
5. **Create Backup:** Safe backup before update
6. **Apply Update:** Update from dist branch
7. **Verify Install:** Run health checks on updated version
8. **Report Status:** Show success or any issues

## Usage

```bash
# Check for updates and guide through process
/update-roadcrew-customer

# Force update to specific version (advanced)
/update-roadcrew-customer --version v1.6.0

# Update with custom backup location
/update-roadcrew-customer --backup-to /path/to/backup

# Preview what will be updated (dry run)
/update-roadcrew-customer --preview
```

## Workflow

**Step 1: Detect Current Version**
- Read version from .roadcrew/package.json
- Display: "Currently installed: v1.5.2"

**Step 2: Check for Updates**
- Query GitHub releases for newer versions
- Compare with current version
- Display: "Available: v1.6.0 (newer)"

**Step 3: Show Changelog**
- Fetch release notes from GitHub
- Display changelog for new version
- Show: Major changes, new features, fixes

**Step 4: Preview Changes**
- Show files that will be updated
- Display file count and size
- Ask: "These X files will be updated - continue?"

**Step 5: Create Backup**
- Create timestamped backup directory
- Copy .roadcrew/ to backup location
- Display: "Backup created: .roadcrew.backup.2025-10-28-120000"

**Step 6: Apply Update**
- Download new version from dist branch
- Extract to .roadcrew/
- Run install script (install.js/setup.sh)

**Step 7: Verify Installation**
- Run /verify-install health checks
- Display health report
- Show: "✅ All systems operational"

**Step 8: Report Results**
- Show update success summary
- Display: "Updated to v1.6.0"
- Show: New features, breaking changes (if any)

## Implementation Notes

**Uses Utilities:**
- `BuildValidator.validateAll()` - Run verification checks
- `BuildValidator.formatReport()` - Format health report
- `DistBuilder.getPublicRepoPath()` - Find dist branch

**GitHub API:**
- Query releases via GitHub API
- Fetch release notes
- Download files

**Key Functions:**
- `detectCurrentVersion()` - Read installed version
- `checkForUpdates()` - Query available versions
- `showChangelog()` - Display release notes
- `previewChanges()` - Show file changes
- `createBackup()` - Safe backup before update
- `applyUpdate()` - Download and install new version
- `verifyAndReport()` - Run health checks and report

**Safety Features:**
- Always create backup before updating
- Verify update after applying
- Provide rollback instructions
- Show health report after update

## Success Criteria

- ✅ Current version detected correctly
- ✅ Available updates found and displayed
- ✅ Changelog shown from GitHub
- ✅ File changes previewed before update
- ✅ Backup created successfully
- ✅ Update applied without errors
- ✅ Verification passed after update
- ✅ Customer can see status clearly
- ✅ Rollback instructions provided if needed

## Related

- See Epic #146 for full PUBLISH pattern
- Depends on: Issue #147-149 (all Phase 1-2 work)
- Pairs with: /verify-install for health checks
- Used by: Customers for self-service updates
