brain-wiki 0.1.0.dev0__tar.gz → 0.1.0.dev1__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.
Files changed (231) hide show
  1. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/.claude-plugin/marketplace.json +1 -1
  2. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/.claude-plugin/plugin.json +1 -1
  3. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/.mcp.json +1 -1
  4. brain_wiki-0.1.0.dev1/CHANGELOG.md +110 -0
  5. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/CONTRIBUTING.md +3 -3
  6. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/PKG-INFO +20 -11
  7. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/README.md +18 -10
  8. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/03-config-and-storage.md +8 -3
  9. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/04-index-and-retrieval.md +12 -8
  10. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/05-write-path-and-consolidation.md +67 -27
  11. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/06-lint-and-reports.md +16 -4
  12. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/07-interfaces.md +90 -27
  13. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/08-agent-integrations.md +17 -3
  14. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/09-import.md +20 -3
  15. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/10-security-and-privacy.md +1 -1
  16. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/13-engineering.md +14 -12
  17. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/14-roadmap-and-open-questions.md +1 -1
  18. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/15-skills-and-onboarding.md +12 -5
  19. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/README.md +3 -2
  20. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/agents/antigravity.md +1 -1
  21. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/agents/codex.md +1 -1
  22. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/user/agents.md +31 -24
  23. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/user/getting-started.md +24 -1
  24. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/user/import.md +15 -4
  25. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/user/maintenance.md +18 -3
  26. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/user/privacy.md +12 -8
  27. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/user/reference.md +35 -25
  28. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/mcp.json +1 -1
  29. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/mcp_config.json +1 -1
  30. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/plugin.json +1 -1
  31. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/pyproject.toml +2 -1
  32. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/rules/brain-wiki.md +1 -1
  33. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/server.json +2 -2
  34. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/skills/brain/SKILL.md +5 -5
  35. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/skills/brain-maintain/SKILL.md +10 -8
  36. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/skills/brain-setup/SKILL.md +31 -27
  37. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/skills/brain-setup/references/hosts.md +1 -1
  38. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/skills/brain-setup/references/privacy.md +20 -10
  39. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/bench/_report.py +29 -4
  40. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/cli/_cmd_bench.py +10 -2
  41. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/cli/_cmd_browse.py +20 -70
  42. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/cli/_cmd_consolidate.py +55 -25
  43. brain_wiki-0.1.0.dev1/src/brainwiki/cli/_cmd_core.py +250 -0
  44. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/cli/_cmd_harvest.py +94 -10
  45. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/cli/_cmd_hosts.py +16 -5
  46. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/cli/_cmd_import.py +84 -28
  47. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/cli/_cmd_lint.py +24 -6
  48. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/cli/_cmd_read.py +43 -6
  49. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/cli/_cmd_runs.py +23 -3
  50. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/cli/_cmd_viz.py +5 -0
  51. brain_wiki-0.1.0.dev1/src/brainwiki/cli/_cmd_write.py +193 -0
  52. brain_wiki-0.1.0.dev1/src/brainwiki/cli/_main.py +1437 -0
  53. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/config/__init__.py +18 -1
  54. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/config/_manifest.py +44 -4
  55. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/config/_resolve.py +36 -12
  56. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/config/_user.py +84 -6
  57. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/consolidate/__init__.py +1 -2
  58. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/consolidate/_apply.py +3 -5
  59. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/consolidate/_packet.py +166 -30
  60. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/consolidate/_pipeline.py +115 -11
  61. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/consolidate/_review.py +62 -4
  62. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/consolidate/_validate.py +18 -3
  63. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/doctor.py +21 -8
  64. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/errors.py +9 -1
  65. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/hosts/__init__.py +2 -0
  66. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/hosts/_connect.py +197 -50
  67. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/hosts/_instructions.py +1 -1
  68. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/importer/_episodes.py +12 -5
  69. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/importer/_normalize.py +4 -2
  70. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/importer/_overlay.py +50 -11
  71. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/__init__.py +8 -1
  72. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/_brains.py +14 -4
  73. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/_orient.py +5 -3
  74. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/_read.py +10 -5
  75. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/_scanner.py +4 -1
  76. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/_search.py +34 -7
  77. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/lifecycle.py +1 -1
  78. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/lint/__init__.py +4 -1
  79. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/lint/_catalog.py +5 -0
  80. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/lint/_fixes.py +3 -1
  81. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/lint/_hook.py +9 -5
  82. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/lint/_model.py +16 -2
  83. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/lint/_runner.py +17 -1
  84. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/mcp/_server.py +4 -4
  85. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/origin.py +14 -1
  86. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/runs/_git.py +16 -23
  87. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/runs/_transaction.py +5 -5
  88. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/runs/_undo.py +11 -69
  89. brain_wiki-0.1.0.dev1/src/brainwiki/setup_wizard.py +268 -0
  90. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/store/_local.py +2 -2
  91. brain_wiki-0.1.0.dev1/src/brainwiki/viz/app/BUILD_INFO.json +5 -0
  92. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/write/__init__.py +4 -1
  93. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/write/_edits.py +59 -20
  94. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/write/_move.py +131 -6
  95. brain_wiki-0.1.0.dev1/src/brainwiki/write/_profiles.py +80 -0
  96. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/write/_rules.py +38 -14
  97. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_bench.py +22 -0
  98. brain_wiki-0.1.0.dev1/tests/test_cli.py +108 -0
  99. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_consolidate.py +214 -0
  100. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_discovery.py +54 -7
  101. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_edits.py +40 -0
  102. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_foundation.py +46 -1
  103. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_harvest.py +75 -0
  104. brain_wiki-0.1.0.dev1/tests/test_import.py +172 -0
  105. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_index.py +32 -0
  106. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_integrations.py +187 -3
  107. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_lint.py +47 -0
  108. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_mcp.py +5 -1
  109. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_runs.py +136 -2
  110. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_viz.py +11 -0
  111. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_write.py +148 -1
  112. brain_wiki-0.1.0.dev0/CHANGELOG.md +0 -54
  113. brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_core.py +0 -155
  114. brain_wiki-0.1.0.dev0/src/brainwiki/cli/_cmd_write.py +0 -122
  115. brain_wiki-0.1.0.dev0/src/brainwiki/cli/_main.py +0 -511
  116. brain_wiki-0.1.0.dev0/src/brainwiki/setup_wizard.py +0 -143
  117. brain_wiki-0.1.0.dev0/src/brainwiki/viz/app/BUILD_INFO.json +0 -5
  118. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/.gitignore +0 -0
  119. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/.pre-commit-hooks.yaml +0 -0
  120. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/LICENSE +0 -0
  121. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/SECURITY.md +0 -0
  122. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/01-overview.md +0 -0
  123. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/02-brain-format.md +0 -0
  124. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/11-eval-bench.md +0 -0
  125. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/12-visualizer.md +0 -0
  126. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/agents/claude-code.md +0 -0
  127. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/agents/cursor.md +0 -0
  128. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/design/agents/openclaw.md +0 -0
  129. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/proposals/README.md +0 -0
  130. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/proposals/consolidation-bench.md +0 -0
  131. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/proposals/hooks.md +0 -0
  132. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/proposals/privacy.md +0 -0
  133. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/proposals/public-benchmarks.md +0 -0
  134. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/proposals/remote-mcp.md +0 -0
  135. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/proposals/remote-sync.md +0 -0
  136. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/proposals/scheduled-maintenance.md +0 -0
  137. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/docs/user/README.md +0 -0
  138. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/scripts/build_docs_brain.py +0 -0
  139. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/scripts/check.py +0 -0
  140. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/scripts/check_visibility.py +0 -0
  141. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/scripts/check_viz.py +0 -0
  142. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/scripts/sync_versions.py +0 -0
  143. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/skills/brain/references/format.md +0 -0
  144. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/skills/brain-maintain/references/consolidate.md +0 -0
  145. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/skills/brain-maintain/references/harvest.md +0 -0
  146. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/__init__.py +0 -0
  147. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/__main__.py +0 -0
  148. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/assets/prompts/consolidate.md +0 -0
  149. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/assets/prompts/distill.md +0 -0
  150. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/assets/prompts/harvest.md +0 -0
  151. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/bench/__init__.py +0 -0
  152. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/bench/_generate.py +0 -0
  153. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/bench/_suites.py +0 -0
  154. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/cli/__init__.py +0 -0
  155. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/cli/_output.py +0 -0
  156. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/config/_dirs.py +0 -0
  157. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/consolidate/_presets.py +0 -0
  158. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/consolidate/_schema.py +0 -0
  159. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/engine.py +0 -0
  160. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/__init__.py +0 -0
  161. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/_agents_md.py +0 -0
  162. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/_claims.py +0 -0
  163. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/_document.py +0 -0
  164. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/_edit.py +0 -0
  165. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/_episode.py +0 -0
  166. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/_fields.py +0 -0
  167. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/_frontmatter.py +0 -0
  168. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/_links.py +0 -0
  169. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/_meta.py +0 -0
  170. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/_normalize.py +0 -0
  171. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/_relations.py +0 -0
  172. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/format/_rules.py +0 -0
  173. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/harvest.py +0 -0
  174. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/hosts/_antigravity.py +0 -0
  175. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/hosts/_claude_code.py +0 -0
  176. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/hosts/_codex.py +0 -0
  177. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/hosts/_detect.py +0 -0
  178. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/hosts/_sessions.py +0 -0
  179. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/ids.py +0 -0
  180. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/importer/__init__.py +0 -0
  181. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/importer/_into.py +0 -0
  182. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/importer/_survey.py +0 -0
  183. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/_db.py +0 -0
  184. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/_guards.py +0 -0
  185. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/_neighbors.py +0 -0
  186. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/_resolver.py +0 -0
  187. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/_schema.py +0 -0
  188. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/_topics.py +0 -0
  189. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/index/_written.py +0 -0
  190. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/lint/_cross.py +0 -0
  191. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/lint/_files.py +0 -0
  192. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/lint/_reports.py +0 -0
  193. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/logs.py +0 -0
  194. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/mcp/__init__.py +0 -0
  195. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/runs/__init__.py +0 -0
  196. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/runs/_lock.py +0 -0
  197. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/runs/_record.py +0 -0
  198. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/store/__init__.py +0 -0
  199. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/viz/__init__.py +0 -0
  200. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/viz/_export.py +0 -0
  201. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/viz/_lod.py +0 -0
  202. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/viz/_server.py +0 -0
  203. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/viz/app/THIRD_PARTY_NOTICES.txt +0 -0
  204. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/viz/app/assets/index-gK1pnQdO.js +0 -0
  205. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/viz/app/assets/style-Cg8NUCst.css +0 -0
  206. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/viz/app/index.html +0 -0
  207. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/write/_episode.py +0 -0
  208. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/src/brainwiki/write/_secrets.py +0 -0
  209. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/conftest.py +0 -0
  210. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/AGENTS.md +0 -0
  211. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/archive/episodes/.keep +0 -0
  212. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/archive/episodes/2026/09/01M2Z44880248H248H248H248H.md +0 -0
  213. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/brain.toml +0 -0
  214. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/inbox/agents/.keep +0 -0
  215. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/inbox/episodes/2026/10/01M4KT3JPSB7BP2SNSCAVC2SFB.md +0 -0
  216. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/log.md +0 -0
  217. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/reports/.keep +0 -0
  218. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/rules.md +0 -0
  219. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/topics/budget/gpu-freeze.md +0 -0
  220. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/topics/budget/index.md +0 -0
  221. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/topics/search/fts5.md +0 -0
  222. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/topics/search/index.md +0 -0
  223. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/topics/search/ripgrep.md +0 -0
  224. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/topics/search/vector-only.md +0 -0
  225. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/topics/storage/index.md +0 -0
  226. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/fixtures/example-brain/topics/storage/sqlite-version-policy.md +0 -0
  227. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_format.py +0 -0
  228. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_plugin.py +0 -0
  229. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_secrets.py +0 -0
  230. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_sessions.py +0 -0
  231. {brain_wiki-0.1.0.dev0 → brain_wiki-0.1.0.dev1}/tests/test_topics.py +0 -0
