Authoring notes, actions, identities, and relations¶
Brain Framework keeps authored knowledge in Markdown notes with OKF YAML frontmatter. Never edit memories/ files manually; record jobs and bf ingest own collected evidence.
Note directories and lifecycle¶
projects/<slug>.mdorprojects/<topic>/index.md: active work streams,Now,Decision, andNext actions.concepts/<slug>.md: durable ideas, people/entity notes, and reusable patterns (concepts/index.mdis the Home note).actions/YYYY-MM-DD_topic/ACTION.md: tracked multi-step work sessions created and transitioned viabf action.- Special files: folder
index.mdand changeloglog.md(YYYY-MM-DDheadings) carry no review reminders or task checks; ordinary Markdown files (such asactions/*/inputs/*.md) index prose metadata while ignoring identity/relation keys so imported text never claims identities.
Every OKF note requires non-empty type and status (draft, stable, or deprecated), verified by bf validate:
---
type: project
status: stable
title: Billing migration
updated: 2026-09-27
summary: Cut over billing pipeline without losing audit history.
relations:
owner: [person:email/alice@example.test]
attributes:
team: platform
---
Keep work logs and status updates in Markdown sections (Now, Decision, Next actions) rather than unbounded frontmatter fields, and use explicit heading anchors (## Decision {#decision}) so renames preserve incoming links.
Manage actions with bf action¶
Create and transition tracked work sessions through the CLI instead of creating ACTION.md folders by hand:
bf action new billing-cutover --summary "Verify invoice dual-write parity"
bf action status 2026-09-27_billing-cutover stable
- Pass
--uniqueto append a 12-hex suffix when running repeated tasks on one day, and--run RUN_IDfrom inside a job run so.bf/runtime.sqlite3records created actions. - An existing
ACTION.mdis never replaced silently. - Open
draftactions appear on Home andbf read review(includingblocked_byfrom unresolveddraftdepends-onlinks). Mark completed actionsstable(which clears them from Home while keeping them searchable) or retired onesdeprecated. - Keep
Context(brief state plus<= 6verified refs, never raw transcripts) andResumeup to date so any future session can continue cleanly.
Connect notes and records¶
- Plain Markdown links and sections:
[New website decision](../projects/new-website.md#decision)records an untypedlinksedge from its originating section;[Product brief](brief:website-brief)cites a record. - OKF
sources:: frontmattersources:entries with non-emptyresourcegeneratecitesedges. - Typed inline
?rel=links: add?rel=RELATIONto abf://URI:
[Launch decision](bf://brain/projects/new-website.md?rel=depends-on#decision)
?rel= is the only supported query parameter on BF links. Whole reads preview up to 5 newest backlinks per relation; bf read REF --rel RELATION paginates all incoming edges.
Identities, relations, and attributes¶
BF builds its knowledge graph strictly from explicit evidence — never from prose heuristics or name matching:
entity,aliases,resource: bind exact case-sensitive identifiers on an owning note (for exampleconcepts/me.mdwithentity: bf://brain/people/me,aliases: [person:email/me@example.test, person:github.com/me],resource: https://example.test/me).entitynever names a#section,.mdfile, page, record, orbf://brain/actions/SLUGfolder.- Typed
relations: map any valid relation name (^[a-z][a-zA-Z0-9]*(?:-[a-z0-9]+)*$, 1–64 chars, excluding reservedtagged-with,links,cites) to ascheme:valueorbf://string or list. Common conventions (author,owner,assignee,participant,sender,recipient,cc,organizer,attendee,repository,project,part-of,label,depends-on,related-to,supersedes) need zero declaration. attributes: attach bounded JSON metadata without creating graph edges.- Optional
fields:constraints inbf.yaml: addfields:entries only when enforcingdescription,broaderrollups (for exampleorganizer->participant), ortargetsscheme prefix checks (bf validateandbf build --reproject). See Reference.
Host hooks and verification¶
For repository-aware session/prompt injection, review and install examples/hooks/ (session-context.py, prompt-context.py) from a private host-owned folder — they run read-only bf read / bf search offline and never print raw record bodies.
Always verify edits before finishing:
bf validate
bf read projects/new-website.md#decision