brain-wiki 0.1.0.dev0__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_wiki-0.1.0.dev0/.claude-plugin/marketplace.json +16 -0
- brain_wiki-0.1.0.dev0/.claude-plugin/plugin.json +19 -0
- brain_wiki-0.1.0.dev0/.gitignore +24 -0
- brain_wiki-0.1.0.dev0/.mcp.json +16 -0
- brain_wiki-0.1.0.dev0/.pre-commit-hooks.yaml +7 -0
- brain_wiki-0.1.0.dev0/CHANGELOG.md +54 -0
- brain_wiki-0.1.0.dev0/CONTRIBUTING.md +111 -0
- brain_wiki-0.1.0.dev0/LICENSE +202 -0
- brain_wiki-0.1.0.dev0/PKG-INFO +231 -0
- brain_wiki-0.1.0.dev0/README.md +197 -0
- brain_wiki-0.1.0.dev0/SECURITY.md +27 -0
- brain_wiki-0.1.0.dev0/docs/design/01-overview.md +211 -0
- brain_wiki-0.1.0.dev0/docs/design/02-brain-format.md +640 -0
- brain_wiki-0.1.0.dev0/docs/design/03-config-and-storage.md +228 -0
- brain_wiki-0.1.0.dev0/docs/design/04-index-and-retrieval.md +605 -0
- brain_wiki-0.1.0.dev0/docs/design/05-write-path-and-consolidation.md +645 -0
- brain_wiki-0.1.0.dev0/docs/design/06-lint-and-reports.md +228 -0
- brain_wiki-0.1.0.dev0/docs/design/07-interfaces.md +417 -0
- brain_wiki-0.1.0.dev0/docs/design/08-agent-integrations.md +340 -0
- brain_wiki-0.1.0.dev0/docs/design/09-import.md +193 -0
- brain_wiki-0.1.0.dev0/docs/design/10-security-and-privacy.md +127 -0
- brain_wiki-0.1.0.dev0/docs/design/11-eval-bench.md +142 -0
- brain_wiki-0.1.0.dev0/docs/design/12-visualizer.md +355 -0
- brain_wiki-0.1.0.dev0/docs/design/13-engineering.md +246 -0
- brain_wiki-0.1.0.dev0/docs/design/14-roadmap-and-open-questions.md +115 -0
- brain_wiki-0.1.0.dev0/docs/design/15-skills-and-onboarding.md +225 -0
- brain_wiki-0.1.0.dev0/docs/design/README.md +69 -0
- brain_wiki-0.1.0.dev0/docs/design/agents/antigravity.md +59 -0
- brain_wiki-0.1.0.dev0/docs/design/agents/claude-code.md +41 -0
- brain_wiki-0.1.0.dev0/docs/design/agents/codex.md +61 -0
- brain_wiki-0.1.0.dev0/docs/design/agents/cursor.md +28 -0
- brain_wiki-0.1.0.dev0/docs/design/agents/openclaw.md +36 -0
- brain_wiki-0.1.0.dev0/docs/proposals/README.md +33 -0
- brain_wiki-0.1.0.dev0/docs/proposals/consolidation-bench.md +100 -0
- brain_wiki-0.1.0.dev0/docs/proposals/hooks.md +125 -0
- brain_wiki-0.1.0.dev0/docs/proposals/privacy.md +154 -0
- brain_wiki-0.1.0.dev0/docs/proposals/public-benchmarks.md +26 -0
- brain_wiki-0.1.0.dev0/docs/proposals/remote-mcp.md +32 -0
- brain_wiki-0.1.0.dev0/docs/proposals/remote-sync.md +169 -0
- brain_wiki-0.1.0.dev0/docs/proposals/scheduled-maintenance.md +88 -0
- brain_wiki-0.1.0.dev0/docs/user/README.md +13 -0
- brain_wiki-0.1.0.dev0/docs/user/agents.md +152 -0
- brain_wiki-0.1.0.dev0/docs/user/getting-started.md +95 -0
- brain_wiki-0.1.0.dev0/docs/user/import.md +61 -0
- brain_wiki-0.1.0.dev0/docs/user/maintenance.md +80 -0
- brain_wiki-0.1.0.dev0/docs/user/privacy.md +68 -0
- brain_wiki-0.1.0.dev0/docs/user/reference.md +87 -0
- brain_wiki-0.1.0.dev0/mcp.json +17 -0
- brain_wiki-0.1.0.dev0/mcp_config.json +15 -0
- brain_wiki-0.1.0.dev0/plugin.json +37 -0
- brain_wiki-0.1.0.dev0/pyproject.toml +112 -0
- brain_wiki-0.1.0.dev0/rules/brain-wiki.md +30 -0
- brain_wiki-0.1.0.dev0/scripts/build_docs_brain.py +625 -0
- brain_wiki-0.1.0.dev0/scripts/check.py +115 -0
- brain_wiki-0.1.0.dev0/scripts/check_visibility.py +238 -0
- brain_wiki-0.1.0.dev0/scripts/check_viz.py +103 -0
- brain_wiki-0.1.0.dev0/scripts/sync_versions.py +186 -0
- brain_wiki-0.1.0.dev0/server.json +30 -0
- brain_wiki-0.1.0.dev0/skills/brain/SKILL.md +145 -0
- brain_wiki-0.1.0.dev0/skills/brain/references/format.md +149 -0
- brain_wiki-0.1.0.dev0/skills/brain-maintain/SKILL.md +111 -0
- brain_wiki-0.1.0.dev0/skills/brain-maintain/references/consolidate.md +91 -0
- brain_wiki-0.1.0.dev0/skills/brain-maintain/references/harvest.md +144 -0
- brain_wiki-0.1.0.dev0/skills/brain-setup/SKILL.md +184 -0
- brain_wiki-0.1.0.dev0/skills/brain-setup/references/hosts.md +88 -0
- brain_wiki-0.1.0.dev0/skills/brain-setup/references/privacy.md +67 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/__init__.py +17 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/__main__.py +5 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/assets/prompts/consolidate.md +89 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/assets/prompts/distill.md +96 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/assets/prompts/harvest.md +142 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/bench/__init__.py +8 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/bench/_generate.py +440 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/bench/_report.py +166 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/bench/_suites.py +959 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/__init__.py +7 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_bench.py +101 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_browse.py +281 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_consolidate.py +108 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_core.py +155 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_harvest.py +137 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_hosts.py +52 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_import.py +149 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_lint.py +117 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_read.py +131 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_runs.py +66 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_viz.py +57 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_write.py +122 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_main.py +511 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/cli/_output.py +19 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/config/__init__.py +56 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/config/_dirs.py +69 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/config/_manifest.py +307 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/config/_resolve.py +169 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/config/_user.py +183 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/consolidate/__init__.py +19 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/consolidate/_apply.py +408 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/consolidate/_packet.py +489 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/consolidate/_pipeline.py +215 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/consolidate/_presets.py +230 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/consolidate/_review.py +104 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/consolidate/_schema.py +153 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/consolidate/_validate.py +252 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/doctor.py +216 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/engine.py +80 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/errors.py +81 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/__init__.py +112 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/_agents_md.py +26 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/_claims.py +95 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/_document.py +203 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/_edit.py +94 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/_episode.py +67 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/_fields.py +350 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/_frontmatter.py +175 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/_links.py +72 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/_meta.py +67 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/_normalize.py +70 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/_relations.py +211 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/format/_rules.py +41 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/harvest.py +414 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/hosts/__init__.py +22 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/hosts/_antigravity.py +163 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/hosts/_claude_code.py +174 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/hosts/_codex.py +149 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/hosts/_connect.py +443 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/hosts/_detect.py +39 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/hosts/_instructions.py +220 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/hosts/_sessions.py +176 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/ids.py +69 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/importer/__init__.py +17 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/importer/_episodes.py +112 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/importer/_into.py +102 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/importer/_normalize.py +64 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/importer/_overlay.py +199 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/importer/_survey.py +167 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/__init__.py +44 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/_brains.py +119 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/_db.py +131 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/_guards.py +154 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/_neighbors.py +174 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/_orient.py +400 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/_read.py +285 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/_resolver.py +147 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/_scanner.py +665 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/_schema.py +164 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/_search.py +659 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/_topics.py +253 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/index/_written.py +29 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/lifecycle.py +158 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/lint/__init__.py +20 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/lint/_catalog.py +85 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/lint/_cross.py +649 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/lint/_files.py +483 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/lint/_fixes.py +87 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/lint/_hook.py +54 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/lint/_model.py +103 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/lint/_reports.py +242 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/lint/_runner.py +156 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/logs.py +34 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/mcp/__init__.py +7 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/mcp/_server.py +917 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/origin.py +97 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/runs/__init__.py +21 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/runs/_git.py +89 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/runs/_lock.py +42 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/runs/_record.py +145 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/runs/_transaction.py +441 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/runs/_undo.py +159 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/setup_wizard.py +143 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/store/__init__.py +7 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/store/_local.py +153 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/viz/__init__.py +9 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/viz/_export.py +414 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/viz/_lod.py +455 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/viz/_server.py +327 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/viz/app/BUILD_INFO.json +5 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/viz/app/THIRD_PARTY_NOTICES.txt +1519 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/viz/app/assets/index-gK1pnQdO.js +4496 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/viz/app/assets/style-Cg8NUCst.css +1 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/viz/app/index.html +14 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/write/__init__.py +23 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/write/_edits.py +730 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/write/_episode.py +195 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/write/_move.py +181 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/write/_rules.py +204 -0
- brain_wiki-0.1.0.dev0/src/brainwiki/write/_secrets.py +108 -0
- brain_wiki-0.1.0.dev0/tests/conftest.py +38 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/AGENTS.md +3 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/archive/episodes/.keep +0 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/archive/episodes/2026/09/01M2Z44880248H248H248H248H.md +15 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/brain.toml +21 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/inbox/agents/.keep +0 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/inbox/episodes/2026/10/01M4KT3JPSB7BP2SNSCAVC2SFB.md +14 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/log.md +4 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/reports/.keep +0 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/rules.md +2 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/topics/budget/gpu-freeze.md +12 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/topics/budget/index.md +9 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/topics/search/fts5.md +26 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/topics/search/index.md +13 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/topics/search/ripgrep.md +12 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/topics/search/vector-only.md +11 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/topics/storage/index.md +9 -0
- brain_wiki-0.1.0.dev0/tests/fixtures/example-brain/topics/storage/sqlite-version-policy.md +12 -0
- brain_wiki-0.1.0.dev0/tests/test_bench.py +123 -0
- brain_wiki-0.1.0.dev0/tests/test_consolidate.py +410 -0
- brain_wiki-0.1.0.dev0/tests/test_discovery.py +368 -0
- brain_wiki-0.1.0.dev0/tests/test_edits.py +259 -0
- brain_wiki-0.1.0.dev0/tests/test_format.py +285 -0
- brain_wiki-0.1.0.dev0/tests/test_foundation.py +183 -0
- brain_wiki-0.1.0.dev0/tests/test_harvest.py +174 -0
- brain_wiki-0.1.0.dev0/tests/test_index.py +160 -0
- brain_wiki-0.1.0.dev0/tests/test_integrations.py +307 -0
- brain_wiki-0.1.0.dev0/tests/test_lint.py +307 -0
- brain_wiki-0.1.0.dev0/tests/test_mcp.py +210 -0
- brain_wiki-0.1.0.dev0/tests/test_plugin.py +197 -0
- brain_wiki-0.1.0.dev0/tests/test_runs.py +158 -0
- brain_wiki-0.1.0.dev0/tests/test_secrets.py +33 -0
- brain_wiki-0.1.0.dev0/tests/test_sessions.py +241 -0
- brain_wiki-0.1.0.dev0/tests/test_topics.py +162 -0
- brain_wiki-0.1.0.dev0/tests/test_viz.py +796 -0
- brain_wiki-0.1.0.dev0/tests/test_write.py +256 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "brain-wiki",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "brain-wiki contributors"
|
|
5
|
+
},
|
|
6
|
+
"description": "brain-wiki: a local-first Markdown second brain shared by your AI agents.",
|
|
7
|
+
"version": "0.1.0.dev0",
|
|
8
|
+
"plugins": [
|
|
9
|
+
{
|
|
10
|
+
"name": "brain-wiki",
|
|
11
|
+
"source": "./",
|
|
12
|
+
"description": "A local-first second brain for AI agents, kept as plain Markdown that you own.",
|
|
13
|
+
"category": "productivity"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "brain-wiki",
|
|
3
|
+
"displayName": "brain-wiki",
|
|
4
|
+
"version": "0.1.0.dev0",
|
|
5
|
+
"description": "A local-first second brain for AI agents, kept as plain Markdown that you own.",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "brain-wiki contributors"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/brain-wiki/brain-wiki",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"memory",
|
|
13
|
+
"agents",
|
|
14
|
+
"mcp",
|
|
15
|
+
"markdown",
|
|
16
|
+
"obsidian",
|
|
17
|
+
"knowledge-base"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.venv/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
|
|
9
|
+
# Tooling caches
|
|
10
|
+
.pytest_cache/
|
|
11
|
+
.ruff_cache/
|
|
12
|
+
.mypy_cache/
|
|
13
|
+
.coverage
|
|
14
|
+
htmlcov/
|
|
15
|
+
|
|
16
|
+
# Editors and OS
|
|
17
|
+
.idea/
|
|
18
|
+
.vscode/
|
|
19
|
+
.DS_Store
|
|
20
|
+
|
|
21
|
+
# Local only: drafts, test caches, and the lockfile (dependencies resolve from pyproject.toml)
|
|
22
|
+
.scratch/
|
|
23
|
+
.hypothesis/
|
|
24
|
+
uv.lock
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0.dev0 (2026-10-14)
|
|
4
|
+
|
|
5
|
+
First release.
|
|
6
|
+
|
|
7
|
+
- **Brain format**: plain Markdown notes with frontmatter, claims with
|
|
8
|
+
provenance, and typed relations (`part_of`, `depends_on`,
|
|
9
|
+
`conflicts_with`, `supersedes`, `related_to`, and their inverses);
|
|
10
|
+
topics as folders, nested to any depth; immutable inbox episodes;
|
|
11
|
+
`rules.md`; a managed `AGENTS.md` block.
|
|
12
|
+
- **Index and retrieval**: SQLite FTS5 index outside the brain, freshness
|
|
13
|
+
checks, guard co-retrieval (superseding and conflicting notes come with
|
|
14
|
+
every hit), search filters, facets, and intents, orientation, and
|
|
15
|
+
Obsidian-style browsing (`brain topics`, `notes`, `links`, `backlinks`,
|
|
16
|
+
`tags`, and more).
|
|
17
|
+
- **Write path**: one episode writer with server-set provenance, secret
|
|
18
|
+
redaction, size caps, and dedupe; episodes dropped in by hand count as
|
|
19
|
+
untrusted; checked direct edits (`brain check`, `brain restore`, a
|
|
20
|
+
per-topic `agent_edits` policy), which agents may make by default; rules
|
|
21
|
+
that need the user's words and confirmation; `brain mv`.
|
|
22
|
+
- **Runs**: every curated change is locked, gated by lint, recorded with
|
|
23
|
+
pre-images, committed to git when the brain is a repository, and
|
|
24
|
+
undoable.
|
|
25
|
+
- **Consolidation**: packets with short handles, a per-op validator, a
|
|
26
|
+
deterministic writer that never deletes text, and review proposals. Your
|
|
27
|
+
agent consolidates in its session over MCP; `brain consolidate --prepare`
|
|
28
|
+
and `--apply` drive it by hand.
|
|
29
|
+
- **Lint and reports**: the BW rule catalog with strict and migrate
|
|
30
|
+
profiles, cached whole-brain lint, safe fixes as one run, staged-file
|
|
31
|
+
lint and a pre-commit hook, and browsable reports.
|
|
32
|
+
- **Agents**: a stdio MCP server with thirteen tools and three prompts;
|
|
33
|
+
`brain connect` for Claude Code, Codex, Antigravity, OpenClaw, and
|
|
34
|
+
Cursor, with instructions placed where each host reads them; session readers and
|
|
35
|
+
harvest for Claude Code, Codex, and Antigravity, with headless presets
|
|
36
|
+
for large backfills; origin lookup; a plugin bundle with three skills;
|
|
37
|
+
`brain setup` and `brain doctor`.
|
|
38
|
+
- **Import**: overlay adoption of Obsidian vaults in phases, copying into
|
|
39
|
+
a brain, documents and agent memory files as episodes.
|
|
40
|
+
- **Visualizer**: `brain viz`, a local read-only 3D map of groups,
|
|
41
|
+
topics, folders, and notes with typed relations and issue highlighting,
|
|
42
|
+
and HTML, JSON, and GraphML export.
|
|
43
|
+
- **Bench**: offline retrieval, lint, and performance suites, and
|
|
44
|
+
model-backed consolidation scenarios through headless presets.
|
|
45
|
+
|
|
46
|
+
Known limitations:
|
|
47
|
+
|
|
48
|
+
- No privacy levels inside a brain: every agent that may use a brain
|
|
49
|
+
reads all of it. Keep separate lives in separate brains
|
|
50
|
+
([proposal](https://github.com/brain-wiki/brain-wiki/blob/main/docs/proposals/privacy.md)).
|
|
51
|
+
- Maintenance runs when you ask your agent; there is no scheduler
|
|
52
|
+
([proposal](https://github.com/brain-wiki/brain-wiki/blob/main/docs/proposals/scheduled-maintenance.md)).
|
|
53
|
+
- Chat apps that need a remote MCP server (ChatGPT, claude.ai, the Gemini
|
|
54
|
+
app) are not supported ([proposal](https://github.com/brain-wiki/brain-wiki/blob/main/docs/proposals/remote-mcp.md)).
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Contributing to brain-wiki
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
uv sync # creates .venv with dev dependencies
|
|
7
|
+
uv run brain --help
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Checks
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
uv run scripts/check.py # everything CI runs: lint, format, tests, plugin sync, docs brain, visualizer bundle, package contents
|
|
14
|
+
uv run pytest -q # tests only
|
|
15
|
+
uv run ruff format src tests scripts && uv run ruff check src tests scripts # format, then lint
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
After editing `docs/`, regenerate the docs brain (`docs-brain/`, the docs as a
|
|
19
|
+
brain) with `uv run scripts/build_docs_brain.py`; CI fails when it is stale.
|
|
20
|
+
After changing the version or anything under `src/brainwiki/assets/`, run
|
|
21
|
+
`uv run scripts/sync_versions.py`.
|
|
22
|
+
|
|
23
|
+
### The visualizer front end
|
|
24
|
+
|
|
25
|
+
`brain viz` serves a prebuilt bundle from `src/brainwiki/viz/app/`, so users
|
|
26
|
+
never need Node. Its source is the
|
|
27
|
+
[brain-wiki-viz](https://github.com/brain-wiki/brain-wiki-viz) repository.
|
|
28
|
+
Clone it next to this one, then:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
cd ../brain-wiki-viz
|
|
32
|
+
npm ci # Node 20.19+, or 22.12+ on Node 22
|
|
33
|
+
npm run check # type check, unit tests, lockfile check
|
|
34
|
+
git commit … # commit the source first: the build records its commit
|
|
35
|
+
npm run build # writes ../brain-wiki/src/brainwiki/viz/app/
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Commit the rebuilt bundle here. `scripts/check.py` checks that the bundle is
|
|
39
|
+
complete and was built from a clean brain-wiki-viz commit
|
|
40
|
+
(`BUILD_INFO.json`); `scripts/check_viz.py --source ../brain-wiki-viz`
|
|
41
|
+
also rebuilds that checkout and fails if the result differs. For live reload,
|
|
42
|
+
run `brain viz --no-open --port 8765` here and `npm run dev` there, then open
|
|
43
|
+
the dev server with the token from `brain viz` (`?t=…`).
|
|
44
|
+
|
|
45
|
+
## Releasing
|
|
46
|
+
|
|
47
|
+
CI (`.github/workflows/ci.yml`) runs `scripts/check.py` on Linux and macOS
|
|
48
|
+
with Python 3.11 and 3.13, runs brain-wiki-viz's checks at the bundle's
|
|
49
|
+
commit, and checks that the bundle rebuilds from it. A version tag runs
|
|
50
|
+
`.github/workflows/release.yml`: it checks the tag against the version and
|
|
51
|
+
the changelog, runs the checks, builds, publishes to PyPI with trusted
|
|
52
|
+
publishing, publishes `server.json` to the MCP Registry (final versions
|
|
53
|
+
only), and creates the GitHub release from the changelog entry.
|
|
54
|
+
|
|
55
|
+
1. Set `version` in `pyproject.toml` to `X.Y.Z`, or a development release
|
|
56
|
+
such as `X.Y.Z.devN`, and date its changelog entry: `## X.Y.Z (YYYY-MM-DD)`.
|
|
57
|
+
A development release goes to PyPI like any other, and pip and uv install
|
|
58
|
+
it while no final release exists; the GitHub release is marked a
|
|
59
|
+
pre-release, and the MCP Registry, a public catalog, is skipped.
|
|
60
|
+
2. `uv run scripts/sync_versions.py`, then commit.
|
|
61
|
+
3. `git tag vX.Y.Z && git push origin main vX.Y.Z`.
|
|
62
|
+
4. Move `main` to the next development version (`X.Y.(Z+1).dev0` after
|
|
63
|
+
`X.Y.Z`, `X.Y.Z.dev(N+1)` after `X.Y.Z.devN`) with a new `(unreleased)`
|
|
64
|
+
entry, run `sync_versions.py`, commit, and push. The plugin files keep
|
|
65
|
+
pointing at the newest dated release, because marketplaces install the
|
|
66
|
+
plugin from `main`.
|
|
67
|
+
|
|
68
|
+
One-time setup: a trusted publisher on PyPI for this repository, workflow
|
|
69
|
+
`release.yml`, environment `pypi` (and that environment in the GitHub
|
|
70
|
+
repository settings); private vulnerability reporting turned on (see
|
|
71
|
+
`SECURITY.md`).
|
|
72
|
+
|
|
73
|
+
## Where things are
|
|
74
|
+
|
|
75
|
+
| Path | What |
|
|
76
|
+
|---|---|
|
|
77
|
+
| `docs/design/` | The design of what is implemented. Read the relevant document before changing behavior, and update it in the same change. |
|
|
78
|
+
| `docs/proposals/` | Designs not yet built, and the backlog. Building one moves its content into `docs/design/`. |
|
|
79
|
+
| `src/brainwiki/` | The package (layout in `docs/design/13-engineering.md` §2) |
|
|
80
|
+
| `src/brainwiki/assets/` | Prompts the engine uses; the skills' copies are generated from them |
|
|
81
|
+
| `plugin.json`, `mcp.json`, `.mcp.json`, `mcp_config.json`, `rules/`, `skills/`, `.claude-plugin/`, `server.json` | The plugin, served from the repository root. These names, and `hooks/` and `hooks.json`, are reserved by hosts; the bundle ships no hooks. |
|
|
82
|
+
| `src/brainwiki/viz/app/` | The visualizer's built bundle (source: brain-wiki-viz); do not edit by hand |
|
|
83
|
+
| `scripts/sync_versions.py` | Writes the version into every manifest and regenerates skill references (`--check` in CI) |
|
|
84
|
+
| `tests/fixtures/` | Synthetic fixtures only |
|
|
85
|
+
|
|
86
|
+
## Rules
|
|
87
|
+
|
|
88
|
+
- **No real personal data anywhere**: examples and fixtures use the
|
|
89
|
+
fictional notes app "Lumen" and generic paths.
|
|
90
|
+
- **Test fixtures never contain credentials**, even fake ones in their real
|
|
91
|
+
shape; build such strings at runtime in the test.
|
|
92
|
+
- **Minimal visibility.** Modules inside a package are private
|
|
93
|
+
(`_name.py`); a package's API is what its `__init__.py` re-exports, and
|
|
94
|
+
code outside the package imports only that (tests may reach private
|
|
95
|
+
modules). Inside a module, a name is public only when another module, a
|
|
96
|
+
test, or a script uses it. `scripts/check_visibility.py` (part of
|
|
97
|
+
`scripts/check.py`) enforces both; `docs/design/13-engineering.md` §2 has
|
|
98
|
+
the details.
|
|
99
|
+
- **Writers never reflow text.** Anything that edits a note changes only the
|
|
100
|
+
lines it must; add a test that untouched lines survive byte for byte.
|
|
101
|
+
- **Every curated change goes through `runs.Run`** so it is recorded,
|
|
102
|
+
locked, gated by lint, and undoable.
|
|
103
|
+
- **The CLI starts fast**: subcommand modules are imported lazily, and only
|
|
104
|
+
`brain mcp` imports the MCP SDK (`docs/design/07-interfaces.md` §2.4).
|
|
105
|
+
- One version number, in `pyproject.toml`; run `scripts/sync_versions.py`
|
|
106
|
+
after changing it or any file under `src/brainwiki/assets/`.
|
|
107
|
+
|
|
108
|
+
## Commits and pull requests
|
|
109
|
+
|
|
110
|
+
Conventional Commits (`feat(lint): …`, `fix(index): …`). The message says
|
|
111
|
+
why the change exists, not what the diff shows.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|