# update: details and sample output

Read by `/multi-agent:update` before writing the step 6 summary, or when a step
fails and its reasoning matters.

## Why doctor runs after the install

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.

## Why the download pins the scope (step 3)

`--registry` does NOT override a scope mapping. A user-level .npmrc line like
`@scope:registry=https://npm.pkg.github.com` wins over it, so the download hits
the wrong registry, fails with `notarget`, and `--silent` hides why. Pinning the
scope is the setting that actually loses to nothing.

The tarball path is taken from `npm pack`'s own output, never a glob: an older
tarball left in `$UPD_DIR` would be extracted instead, and the run would install
the version it was trying to leave.

The registry is read with `curl`, not `npm view`, because `npm view` can answer
from a stale local cache.

## What `--installed` refreshes

`--installed` refreshes exactly the CLI targets that already carry a version
stamp (`$HOME/.claude/.pipeline-version`, `$HOME/.copilot/.pipeline-version`,
`$HOME/.codex/.pipeline-version`) and adds none: an update never installs
Copilot CLI or Codex CLI on a machine that only had Claude Code. With no stamp at
all it installs Claude Code. Each refreshed target gets the new version stamp.

## Retired adapters (step 4c)

Cursor, Antigravity and Copilot Chat adapters are no longer targets; the pipeline
targets Claude Code, Copilot CLI and Codex CLI. Per-project adapter files
(`.cursor/`, `.agent/`, `.github/copilot-instructions.md`) live in the user's
repos and are left untouched.

## Writing the step 6 summary

The JSON holds every release between the old and the new version (not only the
last one) and, for each plugin the refresh moved, that plugin's releases. Turn it
into a short note in `outputLanguage`, written for the person using the
pipeline, not for its maintainers:

- First line: `✓ Updated: v<CUR> → v<NEW>`, then one line per updated plugin
  (`ai-ios-toolkit 0.20.0 → 0.21.0`).
- Then up to four groups, each only when it has entries: **New** (added),
  **Fixed**, **Changed**, **Removed** (Turkish: Yeni, Düzeltilen, Değişen,
  Kaldırılan). Put security entries first under Fixed.
- One plain sentence per item about what the user notices or can now do. Merge
  items that say the same thing; leave out internal-only entries (smoke tests,
  CI, refactors, budgets, docs) unless they change what a user sees. At most
  about eight items per group; when more were dropped, say how many and that the
  full list is in the CHANGELOG.
- Last line, when anything needs action: what to do (restart Claude Code for
  plugin changes, run a command a release asks for).

With empty notes and no plugin updates, print only the version line.

## Sample output

```
Current: v15.6.0   Latest: v15.7.0
  -> npm pack @{npm-scope}/multi-agent-pipeline@15.7.0
  -> node install.js --installed (Claude Code; no Copilot CLI or Codex CLI stamp, not installed)
  -> migrate-prefs.mjs (0 changes  -  already v2.6.0)

✓ Updated: v15.6.0 → v15.7.0
  ai-ios-toolkit 0.19.0 → 0.20.0

New
  - iOS design review: critiques a screen against the HIG from screenshots.
Fixed
  - The usage report reads the tracker as it is written.
Restart Claude Code to load the updated plugins.

Verification:
  schema-validation: 27/27 pass
  cross-cli-behavior: 14/14 pass
```
