Skip to content

LLM-Brain v0.9.0

Choose a tag to compare

@w00ch3a w00ch3a released this 12 Oct 02:07
· 71 commits to main since this release

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]
    and label 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/supersedes from brain_supersedes, revised from
    brain_version_of, retracted from 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 L and --without-label L (repeatable;
    name matches any name: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

  1. 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-boost and FSRS. Off by default.
  2. Named-gate abstention — llm-brain gates PROJECT QUERY reports 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 add abstain_gate= to --metadata-file; packs with
    no selection add a "Recall Gates" section.
  3. Brief compact-on-limit — when the brief would omit items, entries are
    rewritten to one line each (title + ref) before anything is dropped.
    --no-compact or LLM_BRAIN_BRIEF_COMPACT=0 restores 0.8 behaviour.
  4. Standing-constraint re-injection — records with
    brain_constraint: prohibition|non-amplification|commitment, a
    constraint:* label, or a working add --kind constraint item are
    re-injected into packs every K turns when the host passes --turn N
    (K = LLM_BRAIN_CONSTRAINT_EVERY, default 8). llm-brain constraints.
  5. Intention aftereffects — intention add --once intentions go quiet
    after a pack surfaces them; intention quiet ID --until ISO snoozes; packs
    name recently completed intentions whose cue matched ("do not repeat").
  6. Folder summary indexes — llm-brain browse build|show writes derived,
    reproducible indexes/summaries/*.md for okf/ and episodes/ folders
    (month-grouped, lifecycle state, restricted/scoped records counted only).
  7. 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.
  8. 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, no supersedes needed) are
    REPLACE; depends_on/derived_from dependants are STALE, propagated up to
    3 hops; supporting records with their own sources are KEEP, otherwise
    UNKNOWN; conflicts are UNKNOWN. apply records each outcome as an
    outcome:* label targeting the trigger; nothing is retracted or edited.
  9. 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, budget or exhausted. pack build --sufficiency
    selects only as many records as the loop needed. No learned controller.
  10. Working memory — llm-brain working add|list|done|drop keeps
    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 (--session scopes them).
  11. Intention lifecycle — intention revise --reschedule|--override
    typed patches (appended to intentions/ID.patches.tsv, old values kept),
    intention board (formed → revised → filtered-due → quiet → decided),
    and intention observe [--within-days N], which inspects the observed
    state key (--observe KEY on add) before an intention is due.
  12. Not built (net-zero cap) — replaced by label lineage above.
  13. 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 its file:// link. demo is synthetic data only.
  • Dashboard page (/neural-expansion tab) via Hermes' dashboard plugin
    system. Its backend (/api/plugins/llm-brain/) is mounted by Hermes only
    when llm-brain is in plugins.enabled, refuses non-loopback clients, and
    returns the page for a sandboxed srcdoc iframe with a no-network CSP.
  • Real-brain export is opt-in: "neural_expansion_export": true in
    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 until neural_expansion_export: true.
  • No new dependencies; all derived files are rebuildable.