# Refreshing `artifact/` from the live design system

The Artifact tool exists only inside a Claude session, so a sync is a short Claude Code session in this repo. There is no unattended way to pull the artifact.

1. **Check the version.** Artifact `list`, scope `files`, url `https://claude.ai/artifact/BPqvwcPVNHx91qvbLmCeUM`. Compare the version it reports with `artifact/VERSION.json`. Same version: nothing to do.
2. **Pull the files.** Artifact `read` with `paths` (at most 60 per call) for every published path that starts with `project/`, plus `SKILL.md` and `artifact-type/reference/*`. Omit `out_dir`; the files land in the session's scratchpad folder for the artifact. Copy `project/` over `artifact/project/` and the references over `artifact/type-reference/`, then delete from `artifact/project/` any path the listing no longer has.
3. **Pull new assets.** Artifact `list`, scope `assets` (follow `after` for the next page) and compare the ids with `artifact/ASSET-STORE-INVENTORY.tsv`. For each new id: Artifact `read` with `path` = the id (one per call; the `paths` form does not take ids), then copy it to `artifact/assets-store/<group>/<name>`, taking group and name from `assetGroups` in `artifact/project/design-system.json`. Regenerate the inventory from that index.
4. **Record and verify.** Update `artifact/VERSION.json` (version, time, counts, the index's `lastChange`). Run `scripts/verify.sh --write`, then `scripts/verify.sh`.
5. **Commit.** `git add -A && git commit -m "sync: artifact <version>"`, then push to `main`. Put `git diff --stat` for the previous sync in the commit body.

A session that only needs to read the system does not sync: it reads the files here.
