File System as Object — Directories, Interfaces, and the UPPERCASE Marker Grammar
"A directory named
<things>/is saying: the things in here are of the type<thing>. A file namedFOO.mdat a directory's root is saying: this directory exports the FOO interface. The directory IS an implementation class; the UPPERCASE marker files ARE its interface declarations; no UUIDs needed because the filename IS the class name."
This skill formalizes a grammar that already exists throughout MOOLLM. Every skill you've read — skill, prototype, card, schema, adventure, room, character, incarnation — uses these rules implicitly. The other meta-skills USE the grammar; this skill NAMES it so newcomers (human or LLM) can read MOOLLM directory trees fluently without pattern-matching each one from scratch.
The Three Rules
Rule 1: Plural-named directories declare element type
A directory named <things>/ declares "the things in here are of type <thing>."
skills/ → each child is (presumably) a skill
biomes/ → each child is a biome
mechanisms/ → each child is a schema mechanism
recipes/ → each file is a recipe
gotchas/ → each file is a gotcha
runbooks/ → each file is a runbook
instances/ → each child is an instance
stacks/ → each child is a stack
protocols/ → each file is a protocol
rooms/ → each child is a room
characters/ → each child is a character
"Presumably" is doing real work here: the plural name is a declaration of intent. To confirm a specific child actually IS of that type, look for its interface marker file (see Rule 3). Auxiliary content (templates, indexes, READMEs) can also live in a plural container without being instances — their absence of a marker file is the tell.
Rule 2: Singular-named directories are instances
A directory named <thing>/ (singular, kebab-case or single word) is an instance. The directory name is the instance's identifier.
skills/skill/ → instance named "skill" (a specific skill, happens to BE the meta-skill about skills)
skills/biome/ → instance named "biome"
skills/gcs/ → instance named "gcs"
mechanisms/json-schema/ → instance named "json-schema"
instances/leela-zion2-dev-0/ → instance named "leela-zion2-dev-0"
This reads as: <plural-container>/<instance-id>/.
Rule 3: UPPERCASE marker files declare interface exports
A file named FOO.md or FOO.yml (UPPERCASE filename) at a directory's root declares that the directory EXPORTS the FOO interface.
skills/gcs/
├── SKILL.md ← "I export the SKILL interface"
├── CARD.yml ← "I export the CARD interface"
├── GLANCE.yml ← "I export the GLANCE interface"
├── README.md ← "I export the README interface (human landing)"
├── recipes/ ← plural: "I contain recipes"
├── gotchas/ ← plural: "I contain gotchas"
└── ...
The UPPERCASE convention visually distinguishes interface declarations from ordinary content. The presence of the file IS the declaration — no separate registry required.
One directory exports many interfaces. Just like a COM class implements many interfaces, a MOOLLM skill directory typically exports SKILL + CARD + GLANCE + README + sometimes CHARACTER + EXPORTS + PROTOTYPES — all simultaneously, via multiple marker files.
The COM Analogy
This is Henry's framing, which anchors the whole grammar:
| COM concept | File-system-object equivalent |
|---|---|
| Implementation class (C++ / IDL class) | Directory — the <thing>/ singular name |
| Interface declaration (IDL interface IFoo) | UPPERCASE marker file — FOO.md or FOO.yml |
| Interface UUID (IID_IFoo = {01234567-89ab-...}) | Not needed — the filename IS the identifier |
| Multiple interfaces per class | Multiple UPPERCASE marker files per directory |
| QueryInterface(IID_IFoo, &ptr) | cat <dir>/FOO.md (or "does this dir export FOO?" = test -e <dir>/FOO.md) |
| Class factory (CoCreateInstance) | Prototype instantiation (see skill-instantiation-protocol.md, delegation-object-protocol.md) |
| Aggregation (one class delegating to another) | DOP prototype chain via inherits: or PROTOTYPES.yml |
| TypeLib registry | schemapedia/registry.yml (for schema mechanisms); skills/biome/biomes/registry.yml (for biomes) |
COM's big wins were: (a) multiple interfaces per implementation, (b) language-neutral contracts, (c) strong versioning via UUIDs. MOOLLM keeps (a) and (b), swaps (c) for readable UPPERCASE names because we want humans and LLMs to read the tree, not a binary-stamped registry.
COM's big losses were: opaque UUIDs, fiddly registration, reliance on a global registry, Windows-centric tooling. MOOLLM avoids all four by putting the declarations in the filesystem itself.
Why UPPERCASE
The UPPERCASE-filename convention (SKILL.md, CARD.yml, MECHANISM.yml, ALERT.yml, PROTOTYPES.yml) does several things at once:
- Visual grep. In any
lsoutput, UPPERCASE files leap out. Structural signposts pop; ordinary content recedes. - Class-vs-content distinction. Lowercase filenames (
camera-configs.json,my-recipe.md) are content; UPPERCASE is meta — "I am telling you what this directory IS." - Namespace cleanliness.
foo.md(lowercase) is a note about foo;FOO.md(uppercase) is a declaration that this directory implements FOO. They don't collide, and their roles are clear at a glance. - Future-proof tooling. A validator script can simply glob for
[A-Z]*.{md,yml}at a directory root to find all exported interfaces. No manifest file, no parsing. - Big-endian naming. The UPPERCASE prefix groups structural files together alphabetically at the top of
lsoutput.
When NOT to use uppercase. Normal content, per-instance data (state.yml, history.md), templates (RUN.yml.tmpl — the .tmpl is the tell that it's a template, not a declaration), ordinary documentation (troubleshooting.md).
Serialization — YAML Preferred, JSON Welcome, Comments Encouraged
Interface marker files come in three flavors, each picked on purpose:
| Extension | Use when | Why |
|---|---|---|
| .yml | The interface is data-shaped (fields, structure, lists). Default choice. | Comments are first-class and encouraged (see