Repository navigation
v22.0.0
A major release focused on unattended autonomy, triage and leaner workflows. The persisted brain format and bf.yaml stay version: 8 (bf.yaml removes Sensor.truncate_text and combined every+at on assistant schedules, and adds when, at, propose, retries, input_args and schedule_args that 21.x rejects on downgrade); the status-reply, read-reply and assistant-reply schemas have breaking changes while search-reply stays compatible; .bf/ rebuilds automatically on first read or bf build; and $XDG_STATE_HOME/bf/runtime/*/queue.sqlite3 stays version: 2 while moving wake checkpoints to wake:<assistant>:<slot> (and routine when.sources cursors to routines.json, ignored by 21.x). Drain bf queue before upgrading (or downgrading, as queued jobs or wakes using v22 fields/keys are not read by 21.x), back up the brain and queue.sqlite3, apply the breaking-change adjustments below, refresh installed skills with bf skills ~/.agents/skills (or bf skills skills --link inside a personal brain), merge the updated AGENTS.md starter (refresh brain instructions), and re-copy any example sensors, routines, hooks or channels alongside their sibling _sensor.py or _bf.py helper.
Breaking changes
- Assistant schedules require either
everyorat, never both. Removeeveryfrom wall-clockat: "HH:MM"entries underassistants.<name>.schedules(schedule requires either every or at, not both); unknown keys underschedulesare rejected,atoverdue grace defaults to 86,400 seconds, andbf statusreports eithereveryoraton each schedule. - Action-folder paths are rejected as identities.
bf validateand collection rejectbf://NAME/actions/SLUGinentity,aliasesand URIresourcefields (a BF path to an action folder in actions/ names its ACTION.md and no other subject; link to the action instead). Linking to an action folder and readingbf read actions/SLUG --rel ...continue to resolve to itsACTION.md. Sensor.truncate_textandattributes.truncatedare removed. Replacetruncate_text: trueinbf.yamlwith explicitmax_text_bytes: 4194304(or a smaller byte ceiling); cut text sets onlyattributes.partial: true, and oversized text withoutmax_text_bytesfails withset max_text_bytes on this sensor to cut longer text.- Boolean CLI flags are positive-only. Negative
--no-*spellings (such as--no-dry-runor--no-check) are removed across all commands; omit the flag for the defaultfalsebehavior. examples/sensors/github-history.pyemits singularkindvalues, andbf-action/scripts/new-action.pyis replaced bybf action new. Updatedgithub-history.pycopies emitattributes.kindin{"commit", "issue", "pull-request"}and singular title prefixes (Issue: #N,Pull request: #N), keeping CLI subcommands (commits|issues|pulls) and record IDs unchanged. Replace direct calls tonew-action.pywithbf action new SLUG [--title ...] [--summary ...] [--unique].- Uniform
attentionitems acrossbf status, Home andbf read review, andactionsrequired inassistant-reply.schema.json. Polymorphicsensor,routine,assistantandchannelkeys inattentionentries are replaced by{"kind": "sensor"|"routine"|"assistant"|"channel", "name": "...", "freshness": "..."}(with optional"failed": true,"silent": trueand"degraded").bf schema --kind assistant-replyrequires["say", "wake", "actions"](actions: []ornullwhen proposing nothing) so strict structured-output decoders emit every field reliably. - Home
actionslists openstatus: draftactions only.bf read(Home) surfaces onlystatus: draftactions underactions, so marking a finished actionstatus: stableclears it from the active inbox while keeping it inbf read actionsand search.
Added
- Declarative
when:gates on assistant schedules and routines. Optionalwhen: {sources?, review?, actions?, attention?}evaluates SQLite and program health offline with zero subprocesses, skips unmatched checks asgated, interleaves matched signal groups fairly into{{context}}events(up to 64 events / 64 KiB) on assistant schedules, advancessourcescursors only after the scheduled run completes, and runs before customgate:scripts when both are set (gates). - Trigger-scoped assistant arguments and wall-clock routines. Assistants gain
input_args,schedule_argsand per-scheduleargs(expanding{{schema}}and program placeholders), retiringexamples/prompts/routines/harness.py. Routines gain wall-clockat: "HH:MM",daysandtimezonemutually exclusive with nonzerorefresh(routine settings). - Self-healing schedules, tempfail retries, per-slot wakes and input failure notices. Assistants and schedules accept
retries: 0..20(default3whenidempotent, else0), and harness exit code75(EX_TEMPFAIL) retries with backoff up tomax(retries, 3)(unlessretries: 0) without enteringuncertain. Terminalfailed(neveruncertain) scheduled assistant jobs are superseded at the next due window so periodic schedules recover after transient outages. Standalonebf channel senddeliveries onsend.idempotent: truechannels retry automatically inbf watchandbf update. Wakes key per slot (wake:<assistant>:<slot>, up to 16 per assistant) and exposereasoninbf queue. Channel-originatedinputjobs endingfailedoruncertainenqueue[bf] <assistant> did not finish (<state>); run bf queue to inspect.on their reply thread. - Read-only action proposals (
propose: true). Assistants withreplyandpropose: trueaccept up to 3{slug, markdown}proposals inactions, validated through BF's OKF, ontology and broken-link checks and written asstatus: draftactions/YYYY-MM-DD_<slug>/ACTION.mdnotes without granting file-write tools to the harness (structured replies). bf read review, richerbf export --kind items, JSONLcollect,bf actionandbf skills --link.bf read reviewreturns paginated notes needing review (due,newer_evidence,future_modified,unknown_modified), up to 20 opendraftactions (actions_totalcounts all open drafts;blocked_bylists up to 10 unresolveddraftdepends-ontargets), and uniformattention.bf export --kind itemsadds multi-valuevalues, stored recordattributesand--observed-since TIME.bf collectaccepts JSON Lines alongside JSON arrays on sensor stdout and--input.bf action new SLUG [--title ...] [--summary ...] [--unique]andbf action status SLUG draft|stable|deprecatedmanage action lifecycle atomically from the CLI.bf skills DIR --linkinside a brain manages relative.agents/skills/bf-*and.claude/skills/bf-*symlinks.- Standard-library program kits (
_sensor.pyand_bf.py).examples/sensors/_sensor.pyaddsload_state/save_state,git_remote_identity, UTF-8 byte-safe text truncation andcli, andexamples/{routines,hooks,channels/channels}/_bf.pyprovides shared window, state,bf_json/bf_pages/bf_export, text sanitization, gate/action emission and channel envelope helpers across all example programs.
Changed
- Faster CLI startup, scheduled ticks and skill installs.
bf --versionfast-paths without importing Typer or Rich,bf.clilazy-loads command runtimes,due_schedulesbatches SQLite queue reads into one transaction per tick, andbf skillssyncs target directories once per skill instead of per file. - Leaner, more autonomous skills, starter instructions and documentation.
AGENTS.mdandbf-useorient sessions withbf read review, update owningprojects/*.mdnotes after settled decisions and consolidate flagged notes intoconcepts/(bf-use/references/merged from 8 files intoretrieval.md,learn.md,links.mdandevidence.md);bf-actioncloses the loop withbf action new|status; and the packaged skills and user guides are ~35–45% shorter with zero duplicated harness boilerplate.
Fixed
- Action folder section links, status edits and Typer
0.29+compatibility. Links and reads targetingactions/YYYY-MM-DD_slug#sectionresolve section anchors, backlinks andbf validatechecks cleanly;bf action statuspreserves existing frontmatter without duplicating YAML blocks; live collections stampattributes.observedmonotonically at commit time; and CLI option error hints work cleanly ontyper>=0.27.2(including0.29+).