# Universal Asset Registry

> **Architecture / contracts only.** Assets are reusable commercial resources — **not** products, bundles, or capabilities.  
> ADR: [ADR-023](../architecture/adr/ADR-023.md) (v1.2 amendment)  
> Contract version: `asset-registry.v1`  
> Lifecycle: [asset-lifecycle.md](asset-lifecycle.md) · Marketplace stance: [asset-marketplace-contracts.md](asset-marketplace-contracts.md)

---

## 1. Purpose

The **Asset Registry** catalogs reusable commercial resources (templates, themes, libraries, packs) that products, bundles, and tenants may reference, install, or share.

Assets do **not** replace PlatformProducts, Business Bundles, Capabilities, Extensions, or Automation Packs.

---

## 2. Separation

| Concept | Asset? |
| --- | --- |
| PlatformProduct | No |
| Business Bundle | No |
| Capability | No |
| Extension | No (extensions may *reference* assets) |
| Automation Pack | No (packs may *reference* automation templates as assets) |
| Theme / Template / Media pack | **Yes** |

---

## 3. Aggregates

### 3.1 AssetDefinition

| Field | Type | Meaning |
| --- | --- | --- |
| `registry_object_id` | uuid | Universal stable ID — [universal-reference-contracts.md](universal-reference-contracts.md) |
| `asset_code` | string | Human-stable open code |
| `asset_type_code` | string | Open type registry — **unlimited** |
| `display_name` | string | |
| `description` | string? | |
| `publisher_product_code` | string? | Optional publishing PlatformProduct |
| `owner_service_identifier` | string? | Runtime owner when materialized |
| `lifecycle_state` | enum | See [asset-lifecycle.md](asset-lifecycle.md) |
| `version_code` | string | Current version |
| `metadata_ref` | uuid? | Metadata Registry bag |
| `policy_refs[]` | uuid[] | Policy Engine refs |
| `dependency_edge_ids[]` | string[] | Optional graph edges |
| `marketplace` | AssetMarketplaceDeclaration | See marketplace contracts |
| `payload_ref` | string? | Opaque content locator — **not** embedded here |
| `documentation_ref` | string? | |
| `ext` | object | Additive |

### 3.2 AssetType (open registry)

| Field | Type | Meaning |
| --- | --- | --- |
| `asset_type_code` | string | Open key |
| `display_name` | string | |
| `category` | string | Open (e.g. `template`, `theme`, `library`, `palette`, `media`) |
| `status` | enum | `active` \| `reserved` \| `deprecated` |
| `ext` | object | |

Architecture MUST NOT hardcode a closed asset-type list.

---

## 4. Illustrative asset type matrix (examples — not closed)

| asset_type_code | Display | Category |
| --- | --- | --- |
| `website_template` | Website Templates | template |
| `landing_template` | Landing Templates | template |
| `restaurant_theme` | Restaurant Themes | theme |
| `clinic_theme` | Clinic Themes | theme |
| `beauty_theme` | Beauty Themes | theme |
| `business_card_template` | Business Card Templates | template |
| `qr_template` | QR Templates | template |
| `report_template` | Report Templates | template |
| `dashboard_template` | Dashboard Templates | template |
| `email_template` | Email Templates | template |
| `sms_template` | SMS Templates | template |
| `workflow_template` | Workflow Templates | template |
| `automation_template` | Automation Templates | template |
| `invoice_template` | Invoice Templates | template |
| `print_template` | Print Templates | template |
| `menu_template` | Menu Templates | template |
| `course_template` | Course Templates | template |
| `survey_template` | Survey Templates | template |
| `form_template` | Form Templates | template |
| `prompt_template` | Prompt Templates | template |
| `ai_template` | AI Templates | template |
| `component_library` | Component Libraries | library |
| `widget_library` | Widget Libraries | library |
| `theme_pack` | Theme Packs | theme |
| `color_palette` | Color Palettes | palette |
| `font_pack` | Font Packs | library |
| `icon_pack` | Icon Packs | library |
| `media_pack` | Media Packs | media |

Unlimited future `asset_type_code` values MAY be registered without architecture changes.

---

## 5. Invariants

1. Assets never embed pricing amounts — use Pricing Catalog / policies by ref.
2. Assets never own subscription or license truth.
3. Asset payload content is opaque (`payload_ref`); commercial contracts stay lightweight.
4. Published Resources (ADR-022) may *use* assets; Experience does not own the Asset Registry.
5. No Marketplace implementation is authorized by registering marketplace-ready assets.
