Repository navigation
v31.0.0
A major release bumping the brain format to version: 16 (decoupling evals/*.yaml to version: 1), refining bf.yaml (on:, window:, ingest:, string-only emit:, description, {{state}}, .env override precedence), folding bf validate and bf eval into bf check, replacing monolithic .bf/index.jsonl and .bf/cache/state.json with per-source .bf/cache/{index,validate}/<source>.json shards that decouple note builds from sensor corpora, unifying bf read ("text"), compiled note anchors, and bf mcp signatures (bf_query, bf_read, bf_check), and adding operational hygiene (bf status --prune, bf run --reset, skill_outdated checks, and on: daemon health resets). Existing Markdown notes and sensor memories/<source>/*.json files stay compatible once recompiled. Upgrade version: 15 brains by updating bf.yaml to version: 16 (and evals/*.{yaml,yml,json} to version: 1), moving schedule/events/hook under on: and daemon: true to on: daemon, moving lookback/overlap under window: {backfill, overlap}, changing ingest: <source> to ingest: upsert (or ingest: snapshot / {source, mode}), replacing emit: true with emit: loop.event and removing emit: false, replacing action: loops with ingest: snapshot into memories/<loop>/, passing prompt files directly in run: instead of input:/{{input}}, removing watch.debounce, ingest.allow_removal, and unmodified starter schemas/concepts.json, updating any scripts or prompts calling bf validate, bf eval, bf_validate, bf_query(mode=...), .attrs, or bf read "markdown"/"content", refreshing skills/bf/SKILL.md, and running bf status --prune && bf check --force.
Breaking changes
- Brain format bumped to
version: 16: cleanerbf.yaml(on:,window:,ingest:, string-onlyemit:,description,{{state}}) and local.envoverride precedence. Replaced flat loop trigger/window keys withon: daemonoron: {schedules?, events?, hooks?}(all three accept a single value or list; string shorthand supported forevents;minProperties: 1onTrigger/EventMatch/Window) andwindow: {backfill, overlap}(renaminglookback->window.backfill). Defaultedingestsource to the loop name (ingest: upsert | snapshotor{source, mode}, rejecting reserved loop names on shorthandingest), narrowedemit:to a string event kind (removingemit: true/emit: false), changed environment precedence so local gitignored.envoverrides trackedloops.<name>.env:(host allowlist < bf.yaml env < loops.<name>.env < .env < BF_*), removedaction:,input:({{input}},context.input),ingest.allow_removal(CLIbf ingest --allow-removalonly), andwatch.debounce(hardcoded300ms), added optionaldescriptionon the brain and each loop (surfaced inbf status), aligned{{state}}withBF_STATE_DIR(<brain>/.bf/<loop>), and encoded reserved loop/source names plus field descriptions/defaults across all published schemas. - Decoupled
evals/*.{yaml,yml,json}schema toversion: 1and stopped scaffolding unmodifiedschemas/concepts.json. Evaluation suites now declareversion: 1independently ofbf.yaml's format version (bf schema evals), andbf initno longer copies a redundantschemas/concepts.json(the bundledconceptsschema applies automatically unless you createschemas/concepts.jsonto override it). - Folded
bf validateandbf evalintobf check, dropped--sourceonbf query, and aligned MCPbf_query,bf_read, andbf_checkwith the CLI.bf check [TARGET] [--validate | --eval] [-n/--limit N] [--all] [--strict] [--force]replaces separatebf validateandbf evalsubcommands (bf check --validatefor read-only validation,bf check --eval [TARGET]for evals only).bf querydrops redundant--sourcein favor of-s/--scope.bf mcprenamesbf_validate->bf_check(limit, strict, include_eval), replacesbf_query(q, mode, ...)withbf_query(pattern, jq, kind, scope, fields, limit)(supporting combinedrg + jqfiltering), and addsrawandfullparameters tobf_read. - Renamed compiled note
attrs->anchors, unifiedbf readbody keys to"text", and dropped legacyrelationstombstone. Compiled note JSON files now store keyedattr_listmetadata underanchors(omitting empty{}entries for plain headings without metadata while preserving optionallinks[].id);bf readreturns body text under"text"across default note reads,#anchorsections,--raw,--lines, and plain files ("record"stays for--fulland sensor records); andrecord.schema.jsondrops the legacy"relations": falsetombstone. - Replaced
.bf/index.jsonland.bf/cache/state.jsonwith per-source.bf/cache/{index,validate}/<source>.jsonshards. Runbf status --pruneto remove retired.bf/index.jsonland.bf/cache/state.jsonfiles after upgrading.
Added
- Operational hygiene:
bf status --prune,bf run --reset, andskills/bf/SKILL.mddrift detection.bf status --prunedeletes orphaned.bf/<loop>.json/.context.jsonfiles, stale per-source cache shards, and retired monolithic cache files;bf run --reset LOOP...clears saved state and context for named loops; andbf status/bf check --validatesurfaceskill_outdated: true(warning inbf check, failing under--strictandbf status --check) whenskills/bf/SKILL.mddiverges from the installedbfpackage. - Brain & loop
description,bf watchsingleton lock, CLI polish, schema docs, and trackedACTION.md.bf initaccepts--descriptionand emits# yaml-language-server: $schema=...on line 1;bf watchholds an exclusive.bf/watch.lockso two supervisors cannot race on the same brain;-n/--limitworks consistently acrossquery,review, andcheck; all 4 published schemas include field descriptions/defaults;bf.schema.jsonunwraps object-branchanyOferrors; and starter.gitignoretracksactions/*/ACTION.mdwhile ignoring/actions/*/inputs/and/actions/*/outputs/.
Fixed
- Reset
on: daemonfailure counters after sustained healthy uptime.DaemonStreamnow clearsconsecutive_failures, clearserror, resets restart backoff, and recordslast_successonce a daemon stays up for>= 30s, instead of retaining stale failure counts until the process exits.
Changed
- Per-source sharded caching, decoupled note builds, and bounded multi-source scans.
bf buildandsync_notes()now update only the three authored index shards (projects,concepts,actions) without scanning sensor corpora,authored_notes()no longer recurses intoactions/*/inputs/oroutputs/, shard freshness usesDirEntry.stat(follow_symlinks=False)without opening unchanged files, and the100,000-entry scan cap applies per source with a1,000,000-entry total corpus bound.