brain-framework 22.0.0__tar.gz → 24.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {brain_framework-22.0.0 → brain_framework-24.0.0}/PKG-INFO +33 -33
- {brain_framework-22.0.0 → brain_framework-24.0.0}/README.md +32 -32
- {brain_framework-22.0.0 → brain_framework-24.0.0}/pyproject.toml +7 -3
- {brain_framework-22.0.0 → brain_framework-24.0.0}/pyproject.toml.orig +8 -3
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/__init__.py +1 -1
- brain_framework-24.0.0/src/bf/cli.py +973 -0
- brain_framework-24.0.0/src/bf/collect.py +483 -0
- brain_framework-24.0.0/src/bf/config.py +460 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/evaluate.py +6 -11
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/graph.py +50 -86
- brain_framework-24.0.0/src/bf/guide.py +75 -0
- brain_framework-24.0.0/src/bf/guides/authoring.md +58 -0
- brain_framework-24.0.0/src/bf/guides/events.md +60 -0
- brain_framework-24.0.0/src/bf/guides/getting-started.md +73 -0
- brain_framework-24.0.0/src/bf/guides/index.md +37 -0
- brain_framework-24.0.0/src/bf/guides/jobs.md +60 -0
- brain_framework-24.0.0/src/bf/guides/operations.md +65 -0
- brain_framework-24.0.0/src/bf/guides/reference.md +69 -0
- brain_framework-24.0.0/src/bf/guides/retrieval.md +60 -0
- brain_framework-24.0.0/src/bf/health.py +399 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/index.py +40 -78
- brain_framework-24.0.0/src/bf/install.py +314 -0
- brain_framework-24.0.0/src/bf/jobs.py +1085 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/links.py +36 -28
- brain_framework-24.0.0/src/bf/map.py +217 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/markdown.py +6 -1
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/mcp.py +11 -12
- brain_framework-24.0.0/src/bf/models.py +1175 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/ontology.py +40 -126
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/pages.py +243 -693
- brain_framework-24.0.0/src/bf/replies.py +576 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/retrieve.py +185 -330
- brain_framework-24.0.0/src/bf/runtime.py +776 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/schemas.py +8 -8
- brain_framework-24.0.0/src/bf/skills/bf/SKILL.md +35 -0
- brain_framework-24.0.0/src/bf/starter/AGENTS.md +21 -0
- brain_framework-24.0.0/src/bf/starter/gitignore +7 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/storage.py +50 -153
- brain_framework-24.0.0/src/bf/update.py +226 -0
- brain_framework-24.0.0/src/bf/usage.py +326 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/validate.py +180 -153
- brain_framework-24.0.0/src/bf/watch.py +823 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/watch_settings.py +1 -1
- brain_framework-22.0.0/src/bf/assistants.py +0 -1394
- brain_framework-22.0.0/src/bf/channels.py +0 -230
- brain_framework-22.0.0/src/bf/cli.py +0 -1532
- brain_framework-22.0.0/src/bf/collect.py +0 -1211
- brain_framework-22.0.0/src/bf/config.py +0 -550
- brain_framework-22.0.0/src/bf/health.py +0 -606
- brain_framework-22.0.0/src/bf/history.py +0 -168
- brain_framework-22.0.0/src/bf/install.py +0 -229
- brain_framework-22.0.0/src/bf/messages.py +0 -55
- brain_framework-22.0.0/src/bf/models.py +0 -1803
- brain_framework-22.0.0/src/bf/replies.py +0 -834
- brain_framework-22.0.0/src/bf/runtime.py +0 -1300
- brain_framework-22.0.0/src/bf/skills/README.md +0 -37
- brain_framework-22.0.0/src/bf/skills/bf-action/SKILL.md +0 -52
- brain_framework-22.0.0/src/bf/skills/bf-action/references/actions.md +0 -29
- brain_framework-22.0.0/src/bf/skills/bf-action/references/context.md +0 -21
- brain_framework-22.0.0/src/bf/skills/bf-action/references/handoff.md +0 -36
- brain_framework-22.0.0/src/bf/skills/bf-action/scripts/check-handoff.py +0 -133
- brain_framework-22.0.0/src/bf/skills/bf-action/templates/action.md +0 -37
- brain_framework-22.0.0/src/bf/skills/bf-maintain/SKILL.md +0 -46
- brain_framework-22.0.0/src/bf/skills/bf-maintain/references/conflicts.md +0 -10
- brain_framework-22.0.0/src/bf/skills/bf-maintain/references/integrations.md +0 -94
- brain_framework-22.0.0/src/bf/skills/bf-maintain/references/operations.md +0 -42
- brain_framework-22.0.0/src/bf/skills/bf-setup/SKILL.md +0 -55
- brain_framework-22.0.0/src/bf/skills/bf-setup/references/discovery.md +0 -15
- brain_framework-22.0.0/src/bf/skills/bf-setup/references/import.md +0 -20
- brain_framework-22.0.0/src/bf/skills/bf-setup/references/scan.md +0 -19
- brain_framework-22.0.0/src/bf/skills/bf-setup/scripts/inventory.py +0 -182
- brain_framework-22.0.0/src/bf/skills/bf-use/SKILL.md +0 -53
- brain_framework-22.0.0/src/bf/skills/bf-use/references/evidence.md +0 -32
- brain_framework-22.0.0/src/bf/skills/bf-use/references/learn.md +0 -43
- brain_framework-22.0.0/src/bf/skills/bf-use/references/links.md +0 -28
- brain_framework-22.0.0/src/bf/skills/bf-use/references/retrieval.md +0 -26
- brain_framework-22.0.0/src/bf/skills/bf-use/scripts/evidence.py +0 -348
- brain_framework-22.0.0/src/bf/skills/bf-use/scripts/guarded-write.py +0 -359
- brain_framework-22.0.0/src/bf/skills/bf-use/templates/concept.md +0 -16
- brain_framework-22.0.0/src/bf/skills/bf-use/templates/project.md +0 -29
- brain_framework-22.0.0/src/bf/starter/AGENTS.md +0 -23
- brain_framework-22.0.0/src/bf/starter/gitignore +0 -8
- brain_framework-22.0.0/src/bf/update.py +0 -338
- brain_framework-22.0.0/src/bf/usage.py +0 -346
- brain_framework-22.0.0/src/bf/watch.py +0 -1066
- {brain_framework-22.0.0 → brain_framework-24.0.0}/LICENSE +0 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/THIRD_PARTY_NOTICES.md +0 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/__main__.py +0 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/py.typed +0 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/records.py +0 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/starter/concepts/index.md +0 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/starter/concepts/welcome.md +0 -0
- {brain_framework-22.0.0 → brain_framework-24.0.0}/src/bf/starter/evals/retrieval.yaml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: brain-framework
|
|
3
|
-
Version:
|
|
3
|
+
Version: 24.0.0
|
|
4
4
|
Summary: Brain Framework is a local-first brain for you and your AI agents. It collects evidence from your tools into plain files you own, connects them through an ontology you declare, lets any agent harness search and read offline, and wakes your harness when declarative when: rules or reviewed gates spot new evidence.
|
|
5
5
|
Keywords: ai,ai-agents,agent-memory,agent-skills,agents-md,context-engineering,knowledge-graph,knowledge-management,local-first,mcp,model-context-protocol,ontology,personal-knowledge-management,python,second-brain
|
|
6
6
|
Author: Médéric Hurier
|
|
@@ -45,11 +45,11 @@ Description-Content-Type: text/markdown
|
|
|
45
45
|
|
|
46
46
|
**🧠 Brain Framework: from information to informed actions.**
|
|
47
47
|
|
|
48
|
-
Brain Framework (BF) is a local-first brain for you and your AI agents. It collects evidence from your tools into plain files you own, connects them through an explicit ontology, lets any agent harness search and read offline, and wakes your harness when
|
|
48
|
+
Brain Framework (BF) is a local-first brain for you and your AI agents. It collects evidence from your tools into plain files you own, connects them through an explicit ontology, lets any agent harness search and read offline, and wakes your harness when triggers or reviewed gates spot new evidence.
|
|
49
49
|
|
|
50
50
|
- **Plain files you own, open to any agent.** Markdown notes (`projects/`, `concepts/`, `actions/`) and JSON records (`memories/`), reached through the `bf` CLI, [MCP](https://fmind.github.io/brain-framework/docs/mcp/), [Agent Skills](https://agentskills.io/specification) and `AGENTS.md`.
|
|
51
|
-
- **Explicit graph and provenance.** `bf.yaml`
|
|
52
|
-
- **Controlled autonomy.**
|
|
51
|
+
- **Explicit graph and provenance.** `bf.yaml` `map:` rules or scripts map provider fields into shared relations once at collection. Every claim keeps its source record, and `newer_evidence` flags notes when upstream evidence changes.
|
|
52
|
+
- **Controlled autonomy.** Scheduled or event-triggered jobs (`jobs:`) with reviewed `gate:` scripts wake your harness only when needed and deliver answers via `bf post` or validated `ACTION.md` drafts.
|
|
53
53
|
|
|
54
54
|
[](https://github.com/fmind/brain-framework/actions/workflows/ci.yml) [](https://pypi.org/project/brain-framework/) [](https://pypi.org/project/brain-framework/) [](https://github.com/fmind/brain-framework/blob/main/LICENSE)
|
|
55
55
|
|
|
@@ -58,7 +58,7 @@ Brain Framework (BF) is a local-first brain for you and your AI agents. It colle
|
|
|
58
58
|
<a href="https://raw.githubusercontent.com/fmind/brain-framework/main/docs/assets/brain-loop.svg">
|
|
59
59
|
<img
|
|
60
60
|
src="https://raw.githubusercontent.com/fmind/brain-framework/main/docs/assets/brain-loop.svg"
|
|
61
|
-
alt="The Brain Framework loop:
|
|
61
|
+
alt="The Brain Framework loop: jobs gather evidence into a brain folder; bf.yaml declares the ontology, jobs and watch settings; memories, projects, concepts and actions form a knowledge graph; agents read context, act and compile outcomes back."
|
|
62
62
|
width="960"
|
|
63
63
|
>
|
|
64
64
|
</a>
|
|
@@ -107,36 +107,38 @@ Continue with [Getting started](https://fmind.github.io/brain-framework/docs/get
|
|
|
107
107
|
|
|
108
108
|
Five steps run in one loop: **gather → normalize → organize and connect → act → learn.**
|
|
109
109
|
|
|
110
|
-
| Folder | Role
|
|
111
|
-
| ----------- |
|
|
112
|
-
| `memories/` | Collected JSON records keyed by SHA-256 of `id`, with provenance and `
|
|
113
|
-
| `projects/` | Project state (`Now`), decisions (`Decision`) and open tasks (`Next actions`)
|
|
114
|
-
| `concepts/` | Durable reusable patterns and reference syntheses
|
|
115
|
-
| `actions/` | Tracked work sessions (`draft` open, `stable` settled, `deprecated` retired)
|
|
116
|
-
| `sensors/` |
|
|
117
|
-
| `routines/` | Deterministic scripts (
|
|
110
|
+
| Folder | Role |
|
|
111
|
+
| ----------- | ------------------------------------------------------------------------------------------------------- |
|
|
112
|
+
| `memories/` | Collected JSON records keyed by SHA-256 of `id`, with provenance, `@type`, `relations` and `attributes` |
|
|
113
|
+
| `projects/` | Project state (`Now`), decisions (`Decision`) and open tasks (`Next actions`) |
|
|
114
|
+
| `concepts/` | Durable reusable patterns and reference syntheses |
|
|
115
|
+
| `actions/` | Tracked work sessions (`draft` open, `stable` settled, `deprecated` retired) |
|
|
116
|
+
| `sensors/` | Standalone scripts printing JSON/JSONL or raw exports shaped by `bf.yaml` `map:` |
|
|
117
|
+
| `routines/` | Deterministic scripts (like `weekly-review.py`) run on intervals, `at`, events or Git hooks |
|
|
118
118
|
|
|
119
|
-
`bf.yaml` declares shared [fields and mappings](https://fmind.github.io/brain-framework/docs/schema/#shared-fields-and-sensor-mappings)
|
|
119
|
+
`bf.yaml` declares shared [fields and mappings](https://fmind.github.io/brain-framework/docs/schema/#shared-fields-and-sensor-mappings) and unified [`jobs:`](https://fmind.github.io/brain-framework/docs/prompts/) covering [sensors](https://fmind.github.io/brain-framework/docs/sensors/), [routines](https://fmind.github.io/brain-framework/docs/routines/) and [channels](https://fmind.github.io/brain-framework/docs/channels/). A disposable SQLite cache in `.bf/` powers offline BM25 search, graph backlinks (`bf read project:new-website`), triage (`bf read review`) and JSONL exports (`bf export --kind items`). See the [directory reference](https://fmind.github.io/brain-framework/docs/brain/#directory-reference).
|
|
120
120
|
|
|
121
121
|
## Open your agent in your brain
|
|
122
122
|
|
|
123
|
-
Install the packaged
|
|
123
|
+
Install the packaged `/bf` skill for [Claude Code](https://code.claude.com/docs/en/overview), [Codex](https://openai.com/codex/), [GitHub Copilot](https://github.com/features/copilot) or any [Agent Skills](https://agentskills.io/specification) host:
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
|
-
bf
|
|
127
|
-
bf
|
|
126
|
+
bf skill install --global # ~/.agents/skills/bf (and links ~/.claude/skills/bf if present)
|
|
127
|
+
bf skill install # inside a brain: skills/bf, linked to .agents/skills/bf and .claude/skills/bf
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
- **`bf
|
|
133
|
-
- **`bf
|
|
130
|
+
The `/bf` router connects your harness to built-in offline documentation via `bf guide`:
|
|
131
|
+
|
|
132
|
+
- **`bf guide retrieval`**: orient with `bf read review`, verify and cite `SOURCE:ID` refs and export graph claims.
|
|
133
|
+
- **`bf guide authoring`**: update owning `projects/` and `concepts/`, manage tracked `actions/` (`bf action new`, `bf action status`) and connect entities.
|
|
134
|
+
- **`bf guide getting-started` / `bf guide operations`**: initialize or register brains, run [MCP](https://fmind.github.io/brain-framework/docs/mcp/), validate, evaluate and troubleshoot.
|
|
135
|
+
- **`bf guide jobs` / `bf guide events`**: configure `jobs:`, `map:`, `bf watch` triggers, recover queues and use Git hooks.
|
|
134
136
|
|
|
135
137
|
See [agent workflows](https://fmind.github.io/brain-framework/docs/agents/) and optional repository [hooks](https://github.com/fmind/brain-framework/tree/main/examples/hooks).
|
|
136
138
|
|
|
137
139
|
## Bring your tools
|
|
138
140
|
|
|
139
|
-
Copy a
|
|
141
|
+
Copy a standalone stdlib script into `sensors/` (or pair any JSON/JSONL CLI with `bf.yaml` `map:`): [local documents](https://github.com/fmind/brain-framework/blob/main/examples/sensors/local-documents.py), [highlights](https://github.com/fmind/brain-framework/blob/main/examples/sensors/highlights.py), [Git history](https://github.com/fmind/brain-framework/blob/main/examples/sensors/git-history.py), [GitHub history](https://github.com/fmind/brain-framework/blob/main/examples/sensors/github-history.md), [Google Calendar](https://github.com/fmind/brain-framework/blob/main/examples/sensors/google-calendar.py), [Gmail headers](https://github.com/fmind/brain-framework/blob/main/examples/sensors/gmail-headers.py), [Drive folders](https://github.com/fmind/brain-framework/blob/main/examples/sensors/google-drive-folders.py), or [any source you can script](https://fmind.github.io/brain-framework/docs/sensors/#any-source-you-can-script). Keep them fresh in a terminal or [background service](https://fmind.github.io/brain-framework/docs/schedule/) with `bf watch` ([offline demo](https://github.com/fmind/brain-framework/tree/main/examples/watch)):
|
|
140
142
|
|
|
141
143
|
<a href="https://raw.githubusercontent.com/fmind/brain-framework/main/docs/assets/watch.svg">
|
|
142
144
|
<img
|
|
@@ -148,20 +150,18 @@ Copy a reviewed stdlib sensor into `sensors/` alongside [`_sensor.py`](https://g
|
|
|
148
150
|
|
|
149
151
|
## Let your agent come to you
|
|
150
152
|
|
|
151
|
-
|
|
153
|
+
A [prompt job](https://fmind.github.io/brain-framework/docs/prompts/) watches your brain offline and invokes your harness only when an event or `gate:` triggers it:
|
|
152
154
|
|
|
153
155
|
```yaml
|
|
154
|
-
|
|
156
|
+
jobs:
|
|
155
157
|
triage:
|
|
156
158
|
prompt: prompts/triage.md
|
|
157
|
-
|
|
159
|
+
harness:
|
|
158
160
|
[
|
|
159
161
|
claude,
|
|
160
162
|
--print,
|
|
161
163
|
--output-format,
|
|
162
164
|
json,
|
|
163
|
-
--json-schema,
|
|
164
|
-
"{{schema}}",
|
|
165
165
|
--tools,
|
|
166
166
|
"Read,Grep,Glob,Bash",
|
|
167
167
|
--allowedTools,
|
|
@@ -169,19 +169,19 @@ assistants:
|
|
|
169
169
|
--permission-mode,
|
|
170
170
|
dontAsk,
|
|
171
171
|
]
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
extract: /result
|
|
173
|
+
emit: message
|
|
174
174
|
post: desktop
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
on:
|
|
176
|
+
- { every: 600, event: { kind: record, source: mail } }
|
|
177
177
|
```
|
|
178
178
|
|
|
179
|
-
`
|
|
179
|
+
Event rules and `gate:` scripts skip quiet intervals without starting a model, `extract:` unwraps harness JSON, and `post:` delivers answers through your [channel](https://fmind.github.io/brain-framework/docs/channels/) (while `emit: action` writes validated `draft` `ACTION.md` notes). See [safe prompts](https://fmind.github.io/brain-framework/docs/prompts/#keep-prompts-safe) and [propose, then act](https://fmind.github.io/brain-framework/docs/prompts/#propose-then-act).
|
|
180
180
|
|
|
181
181
|
## Good to know
|
|
182
182
|
|
|
183
183
|
1. **Local-first and private.** No BF server, account or telemetry; retrieval is 100% offline ([privacy and security](https://fmind.github.io/brain-framework/docs/privacy/)).
|
|
184
184
|
1. **Harnesses reason; BF verifies.** BF runs no LLM and ships no provider SDKs or embeddings (`bf export --kind items` feeds external retrievers; [what BF does not do](https://fmind.github.io/brain-framework/docs/concepts/#what-bf-does-not-do)).
|
|
185
|
-
1. **Git-native collaboration.** Version notes
|
|
185
|
+
1. **Git-native collaboration.** Version notes, ontology, programs and evals in Git while keeping local memories and `.bf/` caches out of shared history; major releases batch breaking changes cleanly ([versioning](https://fmind.github.io/brain-framework/docs/upgrades/#versioning-and-stability)).
|
|
186
186
|
|
|
187
187
|
[Commands](https://fmind.github.io/brain-framework/docs/commands/) · [Issues](https://github.com/fmind/brain-framework/issues) · [Contribute](https://github.com/fmind/brain-framework/blob/main/CONTRIBUTING.md) · [Governance](https://github.com/fmind/brain-framework/blob/main/GOVERNANCE.md) · [MIT License](https://github.com/fmind/brain-framework/blob/main/LICENSE) · [Third-party notices](https://github.com/fmind/brain-framework/blob/main/THIRD_PARTY_NOTICES.md)
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
**🧠 Brain Framework: from information to informed actions.**
|
|
13
13
|
|
|
14
|
-
Brain Framework (BF) is a local-first brain for you and your AI agents. It collects evidence from your tools into plain files you own, connects them through an explicit ontology, lets any agent harness search and read offline, and wakes your harness when
|
|
14
|
+
Brain Framework (BF) is a local-first brain for you and your AI agents. It collects evidence from your tools into plain files you own, connects them through an explicit ontology, lets any agent harness search and read offline, and wakes your harness when triggers or reviewed gates spot new evidence.
|
|
15
15
|
|
|
16
16
|
- **Plain files you own, open to any agent.** Markdown notes (`projects/`, `concepts/`, `actions/`) and JSON records (`memories/`), reached through the `bf` CLI, [MCP](https://fmind.github.io/brain-framework/docs/mcp/), [Agent Skills](https://agentskills.io/specification) and `AGENTS.md`.
|
|
17
|
-
- **Explicit graph and provenance.** `bf.yaml`
|
|
18
|
-
- **Controlled autonomy.**
|
|
17
|
+
- **Explicit graph and provenance.** `bf.yaml` `map:` rules or scripts map provider fields into shared relations once at collection. Every claim keeps its source record, and `newer_evidence` flags notes when upstream evidence changes.
|
|
18
|
+
- **Controlled autonomy.** Scheduled or event-triggered jobs (`jobs:`) with reviewed `gate:` scripts wake your harness only when needed and deliver answers via `bf post` or validated `ACTION.md` drafts.
|
|
19
19
|
|
|
20
20
|
[](https://github.com/fmind/brain-framework/actions/workflows/ci.yml) [](https://pypi.org/project/brain-framework/) [](https://pypi.org/project/brain-framework/) [](https://github.com/fmind/brain-framework/blob/main/LICENSE)
|
|
21
21
|
|
|
@@ -24,7 +24,7 @@ Brain Framework (BF) is a local-first brain for you and your AI agents. It colle
|
|
|
24
24
|
<a href="https://raw.githubusercontent.com/fmind/brain-framework/main/docs/assets/brain-loop.svg">
|
|
25
25
|
<img
|
|
26
26
|
src="https://raw.githubusercontent.com/fmind/brain-framework/main/docs/assets/brain-loop.svg"
|
|
27
|
-
alt="The Brain Framework loop:
|
|
27
|
+
alt="The Brain Framework loop: jobs gather evidence into a brain folder; bf.yaml declares the ontology, jobs and watch settings; memories, projects, concepts and actions form a knowledge graph; agents read context, act and compile outcomes back."
|
|
28
28
|
width="960"
|
|
29
29
|
>
|
|
30
30
|
</a>
|
|
@@ -73,36 +73,38 @@ Continue with [Getting started](https://fmind.github.io/brain-framework/docs/get
|
|
|
73
73
|
|
|
74
74
|
Five steps run in one loop: **gather → normalize → organize and connect → act → learn.**
|
|
75
75
|
|
|
76
|
-
| Folder | Role
|
|
77
|
-
| ----------- |
|
|
78
|
-
| `memories/` | Collected JSON records keyed by SHA-256 of `id`, with provenance and `
|
|
79
|
-
| `projects/` | Project state (`Now`), decisions (`Decision`) and open tasks (`Next actions`)
|
|
80
|
-
| `concepts/` | Durable reusable patterns and reference syntheses
|
|
81
|
-
| `actions/` | Tracked work sessions (`draft` open, `stable` settled, `deprecated` retired)
|
|
82
|
-
| `sensors/` |
|
|
83
|
-
| `routines/` | Deterministic scripts (
|
|
76
|
+
| Folder | Role |
|
|
77
|
+
| ----------- | ------------------------------------------------------------------------------------------------------- |
|
|
78
|
+
| `memories/` | Collected JSON records keyed by SHA-256 of `id`, with provenance, `@type`, `relations` and `attributes` |
|
|
79
|
+
| `projects/` | Project state (`Now`), decisions (`Decision`) and open tasks (`Next actions`) |
|
|
80
|
+
| `concepts/` | Durable reusable patterns and reference syntheses |
|
|
81
|
+
| `actions/` | Tracked work sessions (`draft` open, `stable` settled, `deprecated` retired) |
|
|
82
|
+
| `sensors/` | Standalone scripts printing JSON/JSONL or raw exports shaped by `bf.yaml` `map:` |
|
|
83
|
+
| `routines/` | Deterministic scripts (like `weekly-review.py`) run on intervals, `at`, events or Git hooks |
|
|
84
84
|
|
|
85
|
-
`bf.yaml` declares shared [fields and mappings](https://fmind.github.io/brain-framework/docs/schema/#shared-fields-and-sensor-mappings)
|
|
85
|
+
`bf.yaml` declares shared [fields and mappings](https://fmind.github.io/brain-framework/docs/schema/#shared-fields-and-sensor-mappings) and unified [`jobs:`](https://fmind.github.io/brain-framework/docs/prompts/) covering [sensors](https://fmind.github.io/brain-framework/docs/sensors/), [routines](https://fmind.github.io/brain-framework/docs/routines/) and [channels](https://fmind.github.io/brain-framework/docs/channels/). A disposable SQLite cache in `.bf/` powers offline BM25 search, graph backlinks (`bf read project:new-website`), triage (`bf read review`) and JSONL exports (`bf export --kind items`). See the [directory reference](https://fmind.github.io/brain-framework/docs/brain/#directory-reference).
|
|
86
86
|
|
|
87
87
|
## Open your agent in your brain
|
|
88
88
|
|
|
89
|
-
Install the packaged
|
|
89
|
+
Install the packaged `/bf` skill for [Claude Code](https://code.claude.com/docs/en/overview), [Codex](https://openai.com/codex/), [GitHub Copilot](https://github.com/features/copilot) or any [Agent Skills](https://agentskills.io/specification) host:
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
|
-
bf
|
|
93
|
-
bf
|
|
92
|
+
bf skill install --global # ~/.agents/skills/bf (and links ~/.claude/skills/bf if present)
|
|
93
|
+
bf skill install # inside a brain: skills/bf, linked to .agents/skills/bf and .claude/skills/bf
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- **`bf
|
|
99
|
-
- **`bf
|
|
96
|
+
The `/bf` router connects your harness to built-in offline documentation via `bf guide`:
|
|
97
|
+
|
|
98
|
+
- **`bf guide retrieval`**: orient with `bf read review`, verify and cite `SOURCE:ID` refs and export graph claims.
|
|
99
|
+
- **`bf guide authoring`**: update owning `projects/` and `concepts/`, manage tracked `actions/` (`bf action new`, `bf action status`) and connect entities.
|
|
100
|
+
- **`bf guide getting-started` / `bf guide operations`**: initialize or register brains, run [MCP](https://fmind.github.io/brain-framework/docs/mcp/), validate, evaluate and troubleshoot.
|
|
101
|
+
- **`bf guide jobs` / `bf guide events`**: configure `jobs:`, `map:`, `bf watch` triggers, recover queues and use Git hooks.
|
|
100
102
|
|
|
101
103
|
See [agent workflows](https://fmind.github.io/brain-framework/docs/agents/) and optional repository [hooks](https://github.com/fmind/brain-framework/tree/main/examples/hooks).
|
|
102
104
|
|
|
103
105
|
## Bring your tools
|
|
104
106
|
|
|
105
|
-
Copy a
|
|
107
|
+
Copy a standalone stdlib script into `sensors/` (or pair any JSON/JSONL CLI with `bf.yaml` `map:`): [local documents](https://github.com/fmind/brain-framework/blob/main/examples/sensors/local-documents.py), [highlights](https://github.com/fmind/brain-framework/blob/main/examples/sensors/highlights.py), [Git history](https://github.com/fmind/brain-framework/blob/main/examples/sensors/git-history.py), [GitHub history](https://github.com/fmind/brain-framework/blob/main/examples/sensors/github-history.md), [Google Calendar](https://github.com/fmind/brain-framework/blob/main/examples/sensors/google-calendar.py), [Gmail headers](https://github.com/fmind/brain-framework/blob/main/examples/sensors/gmail-headers.py), [Drive folders](https://github.com/fmind/brain-framework/blob/main/examples/sensors/google-drive-folders.py), or [any source you can script](https://fmind.github.io/brain-framework/docs/sensors/#any-source-you-can-script). Keep them fresh in a terminal or [background service](https://fmind.github.io/brain-framework/docs/schedule/) with `bf watch` ([offline demo](https://github.com/fmind/brain-framework/tree/main/examples/watch)):
|
|
106
108
|
|
|
107
109
|
<a href="https://raw.githubusercontent.com/fmind/brain-framework/main/docs/assets/watch.svg">
|
|
108
110
|
<img
|
|
@@ -114,20 +116,18 @@ Copy a reviewed stdlib sensor into `sensors/` alongside [`_sensor.py`](https://g
|
|
|
114
116
|
|
|
115
117
|
## Let your agent come to you
|
|
116
118
|
|
|
117
|
-
|
|
119
|
+
A [prompt job](https://fmind.github.io/brain-framework/docs/prompts/) watches your brain offline and invokes your harness only when an event or `gate:` triggers it:
|
|
118
120
|
|
|
119
121
|
```yaml
|
|
120
|
-
|
|
122
|
+
jobs:
|
|
121
123
|
triage:
|
|
122
124
|
prompt: prompts/triage.md
|
|
123
|
-
|
|
125
|
+
harness:
|
|
124
126
|
[
|
|
125
127
|
claude,
|
|
126
128
|
--print,
|
|
127
129
|
--output-format,
|
|
128
130
|
json,
|
|
129
|
-
--json-schema,
|
|
130
|
-
"{{schema}}",
|
|
131
131
|
--tools,
|
|
132
132
|
"Read,Grep,Glob,Bash",
|
|
133
133
|
--allowedTools,
|
|
@@ -135,19 +135,19 @@ assistants:
|
|
|
135
135
|
--permission-mode,
|
|
136
136
|
dontAsk,
|
|
137
137
|
]
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
extract: /result
|
|
139
|
+
emit: message
|
|
140
140
|
post: desktop
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
on:
|
|
142
|
+
- { every: 600, event: { kind: record, source: mail } }
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
`
|
|
145
|
+
Event rules and `gate:` scripts skip quiet intervals without starting a model, `extract:` unwraps harness JSON, and `post:` delivers answers through your [channel](https://fmind.github.io/brain-framework/docs/channels/) (while `emit: action` writes validated `draft` `ACTION.md` notes). See [safe prompts](https://fmind.github.io/brain-framework/docs/prompts/#keep-prompts-safe) and [propose, then act](https://fmind.github.io/brain-framework/docs/prompts/#propose-then-act).
|
|
146
146
|
|
|
147
147
|
## Good to know
|
|
148
148
|
|
|
149
149
|
1. **Local-first and private.** No BF server, account or telemetry; retrieval is 100% offline ([privacy and security](https://fmind.github.io/brain-framework/docs/privacy/)).
|
|
150
150
|
1. **Harnesses reason; BF verifies.** BF runs no LLM and ships no provider SDKs or embeddings (`bf export --kind items` feeds external retrievers; [what BF does not do](https://fmind.github.io/brain-framework/docs/concepts/#what-bf-does-not-do)).
|
|
151
|
-
1. **Git-native collaboration.** Version notes
|
|
151
|
+
1. **Git-native collaboration.** Version notes, ontology, programs and evals in Git while keeping local memories and `.bf/` caches out of shared history; major releases batch breaking changes cleanly ([versioning](https://fmind.github.io/brain-framework/docs/upgrades/#versioning-and-stability)).
|
|
152
152
|
|
|
153
153
|
[Commands](https://fmind.github.io/brain-framework/docs/commands/) · [Issues](https://github.com/fmind/brain-framework/issues) · [Contribute](https://github.com/fmind/brain-framework/blob/main/CONTRIBUTING.md) · [Governance](https://github.com/fmind/brain-framework/blob/main/GOVERNANCE.md) · [MIT License](https://github.com/fmind/brain-framework/blob/main/LICENSE) · [Third-party notices](https://github.com/fmind/brain-framework/blob/main/THIRD_PARTY_NOTICES.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "brain-framework"
|
|
3
|
-
version = "
|
|
3
|
+
version = "24.0.0"
|
|
4
4
|
description = "Brain Framework is a local-first brain for you and your AI agents. It collects evidence from your tools into plain files you own, connects them through an ontology you declare, lets any agent harness search and read offline, and wakes your harness when declarative when: rules or reviewed gates spot new evidence."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.14"
|
|
@@ -78,7 +78,6 @@ src = [
|
|
|
78
78
|
extend-exclude = ["*.md"]
|
|
79
79
|
|
|
80
80
|
[tool.ruff.per-file-target-version]
|
|
81
|
-
"src/bf/skills/*/scripts/*.py" = "py311"
|
|
82
81
|
"examples/**/*.py" = "py311"
|
|
83
82
|
|
|
84
83
|
[tool.ruff.format]
|
|
@@ -131,7 +130,11 @@ ignore = [
|
|
|
131
130
|
]
|
|
132
131
|
|
|
133
132
|
[tool.ruff.lint.per-file-ignores]
|
|
134
|
-
"examples/
|
|
133
|
+
"examples/channels/**" = ["S603"]
|
|
134
|
+
"examples/hooks/**" = [
|
|
135
|
+
"BLE001",
|
|
136
|
+
"S607",
|
|
137
|
+
]
|
|
135
138
|
"examples/sensors/**" = [
|
|
136
139
|
"S603",
|
|
137
140
|
"S607",
|
|
@@ -162,6 +165,7 @@ patch = ["subprocess"]
|
|
|
162
165
|
|
|
163
166
|
[tool.coverage.report]
|
|
164
167
|
fail_under = 95
|
|
168
|
+
precision = 2
|
|
165
169
|
show_missing = true
|
|
166
170
|
skip_covered = true
|
|
167
171
|
skip_empty = true
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# https://packaging.python.org/en/latest/specifications/pyproject-toml/
|
|
2
2
|
[project]
|
|
3
3
|
name = "brain-framework"
|
|
4
|
-
version = "
|
|
4
|
+
version = "24.0.0"
|
|
5
5
|
description = "Brain Framework is a local-first brain for you and your AI agents. It collects evidence from your tools into plain files you own, connects them through an ontology you declare, lets any agent harness search and read offline, and wakes your harness when declarative when: rules or reviewed gates spot new evidence."
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
requires-python = ">=3.14"
|
|
@@ -90,8 +90,8 @@ dev = [
|
|
|
90
90
|
line-length = 120
|
|
91
91
|
src = ["src", "tests"]
|
|
92
92
|
extend-exclude = ["*.md"] # dprint owns Markdown, including its Python code blocks.
|
|
93
|
-
#
|
|
94
|
-
per-file-target-version = { "
|
|
93
|
+
# Copied examples run with the host's python3, not the package interpreter.
|
|
94
|
+
per-file-target-version = { "examples/**/*.py" = "py311" }
|
|
95
95
|
|
|
96
96
|
[tool.ruff.format]
|
|
97
97
|
docstring-code-format = true
|
|
@@ -143,8 +143,12 @@ ignore = [
|
|
|
143
143
|
]
|
|
144
144
|
|
|
145
145
|
[tool.ruff.lint.per-file-ignores]
|
|
146
|
+
"examples/channels/**" = [
|
|
147
|
+
"S603", # Channel adapters invoke notifier CLIs with literal argv lists and no shell.
|
|
148
|
+
]
|
|
146
149
|
"examples/hooks/**" = [
|
|
147
150
|
"BLE001", # Silent hooks must exit 0 with no output on any unexpected error.
|
|
151
|
+
"S607", # Hooks resolve `git` by bare name on PATH with literal arguments.
|
|
148
152
|
]
|
|
149
153
|
"examples/sensors/**" = [
|
|
150
154
|
"S603", # Adapters invoke provider CLIs with literal argv lists; no shell is involved.
|
|
@@ -181,6 +185,7 @@ patch = ["subprocess"]
|
|
|
181
185
|
|
|
182
186
|
[tool.coverage.report]
|
|
183
187
|
fail_under = 95
|
|
188
|
+
precision = 2
|
|
184
189
|
show_missing = true
|
|
185
190
|
skip_covered = true
|
|
186
191
|
skip_empty = true
|