Filesystem layout
<root>/
worlds/<world-folder>/
world.json
calendar.json
dice.json
characters/
locations/
items/
factions/
lore/
prompts/
ui/<pack>/pack.json
images/
ui/<pack>/pack.json
presets/<name>/
preset.json
prompts/<language>/roleplay/
lorebooks/<name>/
lorebook.json
lore/<entry>/lore.json
avatars/
world.json
characters/<avatar>/character.json
images/
sessions/<uuid>/
session.sqlite
settings.json
opening.json
timeline.json
ui/<pack>/
images/
.sync/
state.json
calendar.json is optional. It defines named holidays and the hemisphere used by date-aware routines and triggers. dice.json is optional too: it defines the dice checks the game master rolls, and is copied into the story when it starts.
The roleplay root is portable content. Base plugin configuration and credentials remain in the DSH profile. .sync/ is device-local bookkeeping for cross-device sync; it is deliberately never copied to the remote.
World folder names are not identities. world.json.id is the durable world reference stored by sessions. Entity IDs are local to a world and are remapped into session database IDs on import while retained as source IDs.
A folder in presets/ is a preset: its preset.json (title, description, suggested temperatures) and the narration prompts it carries. A story gets a copy of the prompts when it starts, and keeps preset.json beside its database to remember where they came from.
A folder in lorebooks/ is a lorebook: its lorebook.json (title, description) and its entries, each in the format of a world's own lore with the scope always written. A story gets a copy of the entries when it starts and records which lorebooks they came from in its database.
The ui folders hold interface packs: the world's own, your own in the root, and the copies a session plays with.
Every session directory is named by a UUID. Its DSH chat ID is derived as session-<uuid> and is not stored separately. session.sqlite is the authoritative evolving state; settings.json is live configuration. opening.json and timeline.json keep enough presentation history to reconstruct the local DSH chat after a story arrives from another device.
Reference images have stable names; scene images use timeline node and serial. Metadata and sidecars make the image library readable without the session database.