---
name: "creative_asset_library"
description: "Run one reusable library of creative assets across projects: index footage, images, music, sound effects, characters and sets so the library is searched before anything new is sourced or built, register reused assets as versioned bundles, and log which version each delivered cut used. Use when starting a project that could reuse prior work, when the same character, set, track or clip keeps getting rebuilt, or when a delivered cut cannot be traced back to its asset versions."
---

# Creative Asset Library

## Purpose
Keep one library across projects instead of one folder per project that nobody searches again. Every reusable asset gets one stable id, one registry entry, and a version history. A project searches the library first, reuses what fits, and only sources or builds new material for the gaps. When an asset is reused by a second project it stops being a loose file and becomes a versioned bundle. Every delivered cut records the exact asset versions it used, so a cut can be rebuilt, relicensed, or fixed months later without guessing.

## Workflow
1. **Set up the registry.** Create one registry file for the whole body of work, not one per project. Use `scripts/library.py init` and the schema in `references/registry-schema.md`. The schema starts from the 15 Dublin Core elements (title, creator, subject, description, publisher, contributor, date, type, format, identifier, source, language, relation, coverage, rights) and adds the production fields a creative library needs: tags from a controlled list, master path, proxy path, status, and version list. Keep the required field set small. A field that nobody fills in is worse than no field.
2. **Register assets at creation, not at cleanup.** When footage, an image, a track, a sound effect, a character, or a set is finished, register it in the same session. Fill descriptive fields (title, description, subject, tags), administrative fields (creator, date, rights, usage terms, source licence), and technical fields (format, duration or dimensions, master path). For photos and stills, copy rights and creator from the embedded IPTC and XMP fields where they exist instead of retyping them. Give the asset a stable id that never changes, in the form `type-slug`, for example `char-harbour-keeper` or `sfx-rain-on-tin`.
3. **Search before sourcing.** Before buying, licensing, generating, or building anything, run the search step in `references/search-before-sourcing.md`. Search by need first (what the scene has to do), then by subject, tags, type, and rights. Record the search in the project notes: query, date, what was found, what was rejected and why. A reuse decision and a rejection both count. If nothing in the library fits, that recorded miss is what authorizes new sourcing.
4. **Promote on second reuse.** The first time an asset is used, it stays a single registry entry. When a second project reuses it, promote it to a bundle: a named, versioned package that holds the master, its proxies or derivatives, its licence files, and any variants. See the versioning rules in `references/versioning-and-bundles.md`. From that point, projects reference the bundle and a version, never a loose file path.
5. **Version with meaning.** Version bundles as MAJOR.MINOR.PATCH following Semantic Versioning 2.0.0. Major means existing projects would break or look wrong if they swapped in the new version (character redesigned, set rebuilt at a different scale, track re-recorded in a different key). Minor means backwards compatible additions (new variant, extra angle, added stem). Patch means a fix that changes nothing a project depends on (loudness correction, typo in a texture, cleaned edge). Never edit a released version in place. Any change ships as a new version.
6. **Log every delivered cut.** At delivery, write a usage record for the cut: project, cut id, delivery date, and each asset or bundle with the exact version used. Use `scripts/library.py use` so the record lands in the registry and can be read back. A cut with no usage record is not finished, even if the file was exported and sent.
7. **Audit on a fixed cadence.** Once per project wrap, run `scripts/library.py validate` and review: assets with missing rights, bundles used by a cut but never promoted, duplicate entries for the same master, and tags outside the controlled list. Fix the registry while the project context is still fresh.

## Output Contract
- One registry file (JSON) that validates clean with `scripts/library.py validate`, holding every reusable asset, every bundle, and every usage record.
- For each project: a short search log showing the library was searched before new sourcing, with queries, hits, rejections, and the gaps that justified new work.
- For each promoted asset: a bundle entry with a semantic version, a contents list (master, derivatives, licence files, variants), and a changelog line per version.
- For each delivered cut: a usage record naming the project, the cut, and the exact version of every library asset or bundle in that cut.
- A wrap audit note listing rights gaps, duplicates, and unpromoted reused assets found, with each item either fixed or given an owner.

## Operating Rules
1. Search first is a gate, not a suggestion. No new licence, purchase, generation, or build starts until the search log for that need exists.
2. Rights travel with the asset. An entry with no rights field and no usage terms is not reusable, no matter how good it looks. Treat missing rights as blocked, the same as missing files.
3. One asset, one entry, one id. Never register the same master twice under two names. If a duplicate is found, merge the usage history into the older id and retire the newer id in the changelog.
4. Released versions are frozen. Editing a master in place destroys the usage record for every cut that used it. Always cut a new version.
5. Tags come from the controlled list in the registry. Need a new tag, add it to the list first with a one line definition, then use it. Freeform tagging is how libraries stop being searchable.
6. File names support the registry, they do not replace it. Use `asset-id_v001` style zero padded versions in file names so folders sort correctly, and let the registry carry the meaning.
7. Keep masters and derivatives separate in the bundle. The master is the highest quality source. Proxies, exports, and platform cuts are derivatives and never overwrite the master.
8. Do not delete registry entries for assets used in a delivered cut. Mark them retired instead, with the reason and date, so old cuts stay traceable.
