dotbrain 0.3.4__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.
- dotbrain-0.3.4/.gitignore +8 -0
- dotbrain-0.3.4/LICENSE +21 -0
- dotbrain-0.3.4/PKG-INFO +21 -0
- dotbrain-0.3.4/README.md +231 -0
- dotbrain-0.3.4/docs/README.md +33 -0
- dotbrain-0.3.4/docs/architecture.md +80 -0
- dotbrain-0.3.4/docs/beads-backend.md +100 -0
- dotbrain-0.3.4/docs/cli-reference.md +390 -0
- dotbrain-0.3.4/docs/configuration.md +60 -0
- dotbrain-0.3.4/docs/getting-started.md +205 -0
- dotbrain-0.3.4/docs/glossary.md +102 -0
- dotbrain-0.3.4/docs/skills.md +59 -0
- dotbrain-0.3.4/docs/wiring.md +133 -0
- dotbrain-0.3.4/pyproject.toml +55 -0
- dotbrain-0.3.4/src/dotbrain/__init__.py +7 -0
- dotbrain-0.3.4/src/dotbrain/_cli_reference.py +115 -0
- dotbrain-0.3.4/src/dotbrain/adopter_repos.py +573 -0
- dotbrain-0.3.4/src/dotbrain/beads.py +511 -0
- dotbrain-0.3.4/src/dotbrain/bootstrap.py +199 -0
- dotbrain-0.3.4/src/dotbrain/brainspaces.py +238 -0
- dotbrain-0.3.4/src/dotbrain/cli.py +660 -0
- dotbrain-0.3.4/src/dotbrain/config.py +428 -0
- dotbrain-0.3.4/src/dotbrain/doctor.py +279 -0
- dotbrain-0.3.4/src/dotbrain/hooks.py +84 -0
- dotbrain-0.3.4/src/dotbrain/migrate.py +304 -0
- dotbrain-0.3.4/src/dotbrain/paths.py +139 -0
- dotbrain-0.3.4/src/dotbrain/resource_loader.py +47 -0
- dotbrain-0.3.4/src/dotbrain/resources/__init__.py +1 -0
- dotbrain-0.3.4/src/dotbrain/resources/agents/claude/implementer.md +47 -0
- dotbrain-0.3.4/src/dotbrain/resources/agents/claude/investigator.md +35 -0
- dotbrain-0.3.4/src/dotbrain/resources/agents/claude/reviewer.md +38 -0
- dotbrain-0.3.4/src/dotbrain/resources/agents/claude/verifier.md +35 -0
- dotbrain-0.3.4/src/dotbrain/resources/agents/codex/implementer.toml +26 -0
- dotbrain-0.3.4/src/dotbrain/resources/agents/codex/investigator.toml +21 -0
- dotbrain-0.3.4/src/dotbrain/resources/agents/codex/reviewer.toml +27 -0
- dotbrain-0.3.4/src/dotbrain/resources/agents/codex/verifier.toml +21 -0
- dotbrain-0.3.4/src/dotbrain/resources/config.yaml +20 -0
- dotbrain-0.3.4/src/dotbrain/resources/core.yaml +18 -0
- dotbrain-0.3.4/src/dotbrain/resources/templates/brain/AGENTS.md +9 -0
- dotbrain-0.3.4/src/dotbrain/resources/templates/brain/DOTBRAIN.md +105 -0
- dotbrain-0.3.4/src/dotbrain/resources/templates/brain/adr/README.md +8 -0
- dotbrain-0.3.4/src/dotbrain/resources/templates/brain/designs/README.md +28 -0
- dotbrain-0.3.4/src/dotbrain/resources/templates/brain/docs/README.md +9 -0
- dotbrain-0.3.4/src/dotbrain/resources/templates/brain/project.yaml +27 -0
- dotbrain-0.3.4/src/dotbrain/resources/templates/gitignore +17 -0
- dotbrain-0.3.4/src/dotbrain/skills.py +264 -0
- dotbrain-0.3.4/src/dotbrain/subagents.py +252 -0
- dotbrain-0.3.4/src/dotbrain/updater.py +105 -0
- dotbrain-0.3.4/src/dotbrain/workflows.py +529 -0
dotbrain-0.3.4/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Armin Zou
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
dotbrain-0.3.4/PKG-INFO
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: dotbrain
|
|
3
|
+
Version: 0.3.4
|
|
4
|
+
Summary: Wires project Brainspaces and skills into coding agents.
|
|
5
|
+
Project-URL: Homepage, https://github.com/arminzou/dotbrain
|
|
6
|
+
Project-URL: Repository, https://github.com/arminzou/dotbrain
|
|
7
|
+
Project-URL: Issues, https://github.com/arminzou/dotbrain/issues
|
|
8
|
+
Author: Armin Zou
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Requires-Dist: pyyaml>=6
|
|
21
|
+
Requires-Dist: typer>=0.12
|
dotbrain-0.3.4/README.md
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/banner.jpg" alt="Dotbrain" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Dotbrain
|
|
6
|
+
|
|
7
|
+
> Dotbrain keeps your project's context private and your code repo clean, and makes that discipline effortless.
|
|
8
|
+
|
|
9
|
+
As an engineer, almost everything I build outgrows my private workspace. A side project I start
|
|
10
|
+
alone gets shared or open-sourced later; team repos are visible from day one. The code can be
|
|
11
|
+
shared; the thinking behind it doesn't have to be: the half-formed decisions, the roadmap, the
|
|
12
|
+
rationale I would not want published, or leaked into a commit message by an agent.
|
|
13
|
+
|
|
14
|
+
For a while that thinking had no natural home. It scattered across my head, my Obsidian vault,
|
|
15
|
+
gitignored docs, and agent memory layers. Keeping it coherent was its own maintenance job. Every
|
|
16
|
+
new session meant re-explaining the project, re-wiring tools, and hunting for context that should
|
|
17
|
+
have just been there. So I built Dotbrain.
|
|
18
|
+
|
|
19
|
+
## What is Dotbrain?
|
|
20
|
+
|
|
21
|
+
Dotbrain keeps your project's private thinking in a versioned Brainspace under `~/dotbrain/`.
|
|
22
|
+
It plants gitignored symlinks at your repo root pointing into that Brainspace, so agents pick
|
|
23
|
+
up your decisions, vocabulary, and notes automatically at session start. The content never
|
|
24
|
+
touches the code repo; the symlinks make sure it follows the project wherever you work it.
|
|
25
|
+
|
|
26
|
+
~/dotbrain/
|
|
27
|
+
└── brainspaces/
|
|
28
|
+
└── my-project/
|
|
29
|
+
├── .brain/
|
|
30
|
+
│ ├── CONTEXT.md # domain vocabulary
|
|
31
|
+
│ ├── adr/ # architecture decisions
|
|
32
|
+
│ ├── designs/ # design docs
|
|
33
|
+
│ └── docs/ # derived reference material
|
|
34
|
+
└── .beads/ # execution store (issue tracker)
|
|
35
|
+
|
|
36
|
+
~/repos/my-project/
|
|
37
|
+
├── .brain ──────────────► ~/dotbrain/brainspaces/my-project/.brain
|
|
38
|
+
├── .beads ──────────────► ~/dotbrain/brainspaces/my-project/.beads
|
|
39
|
+
├── .claude/ # real directory with gitignored resource links
|
|
40
|
+
└── .codex/ # real directory with gitignored resource links
|
|
41
|
+
|
|
42
|
+
## Why not just keep private notes?
|
|
43
|
+
|
|
44
|
+
A gitignored notes file is the obvious fix, but I wanted those notes versioned, so they became a
|
|
45
|
+
separate private repo. That is what I did for a long time. It kept them private and tracked, but it
|
|
46
|
+
sat off to the side of the project: when I spun up a git worktree to run a second agent in parallel,
|
|
47
|
+
the notes did not come with it; when I cloned the project onto another machine, they were not there
|
|
48
|
+
either. The context I needed most was the context that never followed the work.
|
|
49
|
+
|
|
50
|
+
Dotbrain keeps the Brain and issue tracker private and versioned under a project's Brainspace, then
|
|
51
|
+
links selected agent resources into the repo's workspaces. A worktree can restore its `.brain` and
|
|
52
|
+
`.beads` links through `wire-brain`'s worktree repair branch. A new machine is one clone and
|
|
53
|
+
bootstrap away from having every project wired. The notes are there wherever you work the project,
|
|
54
|
+
instead of sitting beside it.
|
|
55
|
+
|
|
56
|
+
## "But my agent already remembers, and I have CLAUDE.md/AGENTS.md"
|
|
57
|
+
|
|
58
|
+
**Agent session memory** carries context between sessions, but it is person-scoped, not
|
|
59
|
+
project-scoped: it accumulates facts about you, not the decisions and rationale behind a specific
|
|
60
|
+
project. Memory banks have the same shape. Both are also vendor-locked: Claude's memory doesn't
|
|
61
|
+
help Codex, and wiring a new agent into a project means manual setup each time. Dotbrain is owned
|
|
62
|
+
by the project, not the person or the tool: any agent working in the repo picks it up
|
|
63
|
+
automatically.
|
|
64
|
+
|
|
65
|
+
**CLAUDE.md/AGENTS.md** is great for a handful of standing instructions, but it lives in the public
|
|
66
|
+
repo and should not become the home for every decision and design note. Past a point it just bloats,
|
|
67
|
+
and everything in it is public if the repo is.
|
|
68
|
+
|
|
69
|
+
Dotbrain is a project's private source of truth: authored by humans, readable by any agent,
|
|
70
|
+
enforced by the wiring. The project brain is not accumulated; it is written, reviewed, and corrected.
|
|
71
|
+
Both the human and the agent work from the same source, and git tracks all of it.
|
|
72
|
+
|
|
73
|
+
## Is this for you?
|
|
74
|
+
|
|
75
|
+
**Use Dotbrain if:**
|
|
76
|
+
|
|
77
|
+
- you work with more than one coding agent or across multiple worktrees on the same project
|
|
78
|
+
- your project has real context worth preserving: decisions, vocabulary, rationale that agents need to work effectively
|
|
79
|
+
- your code is shared or will be, and you want the thinking behind it to stay private
|
|
80
|
+
- you want that context authored and version-controlled, not accumulated in an opaque tool
|
|
81
|
+
|
|
82
|
+
**Skip it if:**
|
|
83
|
+
|
|
84
|
+
- your repos are all private and a single agent already covers you
|
|
85
|
+
- you only need a few standing instructions; `CLAUDE.md` is genuinely simpler
|
|
86
|
+
- you are looking for a hosted team knowledge base
|
|
87
|
+
|
|
88
|
+
## How it works
|
|
89
|
+
|
|
90
|
+
```mermaid
|
|
91
|
+
flowchart LR
|
|
92
|
+
agent(["Coding agent: Claude Code, Codex"])
|
|
93
|
+
subgraph repo["Code repo"]
|
|
94
|
+
direction TB
|
|
95
|
+
code["your code"]
|
|
96
|
+
links["gitignored symlinks"]
|
|
97
|
+
end
|
|
98
|
+
subgraph home["Private dotbrain home (~/dotbrain)"]
|
|
99
|
+
direction TB
|
|
100
|
+
brain["Brain: vocabulary, decisions, rules"]
|
|
101
|
+
exec["Execution store: ready-work tracker"]
|
|
102
|
+
ws["Agent workspaces"]
|
|
103
|
+
end
|
|
104
|
+
agent --> repo
|
|
105
|
+
links --> brain
|
|
106
|
+
links --> exec
|
|
107
|
+
links --> ws
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`dotbrain wire <repo>` creates the Brainspace, drops gitignored symlinks at the repo root, and
|
|
111
|
+
links project skills and subagents into the agent workspaces. `dotbrain refresh` repairs wiring
|
|
112
|
+
and relinks project skills and subagents if anything drifts. `dotbrain bootstrap` runs once per
|
|
113
|
+
machine to install session-start hooks and link global skills and subagents.
|
|
114
|
+
|
|
115
|
+
**Skills** are cross-project and live under `~/dotbrain/skills/`. Wiring links the relevant ones
|
|
116
|
+
into each agent workspace (`.claude/`, `.codex/`) so any agent in the repo gets the same skill
|
|
117
|
+
set without manual setup. Per-project skill and subagent selection lives in `project.yaml`; the
|
|
118
|
+
Brain's `AGENTS.md` holds the cross-cutting conventions those skills read at session start.
|
|
119
|
+
|
|
120
|
+
**Beads** (`.beads/`) is the private execution store. Agents use the `bd` CLI to inspect ready
|
|
121
|
+
work, claim issues, and close them. Because it lives in the Brainspace and is version-controlled,
|
|
122
|
+
any agent across sessions, worktrees, or tools operates from the same issue tracker. Work claimed
|
|
123
|
+
in one session is visible to the next; nothing is re-derived from scratch.
|
|
124
|
+
|
|
125
|
+
The session-start hook loads Brain context and execution state automatically, so every session
|
|
126
|
+
starts warm: the agent knows the project vocabulary, the standing decisions, and what work is
|
|
127
|
+
ready.
|
|
128
|
+
|
|
129
|
+
When something needs to go public, you author a fresh, audience-specific doc rather than copying
|
|
130
|
+
from the Brain, a private source that should never be mirrored into the code repo.
|
|
131
|
+
|
|
132
|
+
## Workflow
|
|
133
|
+
|
|
134
|
+
Dotbrain ships a set of bundled Brain-coupled skills: the operating manual for a wired project. They load
|
|
135
|
+
automatically at session start and are available as slash commands.
|
|
136
|
+
|
|
137
|
+
- **`wire-brain`** — provision or repair Brainspace wiring between a repo and its private Brain.
|
|
138
|
+
- **`grill-decisions`** — stress-test a plan against the project's vocabulary and existing
|
|
139
|
+
decisions, then write clarified choices into `CONTEXT.md` and `adr/`.
|
|
140
|
+
- **`curate-project-context`** — organize and maintain public and private project context as it
|
|
141
|
+
accumulates.
|
|
142
|
+
- **`operate-execution`** — inspect the ready frontier, claim a work item, and record discoveries
|
|
143
|
+
back into the execution graph. This is the primary skill for driving daily work.
|
|
144
|
+
- **`to-design`** — formalize a multi-step initiative into a design doc, save it to the Brain, and
|
|
145
|
+
create an epic bead.
|
|
146
|
+
- **`to-issues`** — decompose a design doc into independently-workable bead tasks with acceptance
|
|
147
|
+
criteria and dependencies.
|
|
148
|
+
- **`review-architecture`** — review the codebase for deeper architectural opportunities and feed
|
|
149
|
+
findings back into the Brain.
|
|
150
|
+
- **`triage-public`** — intake public issues (GitHub, Linear, Jira), classify them, and link
|
|
151
|
+
accepted work to private execution items.
|
|
152
|
+
- **`write-agent-docs`** — write public project docs, private Brain material, and user-owned
|
|
153
|
+
skills so agents retrieve and follow them predictably.
|
|
154
|
+
|
|
155
|
+
See [docs/skills.md](docs/skills.md) for the full set.
|
|
156
|
+
|
|
157
|
+
### Worktree execution
|
|
158
|
+
|
|
159
|
+
Most work runs in place in the main checkout, reviewed as it happens. When work needs isolation,
|
|
160
|
+
such as genuine parallelism or a long-running loop you want off your interactive tree, run it in a
|
|
161
|
+
git worktree instead. A worktree shares the main checkout's Brain and execution state, with no
|
|
162
|
+
separate Brain.
|
|
163
|
+
|
|
164
|
+
`operate-execution` recommends when to isolate; the agent runtime creates the worktree. If it has
|
|
165
|
+
no `.brain` or `.beads`, use `wire-brain`'s worktree repair branch to link those two directories
|
|
166
|
+
back to the main checkout.
|
|
167
|
+
|
|
168
|
+
## Install
|
|
169
|
+
|
|
170
|
+
Dotbrain installs as a plugin. You do not need to clone this repo: the plugin carries the skills,
|
|
171
|
+
the session-start hook, and an installer for the matching CLI.
|
|
172
|
+
|
|
173
|
+
Claude Code — send these as two separate prompts:
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
/plugin marketplace add arminzou/dotbrain
|
|
177
|
+
/plugin install dotbrain@dotbrain
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Codex:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
codex plugin marketplace add arminzou/dotbrain
|
|
184
|
+
codex plugin add dotbrain@dotbrain
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Codex holds plugin lifecycle hooks until you approve them: start `codex`, open `/hooks`, trust the
|
|
188
|
+
dotbrain hook, then start a new thread.
|
|
189
|
+
|
|
190
|
+
Then ask your agent to wire a repo, or invoke the `wire-brain` skill. It installs the `dotbrain`
|
|
191
|
+
CLI (along with `uv` and Beads) if it is missing, runs `dotbrain bootstrap`, and wires the repo.
|
|
192
|
+
|
|
193
|
+
On **Windows**, enable
|
|
194
|
+
[Developer Mode](https://learn.microsoft.com/windows/apps/get-started/enable-your-device-for-development)
|
|
195
|
+
first so Dotbrain can create directory symlinks without Administrator privileges. The private
|
|
196
|
+
dotbrain home defaults to `%USERPROFILE%\dotbrain` (for example, `C:\Users\you\dotbrain`). Set
|
|
197
|
+
`DOTBRAIN_HOME` only when you want to use a different location.
|
|
198
|
+
|
|
199
|
+
See [docs/getting-started.md](docs/getting-started.md) for the full walkthrough, including how to
|
|
200
|
+
install the CLI by hand and what to do if `marketplace add` trips over a Windows file lock.
|
|
201
|
+
|
|
202
|
+
## Use
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
dotbrain wire <repo> # connect a code repo to a private Brainspace
|
|
206
|
+
dotbrain refresh # repair wiring, load execution state, link project skills
|
|
207
|
+
dotbrain unwire <repo> # disconnect a repo from its Brainspace
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Develop
|
|
211
|
+
|
|
212
|
+
The CLI is a [uv](https://docs.astral.sh/uv/)-managed Python package.
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
git clone https://github.com/arminzou/dotbrain.git
|
|
216
|
+
cd dotbrain
|
|
217
|
+
uv sync # provision the env
|
|
218
|
+
uv run dotbrain --help # inspect the command tree
|
|
219
|
+
uv run pytest # run the test suite
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
To install a CLI from your checkout rather than a release tag, run `./scripts/dev-install.sh` (or
|
|
223
|
+
`.\scripts\dev-install.ps1` on Windows) from the repo root, then `dotbrain bootstrap`. That is the
|
|
224
|
+
contributor path; users get the CLI from PyPI or the plugin.
|
|
225
|
+
|
|
226
|
+
The plugin's `skills/` tree is the source of truth for dotbrain's bundled skills.
|
|
227
|
+
|
|
228
|
+
Version lives in `pyproject.toml` and is mirrored into `src/dotbrain/__init__.py`, both plugin
|
|
229
|
+
manifests, and both first-run installers; `tests/test_plugin_build.py` enforces that they agree.
|
|
230
|
+
When cutting a release, bump all of them and push a matching `v<version>` tag — the installers pin
|
|
231
|
+
that tag, so a release without one breaks first-run installs.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Documentation
|
|
2
|
+
|
|
3
|
+
This directory is the public docs index for dotbrain.
|
|
4
|
+
|
|
5
|
+
Start here if you want the shape of the material before diving into a specific page.
|
|
6
|
+
|
|
7
|
+
## Start Here
|
|
8
|
+
|
|
9
|
+
- [architecture.md](architecture.md)
|
|
10
|
+
The design narrative: Brainspaces, the Brain/execution split, skills, and the public/private boundary.
|
|
11
|
+
- [getting-started.md](getting-started.md)
|
|
12
|
+
The first-run path: install, bootstrap, wire a repo, and verify the result.
|
|
13
|
+
|
|
14
|
+
## Reference
|
|
15
|
+
|
|
16
|
+
- [cli-reference.md](cli-reference.md)
|
|
17
|
+
Public CLI command reference.
|
|
18
|
+
- [configuration.md](configuration.md)
|
|
19
|
+
Annotated `config.yaml` and `project.yaml` examples.
|
|
20
|
+
- [skills.md](skills.md)
|
|
21
|
+
Catalog of packaged Brain-coupled skills.
|
|
22
|
+
- [glossary.md](glossary.md)
|
|
23
|
+
Public vocabulary for the dotbrain model.
|
|
24
|
+
|
|
25
|
+
## Reading Order
|
|
26
|
+
|
|
27
|
+
If you are new to dotbrain, a reasonable order is:
|
|
28
|
+
|
|
29
|
+
1. [architecture.md](architecture.md)
|
|
30
|
+
2. [getting-started.md](getting-started.md)
|
|
31
|
+
3. [configuration.md](configuration.md)
|
|
32
|
+
4. [skills.md](skills.md)
|
|
33
|
+
5. [cli-reference.md](cli-reference.md)
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
This document explains dotbrain's design: Brainspaces, the Brain and execution split, skills, and
|
|
4
|
+
the public/private boundary. For the problem dotbrain solves and how to get started, see the
|
|
5
|
+
[README](../README.md).
|
|
6
|
+
|
|
7
|
+
## Brainspaces
|
|
8
|
+
|
|
9
|
+
The unit of organization is a **Brainspace** — one directory per project that holds everything an
|
|
10
|
+
agent needs that is not the code itself:
|
|
11
|
+
|
|
12
|
+
- `.brain/` — the project's knowledge (see below)
|
|
13
|
+
- `.beads/` — the execution store (issues, dependencies, plans)
|
|
14
|
+
|
|
15
|
+
Brainspaces live together in a single repository. A code repo connects to its Brainspace through
|
|
16
|
+
the gitignored `.brain` and `.beads` symlinks. Its `.claude` and `.codex` agent workspaces are real
|
|
17
|
+
directories; dotbrain contributes individually ignored skill and subagent links without claiming
|
|
18
|
+
project-owned files. The code repo stays clean and the context stays private, while the agent sees
|
|
19
|
+
both as one tree.
|
|
20
|
+
|
|
21
|
+
## The Brain
|
|
22
|
+
|
|
23
|
+
A Brain has five elements, each with a single clear purpose:
|
|
24
|
+
|
|
25
|
+
- **`CONTEXT.md`** — the project's domain vocabulary. Names for concepts that issues, plans, and code
|
|
26
|
+
use consistently, so language does not drift into synonyms.
|
|
27
|
+
- **`adr/`** — Architecture Decision Records, one file per decision. Each captures a choice that is
|
|
28
|
+
hard to reverse, surprising without context, and the result of a real trade-off.
|
|
29
|
+
- **`designs/`** — design docs, one initiative per file. While a design is active, it is the
|
|
30
|
+
living design authority for the initiative: current design, known unknowns, and deviations live
|
|
31
|
+
there. Authored by `to-design`, decomposed into bead epics by `to-issues`. Beads remain the
|
|
32
|
+
execution/status source. Once shipped, abandoned, or superseded, the design doc freezes as a
|
|
33
|
+
point-in-time record.
|
|
34
|
+
- **`AGENTS.md`** — per-project agent operating conventions: linking rules, ADR policy, priority.
|
|
35
|
+
- **`project.yaml`** — per-project runtime selection plus skill and subagent selection.
|
|
36
|
+
- **`docs/`** — derived runbooks and reference material. Never authoritative; the elements above win.
|
|
37
|
+
|
|
38
|
+
Brain writes are version-controlled, so every change is reviewable and revertable. Each element has
|
|
39
|
+
a single writer rather than every agent editing everything, which keeps the knowledge coherent.
|
|
40
|
+
|
|
41
|
+
## Execution lives in the tracker
|
|
42
|
+
|
|
43
|
+
Plans and tasks do not live as markdown checklists that rot. They live in an **execution store** — by
|
|
44
|
+
default [Beads](https://github.com/gastownhall/beads) (`bd`), a dependency-aware issue tracker.
|
|
45
|
+
Multi-step work is modeled as issues with blocking relationships, so "what is ready to work on" is a
|
|
46
|
+
query, not a document. The execution store is treated as machine-local runtime state, hydrated from
|
|
47
|
+
configuration — which lets the same backend run locally (embedded) or as a shared server across
|
|
48
|
+
machines, configured per project. The tracker is pluggable behind a small contract, so a project can
|
|
49
|
+
swap the backend without changing how agents work.
|
|
50
|
+
|
|
51
|
+
## Skills
|
|
52
|
+
|
|
53
|
+
Skills are reusable agent capabilities, owned by the tool rather than any one project. The plugin
|
|
54
|
+
delivers dotbrain's brain-coupled skills; dotbrain links only the operator's global and per-project
|
|
55
|
+
selections. Linking is reconciled idempotently — the tool only ever creates or prunes the symlinks it
|
|
56
|
+
owns, and never deletes a real file or a link it did not create. That is what lets the bundled
|
|
57
|
+
product skills coexist safely with an operator's own private skills on the same machine.
|
|
58
|
+
|
|
59
|
+
## Wiring and session start
|
|
60
|
+
|
|
61
|
+
Connecting a repo is one command: `dotbrain wire` creates or repairs the Brainspace, writes its two
|
|
62
|
+
links, materializes the agent workspaces, and records per-link ignore rules. A one-time
|
|
63
|
+
`dotbrain bootstrap` links global skills and subagents.
|
|
64
|
+
|
|
65
|
+
At the start of every agent session, a hook injects the shared operating rules and the project's own
|
|
66
|
+
Brain context into the session, so the agent begins already knowing the project's conventions without
|
|
67
|
+
anyone pasting them in. Project-selected skills and vendor-native subagents are linked into the
|
|
68
|
+
matching workspaces from the same Brainspace declarations. A worktree with no `.brain` or `.beads`
|
|
69
|
+
uses `wire-brain`'s worktree repair branch to link them back to the main checkout.
|
|
70
|
+
|
|
71
|
+
## Public / private boundary
|
|
72
|
+
|
|
73
|
+
The decision that shapes everything: **the tool is public; your data is private.** This repository is
|
|
74
|
+
the tool — CLI, bundled skills, templates, scripts. Your Brainspaces and Brains live in a separate,
|
|
75
|
+
private data root that the installed tool operates on. The tool never contains project data, and a
|
|
76
|
+
Brain is never mirrored into a public code repo. When something genuinely needs to be public, you
|
|
77
|
+
*derive* a fresh, audience-specific document instead of exposing the private source.
|
|
78
|
+
|
|
79
|
+
That boundary is what lets you run dotbrain as an open-source tool while keeping it, unchanged, for
|
|
80
|
+
entirely private work.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Beads Backend
|
|
2
|
+
|
|
3
|
+
This page explains the two beads backend modes dotbrain supports, when to use each one, and how the
|
|
4
|
+
backend lifecycle fits into `load`, `migrate`, and cleanup commands.
|
|
5
|
+
|
|
6
|
+
## Two Modes
|
|
7
|
+
|
|
8
|
+
Per project, beads can run in one of two practical modes:
|
|
9
|
+
|
|
10
|
+
- `embedded`
|
|
11
|
+
Local beads state lives in the project's private Brainspace.
|
|
12
|
+
- `server`
|
|
13
|
+
The project uses a shared Dolt sql-server backend.
|
|
14
|
+
|
|
15
|
+
For most first-time setups, `embedded` is the right default.
|
|
16
|
+
|
|
17
|
+
## Embedded Mode
|
|
18
|
+
|
|
19
|
+
Use embedded mode when:
|
|
20
|
+
|
|
21
|
+
- the project is mostly local to one machine
|
|
22
|
+
- you do not need a shared sql-server backend
|
|
23
|
+
- you want the smallest operational footprint
|
|
24
|
+
|
|
25
|
+
In embedded mode, the Brainspace carries the local beads state and dotbrain can hydrate it
|
|
26
|
+
locally when needed.
|
|
27
|
+
|
|
28
|
+
## Server Mode
|
|
29
|
+
|
|
30
|
+
Use server mode when:
|
|
31
|
+
|
|
32
|
+
- the project should use a shared backend across machines or sessions
|
|
33
|
+
- you want multiple wired checkouts to connect to the same server-backed beads database
|
|
34
|
+
- the project has moved beyond the local embedded default
|
|
35
|
+
|
|
36
|
+
Server mode needs shared infrastructure defaults in `config.yaml`, typically under `beads.server`.
|
|
37
|
+
The per-project `project.yaml` then sets `beads.mode: server`.
|
|
38
|
+
|
|
39
|
+
See [configuration.md](configuration.md) for the concrete
|
|
40
|
+
config examples.
|
|
41
|
+
|
|
42
|
+
## How dotbrain Decides
|
|
43
|
+
|
|
44
|
+
There are two layers of configuration:
|
|
45
|
+
|
|
46
|
+
- `~/dotbrain/config.yaml` for machine-wide server defaults
|
|
47
|
+
- `~/dotbrain/brainspaces/<name>/.brain/project.yaml` for per-project backend choice and overrides
|
|
48
|
+
|
|
49
|
+
In practice:
|
|
50
|
+
|
|
51
|
+
- if a project stays on the default path, it is usually `embedded`
|
|
52
|
+
- if a project declares `beads.mode: server`, dotbrain treats it as server-backed
|
|
53
|
+
|
|
54
|
+
## `dotbrain beads load`
|
|
55
|
+
|
|
56
|
+
Use `dotbrain beads load` to hydrate local beads state from the tracked declarations.
|
|
57
|
+
|
|
58
|
+
What it does depends on the backend:
|
|
59
|
+
|
|
60
|
+
- server-mode projects attach to the declared server tracker
|
|
61
|
+
- embedded projects initialize local beads state and pull it
|
|
62
|
+
|
|
63
|
+
This is a reconcile step for backend state. It does not touch repo wiring, hooks, or unrelated
|
|
64
|
+
workspace files.
|
|
65
|
+
|
|
66
|
+
## `dotbrain beads migrate`
|
|
67
|
+
|
|
68
|
+
Use `dotbrain beads migrate` when a project started as embedded and should move onto a remote
|
|
69
|
+
sql-server backend without losing its existing history.
|
|
70
|
+
|
|
71
|
+
Typical use case:
|
|
72
|
+
|
|
73
|
+
- a project began with the local embedded default
|
|
74
|
+
- later it needs a shared server backend
|
|
75
|
+
- you want to preserve existing beads history while moving to server mode
|
|
76
|
+
|
|
77
|
+
`migrate` is the transition step between those two worlds.
|
|
78
|
+
|
|
79
|
+
## `dotbrain beads drop-db`
|
|
80
|
+
|
|
81
|
+
`dotbrain beads drop-db` is a backend cleanup command for server-backed projects.
|
|
82
|
+
|
|
83
|
+
Use it only when you actually intend to remove the remote beads database. This is separate from
|
|
84
|
+
repo wiring and separate from `dotbrain unwire`.
|
|
85
|
+
|
|
86
|
+
Rule of thumb:
|
|
87
|
+
|
|
88
|
+
- `unwire` disconnects a repo from its Brainspace
|
|
89
|
+
- `drop-db` removes a server backend database
|
|
90
|
+
|
|
91
|
+
Those are different operations on purpose.
|
|
92
|
+
|
|
93
|
+
## Which One Should You Pick?
|
|
94
|
+
|
|
95
|
+
Choose `embedded` when you want the simplest default.
|
|
96
|
+
|
|
97
|
+
Choose `server` when the project genuinely needs shared backend infrastructure.
|
|
98
|
+
|
|
99
|
+
If you are unsure, start embedded and migrate later only when the project really needs the shared
|
|
100
|
+
server model.
|