Repository navigation
LLM-Brain v0.9.0
LLM-Brain v0.9.0
Released 2026-10-12.
This release adds label lineage (traceable decision trees with nothing
deleted), cascading invalidation, named-gate abstention, sufficiency-gated
recall, working memory, a fuller intention lifecycle, derived folder
summaries, progressive state disclosure, brief compaction, standing-constraint
re-injection, an opt-in access-recency re-rank, a Memory-Gym-style eval
family, and Neural Expansion inside Hermes. Storage schema 3 and canonical
OKF v0.2 are unchanged; no canonical record is rewritten by any new command.
Every new behaviour that could change ranking or default output is opt-in, or
only appears when the vault contains the new data (labels, working items,
constraints, fire-once intentions). Defaults are listed at the end.
Label lineage (instead of a net-zero size cap)
Growth and change are managed through labels, so a user can trace where a
decision tree changed. Labels live in an append-only, hash-chained ledger
beside the vault (projects/ID/lineage/labels.tsv); canonical records are
never edited. Removing a label appends an unlabel event, so history is kept.
llm-brain label add|remove PROJECT REF LABEL --reason TEXT [--target REF]
andlabel list PROJECT [REF] [--label NAME] [--json]. Vocabulary:
superseded-by,revised,retired,decision-point:NAME,
branch:NAME,topic:NAME,outcome:KEEP|STALE|REPLACE|UNKNOWN,
constraint:prohibition|non-amplification|commitment, or any
name[:value]. Appends are refused if the hash chain is broken.- Derived labels are computed (never stored) from existing lifecycle
data:superseded-by/supersedesfrombrain_supersedes,revisedfrom
brain_version_of,retractedfrom retraction tombstones,state:KEY, and
intention-done|cancelled. llm-brain lineage show PROJECT (--ref REF | --topic TEXT | --decision NAME) [--json]
prints the decision tree, the current head(s) and a timeline where every
change point (supersession, retraction, revision, retirement, STALE/REPLACE
outcome, decision-point or branch label) is marked*. Dependencies
(brain_depends_on,brain_derived_from) are part of the tree.- Search and packs accept
--label Land--without-label L(repeatable;
namematches anyname:value). Packs list the lineage labels of selected
records when the ledger has any.
Example (synthetic):
$ llm-brain lineage show proj_wages --decision dataset
LINEAGE (5 records, 4 change point(s); derived, read-only)
Tree:
Dataset choice: CensusA [okf/claims/dataset-v1.md] {outcome:REPLACE, superseded-by}
└─ Dataset choice: CensusB [okf/claims/dataset-v2.md] {decision-point:dataset, outcome:REPLACE}
Dataset choice: CensusC [okf/claims/dataset-v3.md]
Wage gap finding [okf/claims/finding-gap.md] {outcome:STALE}
Current: okf/claims/dataset-v3.md
Timeline (* = decision tree changed here):
2026-01-01T00:00:00 recorded okf/claims/dataset-v1.md
* 2026-02-01T00:00:00 supersedes okf/claims/dataset-v2.md — okf/claims/dataset-v1.md (Dataset choice: CensusA)
* 2026-10-12T00:00:00 label outcome:REPLACE okf/claims/dataset-v2.md — okf/claims/dataset-v3.md — CensusC adopted; older holder of state study.dataset
Ideas implemented
- Access-recency soft re-rank —
search|pack --recency-boost(or
LLM_BRAIN_RECENCY_BOOST=1): ×1.5 for just-used records decaying (7-day
half-life) to a ×0.7 floor; never-used records share the floor, nothing is
filtered. Separate from--usage-boostand FSRS. Off by default. - Named-gate abstention —
llm-brain gates PROJECT QUERYreports which
gate refused: relevance, validity (superseded, retracted, unapproved,
expired), applicability (principal, cold tier, not yet valid) or risk
(sensitivity, quarantine). Hidden or risky records are counted, never
named. Empty searches addabstain_gate=to--metadata-file; packs with
no selection add a "Recall Gates" section. - Brief compact-on-limit — when the brief would omit items, entries are
rewritten to one line each (title + ref) before anything is dropped.
--no-compactorLLM_BRAIN_BRIEF_COMPACT=0restores 0.8 behaviour. - Standing-constraint re-injection — records with
brain_constraint: prohibition|non-amplification|commitment, a
constraint:*label, or aworking add --kind constraintitem are
re-injected into packs every K turns when the host passes--turn N
(K =LLM_BRAIN_CONSTRAINT_EVERY, default 8).llm-brain constraints. - Intention aftereffects —
intention add --onceintentions go quiet
after a pack surfaces them;intention quiet ID --until ISOsnoozes; packs
name recently completed intentions whose cue matched ("do not repeat"). - Folder summary indexes —
llm-brain browse build|showwrites derived,
reproducibleindexes/summaries/*.mdforokf/andepisodes/folders
(month-grouped, lifecycle state, restricted/scoped records counted only). - Progressive state disclosure —
llm-brain state index(thin
key/ref/summary/hash),state open KEY|REF, incremental
state index --since FILE [--changes-only](added/updated/removed), and
pack build --state-index. - Cascading invalidation —
llm-brain invalidate preview|apply --from REF
adjudicates KEEP / STALE / REPLACE / UNKNOWN: explicit supersession and
older holders of the same state key (implicit, nosupersedesneeded) are
REPLACE;depends_on/derived_fromdependants are STALE, propagated up to
3 hops; supporting records with their own sources are KEEP, otherwise
UNKNOWN; conflicts are UNKNOWN.applyrecords each outcome as an
outcome:*label targeting the trigger; nothing is retracted or edited. - Sufficiency-gated expand-or-stop —
llm-brain recall-check PROJECT QUERY
fetches in batches and reports sufficiency (query-term coverage), missing
terms, contradiction count and continue-utility, stopping at
sufficient,no-gain,budgetorexhausted.pack build --sufficiency
selects only as many records as the loop needed. No learned controller. - Working memory —
llm-brain working add|list|done|dropkeeps
short-horizon to-dos, bindings and constraints in an append-only
working/items.tsv, separate from OKF and excluded from search; open
items appear in the brief and in packs (--sessionscopes them). - Intention lifecycle —
intention revise --reschedule|--override
typed patches (appended tointentions/ID.patches.tsv, old values kept),
intention board(formed → revised → filtered-due → quiet → decided),
andintention observe [--within-days N], which inspects the observed
state key (--observe KEYon add) before an intention is due. - Not built (net-zero cap) — replaced by label lineage above.
- Memory-Gym task family —
evals/real/tasks/memorygym.py: single-hop,
multi-hop and multi-session-summary tasks plus tasks for folder summaries,
progressive state, implicit invalidation, sufficiency and label lineage
(8 memory + 1 control). The bundle stays runnable with Codex on macOS;
coding and research prompts are unchanged so scores remain comparable.
Neural Expansion in Hermes
/neural-expansion [demo|export]slash command, registered by the
Hermes plugin. It writes a new self-contained page under
$HERMES_HOME/llm-brain/neural-expansion/(directory 0700, file 0600) and
replies with itsfile://link.demois synthetic data only.- Dashboard page (
/neural-expansiontab) via Hermes' dashboard plugin
system. Its backend (/api/plugins/llm-brain/) is mounted by Hermes only
whenllm-brainis inplugins.enabled, refuses non-loopback clients, and
returns the page for a sandboxedsrcdociframe with a no-network CSP. - Real-brain export is opt-in:
"neural_expansion_export": truein
llm-brain.json, then the CLI's existing gate, principal filter and
owner-only output apply. Nothing is served beyond Hermes' own dashboard
and no network is used. - Exports now carry active lineage labels on visible nodes and label
edges between visible records (reasons and actors are never exported).
Upgrade
No vault migration is needed. Upgrading from 0.8.x or 0.7.6 keeps every record, custody file, review,
feedback item and receipt unchanged (tested for both). New data lives in new
files created on first use (lineage/, working/, indexes/summaries/,
intentions/*.patches.tsv). A 0.8.x upgrader does not know the new
lib/memory_lineage.py helper; standalone installs upgraded by it should run
llm-brain upgrade repair-standalone --source RELEASE_DIR once. Until then
the new commands report the missing helper and existing commands fail open.
Defaults and decisions
- Labels never change default ranking or filtering;
retired/outcome:*
only filter with--without-label. Search and gates agree on eligibility. - Recency re-rank, sufficiency packs, state index in packs, constraint
re-injection (--turn) and fire-once intentions are opt-in. - Brief compaction is on by default but only triggers when the 0.8 brief
would have dropped items. - Working-memory, completed-intention and lineage-label pack sections only
appear when that data exists. - Hermes: the slash command and dashboard page are registered by default;
real-brain export stays off untilneural_expansion_export: true. - No new dependencies; all derived files are rebuildable.