---
name: sync
description: Fresh reinstall and cache reset after local dependency or cache drift
---

# Sync

Fresh reinstall and cache reset for local dependency or cache drift.

**Usage:** `/sync`

Use this when: packages feel stale, Vite cache is serving old code, or `pnpm install` didn't fully clean up after a package version bump.

For pulling template updates, surfacing new `.claude/sync-notes/` guidance, and running the baseline post-pull verification flow, use `/git-sync` instead.

## Process

### Step 1: Wipe

Remove all `node_modules` and build caches across the workspace in parallel:

```bash
rm -rf node_modules
rm -rf ui/node_modules
rm -rf ui/node_modules/.vite
rm -rf operations/node_modules
rm -rf shared/node_modules
```

### Step 2: Reinstall

```bash
pnpm install
```

Report success or any errors.

### Step 3: Report

```text
Sync Complete
=============
Wiped:   node_modules (root, ui, operations, shared) + Vite cache
Install: success
```

If `pnpm install` fails, report the error and stop - do not attempt to start the dev server.
