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.
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| Field | Type | Required | Description |
|---|---|---|---|
title | string | yes | Slate name. Must be unique. Referenced by slate: in targets. |
folders | array | yes | List 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.
- 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 }| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Folder name. Must be unique within the slate. |
tokenLimit | integer | yes | Maximum tokens stored across all files in this folder. |
access | readWrite or read | no | Default: readWrite. read folders can be read but not written. |
evictionPolicy | FIFO, LRU, reject | no | Default: FIFO. Controls what happens when tokenLimit is exceeded. |
metatags | array | no | Folder-level metatag declarations. Apply to all files. |
files | array | no | Pre-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.
- name: core.md # required
init: blank # optional, default: blank
metatags: # optional: file-level metatags
- { name: priority, type: number }| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | File name (typically with .md or .json extension). |
init | blank or string | no | Default: blank (empty file). A literal string seeds the file with content. |
metatags | array | no | File-level metatags. Extend or override folder-level metatags. |
Initial content examples:
# 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.
| Policy | Behavior | Use when |
|---|---|---|
FIFO (default) | Removes the oldest content first (first-in-first-out) | Chronological logs, append-only histories |
LRU | Removes the least recently accessed content | Caches, frequently-changing working sets |
reject | Refuses the write entirely; existing content preserved | Fixed-size stores where data integrity matters |
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 fullHow eviction works:
- A write adds new content to a file.
- The runtime checks if the folder's total token count exceeds
tokenLimit. - 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 forslateWrite; gated writes propagate the error).
- 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.