Skip to content

v32.0.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 12:33
· 8 commits to main since this release
Immutable release. Only release title and notes can be modified.
5aeca43

A major release aligning Brain Framework around the UNIX-native 3x3 convention (Notes: concepts//projects//actions/; Loops: sensors//routines//agents/; Records: memories//usages//logs/), flat schema-validated JSONL storage (zero SQLite, zero validation cache), a single event stream in logs/events.jsonl, two-stream stdout/stderr JSONL loop execution, $BRAIN_LOCATION / ~/brain brain discovery, bird's-eye bf status --format text + lightweight bf watch streaming, and retiring bf mcp and rich. Existing Markdown notes remain compatible once rebuilt; back up your brain before migrating and follow the manual upgrade steps below.

Breaking changes

  • Brain format bumped to version: 17: 3x3 UNIX layout, flat JSONL (memories/ + usages/), single logs/events.jsonl event bus, universal ref links, and unconditional core record schema. Replaced per-record memories/<source>/<sha256>.json files, .bf/cache.db, .bf/index.jsonl, and .bf/events.jsonl with flat JSON Lines in memories/<source>.jsonl, first-class FinOps/telemetry usages/<source>.jsonl (bf ingest --to usages, kind: "usage", validated against bundled record + required schemas/usages.json), and a single O_APPEND event stream in logs/events.jsonl (0700/0600 private; .bf/ now holds only disposable locks and per-loop state). links[].to stores human-readable universal refs (concepts/foo.md, <source>:<id>, declared bf://<brain>/<ref>, https://...), bundled RECORD_SCHEMA is enforced unconditionally, record IDs forbid #, unknown scheme:// URLs are rejected instead of misclassified as record refs, and cross-brain bf://<host>/... targets must be declared under brains: in bf.yaml.
  • Convention-first loops: (sensors/, routines/, agents/, .sh/.py/executable), two-stream JSONL (stdout/stderr), and $BRAIN_LOCATION + ~/brain discovery. Renamed on: -> when: (unifying when: daemon and triggers with per-trigger backfill/overlap windows), moved watch.concurrency to top-level concurrency, renamed BF_STATE_DIR -> BF_STATE, dropped defaults.env:, templates:, use:, args:, requires:, watch:, on.hooks, {{...}} interpolation, and .bf/<loop>.context.json. Discovery searches sensors/, routines/, and agents/ for <name>, <name>.sh, or <name>.py (sensors/ auto-implies ingest: upsert, including interpreter-prefixed run:; agents/ defaults to 15m timeout). Loop stderr lines (structured JSONL/structlog or plain text) stream live with secret redaction into logs/<loop>.jsonl for both cycle loops and daemons. Brain discovery resolves --brain PATH -> enclosing bf.yaml -> BF_BRAIN -> $BRAIN_LOCATION -> ~/brain (dropping DEFAULT_BRAIN_PATH). Reserved sensors, routines, agents, clients, prompts, and usages in RESERVED_SOURCES.
  • Retired bf mcp, rich TUI, bf new, YAML evals/, ACTION.md, skills/bf/SKILL.md scaffolding, and legacy CLI flags/envelopes. Removed bf mcp (brain-framework[mcp]), rich (cutting 23 packages from uv.lock), bf new, bf build --force, bf check --force, bf check [TARGET]/--validate/--eval (bf check is now strictly read-only and never runs bf build), bf status --prune (moved to bf run --prune), bf read --outline/--lines/--fields/--full (notes now return their compiled record under "record", with --raw returning "text"), bf query/bf review --fields and --format tsv, skills/bf/SKILL.md scaffolding and skill_outdated warnings, and YAML evals/ (replaced by user Python/pytest scripts in evals/). Any <slug>/index.md subdirectory inside configured notes: folders is a bundle note (retiring ACTION.md and hardcoded actions_open). Added bird's-eye bf status --format text, replaced bf watch Rich TUI / --json with startup status + live text or --format jsonl streaming, added bf emit --data - stdin piping, added --dry-run on bf run --prune and bf run --reset, added bf run fnmatch globs and --all, and warned on stderr when --format jsonl truncates output. Upgrade version: 16 brains by bumping bf.yaml to version: 17, migrating on: -> when: and watch.concurrency -> concurrency, dropping defaults.env:/watch:/templates:/use:/args:/requires:, moving loop scripts to sensors//routines//agents/ reading BF_* env (BF_STATE, not BF_STATE_DIR) + stdin, creating schemas/<source>.json and schemas/usages.json, converting ACTION.md -> index.md, converting evals/*.yaml to Python scripts, removing obsolete skills/bf/SKILL.md copies, updating any callers of bf check/bf status --prune/bf read/bf query/bf review, setting BRAIN_LOCATION (replacing DEFAULT_BRAIN_PATH), re-ingesting records into memories/*.jsonl / usages/*.jsonl, and running bf run --prune && bf build && bf check.

Fixed

  • Hardened bf build, bf check, bf watch, bf status, bf read, and example sensors. Prevented bf build from wiping memories/<dir>.jsonl on partial scan/compile failure, prevented self-triggering loop.succeeded storms and runaway mutual event cycles in bf watch, isolated corrupted .bf/<loop>.json files per loop, fixed bf check crashing on invalid schemas/record.json and missing misplaced cross-folder notes, fixed bf read misclassifying bundle sibling .md attachments and missing spaced/escaped JSONL records, fixed bf status "inside_brain" checking the selected brain root, clamped BF_START < BF_END on same-second runs, fixed loop stderr tail slicing ([-8192:]), fixed blockquote heading shifts in extract_section(), triggered note rebuilds on bf.yaml name/notes edits in bf watch, and updated all 4 windowed examples/sensors/*.py adapters to default to BF_START/BF_END.