---
name: ferret-scene-from-library
description: Use when a Ferret scene needs a thing (water, a car, a character, a material, a model): search the asset library first, take the item unless a new one was asked for, else make it; refer to id@version; what you make goes in. Never ask for permission to model.
---

# Assembling a scene from the library

## When to use
Every time a scene needs something: before anything is modelled, textured, generated or imported.

## The rule
1. Look it up. **The library is English only** (tags, descriptions, rubric names): translate the request yourself ("лес" is `forest`); the commands do not translate.
2. In the library and no new one was explicitly asked for: take it ("a passenger car" gives the library's Ford Crown Victoria).
3. Absent, or a new one was explicitly asked for: make it from scratch, and add what you made to the library when it is a reusable asset.
4. **Never ask for permission to model**, nor which of two library items: pick by the cards and previews; the frame corrects it.

## Versions, uids, descriptions
- An asset has a **uid** (issued by the library at the first submission; the assets of the first library keep their ids as uids), tags and a short English **description**. New assets have no names.
- The library issues the **version**: 1.0.0 first, then 1.1.0, 1.2.0 ... for each accepted new variant of the same uid. Old versions stay; a new one may hold fewer items.
- **A scene refers to a concrete version: `id@version`** (the API and the engine's library loading take it). **No version means 1.0.0, never the latest**: a new version never changes a made scene. Cards list `versions`; to use a newer one, name it. One version of a package is open at a time in a running scene.

## The REST API
Base `https://ferret.partners.solutions/ferret/library/`. You call it with plain HTTP; there is no other interface to the library.
- **Search** `GET api/search?q=<english words>&type=&rubric=&tags=&limit=`: a keyword search with a **generous set** of candidates (`car` brings `carbon` too); cards: id, uid, type, name, tags, rubric, description, preview url, size, versions. No ranking to trust: **read the cards and pick**; open the previews of the best few.
- **Card** `GET api/item/<id>[@version]`: catalog entry, package, versions. **Catalog** `GET catalog.json`; **packages and previews** `GET c/<hh>/<file>`, `GET previews/<file>` (Range supported, no sign-in): what the engine's `AssetLibrary` reads; the scene places the asset by `id@version`.
- **Rubrics** `GET api/rubrics`.
- **Add or update** `POST api/item[?uid=<uid>&description=<English>&rubric=<path>]`, `Authorization: Bearer <SW session of the person>`, body: a `.ferret` package, or a zip of `package.ferret` [+ `tiers/<tier>.ferret`] [+ `preview.webp`]. The answer carries the **uid and version issued**; **to update an asset send its uid back**. English only: Cyrillic is refused. The moderator's items go straight in, others' wait in `incoming/` (an update sent while the earlier waits replaces it; once accepted it is a new version of the same uid). Moderator: `GET api/incoming`, `POST api/incoming/<id>/accept|reject`.

## Steps
1. List what the scene is built from (skills and library items as `id@version`) at its start.
2. Search each need in English; read the cards; take the pick by `id@version` into the scene; frame; compare (`ferret-frame-check`).
3. Anything absent: make it (`ferret-models`, `ferret-humans`, `ferret-terrain`), then POST it with description, tags and rubric.

## What usually goes wrong
- Modelling first, searching later; asking "shall I model it?"; searching in Russian.
- A made asset left only in the scene or copied into the repository.
- A reference without a version taken for "the latest" (it is 1.0.0); an update sent without its uid (refused, with the uid to send).
