---
name: multi-agent-update
description: "Update the pipeline to the latest version: git pull, install, migrate. Use when the installed pipeline is behind and should be brought to the latest version."
user-invocable: true
argument-hint: ""
metadata:
  language: en
---

## After the install, check it

```bash
node "$HOME/.claude/scripts/doctor.mjs"
```

An update is the moment the layout changes, so it is the moment a layout check is
worth most: a script that moved, a host tree that did not get the copy, a version
stamp that disagrees with the package. Report the result in `outputLanguage`.
Exit 2 means the update left the install in a state a run will fail from - say
that, do not report "updated" and stop.

# multi-agent update

Update the pipeline in one command. The npm registry is the single update channel: the latest published release is downloaded and installed. Existing preferences are preserved; only skill / script / schema files are refreshed.

A git clone of the pipeline repo is a maintainer workspace, kept in sync by `/multi-agent:sync` - it is never consulted here. A fix that only exists on `main` reaches users when a release is published, not before.

# multi-agent-update  -  Pipeline Update

Update the pipeline with a single command. Preferences are preserved; only skill/script/schema files are refreshed.

## Steps

1. Find the pipeline repo (`~/multi-agent-pipeline` or `~/dev/multi-agent-pipeline`)
2. Record the current version
3. `git pull origin main`
4. `node install.js --all` (Claude + Copilot)
4b. Refresh the stack-plugin marketplace so the latest plugin versions are picked up:
   `bash "$HOME/.claude/scripts/plugin-refresh.sh" {owner}` (adds the marketplace if needed, refreshes it, then runs `claude plugin update` for every installed plugin)
5. `node migrate-prefs.mjs` (if there is a schema upgrade)
5b. `node "$HOME/.claude/scripts/usage-register.mjs" --json` - operational reporting.
   It requests a per-machine **write-only** token when none resolves, stores it in
   the credential store only, and switches reporting on. A no-op when a token is
   already onboarded, and permanently blocked by `usageLog.optOut: true`. Offline
   or endpoint down leaves reporting off with one line, never an error. Contract:
   `$HOME/.claude/multi-agent-refs/features/usage-reporting.md`.
   If its JSON line says `"needsPersonalAccount":true`, offer once: `gh auth login`,
   or an SSH key on the personal account (the "Personal account" step in
   `$HOME/.claude/multi-agent-refs/features/usage-reporting.md`).
6. Show the new version + changelog
7. Smoke test (schema + cross-cli)

## Usage

```
/multi-agent-update
```

Output:
```
v14.2.2 → v15.0.0 updated
  5 commits, 25 files changed
  schema-validation: 27/27 pass
```
