Add Assetlib to this app so selected artwork (heroes, banners, backgrounds, promo art) can change without an app release. The app checks each release's signature before using it and keeps its bundled images as fallbacks. It needs one integration release first, and the SDKs are developer previews. Work in phases and stop where told. Rules - Read this repository's agent instructions first (AGENTS.md, CLAUDE.md and what they point to). On builds, schemes, project files, branches, commits, lint and PR format, the repository's rules win over this prompt. - Use only the packages, versions and commands named here or in each SDK's README at the pinned tag. Never invent a package, import, org or app ID, placement key or token. - Never run `npx assetlib` or `npm install assetlib`: Assetlib publishes nothing under that npm name. Use only the release URLs below. - Never ask me to paste a token into this chat or write one into code or config. - In this install session, never upload, publish, delete, rename or move an image (the AGENTS.md section from step 5 lets later agents draft images over the Assetlib MCP server; that is not part of this install). Never hand-edit a generated file. - Never raise a deployment target or upgrade Expo, React Native, Kotlin, the Android Gradle Plugin, Xcode or the Swift toolchain. If a minimum is unmet, stop and say which. - Do not push, open a PR, or run `assetlib sync` without --dry-run. Phase 1: read only 1. Run the assetlib-audit skill, or `npx -y @assetlib/audit@0.2.1 --json` (Node 22+) with --assets, --references and --history (git 2.44+). Its inventory reads PNG, JPEG and WebP only, and with --references at most 500 source files; --history counts how often artwork changed, asset-catalog PDF and SVG included. On iOS also read each .xcassets Contents.json and the image enums or helpers; on Android, the drawables and their call sites. Write nothing. 2. Report artwork that changes after release: path, pixel size, light/dark, accessor, call sites, change history. Start with still images. Not placements: app icon, launch screen, colors, user or market data, video. Icons only as tintable-icon placements. Lottie plays only on the web, through a player the app supplies; iOS and Android apps, Expo included, show its still poster. "No reference found" never means unused. 3. Propose 3 to 5 first placements: key, symbol (exactly two parts on Swift and Kotlin), width and height, fallback image. Check minimums and stop if one is unmet: - Swift: iOS 16, Xcode 16 (Swift tools 6.0), SwiftUI images only (drop art that renders in UIKit). Fallback image names may use only ASCII letters, digits, "_", "." and "-", with "/" between folder and image names and single spaces inside a segment; no segment may start with ".", and the whole name is at most 120 characters. - Kotlin: API 26; the AAR is built with Kotlin 2.2.20 and a JVM 17 target, so the app needs a Kotlin compiler that reads 2.2 metadata and a JVM 17 target. Never use AppAssets, AssetRef, AssetAccessibility or AssetRendering as a group or member name, two groups that differ only in case, or members that share a getter (coast, Coast). - Expo: Expo SDK 54 to 57, React Native 0.81 to 0.86, React 19. `assetlib init` and `assetlib adopt` name keys themselves: .. Art used in _layout, [param] or +route files is skipped. Propose keys in that form. STOP. Wait until I reply "go" with the approved list. Before I do, I will: a) create a workspace at https://console.assetlib.dev (GitHub or Google sign-in); b) save the staging and production public SDK configuration from Settings > Connect and tell you where the files are; c) have a workspace owner mint a declare token and save it as the CI secret ASSETLIB_TOKEN; on GitHub Actions, as a secret of an environment named assetlib-sync whose deployment branches are limited to main (a repository secret on a private GitHub Free repository). The token never comes to you. Phase 2: foundations, approved placements only 4. Install pinned exactly. Check the Expo, CLI and Kotlin downloads against the release's SHA256SUMS before committing the lockfile; SwiftPM pins Swift by the exact tag. - Swift: https://github.com/AssetLib/sdk-swift.git, exact 0.7.0-preview.1, product `AssetLib`, in the target or package that owns the artwork. If that is an Xcode project and the repository's rules forbid editing project.pbxproj, give me the Xcode steps and wait. - Kotlin, in the app module's libs/, plus the four exact dependencies in that README: https://github.com/AssetLib/sdk-android/releases/download/v0.6.0-preview.1/assetlib-android-0.6.0-preview.1.aar If the app pins different versions of those dependencies, report it; do not change them. If only a library module can hold the AAR, tell me. - Expo, then `npx expo install expo-file-system expo-image`: https://github.com/AssetLib/sdk-js/releases/download/v0.7.13-preview.1/assetlib-sdk-core-0.7.13-preview.1.tgz https://github.com/AssetLib/sdk-js/releases/download/v0.7.13-preview.1/assetlib-sdk-expo-0.7.13-preview.1.tgz - CLI, all apps, as a dev dependency (native apps: in a small package.json next to the catalog), run as `node ./node_modules/@assetlib/cli/bin/assetlib.mjs`: https://github.com/AssetLib/sdk-js/releases/download/v0.7.13-preview.1/assetlib-cli-0.4.9.tgz 5. Catalog: - Expo, no catalog yet: `assetlib init --config --src --image `. Show me the dry run, then add --apply. Exit 3 means nothing was adoptable: write the catalog by hand. If this repository does not use GitHub Actions, add --ci none. The workflow init writes runs on every push to main and fails until ASSETLIB_TOKEN exists. On Expo SDK 57, init also writes plugins/with-ios-scene-lifecycle.js and adds it to app.config.json or app.json, shown in the dry run: apps built with Xcode 27 need it to launch on iOS 27. A dynamic app.config.* gets a note instead: once --apply has written the plugin file, add it there. On exit 3 init writes no plugin file: tell me. If init notes an ios/ folder, tell me; do not run prebuild or edit ios/ yourself. On Expo SDK 54 to 56 init writes no plugin: Xcode 27 builds need Expo 57 or Xcode 26. Tell me in every case; on exit 3 init does not print that note. - Expo with a catalog: `assetlib adopt`, dry run first. It adopts every adoptable call site under --src, so narrow --src to folders with only approved call sites, or remove the unapproved entries from assetlib.catalog.json as well as reverting their call sites. - init and adopt also add or update an Assetlib section in AGENTS.md (and in an existing CLAUDE.md that does not import @AGENTS.md), shown in the dry run. If this repository's rules forbid that edit, revert those edits (delete AGENTS.md if the run created it) and tell me. If the output notes it left AGENTS.md or CLAUDE.md unchanged, tell me; do not add the section by hand. - Swift and Kotlin: write assetlib.catalog.json by hand with the approved entries. - Keys become permanent at the first sync. Fix any key name before then. 6. Generate code and commit a script that regenerates it: - Swift: copy scripts/generate-catalog.py from sdk-swift tag v0.7.0-preview.1 (commit 2b53a75). Inside a Swift package, construct AppArtwork(store:bundle: .module); the generated types are internal, so keep the store, connect and refresh in that package and expose a public entry point. - Kotlin: copy scripts/generate-assets.mjs from sdk-android tag v0.6.0-preview.1 (commit 7e1590e). Write one small composable from that README's example (the bitmap, or the R.drawable fallback) and use it only at approved call sites. - Expo: init or adopt generates it. After any hand edit of the catalog, regenerate with `node ./node_modules/@assetlib/sdk-core/bin/codegen.mjs assetlib.catalog.json > src/assets.generated.ts`, then run `assetlib check --catalog assetlib.catalog.json --generated src/assets.generated.ts`. 7. Route approved images through the generated accessors at the narrowest point (the app's image enum or helper), not every call site. 8. One long-lived client per app process. Load the public config for staging or production by build configuration, flavor or app variant; if it is missing or invalid, create no client and keep the bundled images. On Expo, load it that way in init's starter client. Call refresh at launch and on return to the foreground, never on a timer: Swift `images.connect(client)` then `await images.refresh(AssetCatalog.all)`; Kotlin `client.initialize()` then `client.refresh()`; Expo: the starter client already calls `client.refresh()` at both, so keep those calls (a client module from an earlier CLI lacks them: add them as the CLI README section "Starter clients written before CLI 0.4.3" shows); keep one refresh owner. To redraw images already on screen, a screen may await its own `client.refresh()` and then increment `revision`, after every refresh, never only when `updated` is true (the starter client may already have applied it). 9. CI (skip if init wrote .github/workflows/assetlib-sync.yml; if that file has no branch_gate job, it predates CLI 0.4.2: report it, point me to the CLI README section "Workflows written before CLI 0.4.2" and do not rewrite it): a job with Node 22 that installs the CLI folder with `npm ci --ignore-scripts`, then runs `sync --catalog --root --platform --app-version --build-number --references --json`, with ASSETLIB_TOKEN from CI secrets and ASSETLIB_CONSOLE, ASSETLIB_ORG and ASSETLIB_APP from CI variables, skipped while the secret is absent. It runs only on main and, on GitHub Actions, in the assetlib-sync environment: copy the branch_gate job and the sync job's needs, if and environment lines from that README section. If the default branch is not main, tell me before writing the job. Run `sync --dry-run` locally now. 10. Regenerate and diff, lint, and build a non-production configuration if the repository allows builds; otherwise give me the command. Commit the way the repository requires. Phase 3: hand-off. List what changed and what I still need to do: ship the integration release; after a build syncs, upload, review and publish in the console, or connect you to the workspace (claude mcp add --transport http assetlib https://console.assetlib.dev/mcp) so you can upload and assign images as a draft. Publishing always stays with a person.