Add or locate LunCoSim assets under `assets/`: USD components, WESL shaders, Modelica models, SysML requirements, or event-driven Rhai policies. Use for discovery, spawn palette entries, `lunco://` references, Twin-mounted assets, source programs, or web manifests. This skill owns placement and resolution; use author-usd-component for USD authoring and validate-assets for pre-flight.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Use Asset Library?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/luncosim-use-asset-library)
---
name: use-asset-library
description: >
Add or locate LunCoSim assets under `assets/`: USD components, WESL shaders,
Modelica models, SysML requirements, or event-driven Rhai policies. Use for discovery, spawn
palette entries, `lunco://` references, Twin-mounted assets, source programs,
or web manifests. This skill owns placement and resolution; use
author-usd-component for USD authoring and validate-assets for pre-flight.
---
# Use the asset library
Almost everything in LunCoSim is an **asset file**, not a Rust type. A part, a
vehicle, a material, a subsystem's physics, a mission script — all of them are
files under `assets/` that the engine discovers at runtime.
> **Rust ships parameterized behaviours; it never hardcodes a thing.** If you
> are about to add a Rust struct for a specific rover, habitat, or shader, stop
> and add a file instead.
Related: [`author-usd-component`](../author-usd-component/SKILL.md) (how to write
the `.usda`), [`build-vehicle`](../build-vehicle/SKILL.md) (assemble parts),
[`build-usd-scene`](../build-usd-scene/SKILL.md) (assemble a scene),
[`author-scenario`](../author-scenario/SKILL.md) (rhai),
[`run-modelica`](../run-modelica/SKILL.md) (`.mo`),
[`validate-assets`](../validate-assets/SKILL.md) (**pre-flight before you run**).
Design: [`56-asset-resolution-and-cache.md`](../../docs/architecture/56-asset-resolution-and-cache.md),
[`50-usd-driven-visuals.md`](../../docs/architecture/50-usd-driven-visuals.md).
## Where things live
The canonical human/AI map is [`assets/README.md`](../../assets/README.md).
Read it before adding a file; the filesystem is the runtime manifest and the
README defines the stable taxonomy.
| Folder | Holds |
|---|---|
| `assets/components/` | reusable part prims referenced into vessels — domain folders include `avionics/`, `cameras/`, `comms/`, `environment/`, `gnc/`, `lights/`, `mobility/`, `mounting/`, `payload/`, `power/`, `terrain/`, `thermal/` |
| `assets/vessels/` | whole vehicles — `rovers/`, `landers/`, `satellites/`, `balloons/`, plus `control_profiles.usda` |
| `assets/structures/` | surface installations — habitat, mast, ISRU plant, landing pad |
| `assets/props/` | simple scene objects — ball, ramp, wall |
| `assets/scenes/` | loadable stages — `base/`, `luncosim/`, `tests/`, `celestial/` |
| `assets/models/` | behaviour sources: `.mo` (Modelica); `.py` only when the optional Python backend is explicitly enabled |
| Twin-owned requirement roots | `.sysml` / `.kerml` source files declared and indexed by `twin.toml` |
| `assets/scenarios/` | `.rhai` bound as a `LunCoProgramAPI` source |
| `assets/scripting/` | importable rhai modules — `lib/`, `prelude/`, `policy/`, `tools/` |
| `assets/shaders/` | `.wesl` |
| `assets/celestial/`, `missions/`, `tutorials/`, `lighting/`, `config/` | global/application data |
## Architecture boundary
Native asset-backed entry points use `lunco-assets-runtime::run_asset_app`.
The asset owner retains source-event receivers through App teardown and drains
them until native watcher producers retire. Keep this lifetime outside the
runner; do not disable hot reload, add a timed shutdown delay, or copy a watcher
implementation into the application. Browser runner lifetime stays asynchronous.
Keep native filesystem paths in their platform spelling. Use the storage
owner's `file_path_to_uri` for URI transport, and slash-normalize only logical
asset paths after stripping their native root. See the
[asset addressing boundary](../../docs/architecture/56-asset-resolution-and-cache.md#usd-references-stay-logical-through-loading)
for Windows verbatim and UNC handling.
Dataset output ownership uses worker-prepared `lunco-storage::FilePathIdentity`;
do not infer case sensitivity from the OS or lowercase native paths. Missing
destinations inherit their admitted ancestor's directory/volume semantics.
Windows uses native ordinal comparison; macOS queries its volume format/case mode
and uses APFS canonical Unicode comparison or HFS's native filename representation
and fixed collation API. Unknown collation rejects ownership visibly. Keep preparation on the I/O worker
and consume snapshots without filesystem work at admission.
- USD owns assembly, transforms, variants, references, and wiring.
- Modelica owns continuous/domain math.
- Rhai owns scenario orchestration, rules, scoring, and assertions.
- The task kernel is reusable mechanism; Rhai owns authored behavior policy.
- Rust owns only general heavy runtime capabilities and bridges; expose their
controls to Rhai instead of baking mission policy into Rust.
For a generic human/AI assembly workflow, use the hot-reloadable
`assets/scripting/tools/model_authoring.rhai` facade. Keep its reusable reads,
plans, and checks generic; put Twin-specific recipes beside the Twin. Pair any
observable asset/linter regression with a USD fixture and Rhai scene observer
under `assets/scenes/tests/` and `assets/scenarios/tests/`.
Environment facts are produced by a distinct
`components/environment/probe.usda` source prim. Never make a Modelica/Python
consumer declare `gravity_accel` or a direction-target triplet as its own
output and connect that output back to itself. EnvironmentProbe outputs use
`<target-id>_mount_x/y/z`; reusable Modelica consumers use the generic
`target_mount_x/y/z` inputs, and their wires choose which object supplies the
direction. Use `components/comms/antenna.usda` for passive geometry carried by
its parent. For articulated pointing, reference `components/comms/antenna_tracking.usda`
and connect the triplet on its `AntennaTrackerController`. The component owns
its bodies and joints; scenes own target selection.
The engine catalog and web manifest share `discovery::scan_library`; its
registered extensions live in `MANIFEST_EXTS`, not in a second packaging list.
Its `Result` must be propagated: an invalid inventory must not become an empty
catalog. Native catalog filters and complete source inventories share the same
contained traversal; never add another directory walker for a picker or browser.
Domain discovery, such as Modelica's model catalog or a Twin's SysML source
index, is distinct from that engine catalog. Installed source stores use the
complete `inventory_files` traversal and let their language owner select sources.
Structured Modelica packages use `models::package_files`, which reads through
`discovery::read_files_with_extension`; do not add a separate package walker.
Package-root admission is owned by `models_package_root_path`; propagate its
errors and inventory/read failures rather than selecting another source bundle.
Package-browser nodes use the admitted `LibrarySource` inventory and reader,
with Modelica layout supplied by `package_paths`. Lazy failures stay visible
until an explicit retry or source reconciliation.
Catalog membership never restricts loading an explicitly addressed data asset.
## The `lunco://` scheme
`lunco://<rel>` = the runtime `assets/<rel>` followed by the shared global
cache. Packaged files are staged into `assets/`; no engine-local cache is
searched. The runtime root is selected by
the fallible `lunco_assets_core::assets_dir_abs()` from `LUNCO_ASSET_ROOT` when
set, otherwise executable/package ancestry before current-directory ancestry.
An invalid override or unresolved library stops admission with an error;
callers propagate that error instead of inventing a root. The asset owner
provides typed Bevy load addresses, preserving literal `#` and `%` filenames.
Engine reads use `lunco_assets_core::engine_asset_read_roots()`.
Twin reads use the manifest routes admitted into `TwinRoots`; unlisted Twin
paths resolve only in the authored Twin folder.
`twin://<source-identity>/<rel>` is the canonical Twin source address used by
scene commands and persisted source identity. UI labels resolve it to the
mounted Twin's display name and relative path. For legacy sources without a
UUID, the source identity is the encoded display name and changes if that name
changes.
`LoadScene` resolves it to the current mount; only internal asset reads use the
mount authority. Each Twin `Assets.toml` declaration maps a logical asset path
to one physical owner: the Twin cache by default, the global cache when
`shared = true`, or the authored Twin folder when a processed output sets
`output_root = "twin"`. Missing content at that owner fails there; another copy
is not searched. Unlisted Twin paths read only from the authored Twin folder.
`TwinAssetMounted` is published only after the manifest routes are read through
platform storage and installed. Native hosts use an I/O worker; browsers read
from OPFS asynchronously. Consumers must wait for that event before loading
Twin assets.
Runtime code gets the Twin cache path from `lunco-assets-core::twin_cache_dir`
and manifest cache ownership from `lunco-assets-datasets`; do not join
`.cache` or choose shared versus local storage at call sites. See the
[cache ownership contract](../../docs/architecture/56-asset-resolution-and-cache.md#engine-and-twin-caches).
A manifest-selected owner controls each dataset artifact path. Schemes are registered in
`crates/lunco-assets-runtime/src/asset_sources.rs`; `twin://` is stateful, it is not a
second texture scheme. Use the existing logical `lunco://` or `twin://` identity
for every delivered artifact. Canonical URI construction, separator normalization,
and traversal validation come from `lunco-assets-path`;
source roots and bytes are admitted by `lunco-assets-runtime` using the identity
and cache contracts from `lunco-assets-core`. User-authored addresses and scene
commands use the stable source URI. The asset owner keeps the exact current
mount lease private for internal reads; callers must not construct it from a
manifest name or retain it across Twin closure. Follow the canonical
[source URI and mount lease contract](../../docs/architecture/55-scene-addressing-and-roots.md#3-source-uris-and-internal-mount-leases)
for provenance and scenario synchronization. Verify replacement content through
the production app; resolver seam tests alone do not prove Bevy cache behavior.
Native USD payloads, texture inputs, and Rhai asset sources use the
[typed native admission contract](../../docs/architecture/55-scene-addressing-and-roots.md#native-payload-and-source-admission).
Pass the stage's actual `AssetServer` path and current `TwinRoots` to the asset
owner; keep its `Result<AssetPath>` through loading and attach labels separately.
Verify a valid native filename with URI characters and a rejected foreign or
retired mount through the production consumer; do not register an unrestricted
`file:` source or enable unapproved paths to make a fixture load.
Every Twin cache-backed download or processed artifact is declared in its
`Assets.toml`, which selects the artifact owner. Runtime downloads begin only
on explicit request (Settings ▸ Data & libraries, the
Twin Browser Files section's Twin assets rows, or the `lunco-assets` CLI).
Bundle targets declare build-time delivery for packaged runtime dependencies.
The browser rows are only a view of
`lunco_assets_datasets::DatasetRegistry`; they must emit its typed
request/cancel commands and never create a second downloader or parse cache
paths. The optional `lunco-assets` package composes native workers from
`lunco-assets-transport`, `lunco-assets-download`, and
`lunco-assets-processing`; consumers that only inspect declarations or state should depend on
`lunco-assets-datasets`.
All requesters use the `download` section of the one settings file owned by
`lunco-settings`. `DownloadSettings.max_attempts` includes the first request;
retry waits are exponential and capped. Native and browser fetches retain
received bytes and resume with HTTP `Range` when the origin supports it.
Callers must pass the shared settings resource through the existing asset/API
surface rather than adding a local retry loop or path.
**A bare relative path is not "wrong" — it is resolved against the anchoring
document's directory, keeping that document's scheme.** That is why it bites:
```usda
# ✅ engine library — works no matter who mounts this file
prepend references = @lunco://components/mobility/wheel.usda@
prepend references = @lunco://components/power/battery.usda@
# ✅ a file sitting next to a Twin scene
uniform asset info:sourceAsset = @./gnc.rhai@
# ⚠️ only legal when this file is itself inside assets/ AND never Twin-mounted
uniform asset info:sourceAsset = @scenarios/foo.rhai@
# ❌ when this traversal leaves the admitted source root
prepend references = @../../components/mobility/wheel.usda@
```
The active program contract is visible in the runtime status. A Modelica or
optional Python source with no declared `inputs:`/`outputs:` is reported as source-only;
it is not treated as a running participant. `AttachProgram` is the canonical
way to add the source and its explicit scalar contract. "My model does nothing"
should be diagnosed by checking `CosimStatus` and `GetBrokenConnections`, not by
assuming a hidden fallback. The production scene-test catalog reports read and
parse status for every discovered `.usd*` asset, and the sandbox smoke
scenario asserts that shipped USD sources are readable and parseable. Only
[`validate-assets`](../validate-assets/SKILL.md) catches a broken `references`
arc before you launch.
> Rhai `import` uses the same canonical asset identity as USD. Use a logical
> `lunco://…` or `twin://…` URI, an assets-root `/…` path, or a path relative to
> the importing script. `RhaiSourceLoader` loads every literal import as a Bevy
> dependency; unused scripts are not preloaded.
The source asset owner qualifies default Bevy paths as `lunco://` before it
publishes source text or prepared ASTs. Scenario roots, imports, and unloads use
the same canonical identity; Twin paths retain `twin://`. Consumers commit the
complete loaded import graph before binding or starting a source because Bevy
can report graph readiness before its `Added` messages are consumed.
## Add a USD component
Write one file = one spawnable thing. The full authoring reference is
[`author-usd-component`](../author-usd-component/SKILL.md); the *library* rules
are:
```usda
#usda 1.0
( defaultPrim = "Widget" # ← lunco:spawnable is ONLY read here
upAxis = "Y" metersPerUnit = 1.0
doc = """What this is." """ )
def Xform "Widget" ( kind = "component" prepend apiSchemas = ["LunCoCatalogAPI"] )
{
uniform bool lunco:spawnable = true
}
```
**How it reaches the palette** (`crates/lunco-scene-catalog/src/catalog.rs`):
| Palette field | Derived from |
|---|---|
| `id` | the **file stem** |
| `display_name` | stem Title-cased (splits `_` and `-`) |
| `category` | the **immediate parent folder**, Title-cased |
| description | the stage's `doc` metadata |
So `components/power/solar_panel.usda` lands under **"Power"** — not
"Components". A file with no parent folder lands in "Other". Nothing is
hardcoded; **moving the file changes its category.**
- `lunco:spawnable` defaults to **false** — it is opt-in.
- It must sit on the stage's `defaultPrim`. On any other prim the palette never
sees it (child `lunco:spawnable` is a different feature — subpart selection).
- An unreadable file is not spawnable and logs `CATALOG: … unreadable`.
- Editing an already-scanned file? Send **`RescanSpawnCatalog`** — the scan
caches per asset. Adding a *new* file is picked up automatically on native
(the filesystem is the manifest).
For photographic terrain detail, declare the scan maps in the Twin's
`Assets.toml` and download them through the asset manager into `.cache`.
Author `detail_albedo_map`, `detail_normal_map` and `detail_surface_map` inputs
through the USD document owner; keep their metre scale and linear luminance
mean explicit. Tangent detail normals belong to their separate role, while
DEM normals and site rasters retain their own registered frames. See
[`physical-scale surface detail`](../../docs/architecture/terrain-layered-rendering.md#physical-scale-surface-detail).
## Add a shader (`.wesl`)
Drop it in `assets/shaders/`. It is walked into the manifest and registered into
the `ShaderCatalog` automatically (`RescanShaders` to re-read edits). Bind it
**directly on the gprim**:
```usda
uniform asset info:wesl:sourceAsset = @lunco://shaders/rover_hull.wesl@
```
The tunable surface is reflected from a `struct Material` at
`@group(2) @binding(0)`, annotated with `//!@` comments
(`crates/lunco-materials/src/dyn_params.rs`). There are exactly **three**
directives — there is no `//!@param`:
```wgsl
struct Material {
//!@engine display_color
display_color: vec3<f32>,
//!@ui 0.0 1.0 "Wear"
wear: f32,
//!@default albedo 0.17,0.17,0.17
//!@ui color "Accent"
accent_color: vec3<f32>,
}
```
| Directive | Effect |
|---|---|
| `//!@engine <name>` | the **engine fills this uniform** — see the registry below |
| `//!@ui <name> [args] "Label"` | `color` / `int min max` / `min max` (slider) / else free |
| `//!@default <name> <v>[,<v>…]` | packed value when nothing else supplies one |
### Engine-filled uniforms
`crates/lunco-materials/src/engine_params.rs` is the **provider registry** — a
process-wide `OnceLock`, so the validator, the prop picker and the renderer all
read the same list.
| `//!@engine` name | Filled from | Usable on a prop? |
|---|---|---|
| `display_color` | the prim's composed `primvars:displayColor` **element 0** | ✅ |
| `sun_vis` | horizon ray-march visibility | ✅ |
| `sun_dir`, `sun_dir_world`, `sun_tan_radius` | sun direction / angular radius | ❌ |
| `hf_size`, `hf_res`, `csm_far`, `shadow_cache_on`, `horizon_march` | terrain heightfield, shadow state and march parameters | ❌ |
**The colour contract: author `primvars:displayColor`, the shader consumes it.**
```usda
color3f[] primvars:displayColor = [(0.30, 0.72, 0.35)] # ARRAY, linear
```
One authored attribute, in the standard USD place, whether the part renders
through plain PBR or through WESL. An authored `inputs:<name>` on the bound
Shader **always wins** over the engine fill — but authoring `inputs:display_color`
hides the colour from every other tool that reads USD, so use `inputs:` only for
what displayColor cannot express (accents, panel scale, wear, dust).
A shader using any ❌ param is refused by the **prop material picker** (it would
render black on a rover part) but still works as a scene shader — that is exactly
the `not prop-pickable` warning from
[`validate-assets`](../validate-assets/SKILL.md). An unregistered `//!@engine`
name warns and packs to its `//!@default` (or zero) — nothing fills it.
## Add a Modelica behaviour (`.mo`)
For an acausal physical domain, author component class/nameplate facts and
connector topology in USD. The runtime projector compiles each connected island
into one Modelica model; never bind one solver program per electrical part.
Three gates, each of which silently does nothing when unmet:
1. **The language is the file extension**, nothing else. `.mo` → Modelica,
`.py` → Python, `.rhai` → Rhai.
2. **No `inputs:`/`outputs:` ⇒ never stepped.** The cosimulation projector requires at least
one port-prefixed attribute. A model with no ports is a documentation-only
reference.
3. **`realtimeSafe` defaults to `false`**, and the wiring pass then refuses the
prim a force/torque port on a client-predicted body. Author it `true` when
the program drives a force.
And `sourceAsset` must be typed **`asset`**, never `string` — only an `asset` is
visible to the resolver, the reference closure, and packaging.
Continuous equations belong in Modelica. Rumoca 0.10 compiles conditional
expressions and events; the selected solver validates its supported model
contract. Client prediction selects fixed RK4 and requires continuous models
with parameter-only event partitions. Parameter assertions remain active;
dynamic events and discrete updates need an event-capable solver.
Smooth clamps remain useful when the authored physical law
requires a transition band. Rhai owns events and mission glue; production
scenarios use events, while authored tests may sample ticks for verdicts.
## Regenerate the web manifest
Native runtime walks the filesystem, so **adding a file needs no step at all**.
The **web** build has no filesystem: it fetches `assets/manifest.json`
(`crates/lunco-assets-runtime/src/discovery.rs`). After changing a source included by `scan_library`:
```bash
./scripts/build_web.sh build luncosim
```
which rsyncs `assets/` into `dist/` and runs
`cargo run -p lunco-assets-runtime --bin build_asset_manifest -- <dist>/assets`
(`scripts/build_web.sh`). That generator calls the **same**
`discovery::scan_library` the native runtime uses, so the two cannot drift.
There is no standalone regenerate command.
Binary runtime assets are staged by the manifest-declared bundle target as part
of the same build. Add or change the `bundle` field on the authoritative
`Assets.toml` entry, then rebuild; do not add a second shell list. DejaVu Sans
has targets for both applications' native and web builds, is included in those
packages for offline use, and remains available in Settings for explicit retry.
Planetary imagery, external models, and source libraries remain user-requested
downloads and have no bundle target.
Other package-only entries must name a bundle and cannot be recommended. The
staging command validates the declared raw/processed artifact before copying
it, so a missing or incomplete asset fails the build instead of becoming a
browser 404.
Bundle-qualified keys are for log identity; temporary download files use an
opaque process/attempt name, so adding a grouped asset never creates a
platform-dependent cache subdirectory.
## Validate before you run
```bash
"$LUNCOSIM_BIN" --validate assets/vessels/rovers/my_rover.usda
```
Seconds, no GPU, no app. Composes the whole reference closure — so it catches
the broken `@lunco://…@` that would otherwise be a mystery at load — and runs the
strict wheel reader. See [`validate-assets`](../validate-assets/SKILL.md).
## Anti-patterns
USD composition is owned by `lunco-usd-compose`: `lunco-assets-core` supplies
canonical IDs and traversal-safe roots, while `lunco-assets-runtime` supplies
source bytes; composition interprets USD arcs into an
inert stage. Modelica, Rhai, behavior trees, physics, and rendering bind later
in their own layers. A tutorial only projects metadata from that stage.
- ❌ A bare relative reference to a **shipped** asset — it resolves against the
anchoring document, so the file breaks the moment a Twin mounts it. Use
`@lunco://…@`.
- ❌ A layer-relative reference which escapes its admitted root. Explicit `./`
and `../` references anchor to the contributing layer and remain contained.
- ❌ A dynamic/non-literal Rhai `import` — dependencies must be known while the
asset is loading, so the loader rejects it visibly.
- ❌ `lunco:spawnable` on a prim that is not the stage `defaultPrim` — invisible
to the palette.
- ❌ Encoding a category in the filename — the category IS the parent folder.
- ❌ A `LunCoProgramAPI` with no `inputs:`/`outputs:` and expecting it to run.
- ❌ `info:sourceAsset` typed `string` — must be `asset`.
- ❌ Authoring `inputs:display_color` instead of `primvars:displayColor` — it
works, and it hides the colour from every other USD consumer.
- ❌ Adding a Rust struct for a specific vehicle/part/material. It is a file.
- ❌ Assuming the web build picked up a new asset without re-running
`build_web.sh`.
## Language resources use the same reader
Interpret a language reference once, then return a typed asset location. Use
`lunco-assets-core::registered_read` for bounded source/directory bytes and the
optional `lunco-assets-runtime::ui_loader::AssetBytesLoader` for egui. Do not add
per-language byte readers, cache searches, percent decoders or pending-load
caches. Standard URI components decode at their boundary; literal internal
asset addresses do not. Scheme case normalizes without changing name/path case.
Installed source stores use `library_read`/`library_open` with `Result<Option<_>>`:
only absence permits another root. Registered `library://` addresses pin one
installed source and remain runtime addresses, not authored cache locations.
Keep native source traversal under its admitted absolute root; an escaped or
repeated entry is a source-set admission error.
For Modelica, use `resource_uri` language facts and `SourceRootRegistry`'s
resource context. Package declarations come from admitted parsed sources, not
palette entries. Preserve the qualified resource hierarchy when packages share
one file. UI links dispatch `OpenAssetResource`; documentation and Bitmap
painting consume the same asynchronous asset/image pipeline.
Admit filesystem source roots through `canonical_directory_root` and the shared
store installer. Invalid configured roots reject visibly; do not substitute the
cache. Source stores are immutable for the application lifetime and repeated
installation must retain the same identities. Settings views read resident roots,
not filesystem probes. Explicit native file URIs retain native filename semantics;
portable asset paths and exact UTF-8 language source identities keep their own
validated representations. Use the shared resource reload action after an external
file edit; do not introduce a language-specific retry or cache reset.
Prepare native source stores with `LibrarySource::filesystem` on a worker after
UI startup. The common inventory includes every file, including Resources,
Images and test directories; language owners filter its resident paths. Native
reads share `FileStorage::open_regular_file`, so special files reject before
opening. Twin readers stream native/OPFS payloads before the consumer byte limit
and share resident overlay bytes without cloning the payload.
Directory-owned Modelica facts retain per-file provenance. A document overlays
its current valid parse at that owner; an invalid/pending parse reports an
error. Save commits facts, close removes only the unsaved overlay, and Twin
retirement removes the owner. Verify edits, sibling-file membership, save/close,
and invalid-parse recovery with `scripts/api/test_asset_resources.py`.
Engine readers and dataset probes use the engine root contract and
`resolve_native_asset`. Twin readers first select the manifest-declared owner,
then validate containment and entry kind there. They do not search another
Twin or cache location when the selected artifact is absent or invalid. Use
`resolve_asset_input` at native CLI/validation boundaries. Synchronous Twin
bytes require `TwinReadScope` captured from `TwinRoots`, including the admitted
manifest routes.
`file_uri_to_path` returns verbatim native paths on Windows so URI filenames
retain literal trailing dots/spaces. Keep those `PathBuf` values intact; compare
native identities through storage instead of prefix/string rewriting. Scoped
native file references must stay inside the captured Twin root. Registered native
readers use the same relative-address grammar as typed load requests.
Admit native paths containing parent traversal through storage before converting
them to file URIs. URI lexical normalization cannot establish filesystem identity;
unrepresentable literal dot components produce an explicit conversion error.