@@ -4,7 +4,7 @@
4
4
  "name": "brain-wiki contributors"
5
5
  },
6
6
  "description": "brain-wiki: a local-first Markdown second brain shared by your AI agents.",
7
- "version": "0.1.0.dev0",
7
+ "version": "0.1.0.dev1",
8
8
  "plugins": [
9
9
  {
10
10
  "name": "brain-wiki",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "brain-wiki",
3
3
  "displayName": "brain-wiki",
4
- "version": "0.1.0.dev0",
4
+ "version": "0.1.0.dev1",
5
5
  "description": "A local-first second brain for AI agents, kept as plain Markdown that you own.",
6
6
  "author": {
7
7
  "name": "brain-wiki contributors"
@@ -5,7 +5,7 @@
5
5
  "command": "uvx",
6
6
  "args": [
7
7
  "--from",
8
- "brain-wiki==0.1.0.dev0",
8
+ "brain-wiki==0.1.0.dev1",
9
9
  "brain",
10
10
  "mcp",
11
11
  "--host",
@@ -0,0 +1,110 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0.dev1 (2026-10-14)
4
+
5
+ - `brain setup --guide` prints the setup steps for an AI agent, so any agent
6
+ that can run commands can set brain-wiki up from one prompt, without the
7
+ plugin. Without a terminal, `brain setup` points to it, and an agent that
8
+ finds no brain is told to use the `brain-setup` skill or the guide.
9
+ - Every setup step is now a command, so the guide never edits config files:
10
+ `brain agents [list | grant | revoke]` changes what an app may do as an
11
+ undoable run, and `brain harvest enable | disable | route` configures
12
+ harvest. A refusal names the `brain agents grant` command that allows it.
13
+ `brain brains limit HOST BRAIN...` and `unlimit HOST` set which brains an
14
+ app may use.
15
+ - `brain setup` also asks what each connected app may do, grants the
16
+ `harvest` ability with harvest, and ends with what to try next.
17
+ - The CLI is built on Typer. Action commands are real subcommands with their
18
+ own help (`brain rules add --help`), and `brain --install-completion`
19
+ installs tab completion. `--brain`, `--as`, and `--json` still work before
20
+ or after the command. `brain --version` also prints the file format.
21
+ - Removed commands, and what replaces them: `brain version` → `brain
22
+ --version`; `brain list` → `brain brains` (also with `--as HOST`); `brain
23
+ notes` and `brain recent` → `brain search ""` with filters (e.g. `brain
24
+ search "" --since 7d`; browsing sorts by `recent`); `brain outline TARGET` →
25
+ `brain read TARGET --mode outline`.
26
+ - `brain rule` is now `brain rules`; `rule` still works as a hidden alias.
27
+ - `brain review` also covers rule proposals: `review list` shows them with
28
+ consolidation and edit proposals, marking each one's kind, and `review
29
+ show`, `accept`, and `reject` take a rule proposal's id.
30
+ - `brain import --phase` given with a mode other than `--overlay` is a usage
31
+ error even when it is `--phase 0`.
32
+ - Harvest routes are a fallback: a project's `.brain-wiki.toml` now wins over
33
+ a catch-all route such as `~/**`.
34
+
35
+ Fixes from an audit of every command, each with a regression test:
36
+
37
+ - **Data loss:** undo could delete notes when the first write came before
38
+ any full scan. In a git brain, undo lost files git never tracked (inbox
39
+ episodes, proposals), left deletions staged, and failed for any run but the
40
+ newest. Undo now restores from the run's saved copies in every brain.
41
+ - **Safety:** `brain review accept` trusted the packet inside the proposal
42
+ file, so a forged one could write `rules.md`; it now rebuilds the packet
43
+ from the brain. `--as HOST` is enforced by every write command.
44
+ - `brain import --apply --dry-run` applied the import; a failed `brain
45
+ brains rename` deleted the brain's entry; overlay phases 1–3 never ran in
46
+ a git repository; `--to-episodes` turned frontmatter into an episode.
47
+ - `tags`, `types`, `orphans`, and `unresolved` showed a stale index; `search
48
+ --where` ignored tags, aliases, title, and id; `read --mode raw` was not
49
+ the raw file; `doctor` counted hubs as notes.
50
+ - `brain check` recorded edits that lint rejects; `brain mv` of a topic left
51
+ its `brain.toml` entry behind; topics with `review = "always"` skipped
52
+ review for new notes.
53
+ - `brain connect` broke a project-scope install on a later user-scope
54
+ connect, did not restore config files byte for byte, and crashed on
55
+ malformed JSON.
56
+ - Unexpected errors exit 10 with a log reference instead of a traceback;
57
+ conflicts report `conflict:`, and only stale data reports `stale:`.
58
+
59
+ ## 0.1.0.dev0 (2026-10-14)
60
+
61
+ First release.
62
+
63
+ - **Brain format**: plain Markdown notes with frontmatter, claims with
64
+ provenance, and typed relations (`part_of`, `depends_on`,
65
+ `conflicts_with`, `supersedes`, `related_to`, and their inverses);
66
+ topics as folders, nested to any depth; immutable inbox episodes;
67
+ `rules.md`; a managed `AGENTS.md` block.
68
+ - **Index and retrieval**: SQLite FTS5 index outside the brain, freshness
69
+ checks, guard co-retrieval (superseding and conflicting notes come with
70
+ every hit), search filters, facets, and intents, orientation, and
71
+ Obsidian-style browsing (`brain topics`, `notes`, `links`, `backlinks`,
72
+ `tags`, and more).
73
+ - **Write path**: one episode writer with server-set provenance, secret
74
+ redaction, size caps, and dedupe; episodes dropped in by hand count as
75
+ untrusted; checked direct edits (`brain check`, `brain restore`, a
76
+ per-topic `agent_edits` policy), which agents may make by default; rules
77
+ that need the user's words and confirmation; `brain mv`.
78
+ - **Runs**: every curated change is locked, gated by lint, recorded with
79
+ pre-images, committed to git when the brain is a repository, and
80
+ undoable.
81
+ - **Consolidation**: packets with short handles, a per-op validator, a
82
+ deterministic writer that never deletes text, and review proposals. Your
83
+ agent consolidates in its session over MCP; `brain consolidate --prepare`
84
+ and `--apply` drive it by hand.
85
+ - **Lint and reports**: the BW rule catalog with strict and migrate
86
+ profiles, cached whole-brain lint, safe fixes as one run, staged-file
87
+ lint and a pre-commit hook, and browsable reports.
88
+ - **Agents**: a stdio MCP server with thirteen tools and three prompts;
89
+ `brain connect` for Claude Code, Codex, Antigravity, OpenClaw, and
90
+ Cursor, with instructions placed where each host reads them; session readers and
91
+ harvest for Claude Code, Codex, and Antigravity, with headless presets
92
+ for large backfills; origin lookup; a plugin bundle with three skills;
93
+ `brain setup` and `brain doctor`.
94
+ - **Import**: overlay adoption of Obsidian vaults in phases, copying into
95
+ a brain, documents and agent memory files as episodes.
96
+ - **Visualizer**: `brain viz`, a local read-only 3D map of groups,
97
+ topics, folders, and notes with typed relations and issue highlighting,
98
+ and HTML, JSON, and GraphML export.
99
+ - **Bench**: offline retrieval, lint, and performance suites, and
100
+ model-backed consolidation scenarios through headless presets.
101
+
102
+ Known limitations:
103
+
104
+ - No privacy levels inside a brain: every agent that may use a brain
105
+ reads all of it. Keep separate lives in separate brains
106
+ ([proposal](https://github.com/brain-wiki/brain-wiki/blob/main/docs/proposals/privacy.md)).
107
+ - Maintenance runs when you ask your agent; there is no scheduler
108
+ ([proposal](https://github.com/brain-wiki/brain-wiki/blob/main/docs/proposals/scheduled-maintenance.md)).
109
+ - Chat apps that need a remote MCP server (ChatGPT, claude.ai, the Gemini
110
+ app) are not supported ([proposal](https://github.com/brain-wiki/brain-wiki/blob/main/docs/proposals/remote-mcp.md)).
@@ -49,14 +49,14 @@ with Python 3.11 and 3.13, runs brain-wiki-viz's checks at the bundle's
49
49
  commit, and checks that the bundle rebuilds from it. A version tag runs
50
50
  `.github/workflows/release.yml`: it checks the tag against the version and
51
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.
52
+ publishing, and creates the GitHub release from the changelog entry. Its
53
+ MCP Registry job is turned off until the project decides to be listed.
54
54
 
55
55
  1. Set `version` in `pyproject.toml` to `X.Y.Z`, or a development release
56
56
  such as `X.Y.Z.devN`, and date its changelog entry: `## X.Y.Z (YYYY-MM-DD)`.
57
57
  A development release goes to PyPI like any other, and pip and uv install
58
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.
59
+ pre-release.
60
60
  2. `uv run scripts/sync_versions.py`, then commit.
61
61
  3. `git tag vX.Y.Z && git push origin main vX.Y.Z`.
62
62
  4. Move `main` to the next development version (`X.Y.(Z+1).dev0` after
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: brain-wiki
3
- Version: 0.1.0.dev0
3
+ Version: 0.1.0.dev1
4
4
  Summary: A local-first second brain for AI agents, kept as plain Markdown that you own.
5
5
  Project-URL: Homepage, https://github.com/brain-wiki/brain-wiki
6
6
  Project-URL: Documentation, https://github.com/brain-wiki/brain-wiki/tree/main/docs/user
@@ -30,6 +30,7 @@ Requires-Dist: jsonschema>=4.20
30
30
  Requires-Dist: mcp<3,>=2.3
31
31
  Requires-Dist: pyyaml>=6.0
32
32
  Requires-Dist: tomlkit>=0.12
33
+ Requires-Dist: typer<1,>=0.26
33
34
  Description-Content-Type: text/markdown
34
35
 
35
36
  # brain-wiki
@@ -89,12 +90,18 @@ uv, Homebrew, and most Linux builds include, and [uv](https://docs.astral.sh/uv/
89
90
  | Antigravity | `agy plugin install https://github.com/brain-wiki/brain-wiki` |
90
91
  | OpenClaw, Cursor, other MCP clients | Install the command, then `brain connect openclaw`, `brain connect cursor`, or `brain connect generic --print` (see below) |
91
92
 
93
+ No plugin yet, or an agent not listed? Ask any agent that can run commands:
94
+
95
+ > Install brain-wiki with `uv tool install brain-wiki`, then run
96
+ > `brain setup --guide` and follow it.
97
+
92
98
  **2. Ask your agent to set it up.**
93
99
 
94
100
  > Set up brain-wiki.
95
101
 
96
- The `brain-setup` skill explains each choice, lets you decide, and shows
97
- every change before making it:
102
+ The `brain-setup` skill (or the guide `brain setup --guide` prints, which
103
+ holds the same steps) explains each choice, lets you decide, and shows every
104
+ change before making it:
98
105
 
99
106
  - where your brain lives (a new folder, or an Obsidian vault adopted in
100
107
  place) and whether to track it with git;
@@ -116,21 +123,23 @@ every change before making it:
116
123
 
117
124
  ```sh
118
125
  uv tool install brain-wiki # or: pipx install brain-wiki
119
- brain doctor # checks SQLite, your brains, and the agents on this machine
120
- brain init ~/brains/personal --name personal --git
121
- brain connect claude-code # or codex, antigravity, openclaw, cursor; try --dry-run first
126
+ brain setup # step by step: create a brain, connect your agents, harvest
122
127
  brain log "Lumen keeps attachments next to their notes; Obsidian expects relative paths."
123
128
  brain search "attachments"
124
129
  brain viz # a local 3D map of the brain
125
130
  ```
126
131
 
132
+ Or do the steps yourself: `brain doctor` (checks SQLite, your brains, and
133
+ the agents on this machine), `brain init ~/brains/personal --name personal
134
+ --git`, and `brain connect claude-code` (or codex, antigravity, openclaw,
135
+ cursor; try `--dry-run` first).
136
+
127
137
  Keep brains outside your code repositories. Agents may log and correct
128
- notes by default; to let one consolidate or propose rules, give it a profile
129
- in the brain's `brain.toml`:
138
+ notes by default; `brain setup` asks whether each app may also consolidate
139
+ and propose rules, or grant it yourself:
130
140
 
131
- ```toml
132
- [agents.claude-code]
133
- write = ["episodes", "edit", "consolidate", "propose_rules"]
141
+ ```sh
142
+ brain agents grant claude-code consolidate propose_rules
134
143
  ```
135
144
 
136
145
  Marketplace installs start the server with `uvx`. With the command
@@ -55,12 +55,18 @@ uv, Homebrew, and most Linux builds include, and [uv](https://docs.astral.sh/uv/
55
55
  | Antigravity | `agy plugin install https://github.com/brain-wiki/brain-wiki` |
56
56
  | OpenClaw, Cursor, other MCP clients | Install the command, then `brain connect openclaw`, `brain connect cursor`, or `brain connect generic --print` (see below) |
57
57
 
58
+ No plugin yet, or an agent not listed? Ask any agent that can run commands:
59
+
60
+ > Install brain-wiki with `uv tool install brain-wiki`, then run
61
+ > `brain setup --guide` and follow it.
62
+
58
63
  **2. Ask your agent to set it up.**
59
64
 
60
65
  > Set up brain-wiki.
61
66
 
62
- The `brain-setup` skill explains each choice, lets you decide, and shows
63
- every change before making it:
67
+ The `brain-setup` skill (or the guide `brain setup --guide` prints, which
68
+ holds the same steps) explains each choice, lets you decide, and shows every
69
+ change before making it:
64
70
 
65
71
  - where your brain lives (a new folder, or an Obsidian vault adopted in
66
72
  place) and whether to track it with git;
@@ -82,21 +88,23 @@ every change before making it:
82
88
 
83
89
  ```sh
84
90
  uv tool install brain-wiki # or: pipx install brain-wiki
85
- brain doctor # checks SQLite, your brains, and the agents on this machine
86
- brain init ~/brains/personal --name personal --git
87
- brain connect claude-code # or codex, antigravity, openclaw, cursor; try --dry-run first
91
+ brain setup # step by step: create a brain, connect your agents, harvest
88
92
  brain log "Lumen keeps attachments next to their notes; Obsidian expects relative paths."
89
93
  brain search "attachments"
90
94
  brain viz # a local 3D map of the brain
91
95
  ```
92
96
 
97
+ Or do the steps yourself: `brain doctor` (checks SQLite, your brains, and
98
+ the agents on this machine), `brain init ~/brains/personal --name personal
99
+ --git`, and `brain connect claude-code` (or codex, antigravity, openclaw,
100
+ cursor; try `--dry-run` first).
101
+
93
102
  Keep brains outside your code repositories. Agents may log and correct
94
- notes by default; to let one consolidate or propose rules, give it a profile
95
- in the brain's `brain.toml`:
103
+ notes by default; `brain setup` asks whether each app may also consolidate
104
+ and propose rules, or grant it yourself:
96
105
 
97
- ```toml
98
- [agents.claude-code]
99
- write = ["episodes", "edit", "consolidate", "propose_rules"]
106
+ ```sh
107
+ brain agents grant claude-code consolidate propose_rules
100
108
  ```
101
109
 
102
110
  Marketplace installs start the server with `uvx`. With the command
@@ -54,7 +54,9 @@ hosts = ["claude-code"]
54
54
  - No credentials are ever stored here. Proposed remote backends use the
55
55
  platform's own credential chains ([remote sync](../proposals/remote-sync.md)).
56
56
  - The file is created by `brain init` and edited by `brain brains add |
57
- remove | default`, which preserve comments and formatting.
57
+ remove | rename | default | limit`, which preserve comments and formatting.
58
+ `add` and `rename` take names of lowercase letters, digits, and hyphens.
59
+ An edit that fails changes nothing.
58
60
 
59
61
  ## 3. Choosing a brain
60
62
 
@@ -76,6 +78,9 @@ If nothing matches, the command fails with a message that suggests
76
78
  **Host limits.** When `[hosts.<id>] brains` is set, a selection outside
77
79
  that list is refused for that host, whichever source produced it. This is
78
80
  how a user keeps, say, a work brain away from a personal assistant.
81
+ `brain brains limit HOST BRAIN...` sets the list and `unlimit HOST` clears
82
+ it; a host default outside the new list moves to its first brain, since it
83
+ would only be refused.
79
84
 
80
85
  **Project files** name a brain, not a path, so a repository can carry one
81
86
  without exposing anyone's directory layout. If the named brain does not
@@ -116,9 +121,9 @@ reports the duplicate id.
116
121
  | Adopt an existing folder | `brain import --overlay <path>` | See [09](09-import.md). Adds `brain.toml` and the generated files without moving anything. |
117
122
  | Register on another device | `brain brains add <name> <path>` | For a brain that arrived by git clone or file sync. Validates `brain.toml`. |
118
123
  | Move | move the folder, then `brain brains add <name> <new path>` | Same id, so index and history carry over. The name may be re-pointed because its old folder is no longer a brain (or holds the same brain); otherwise the name is refused. |
119
- | Rename | `brain brains rename <old> <new>` | Config only; `brain.toml` `name` is cosmetic. |
124
+ | Rename | `brain brains rename <old> <new>` | Config only; `brain.toml` `name` is cosmetic. Refused when `<new>` is already registered; otherwise the entry and every reference to `<old>` (`default`, `[hosts.*] brain` and `brains`, harvest routes) change in one write. |
120
125
  | Forget | `brain brains remove <name>` | Config only. The folder, index, and state stay until `--purge-state` deletes the last two. The brain folder is never deleted by brain-wiki. |
121
- | Check | `brain doctor` | Config, brain, index, SQLite features (trigram), git status, host wiring, pending crashed runs. |
126
+ | Check | `brain doctor` | Config (including brains registered with no default), brain, index (note counts as in `brain brains`), SQLite features (trigram), git status, host wiring, pending crashed runs. |
122
127
 
123
128
  ## 6. Storage and sync
124
129
 
@@ -311,11 +311,11 @@ JOIN nodes n ON n.id = CASE WHEN e.src = h.id THEN e.dst ELSE e.src END;
311
311
  | Parameter | Default | Meaning |
312
312
  |---|---|---|
313
313
  | `query` | `""` | Free text. **Empty means browse**: no text matching, results ordered by `sort` (default `recent`) within the filters. |
314
- | `limit` | 8 | Primary results, before expansion and guards. Max 50. |
315
- | `topic` | all | Restrict to one or more topics, each with its sub-topics. |
314
+ | `limit` | 8 | Primary results, before expansion and guards. Max 50 (the CLI refuses more rather than clamping). |
315
+ | `topic` | all | Restrict to one or more topics, each with its sub-topics. Slugs match case-insensitively; an unknown slug is `not_found`, not an empty result. |
316
316
  | `type` | any | Restrict to note types (`decision`, `release`, `person`…), as in frontmatter. |
317
317
  | `tag` | any | Restrict to notes carrying all of these tags. |
318
- | `where` | none | Frontmatter property equality, e.g. `{"stage": "open"}`; values compare as strings, lists match any item. |
318
+ | `where` | none | Frontmatter property equality, e.g. `{"stage": "open"}`; values compare as strings, case-insensitively, lists match any item. Keys the index keeps as columns match too: `tags` and `aliases` (any item), `title`, `id` (as written), `type`, `status` (or a custom `stage`), `topic`, `created`, `updated`. |
319
319
  | `include_episodes` | on for a query, off when browsing | Pending episodes are searchable; a browse lists curated notes unless episodes are asked for. |
320
320
  | `include_archived` | false | Also return notes with `status: archived`. |
321
321
  | `include_archived_episodes` | false | Also return consolidated episodes (CLI `--include archived_episodes` only). |
@@ -443,8 +443,8 @@ guessing.
443
443
  |---|---|
444
444
  | `outline` (default for hubs) | Frontmatter summary, headings, active claims (each with its `inputs`, and `[unverified]` in the text when not `local`), relations with resolved titles |
445
445
  | `full` (default for notes) | The body, then the current claims (unverified ones marked) and a count of superseded ones; no metadata |
446
- | `section` | One heading's content; `claims` gives the claims block |
447
- | `raw` | The file exactly as on disk (for agents about to edit it, [05 §2.3](05-write-path-and-consolidation.md#23-checked-agent-edits)) |
446
+ | `section` | One heading's content; `claims` gives the claims block. Asking for a `section` implies this mode; the mode without a section, or a section with another mode, is a usage error |
447
+ | `raw` | The file exactly as on disk (for agents about to edit it, [05 §2.3](05-write-path-and-consolidation.md#23-checked-agent-edits)); an episode stays in its untrusted envelope |
448
448
 
449
449
  Every relation and backlink in the result carries its handle: `id` and
450
450
  `path` in the structured result, and the path after the title in the text,
@@ -468,7 +468,8 @@ Guard banners show at most three in full, then a count with a pointer to
468
468
  `brain_neighbors` for the rest, so a note with many conflicts does not bury
469
469
  its own content. Search results render their banners the same way.
470
470
 
471
- Every mode except `raw` starts with banners computed by §5:
471
+ Every mode except `raw` starts with banners computed by §5 (a `raw` read
472
+ still carries them in the structured result, but its text is the file alone):
472
473
 
473
474
  ```
474
475
  ⚠ SUPERSEDED by "Use SQLite FTS5 for local search" (topics/search/fts5.md), 2026-10-09
@@ -504,7 +505,7 @@ included in full:
504
505
  5. Recent changes: the last 5 `log.md` entries, one line each, and the number
505
506
  of notes updated in the last 7 days.
506
507
  6. Inbox status: pending episode count, oldest pending age, rule proposals
507
- awaiting `brain rule accept`, and a hint to consolidate when 20 or more
508
+ awaiting `brain rules accept`, and a hint to consolidate when 20 or more
508
509
  episodes are pending or the oldest is more than 7 days old.
509
510
  7. How to query: three example calls built from this brain's own topics and
510
511
  types (a keyword search, a typed "latest" lookup, and a `why` search).
@@ -515,6 +516,9 @@ The same function generates the managed block of `AGENTS.md`.
515
516
 
516
517
  | Query | Used by | Notes |
517
518
  |---|---|---|
519
+ | Notes within filters, newest first | `brain_search("")`, `brain search ""` (e.g. `--since 7d`, `--topic T`) | The search path without text matching (§6.1); there is no separate listing command |
520
+ | Headings, claims, and relations of a note | read (`outline`), `brain read TARGET --mode outline` | §7 |
521
+ | Links as written in a file, and in other files | `brain links`, `brain backlinks` | Edges by the file that declares them (`declared_in`), resolved or not; `brain neighbors` follows them by meaning instead (§9.2) |
518
522
  | Backlinks of a node | read (`outline`), neighbors, lint orphans | All edges with `dst = node` |
519
523
  | Facet counts | orientation, search `facets`, `brain tags`, `brain types` | Counts by type, topic, tag, and property |
520
524
  | Orphans, dead ends, unresolved links | `brain orphans`, `brain unresolved`, reports | Nodes without incoming edges; nodes without outgoing edges; links that resolve to nothing |
@@ -525,7 +529,7 @@ The same function generates the managed block of `AGENTS.md`.
525
529
 
526
530
  ### 9.1 Brain list
527
531
 
528
- `brain_list` (CLI `brain list`) answers "which brains exist, and what is
532
+ `brain_list` (CLI `brain brains`) answers "which brains exist, and what is
529
533
  each for?" for the calling host:
530
534
 
531
535
  | Field | Source |
@@ -107,7 +107,7 @@ discover ─► filter ─► route ─► extract ─► distill (or raw) ─
107
107
  |---|---|
108
108
  | Discover | A per-host session reader lists sessions with id, working directory, start and last-modified time, size, and whether it is a subagent ([08 §6.4](08-agent-integrations.md#64-session-readers)). |
109
109
  | Filter | Skip subagent sessions, brain-wiki's own headless runs, sessions idle for less than `min_idle_minutes` (still in progress), and sessions with fewer than `min_user_turns` user messages. |
110
- | Route | Each session belongs to the brain of its working directory, checked in order: the first matching pattern in `[harvest.routes]`, a project file (`.brain-wiki.toml`), the brain folder it is inside, then the host's `brain` ([03 §3](03-config-and-storage.md#3-choosing-a-brain)). Sessions that resolve to no brain are skipped, never sent to the default brain. |
110
+ | Route | Each session belongs to the brain of its working directory, checked in order: a project file (`.brain-wiki.toml`), the brain folder it is inside, the first matching pattern in `[harvest.routes]` (`brain harvest route PATTERN BRAIN` adds one and keeps longer patterns first, so a specific folder still wins over `~/**`), then the host's `brain`. Routes come after what the folder itself says, so a catch-all never overrides a project's own brain ([03 §3](03-config-and-storage.md#3-choosing-a-brain)). Sessions that resolve to no brain are skipped, never sent to the default brain. |
111
111
  | Extract | Normalize turns (user text, assistant text, tool calls by name and short argument summary). Tool output bodies are dropped. Text the host injected into turns (reminders, command echoes) is stripped. Secrets are scrubbed. Inputs are computed from the tool calls. |
112
112
  | Distill | One call to the configured headless preset ([08 §7](08-agent-integrations.md#7-headless-presets)) with the distill instructions (`prompts/distill.md`): the model returns `{skip, summary, claims[{text, turns}], negative_findings, open_questions, topics}`. Long sessions are split into chunks of at most 30k tokens, one episode per chunk. With `--raw`, no model is called and the episode holds a condensed transcript excerpt instead; consolidation distills it later. |
113
113
  | Write | Episodes with `bw-captured: harvest`, `bw-agent`, `bw-session`, `bw-turns`, `bw-device`, and the computed `bw-inputs`. The dedupe key `<host>:<session>:<turn range>` makes a repeated harvest write nothing new. |
@@ -138,9 +138,13 @@ The in-agent recipe is off by default and enabled per host (`[harvest]
138
138
  enabled` and `hosts` in the user config, plus `harvest` in the host's
139
139
  profile `write` list). `brain harvest` in a terminal is the owner's
140
140
  command and needs neither; every CLI run starts as a dry run that lists the sessions
141
- it would read, the brain each routes to, and an estimate of tokens for
142
- distillation; `--apply` executes. A backend only receives sessions routed
143
- to a brain; unrouted sessions are skipped.
141
+ it would read (full session id and the folder it ran in), the brain each
142
+ routes to, and an estimate of tokens for distillation; `--apply` executes,
143
+ and `--apply --dry-run` lists the turn ranges it would write as episodes,
144
+ per session, and writes nothing. `--from` with an unknown host, or one
145
+ without a session reader, is a usage error, as it is for `brain harvest
146
+ enable`. A backend only receives sessions routed to a brain; unrouted
147
+ sessions are skipped.
144
148
 
145
149
  ### 2.3 Checked agent edits
146
150
 
@@ -167,7 +171,8 @@ recorded version:
167
171
  | Links and relations | A relation does not parse or names an unknown `bw-` field (error), or a new link does not resolve (warning) |
168
172
  | Claims | Claim metadata is broken, or a claim was deleted or reworded in place. Claims change only by superseding (move the old claim to `bw-claims-superseded`, add the new one), so a fact's history is never lost |
169
173
  | Claim provenance | An agent changed an existing claim's `origin`, `inputs`, or `src`. Only brain-wiki and the user set provenance |
170
- | Loss guard | Much of a note's text disappeared in one edit: a warning above 10%, an error above 50% unless `--allow-shrink` |
174
+ | Loss guard | Much of a note's text disappeared in one edit: a warning above 10%, an error above 50% unless `--allow-shrink` (MCP `allow_shrink`) |
175
+ | Lint | The edit introduces a strict lint error: file rules on the new content, and cross-file rules (a `by:` naming no claim, a supersession cycle) reported on lines the edit added or changed. Warnings and info are shown with their own severity and do not block |
171
176
  | Protected files | Any of the files above changed |
172
177
  | Sync debris | Merge-conflict markers or sync-conflict copies |
173
178
 
@@ -177,20 +182,23 @@ it; `log.md` gains a line; the brain's git repo, if any, gets a commit;
177
182
  author `agent:<host>`. Claims the edit added get `origin: agent` and
178
183
  `inputs: unknown`, whatever the agent wrote (an edit cannot show what else
179
184
  happened in the session), so they show as unverified until the user edits
180
- them; consolidation keeps the worse value when it merges. A
181
- failed check records nothing and returns every problem with its line; the
185
+ them; consolidation keeps the worse value when it merges. Claims the user
186
+ adds are left as written. A failed check records nothing and returns every problem with its line; the
182
187
  agent fixes the file and checks again, or `brain restore <path>` puts back
183
188
  the last recorded version.
184
189
 
185
190
  **The last recorded version.** The index keeps, for each note, the content
186
191
  it had when a run last wrote it, when `brain check` last recorded it, or
187
- when the index was first built. A note created outside brain-wiki after
188
- that is recorded as absent, so it shows as a pending creation. A note whose
192
+ when the index was first built: every note found before the first full
193
+ scan completes counts as the starting version, even when a write (a first
194
+ `brain log` or rule change) indexed some files before that scan. A note
195
+ created outside brain-wiki after that is recorded as absent, so it shows as a pending creation. A note whose
189
196
  file differs from its recorded version has a *pending edit*. `brain check`
190
197
  with no paths lists pending edits with their diffs; `brain check --adopt
191
198
  PATH` records a pending edit as the user's (author `owner`) even when checks
192
199
  report problems, which is how hand edits made outside brain-wiki can be
193
- given an undo point. Pending edits are not lint errors: humans edit their
200
+ given an undo point. Adopting cannot record a protected file or a file that
201
+ is not a note, so a failed check suggests `--adopt` only when it would help. Pending edits are not lint errors: humans edit their
194
202
  notes freely, and nothing nags them. A rename by hand carries the recorded
195
203
  version to the new path. The recorded versions survive index rebuilds,
196
204
  since they are the only record of unchecked edits; only a lost index starts
@@ -285,7 +293,7 @@ rolled back from in-memory pre-images before the lock is released.
285
293
  | Trigger | Backend | How |
286
294
  |---|---|---|
287
295
  | User asks their agent ("consolidate my brain") | `agent` | The skill drives `brain_consolidate_prepare` / `brain_consolidate_apply` over MCP. |
288
- | User drives it from a terminal | `agent` | `brain consolidate --prepare` writes the packet and instructions; any model or person produces the ops; `brain consolidate --apply OPS.json --run RUN` validates and applies them. |
296
+ | User drives it from a terminal | `agent` | `brain consolidate --prepare` prints the instructions and packet (`--out FILE` writes the same JSON document `--json` prints: `run`, `instructions`, `packet`); any model or person produces the ops; `brain consolidate --apply OPS.json --run RUN` validates and applies them. Exit codes follow [07 §2.3](07-interfaces.md#23-exit-codes): 0 applied or dry run, 1 invalid ops (including a file that is not JSON) or routed to review, 4 stale (prepare again). |
289
297
 
290
298
  v0.1 never consolidates on its own in the background. Running an LLM costs
291
299
  money and attention, and the user should choose when. Scheduled, headless
@@ -509,12 +517,20 @@ session. They get the strictest path.
509
517
 
510
518
  | Path | Flow |
511
519
  |---|---|
512
- | `brain rule add "…"` | The person running the CLI is the user. Written immediately, `origin: owner`, `quote` defaults to the text. |
513
- | MCP `brain_propose_rule {text, user_quote, replaces?}` | Requires `propose_rules` in the profile's `write` list. The server asks the user to confirm, showing the exact rule: through an input-required result carrying an elicitation request on 2026-07-28 connections, or a pushed elicitation on older sessions, whichever the client advertises. The tool is also annotated as destructive and, for hosts that honor it, as requiring user interaction (`_meta["anthropic/requiresUserInteraction"]`), so the call itself is approved by the user. Confirmed → written with `origin: owner`, `via: mcp`. Declined → nothing. If the client supports neither form of confirmation, the rule is written as a proposal (`inbox/proposals/rule-<id>.md`) and orientation shows "1 rule awaiting confirmation: `brain rule accept <id>`". |
520
+ | `brain rules add "…"` | The person running the CLI is the user. Written immediately, `origin: owner`, `quote` defaults to the text. With `--as <host>`, it needs `propose_rules` and is saved as a proposal instead ([07 §1](07-interfaces.md#1-agent-profiles)). |
521
+ | MCP `brain_propose_rule {text, user_quote, replaces?}` | Requires `propose_rules` in the profile's `write` list. The server asks the user to confirm, showing the exact rule: through an input-required result carrying an elicitation request on 2026-07-28 connections, or a pushed elicitation on older sessions, whichever the client advertises. The tool is also annotated as destructive and, for hosts that honor it, as requiring user interaction (`_meta["anthropic/requiresUserInteraction"]`), so the call itself is approved by the user. Confirmed → written with `origin: owner`, `via: mcp`. Declined → nothing. If the client supports neither form of confirmation, the rule is written as a proposal (`inbox/proposals/rule-<id>.md`) and orientation shows "1 rule awaiting confirmation: `brain rules accept <id>`". |
514
522
  | Consolidation | Never. If an episode looks like a preference ("user prefers X"), the instructions say to record it as a claim in a `preferences` topic; promoting it to a rule is a separate, user-confirmed step. |
515
523
 
516
524
  Replacing a rule (`replaces: r-…`) moves the old line to `archive/rules.md`.
517
525
  Budget overflow is an error that tells the user which rules are longest.
526
+ Adding, proposing, or accepting a rule is refused with `not_found` when
527
+ `replaces` names no rule, and with `conflict` when an existing rule already
528
+ says the same thing (compared ignoring case and spacing).
529
+
530
+ A proposal is known by its file name (`rule-<id>.md`): `brain rules list`
531
+ and `brain review list` show that id, and the rule it replaces, and `accept`
532
+ and `reject` take it (`brain rules accept ID` or `brain review accept ID`).
533
+ Accepting and rejecting are the user's decisions: no profile allows them.
518
534
 
519
535
  ## 7. Validation and apply
520
536
 
@@ -531,7 +547,7 @@ Budget overflow is an error that tells the user which rules are longest.
531
547
  | V7 | Completeness: episodes neither cited nor skipped. | Not an error: they stay pending and the run reports them. |
532
548
  | V8 | **Supersession ratio**: for a note with ≥ 4 active claims, superseded + retracted in this run ÷ active before > `max_supersede_ratio`. | Run is routed to review. |
533
549
  | V9 | **Specificity warning**: a superseding claim drops anchors (numbers, dates, versions, URLs, code spans, wikilinks) that appear in the old claim. | Warning in the run record and review file. Not blocking: changing a value is the point of superseding, and the old text is kept. |
534
- | V10 | Any touched topic has `review = "always"`, or sources include `inputs` ≠ `local` and `review_external = true` (default `false`). | Run is routed to review. |
550
+ | V10 | Any topic an op writes into has `review = "always"` (a note's own topic for claim ops and relations, the target's too for `supersedes`, the topic of a created note, and the parent of a created sub-topic, whose policy it inherits), or sources include `inputs` ≠ `local` and `review_external = true` (default `false`). | Run is routed to review. |
535
551
  | V11 | Lint (strict) on every touched file after the in-memory apply; errors already present before the run do not count. | Invalid; nothing is written. |
536
552
 
537
553
  **Why not a content-loss threshold on whole files?** Because the writer
@@ -546,12 +562,31 @@ summary, the rendered diff, warnings, and the ops as a fenced JSON block.
546
562
  Nothing else changes; the episodes stay pending (and are excluded from new
547
563
  packets while a proposal references them).
548
564
 
549
- - `brain review list | show <run> | accept <run> | reject <run>`. Review is
550
- CLI-only: there are no MCP review tools, so an agent can point the user
565
+ - `brain review list | show <id> | accept <id> | reject <id>`, the one queue
566
+ for consolidation and edit proposals (`run-…`) and rule proposals (§6);
567
+ `list` marks each proposal's kind. Review is CLI-only: there are no MCP review tools, so an agent can point the user
551
568
  at a proposal but cannot accept it (MCP review tools are in the
552
569
  [backlog](../proposals/README.md#backlog)).
553
570
  - Accept re-validates the stored ops against the current brain (notes may
554
- have changed) and applies them as a normal run.
571
+ have changed) and applies them as a normal run. The proposal is a file
572
+ anything with access to the brain can write, so the packet embedded in it
573
+ is never trusted: accept rebuilds the packet from the current brain with
574
+ the code `prepare` uses, keeping only which handle names which note,
575
+ claim, and episode (from the packet saved in `<state>/runs/<run>/` when
576
+ this device prepared the run, else from the proposal). Every note must be
577
+ a note or hub outside `rules.md`, `log.md`, `brain.toml`, `AGENTS.md`,
578
+ `inbox/`, `archive/`, and `reports/`, at the path and id the proposal
579
+ names; every episode a pending one whose archive target is its computed
580
+ archive location. A proposal that names anything else is refused with a
581
+ `format` error (exit 1) and nothing is written. Hashes, line ranges,
582
+ provenance (`origin`, `inputs`), and topic review policies come from the
583
+ files. A note, claim, or episode the ops use that has changed or gone
584
+ makes the accept stale (exit 4): reject the proposal and consolidate
585
+ again.
586
+ - `show` prints what accepting would do, computed the same way: the review
587
+ reasons, one line per op with handles resolved to paths, and the diff
588
+ against the brain as it is now (or why accepting would fail). It never
589
+ prints the packet.
555
590
  - Proposals are files in the brain, so they sync to the user's other
556
591
  devices and can be reviewed in Obsidian.
557
592
 
@@ -599,16 +634,21 @@ Pre-images are stored next to it (`preimages/<sha256>`, gzip).
599
634
 
600
635
  `brain undo [<run>]` (default: the latest applied run on this device):
601
636
 
602
- - **Git brains:** if the run's commit exists, `git revert --no-edit <commit>`.
603
- Revert merges with later edits; a conflict aborts the revert and reports
604
- the files, leaving the tree as it was.
605
- - **Other brains:** for each file, if its current hash equals `after`,
606
- restore the pre-image (or delete it if `before` is null) and move episodes
607
- back. If any file changed since the run, refuse and list them. `--force`
608
- saves the current versions under `<state>/runs/<run>/conflicts/` first.
609
- - Undo is itself recorded (`kind: undo`) and logged in `log.md`.
610
-
611
- Retention: the last 200 runs or 90 days, whichever keeps more.
637
+ - For each file, if its current hash equals `after`, restore the pre-image
638
+ (or delete it if `before` is null) and move episodes back. `log.md` is
639
+ append-only and not restored. If any file changed since the run, refuse
640
+ and list them; files no later run touched do not block, so an older run
641
+ can be undone. `--force` saves the current versions under
642
+ `<state>/runs/<run>/conflicts/` first.
643
+ - Undo is itself a run (`kind: undo`, §7.3): logged in `log.md` and, in a
644
+ git brain, committed with exactly the restored files, deletions included.
645
+ - Git is never the source of what to restore, the pre-images are: a run can
646
+ touch files git never saw (an uncommitted episode, a proposal), and a
647
+ `git revert` of an older run conflicts on `log.md`.
648
+
649
+ Retention: the last 200 runs or 90 days, whichever keeps more. Older runs can no
650
+ longer be undone by `brain undo`; in a git brain, their commits can still be reverted
651
+ with git.
612
652
 
613
653
  ## 9. Concurrency and multiple devices
614
654
 
@@ -163,12 +163,15 @@ check`, not by lint, so hand edits never raise warnings.
163
163
  converting frontmatter relations, listing notes in hubs) run only when
164
164
  their codes are selected with `--select`, because they are suggestions, not
165
165
  repairs. `--select` and `--ignore` take codes or prefixes (`BW3`, `BW405`)
166
- for checks and fixes alike. Rules:
166
+ for checks and fixes alike; one that matches no rule is a usage error, so a
167
+ typo cannot pass as "no problems". Rules:
167
168
 
168
169
  - A fix changes only the lines it must (02 §4). It never reflows prose.
169
170
  - All fixes in one invocation form one run with an undo record, one
170
171
  `log.md` entry, and one git commit if git mode is on.
171
- - `--fix --dry-run` prints the diff.
172
+ - `--fix --dry-run` prints the diff; `--dry-run` alone is a usage error.
173
+ - `--fix` changes files, so under `--as <host>` it needs the `edit`
174
+ capability ([07 §1](07-interfaces.md#1-agent-profiles)).
172
175
  - Fixes that need judgment (resolving an ambiguous link, removing a
173
176
  secret, choosing between conflict copies) are never automatic.
174
177
 
@@ -184,6 +187,10 @@ topics/search/fts5.md
184
187
  2 problems (1 error, 1 warning), 1 fixable with --fix
185
188
  ```
186
189
 
190
+ The "fixable with --fix" count is what `--fix` with the same options would
191
+ repair. Fixable `info` problems are counted after it, with the selection
192
+ that turns them on: `; 2 more with --fix --select BW205,BW405`.
193
+
187
194
  `--json` emits a list of `{code, severity, path, line, message, fixable}`.
188
195
  Exit codes: `0` no errors, `1` errors found, `2` usage error; the rest as in
189
196
  [07 §2.3](07-interfaces.md#23-exit-codes).
@@ -214,8 +221,13 @@ churn on every run.
214
221
  ## 8. Pre-commit integration
215
222
 
216
223
  - `brain lint --install-hook` writes a small `.git/hooks/pre-commit` in the
217
- brain that runs `brain lint --staged`. It refuses to overwrite an
218
- existing hook and prints how to chain it instead.
224
+ brain that runs `brain lint --staged`. Run again, it reports the hook as
225
+ already installed. It refuses to overwrite any other existing hook and
226
+ prints how to chain it instead.
227
+ - The hook also checks brain-wiki's own run commits. When it (or anything
228
+ else) makes git refuse one, the run stays applied, its files stay staged,
229
+ and the command prints git's message on stderr with how to finish: fix the
230
+ problem, then `git commit`.
219
231
  - The repository also ships `.pre-commit-hooks.yaml` so users of the
220
232
  pre-commit framework can add `brain-lint` to their own config.
221
233