Skip to content

YAML Schema

The edicts file has four top-level keys:

version: 1
config:
maxEdicts: 200
tokenBudget: 4000
categories: []
staleThresholdDays: 90
categoryLimits: {}
defaultCategoryLimit: null
defaultEphemeralTtlSeconds: 86400
edicts: []
history: []
FieldTypeDescription
maxEdictsnumberMaximum number of active edicts
tokenBudgetnumberMaximum total token budget
categoriesstring[]Allowed categories (empty = any)
staleThresholdDaysnumberDays before durable edicts are stale
categoryLimitsRecord<string, number>Per-category soft limits
defaultCategoryLimitnumberDefault limit for unlisted categories
defaultEphemeralTtlSecondsnumberDefault TTL for ephemeral edicts

Config values in the file are merged with constructor options. Constructor options take precedence.

Each edict in the edicts array:

FieldTypeRequiredDescription
idstringAuto-generatedUnique identifier. Sequential (e_001, e_002) or derived from key
textstringThe edict content — the actual fact or assertion
categorystringCategory for grouping. Normalized: lowercased, trimmed, plural ‘s’ stripped
tagsstring[]Default: []Free-form tags for fine-grained filtering. Same normalization as category
confidence'verified' | 'inferred' | 'user'Default: 'user'How confident we are in this fact
sourcestringDefault: 'manual'Provenance — who or what established this edict
keystringOptionalDedup/supersession key. Adding an edict with an existing key supersedes the old one
ttl'ephemeral' | 'event' | 'durable' | 'permanent'Default: 'durable'Time-to-live classification
expiresAtstring (ISO 8601)OptionalExpiration date for ephemeral/event edicts
createdstring (ISO 8601)Auto-setWhen the edict was created
updatedstring (ISO 8601)Auto-setWhen the edict was last modified
lastAccessedstring (ISO 8601)Auto-setLast time this edict was accessed via get() or render()
version: 1
config:
maxEdicts: 200
tokenBudget: 4000
categories:
- product
- compliance
- operations
staleThresholdDays: 90
edicts:
- id: e_001
text: "Product v2.0 launches April 15, NOT before."
category: product
tags:
- launch
- v2
confidence: verified
source: "Product team standup, 2025-03-15"
ttl: event
expiresAt: "2025-04-16T00:00:00.000Z"
created: "2025-03-15T10:00:00.000Z"
updated: "2025-03-15T10:00:00.000Z"
- id: no_gas_sponsorship
text: "Product does NOT have gas sponsorship. Do not claim otherwise."
category: product
tags:
- feature
- negative
confidence: verified
source: manual
key: no_gas_sponsorship
ttl: permanent
created: "2025-03-10T00:00:00.000Z"
updated: "2025-03-10T00:00:00.000Z"
- id: e_003
text: "Database migration in progress — no writes to users table."
category: operations
tags: []
confidence: verified
source: "ops-agent"
ttl: ephemeral
expiresAt: "2025-03-22T10:00:00.000Z"
created: "2025-03-20T10:00:00.000Z"
updated: "2025-03-20T10:00:00.000Z"
history:
- id: "current_release__1710900000000_1"
text: "Current release: v1.9.3"
supersededBy: "current_release"
archivedAt: "2025-03-20T12:00:00.000Z"

When an edict is superseded (via key match) or explicitly removed, it’s moved to history:

FieldTypeDescription
idstringOriginal ID with timestamp suffix: {id}__{timestamp}_{version}
textstringThe original edict text
supersededBystringID of the replacing edict, or 'expired'
archivedAtstring (ISO 8601)When this entry was archived

History provides an audit trail. Old edicts aren’t deleted — they’re archived.

TTLBehavior
permanentNever expires. For facts that won’t change.
durableNo auto-expiration, but flagged as “stale” after staleThresholdDays in review().
eventExpires at expiresAt. Tied to a specific date/event.
ephemeralExpires at expiresAt (computed from expiresIn if not set). Short-lived constraints.