Redeo Docs
DocsLADR / Slate Schema Reference

Slates

Slate Schema Reference

Slate Schema Reference

A slate is a persistent memory store declared at config time. It has folders, files, and metatags. The schema controls what gets stored, how much, and what happens when limits are exceeded. This article is the complete reference for every field in a slate declaration.

Slate declaration

A slate is declared under the top-level slates: key. Each slate has a title and a list of folders.

yaml
slates:
  - title: Project Memory          # required, unique within the config
    folders:
      - name: facts                # required
        tokenLimit: 500            # required
        access: readWrite          # optional, default: readWrite
        evictionPolicy: FIFO       # optional, default: FIFO
        metatags: [...]            # optional
        files: [...]               # optional
FieldTypeRequiredDescription
titlestringyesSlate name. Must be unique. Referenced by slate: in targets.
foldersarrayyesList of folder declarations. At least one.

Folder declaration

Each folder is a container for files and metatags. It has a token budget and an eviction policy.

yaml
- name: facts                      # required
  tokenLimit: 500                  # required
  access: readWrite                # optional, default: readWrite
  evictionPolicy: FIFO             # optional, default: FIFO
  metatags:                        # optional: folder-level metatags
    - { name: category, type: string }
  files:                           # optional: pre-declared files
    - name: core.md
      init: blank
      metatags:
        - { name: category, type: string }
FieldTypeRequiredDescription
namestringyesFolder name. Must be unique within the slate.
tokenLimitintegeryesMaximum tokens stored across all files in this folder.
accessreadWrite or readnoDefault: readWrite. read folders can be read but not written.
evictionPolicyFIFO, LRU, rejectnoDefault: FIFO. Controls what happens when tokenLimit is exceeded.
metatagsarraynoFolder-level metatag declarations. Apply to all files.
filesarraynoPre-declared files with initial content and file-level metatags.

Token limit enforcement: When a write would exceed tokenLimit, the eviction policy determines what happens. FIFO removes the oldest content; LRU removes the least recently accessed; reject refuses the write entirely.

File declaration

Files are declared inside folders. Each file has a name, initial content, and optional file-level metatags.

yaml
- name: core.md                    # required
  init: blank                      # optional, default: blank
  metatags:                        # optional: file-level metatags
    - { name: priority, type: number }
FieldTypeRequiredDescription
namestringyesFile name (typically with .md or .json extension).
initblank or stringnoDefault: blank (empty file). A literal string seeds the file with content.
metatagsarraynoFile-level metatags. Extend or override folder-level metatags.

Initial content examples:

yaml
# Empty file
- { name: core.md, init: blank }

# Pre-seeded with text
- { name: instructions.md, init: "Always cite sources." }

# Pre-seeded with JSON array (for mergeByKey writes)
- { name: index.md, init: "[]" }

Files not declared in the config can still be written at runtime — the runtime creates them on first write. Pre-declaring files is useful for:

  • Seeding initial content (init:).
  • Declaring file-level metatags.
  • Ensuring the file exists for the first read (avoids fallback).

Eviction policies

When a write would push a folder over its tokenLimit, the eviction policy determines what gets removed.

PolicyBehaviorUse when
FIFO (default)Removes the oldest content first (first-in-first-out)Chronological logs, append-only histories
LRURemoves the least recently accessed contentCaches, frequently-changing working sets
rejectRefuses the write entirely; existing content preservedFixed-size stores where data integrity matters
yaml
folders:
  - name: log
    tokenLimit: 1000
    evictionPolicy: FIFO           # oldest entries drop off

  - name: cache
    tokenLimit: 500
    evictionPolicy: LRU            # least-used entries drop off

  - name: critical
    tokenLimit: 100
    evictionPolicy: reject         # refuse writes when full

How eviction works:

  1. A write adds new content to a file.
  2. The runtime checks if the folder's total token count exceeds tokenLimit.
  3. If exceeded:
    • FIFO: remove the oldest written block until under limit.
    • LRU: remove the least recently read/written block until under limit.
    • reject: undo the write and return an error (the write fails silently for slateWrite; gated writes propagate the error).
  4. If under limit: write succeeds, no eviction.

Note: Eviction operates at the content-block level, not the file level. A single file's content may be partially evicted if it contains multiple appended blocks. Files declared with init: content are not protected from eviction — their initial content can be evicted like any other.