Room
Rooms are intertwingled navigable activation context maps. Entering = calling. Exiting = returning.
Ethics (venue / framing inheritance): ETHICS.md · stack: soul/ETHICS.md
Directories as cognitive spaces where cards come to life.
The Metaphor
| Filesystem | Simulation | Programming |
|------------|------------|-------------|
| Directory | Room | Stack frame |
| cd room/ | Enter | Function call |
| cd .. | Exit | Return |
| Files in dir | Active entities | Local variables |
| Links | Exits/doors | Calls to other functions |
Room Anatomy
room-name/
├── ROOM.yml # Room definition (REQUIRED!)
├── README.md # Room's voice (optional)
├── CARD.yml # Card sidecar (optional)
├── character-*.yml # NPCs embedded in room
├── object-*.yml # Objects in room
├── inbox/ # Objects thrown INTO this room
├── outbox/ # Objects staged to throw OUT
├── region/ # Sub-region of this room
│ └── ROOM.yml # Region must also declare itself!
└── nested-room/ # Full sub-room (different location)
└── ROOM.yml
Regions vs Sub-Rooms
What's a Region?
A region is a sub-directory that represents a portion of the same room — like the stage area of the pub, or the back corner of a library.
# pub/ROOM.yml
name: "The Gezelligheid Grotto Pub"
# Regions are PARTS of this room
regions:
stage:
path: "stage/"
description: "The performance stage"
visibility: public
back-room:
path: "back-room/"
description: "Private back room"
visibility: private
requires: "bartender approval"
bar:
path: "bar/"
description: "The bar counter area"
Regions Have Rules
Each region can have its own:
# pub/back-room/ROOM.yml
name: "Back Room"
type: region # Marks as region, not full room
# Access control
access:
visibility: private # Not visible to everyone
requires: "bartender approval OR staff badge"
who_allowed:
- "characters/staff/*"
- "player if has_flag('vip_access')"
who_denied:
- "characters/troublemakers/*"
# Ethics & behavior
rules:
- "No recording"
- "Confidential conversations"
- "Staff only by default"
# Privacy
privacy:
eavesdropping: false # Can't hear from outside
visible_from_parent: false # Can't see inside from pub
# What happens in the back room...
narrative:
on_enter: "The door closes behind you with a soft click."
on_exit: "You return to the bustling pub."
Visibility Types
| Type | Description |
|------|-------------|
| public | Anyone can see and enter |
| visible | Can see but may need permission to enter |
| private | Hidden unless you know about it |
| secret | Hidden AND requires discovery |
Region vs Full Sub-Room
| Feature | Region | Sub-Room |
|---------|--------|----------|
| Part of parent? | Yes | No |
| Own identity? | Partial | Full |
| Exit returns to? | Parent | Varies |
| Shares parent context? | Yes | No |
| Type field | type: region | type: room |
Directory Type Declaration
The Rule
Every directory in an adventure MUST declare what it is.
| Directory Type | Declaration File |
|----------------|------------------|
| Room | ROOM.yml |
| Region | ROOM.yml (with type: region) |
| Character | CHARACTER.yml |
| Adventure root | ADVENTURE.yml |
| Personas | ROOM.yml (with type: personas) |
| Storage | ROOM.yml (with type: storage) |
Lint Error: Undeclared Directory
# LINT ERROR: Directory without type declaration
- type: MISSING_TYPE_DECLARATION
severity: WARNING
path: "pub/mysterious-corner/"
message: "Directory has no ROOM.yml, CHARACTER.yml, or other type declaration"
suggestion: "Add ROOM.yml with appropriate type field"
Valid Non-Room Directories
Some directories aren't rooms and that's OK:
# These don't need ROOM.yml:
messages/ # Mail storage (system)
inbox/ # Postal inbox (system)
outbox/ # Postal outbox (system)
sessions/ # Session logs (meta)
images/ # Asset storage (meta)
Marking System Directories
# Alternative: mark as system directory
# pub/messages/.meta.yml
type: system
purpose: "Mail storage for pub"
requires_room_yml: false
Container Directories (Inheritance Scopes)
Some directories are inheritance containers — they provide shared properties to child rooms without being navigable themselves. Like OpenLaszlo's <node> element.
# maze/CONTAINER.yml — not a room; its defaults reach the rooms inside
name: "The Twisty Maze"
description: "Groups maze rooms that share darkness and rules"
defaults:
room:
is_maze: true
lighting: 0 # pitch black; a lamp or a crystal changes it, the grue decides what that means
ambient:
sound: "dripping water"
Every room inside (room-a/, room-b/, ...) gets defaults.room unless it states the slot
itself. See the container skill for the lookup order.
Alternatively, you can make the container into an actual room:
# maze/ROOM.yml — The maze entrance IS a room
name: "Maze Entrance"
description: "Dark passages branch off in every direction..."
exits:
a: room-a/
b: room-b/
# ... etc
DESIGN CHOICE:
- Use
CONTAINER.ymlif you want inheritance without navigation (see container skill) - Use
ROOM.ymlif you want the directory to be a navigable space
Hierarchy Example
adventure-4/
├── ADVENTURE.yml # Adventure declaration
├── pub/
│ ├── ROOM.yml # Room declaration
│ ├── stage/
│ │ └── ROOM.yml # Region (type: region)
│ ├── bar/
│ │ └── ROOM.yml # Region
│ ├── back-room/
│ │ └── ROOM.yml # Private region
│ └── messages/
│ └── .meta.yml # System directory (no ROOM.yml needed)
├── characters/
│ ├── ROOM.yml # Hall of characters (type: personas)
│ └── don-hopkins/
│ └── CHARACTER.yml # Character declaration
└── maze/
├── ROOM.yml # Room declaration
└── room-a/
└── ROOM.yml # Sub-room (full room, not region)