brainclaw 1.8.0 → 1.9.1

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 (178) hide show
  1. package/README.md +592 -505
  2. package/dist/brainclaw-vscode.vsix +0 -0
  3. package/dist/cli.js +138 -13
  4. package/dist/commands/add-step.js +1 -1
  5. package/dist/commands/bootstrap.js +2 -26
  6. package/dist/commands/check-security-mcp.js +50 -33
  7. package/dist/commands/check-security.js +86 -43
  8. package/dist/commands/claim.js +22 -21
  9. package/dist/commands/confirm.js +26 -0
  10. package/dist/commands/context-diff.js +1 -1
  11. package/dist/commands/dispatch-watch.js +142 -0
  12. package/dist/commands/doctor.js +113 -2
  13. package/dist/commands/estimation-report.js +115 -16
  14. package/dist/commands/harvest.js +286 -23
  15. package/dist/commands/hooks.js +73 -73
  16. package/dist/commands/init.js +124 -22
  17. package/dist/commands/install-hooks.js +78 -78
  18. package/dist/commands/loops-handlers.js +4 -0
  19. package/dist/commands/mcp-read-handlers.js +253 -41
  20. package/dist/commands/mcp.js +664 -102
  21. package/dist/commands/memory.js +21 -17
  22. package/dist/commands/migrate.js +81 -17
  23. package/dist/commands/prune.js +78 -4
  24. package/dist/commands/reflect.js +26 -20
  25. package/dist/commands/register-agent.js +57 -1
  26. package/dist/commands/repair.js +20 -0
  27. package/dist/commands/session-end.js +15 -6
  28. package/dist/commands/session-start.js +18 -1
  29. package/dist/commands/setup-security.js +39 -18
  30. package/dist/commands/setup.js +26 -27
  31. package/dist/commands/stale.js +16 -2
  32. package/dist/commands/switch.js +26 -5
  33. package/dist/commands/uninstall.js +126 -34
  34. package/dist/commands/update-step.js +6 -0
  35. package/dist/commands/version.js +1 -1
  36. package/dist/commands/worktree.js +60 -0
  37. package/dist/core/actions.js +12 -3
  38. package/dist/core/agent-capability.js +30 -17
  39. package/dist/core/agent-files.js +963 -666
  40. package/dist/core/agent-integrations.js +0 -3
  41. package/dist/core/agent-inventory.js +67 -0
  42. package/dist/core/agent-registry.js +163 -29
  43. package/dist/core/agentrun-reconciler.js +33 -2
  44. package/dist/core/agentruns.js +7 -1
  45. package/dist/core/ai-agent-detection.js +31 -44
  46. package/dist/core/archival.js +15 -9
  47. package/dist/core/assignment-reconciler.js +56 -0
  48. package/dist/core/assignment-sweeper.js +127 -4
  49. package/dist/core/assignments.js +69 -11
  50. package/dist/core/bootstrap.js +233 -67
  51. package/dist/core/brainclaw-version.js +22 -0
  52. package/dist/core/candidates.js +21 -1
  53. package/dist/core/claims.js +313 -150
  54. package/dist/core/codev-prompts.js +38 -38
  55. package/dist/core/config.js +6 -1
  56. package/dist/core/context-diff.js +148 -20
  57. package/dist/core/context.js +129 -8
  58. package/dist/core/coordination.js +22 -3
  59. package/dist/core/default-profiles/doctor.yaml +11 -11
  60. package/dist/core/default-profiles/janitor.yaml +11 -11
  61. package/dist/core/default-profiles/onboarder.yaml +11 -11
  62. package/dist/core/default-profiles/reviewer.yaml +13 -13
  63. package/dist/core/dispatch-status.js +79 -5
  64. package/dist/core/dispatcher.js +65 -12
  65. package/dist/core/entity-operations.js +74 -27
  66. package/dist/core/entity-registry.js +31 -5
  67. package/dist/core/event-log.js +138 -21
  68. package/dist/core/events/checkpoint.js +258 -0
  69. package/dist/core/events/genesis.js +220 -0
  70. package/dist/core/events/journal.js +507 -0
  71. package/dist/core/events/materialize.js +126 -0
  72. package/dist/core/events/registry-post-image.js +110 -0
  73. package/dist/core/events/verify.js +109 -0
  74. package/dist/core/execution-adapters.js +23 -0
  75. package/dist/core/execution.js +1 -1
  76. package/dist/core/facade-schema.js +38 -0
  77. package/dist/core/gc-semantic.js +130 -5
  78. package/dist/core/handoff-snapshot.js +68 -0
  79. package/dist/core/ids.js +19 -8
  80. package/dist/core/instruction-templates.js +34 -115
  81. package/dist/core/io.js +39 -3
  82. package/dist/core/json-store.js +10 -1
  83. package/dist/core/lock.js +153 -28
  84. package/dist/core/loops/bootstrap-acquire.js +25 -1
  85. package/dist/core/loops/facade-schema.js +2 -0
  86. package/dist/core/loops/hooks/survey-signals-baseline.js +36 -0
  87. package/dist/core/loops/index.js +1 -0
  88. package/dist/core/loops/presets/bootstrap.js +7 -0
  89. package/dist/core/loops/store.js +17 -0
  90. package/dist/core/loops/verbs.js +24 -2
  91. package/dist/core/markdown.js +8 -76
  92. package/dist/core/mcp-command-resolution.js +245 -0
  93. package/dist/core/memory-compactor.js +5 -3
  94. package/dist/core/memory-lifecycle.js +282 -0
  95. package/dist/core/merge-risk.js +150 -0
  96. package/dist/core/messaging.js +10 -3
  97. package/dist/core/migration.js +11 -1
  98. package/dist/core/observer-mode.js +26 -0
  99. package/dist/core/operations/memory-mutation.js +90 -65
  100. package/dist/core/operations/plan.js +27 -1
  101. package/dist/core/protocol-skills.js +210 -0
  102. package/dist/core/reflection-safety.js +6 -7
  103. package/dist/core/reputation.js +84 -2
  104. package/dist/core/runtime-signals.js +72 -10
  105. package/dist/core/runtime.js +84 -1
  106. package/dist/core/schema.js +114 -0
  107. package/dist/core/search.js +19 -2
  108. package/dist/core/security-detectors.js +125 -0
  109. package/dist/core/security-extract.js +189 -0
  110. package/dist/core/security-guard.js +217 -139
  111. package/dist/core/security-packages.js +121 -0
  112. package/dist/core/security-scoring.js +76 -9
  113. package/dist/core/security.js +34 -2
  114. package/dist/core/sequence.js +11 -2
  115. package/dist/core/setup-flow.js +141 -13
  116. package/dist/core/spawn-check.js +16 -2
  117. package/dist/core/staleness.js +73 -2
  118. package/dist/core/state.js +250 -54
  119. package/dist/core/store-resolution.js +45 -12
  120. package/dist/core/worktree.js +90 -26
  121. package/dist/facts.js +8 -8
  122. package/dist/facts.json +7 -7
  123. package/docs/PROTOCOL.md +223 -0
  124. package/docs/adapters/openclaw.md +43 -43
  125. package/docs/architecture/project-refs.md +328 -328
  126. package/docs/cli.md +2097 -2096
  127. package/docs/concepts/coordination.md +52 -52
  128. package/docs/concepts/coordinator-runbook.md +129 -0
  129. package/docs/concepts/dispatch-lifecycle.md +245 -245
  130. package/docs/concepts/event-log-store.md +928 -0
  131. package/docs/concepts/ideation-loop.md +317 -317
  132. package/docs/concepts/loop-engine.md +520 -511
  133. package/docs/concepts/mcp-governance.md +268 -268
  134. package/docs/concepts/memory.md +89 -88
  135. package/docs/concepts/multi-agent-workflows.md +167 -167
  136. package/docs/concepts/observer-protocol.md +361 -0
  137. package/docs/concepts/parallel-merge-protocol.md +71 -0
  138. package/docs/concepts/plans-and-claims.md +217 -174
  139. package/docs/concepts/project-md-convention.md +35 -35
  140. package/docs/concepts/runtime-notes.md +38 -38
  141. package/docs/concepts/skills.md +78 -0
  142. package/docs/concepts/troubleshooting.md +254 -254
  143. package/docs/concepts/workspace-bootstrapping.md +142 -81
  144. package/docs/context-format-changelog.md +35 -35
  145. package/docs/context-format.md +48 -48
  146. package/docs/index.md +65 -65
  147. package/docs/integrations/agents.md +162 -162
  148. package/docs/integrations/claude-code.md +23 -23
  149. package/docs/integrations/cline.md +87 -88
  150. package/docs/integrations/codex.md +2 -2
  151. package/docs/integrations/continue.md +60 -60
  152. package/docs/integrations/copilot.md +82 -80
  153. package/docs/integrations/cursor.md +23 -23
  154. package/docs/integrations/kilocode.md +72 -72
  155. package/docs/integrations/mcp.md +377 -377
  156. package/docs/integrations/mistral-vibe.md +122 -122
  157. package/docs/integrations/openclaw.md +99 -98
  158. package/docs/integrations/opencode.md +84 -84
  159. package/docs/integrations/overview.md +122 -122
  160. package/docs/integrations/roo.md +74 -74
  161. package/docs/integrations/windsurf.md +83 -83
  162. package/docs/mcp-schema-changelog.md +360 -329
  163. package/docs/playbooks/integration/index.md +121 -121
  164. package/docs/playbooks/orchestration.md +37 -0
  165. package/docs/playbooks/productivity/index.md +99 -99
  166. package/docs/playbooks/team/index.md +117 -117
  167. package/docs/product/agent-first-model.md +184 -184
  168. package/docs/product/entity-model-audit.md +462 -462
  169. package/docs/product/positioning.md +86 -86
  170. package/docs/quickstart-existing-project.md +107 -107
  171. package/docs/quickstart.md +148 -147
  172. package/docs/release-maintenance.md +79 -79
  173. package/docs/reputation.md +52 -52
  174. package/docs/review.md +45 -45
  175. package/docs/security.md +212 -53
  176. package/docs/server-operations.md +118 -118
  177. package/docs/storage.md +110 -108
  178. package/package.json +86 -69
@@ -1,122 +1,122 @@
1
- # Mistral Vibe Integration
2
-
3
- brainclaw integrates with **Mistral Vibe** through MCP tools, the universal `.agents/skills/brainclaw/SKILL.md`, and a `.live.md` companion file. Mistral Vibe is a Tier B agent — MCP + skills + CLI spawn, but no hooks (BeforePrompt is a feature request, not yet implemented) and no native rules file equivalent to `CLAUDE.md`.
4
-
5
- Mistral Vibe is open-source (Apache 2.0), Paris-based, and supports on-premise / EU-hosted deployment — making it a strategic option for teams that need GDPR compliance and freedom from US CLOUD Act exposure.
6
-
7
- ## Auto-setup
8
-
9
- `brainclaw init` detects Mistral Vibe (via `~/.vibe/` directory or `VIBE_HOME` env var) and writes:
10
-
11
- - `.vibe/config.toml` — TOML MCP config registering brainclaw as a stdio server
12
- - `AGENTS.md` — shared instruction file (also read by Codex and OpenCode)
13
- - `.agents/skills/brainclaw/SKILL.md` — universal skill auto-discovered by Vibe
14
- - `.vibe/live.md` (opt-in via `--include-live`) — refreshed on session-end / handoff with current plans, claims, traps, candidates, handoffs
15
-
16
- Manual regeneration:
17
-
18
- ```bash
19
- brainclaw export --format agents-md --write
20
- brainclaw export --format agents-md --write --include-live # add the live companion
21
- ```
22
-
23
- ## MCP configuration
24
-
25
- Mistral Vibe reads MCP servers from `.vibe/config.toml` (project, prioritaire) or `~/.vibe/config.toml` (user fallback). Format is **TOML** — Mistral Vibe is the only Tier B agent in brainclaw's catalog using TOML rather than JSON/YAML.
26
-
27
- ```toml
28
- [[mcp_servers]]
29
- name = "brainclaw"
30
- transport = "stdio"
31
- command = "npx"
32
- args = ["-y", "brainclaw@latest", "mcp"]
33
- ```
34
-
35
- Other transports supported by Mistral Vibe : `http`, `sse` (Streamable-HTTP). brainclaw uses `stdio` by default, the simplest and most secure local path.
36
-
37
- The brainclaw writer is **idempotent** — if `.vibe/config.toml` already declares a `[[mcp_servers]]` block whose `name = "brainclaw"`, the writer leaves it alone (preserves any user customization of `command`, `args`, etc.). Other `[[mcp_servers]]` entries (e.g., Serena, custom MCP servers) are also preserved on regeneration.
38
-
39
- ## Permissions
40
-
41
- Mistral Vibe supports per-tool permission control in `.vibe/config.toml`:
42
-
43
- ```toml
44
- [tools.bash]
45
- permission = "always" # auto-approve
46
-
47
- [mcp_servers.brainclaw]
48
- enabled_tools = ["bclaw_work", "bclaw_context", "bclaw_find", "bclaw_get"]
49
- ```
50
-
51
- Patterns supported: exact names, glob (`bash*`), regex (`re:^bclaw_.*$`). brainclaw does not yet emit a curated `enabled_tools` list automatically — configure manually for headless workflows.
52
-
53
- For interactive sessions, toggle global auto-approve with `Shift+Tab` or pass `--auto-approve` on the CLI.
54
-
55
- ## Instruction files
56
-
57
- - **`AGENTS.md`** — shared instruction file (read by Mistral Vibe, Codex, OpenCode). Static brainclaw protocol + active constraints. Generated by `brainclaw export --format agents-md --write`.
58
- - **`.agents/skills/brainclaw/SKILL.md`** — universal skill, auto-discovered by Mistral Vibe alongside `.vibe/skills/`. Provides slash-command access (`/brainclaw`).
59
- - **`.vibe/live.md`** (opt-in) — live companion regenerated on session-end and handoff with plans, claims, traps, candidates, handoffs. Critical for Tier B agents like Vibe that lack pre-prompt hooks: this is the parity backstop so the agent sees current coordination state without an MCP round-trip on every prompt.
60
-
61
- Mistral Vibe **does not have a native rules file** equivalent to `CLAUDE.md` — there is no documented mechanism to inject project-wide instructions outside `AGENTS.md` and skills. brainclaw works within that constraint.
62
-
63
- ## Headless invocation
64
-
65
- Mistral Vibe is CLI-spawnable for parallel lanes and dispatched workflows. The canonical invoke template is:
66
-
67
- ```bash
68
- vibe --prompt "{prompt}" --auto-approve --max-turns 5
69
- ```
70
-
71
- - `--prompt` runs the task non-interactively from a single string.
72
- - `--auto-approve` disables interactive approval on file edits and bash exec.
73
- - `--max-turns N` caps the agent loop. brainclaw uses 5 by default; raise for larger tasks.
74
- - `--max-price <USD>` (optional) caps cost before interruption.
75
-
76
- For long prompts, `stdin_pipe` is supported (`echo "prompt" | vibe`) and is the fallback when `inline_arg` exceeds 8000 chars.
77
-
78
- Output is text-formatted on stdout. brainclaw parses completion via the brief-ack file (same handshake pattern as Codex and other CLI-spawned workers).
79
-
80
- ## Capability profile
81
-
82
- | Field | Value |
83
- |-------|-------|
84
- | Tier | B |
85
- | MCP | yes (TOML config, project + user) |
86
- | Hooks | no (BeforePrompt is feature request #531, not implemented) |
87
- | Auto-approve | per-call (`--auto-approve` flag, or `Shift+Tab` interactive toggle) |
88
- | Skills | yes (`.vibe/skills/` + universal `.agents/skills/`) |
89
- | CLI spawnable | yes |
90
- | Max concurrent tasks | 2 (conservative, see caveats) |
91
- | Workflow model | task-based (one-shot `--prompt` exec) |
92
- | MCP config scope | both (project + user fallback) |
93
- | Prompt delivery | `inline_arg` (preferred, max 8000 chars), `stdin_pipe` (fallback) |
94
- | Native rules file | no (relies on `AGENTS.md` + skill universel) |
95
- | Live companion | `.vibe/live.md` (opt-in via `--include-live`) |
96
-
97
- ## Sovereignty & compliance
98
-
99
- Mistral Vibe is a strategic option when EU/FR data sovereignty matters:
100
-
101
- - **Mistral AI is Paris-based** — fully subject to GDPR, **not** subject to the US CLOUD Act.
102
- - **Vibe CLI is open-source** (Apache 2.0) on [github.com/mistralai/mistral-vibe](https://github.com/mistralai/mistral-vibe) — auditable end-to-end.
103
- - **Open-weight models** (Mistral Medium 3.5, Codestral, Devstral) deployable on-premise via Hugging Face — full data control, no third-party API calls when self-hosted.
104
- - **EU-hosted Mistral cloud** available with a Data Processing Agreement (DPA).
105
-
106
- For teams that have ruled out US-hosted agents on compliance grounds (regulated sectors, public sector, defense), this is often the only viable Tier B option.
107
-
108
- ## Caveats
109
-
110
- - **Windows + Git Bash unsupported.** Mistral Vibe spawns its child shells via PowerShell or `cmd.exe` on Windows and cannot reuse environment variables sourced inside Git Bash. Tracked upstream as [issue #135](https://github.com/mistralai/mistral-vibe/issues/135). Workaround: run `vibe` from PowerShell or WSL.
111
- - **No pre-prompt hooks.** Vibe has an experimental post-agent-turn hook system (v2.9.0+) but no `BeforePrompt` / `UserPromptSubmit` equivalent. Live coordination state must reach the agent via MCP calls or the `.vibe/live.md` companion regenerated on session-end / handoff — there is no real-time push mechanism.
112
- - **No `CLAUDE.md` equivalent.** Mistral Vibe does not auto-load a free-form rules file at session start; integration relies on `AGENTS.md` + skills.
113
- - **CLI freezes documented** on the current version (early v2.x). For production parallel dispatch, `max_concurrent_tasks` is capped at 2 conservatively.
114
- - **Rate-limit messages are vague** (upstream issue) — when running heavy parallel workloads, expect generic `rate limit exceeded` errors without specific guidance.
115
- - **Skill discovery overlap.** Vibe auto-discovers both `.vibe/skills/` and `.agents/skills/`. brainclaw writes only to `.agents/skills/brainclaw/SKILL.md` to avoid duplicate definitions; if a project already had a `.vibe/skills/brainclaw/` folder, remove it manually after this integration to avoid two competing definitions.
116
-
117
- ## See also
118
-
119
- - [docs/integrations/overview.md](overview.md) — full agent matrix and integration tier model
120
- - [docs/integrations/mcp.md](mcp.md) — recommended dynamic runtime path
121
- - [Mistral Vibe official documentation](https://docs.mistral.ai/mistral-vibe/introduction)
122
- - [Mistral Vibe GitHub repository](https://github.com/mistralai/mistral-vibe) (Apache 2.0)
1
+ # Mistral Vibe Integration
2
+
3
+ brainclaw integrates with **Mistral Vibe** through MCP tools, the universal `.agents/skills/brainclaw/SKILL.md`, and a `.live.md` companion file. Mistral Vibe is a Tier B agent — MCP + skills + CLI spawn, but no hooks (BeforePrompt is a feature request, not yet implemented) and no native rules file equivalent to `CLAUDE.md`.
4
+
5
+ Mistral Vibe is open-source (Apache 2.0), Paris-based, and supports on-premise / EU-hosted deployment — making it a strategic option for teams that need GDPR compliance and freedom from US CLOUD Act exposure.
6
+
7
+ ## Auto-setup
8
+
9
+ `brainclaw init` detects Mistral Vibe (via `~/.vibe/` directory or `VIBE_HOME` env var) and writes:
10
+
11
+ - `.vibe/config.toml` — TOML MCP config registering brainclaw as a stdio server
12
+ - `AGENTS.md` — shared instruction file (also read by Codex and OpenCode)
13
+ - `.agents/skills/brainclaw/SKILL.md` — universal skill auto-discovered by Vibe
14
+ - `.vibe/live.md` (opt-in via `--include-live`) — refreshed on session-end / handoff with current plans, claims, traps, candidates, handoffs
15
+
16
+ Manual regeneration:
17
+
18
+ ```bash
19
+ brainclaw export --format agents-md --write
20
+ brainclaw export --format agents-md --write --include-live # add the live companion
21
+ ```
22
+
23
+ ## MCP configuration
24
+
25
+ Mistral Vibe reads MCP servers from `.vibe/config.toml` (project, prioritaire) or `~/.vibe/config.toml` (user fallback). Format is **TOML** — Mistral Vibe is the only Tier B agent in brainclaw's catalog using TOML rather than JSON/YAML.
26
+
27
+ ```toml
28
+ [[mcp_servers]]
29
+ name = "brainclaw"
30
+ transport = "stdio"
31
+ command = "npx"
32
+ args = ["-y", "brainclaw@latest", "mcp"]
33
+ ```
34
+
35
+ Other transports supported by Mistral Vibe : `http`, `sse` (Streamable-HTTP). brainclaw uses `stdio` by default, the simplest and most secure local path.
36
+
37
+ The brainclaw writer is **idempotent** — if `.vibe/config.toml` already declares a `[[mcp_servers]]` block whose `name = "brainclaw"`, the writer leaves it alone (preserves any user customization of `command`, `args`, etc.). Other `[[mcp_servers]]` entries (e.g., Serena, custom MCP servers) are also preserved on regeneration.
38
+
39
+ ## Permissions
40
+
41
+ Mistral Vibe supports per-tool permission control in `.vibe/config.toml`:
42
+
43
+ ```toml
44
+ [tools.bash]
45
+ permission = "always" # auto-approve
46
+
47
+ [mcp_servers.brainclaw]
48
+ enabled_tools = ["bclaw_work", "bclaw_context", "bclaw_find", "bclaw_get"]
49
+ ```
50
+
51
+ Patterns supported: exact names, glob (`bash*`), regex (`re:^bclaw_.*$`). brainclaw does not yet emit a curated `enabled_tools` list automatically — configure manually for headless workflows.
52
+
53
+ For interactive sessions, toggle global auto-approve with `Shift+Tab` or pass `--auto-approve` on the CLI.
54
+
55
+ ## Instruction files
56
+
57
+ - **`AGENTS.md`** — shared instruction file (read by Mistral Vibe, Codex, OpenCode). Static brainclaw protocol + active constraints. Generated by `brainclaw export --format agents-md --write`.
58
+ - **`.agents/skills/brainclaw/SKILL.md`** — universal skill, auto-discovered by Mistral Vibe alongside `.vibe/skills/`. Provides slash-command access (`/brainclaw`).
59
+ - **`.vibe/live.md`** (opt-in) — live companion regenerated on session-end and handoff with plans, claims, traps, candidates, handoffs. Critical for Tier B agents like Vibe that lack pre-prompt hooks: this is the parity backstop so the agent sees current coordination state without an MCP round-trip on every prompt.
60
+
61
+ Mistral Vibe **does not have a native rules file** equivalent to `CLAUDE.md` — there is no documented mechanism to inject project-wide instructions outside `AGENTS.md` and skills. brainclaw works within that constraint.
62
+
63
+ ## Headless invocation
64
+
65
+ Mistral Vibe is CLI-spawnable for parallel lanes and dispatched workflows. The canonical invoke template is:
66
+
67
+ ```bash
68
+ vibe --prompt "{prompt}" --auto-approve --max-turns 5
69
+ ```
70
+
71
+ - `--prompt` runs the task non-interactively from a single string.
72
+ - `--auto-approve` disables interactive approval on file edits and bash exec.
73
+ - `--max-turns N` caps the agent loop. brainclaw uses 5 by default; raise for larger tasks.
74
+ - `--max-price <USD>` (optional) caps cost before interruption.
75
+
76
+ For long prompts, `stdin_pipe` is supported (`echo "prompt" | vibe`) and is the fallback when `inline_arg` exceeds 8000 chars.
77
+
78
+ Output is text-formatted on stdout. brainclaw parses completion via the brief-ack file (same handshake pattern as Codex and other CLI-spawned workers).
79
+
80
+ ## Capability profile
81
+
82
+ | Field | Value |
83
+ |-------|-------|
84
+ | Tier | B |
85
+ | MCP | yes (TOML config, project + user) |
86
+ | Hooks | no (BeforePrompt is feature request #531, not implemented) |
87
+ | Auto-approve | per-call (`--auto-approve` flag, or `Shift+Tab` interactive toggle) |
88
+ | Skills | yes (`.vibe/skills/` + universal `.agents/skills/`) |
89
+ | CLI spawnable | yes |
90
+ | Max concurrent tasks | 2 (conservative, see caveats) |
91
+ | Workflow model | task-based (one-shot `--prompt` exec) |
92
+ | MCP config scope | both (project + user fallback) |
93
+ | Prompt delivery | `inline_arg` (preferred, max 8000 chars), `stdin_pipe` (fallback) |
94
+ | Native rules file | no (relies on `AGENTS.md` + skill universel) |
95
+ | Live companion | `.vibe/live.md` (opt-in via `--include-live`) |
96
+
97
+ ## Sovereignty & compliance
98
+
99
+ Mistral Vibe is a strategic option when EU/FR data sovereignty matters:
100
+
101
+ - **Mistral AI is Paris-based** — fully subject to GDPR, **not** subject to the US CLOUD Act.
102
+ - **Vibe CLI is open-source** (Apache 2.0) on [github.com/mistralai/mistral-vibe](https://github.com/mistralai/mistral-vibe) — auditable end-to-end.
103
+ - **Open-weight models** (Mistral Medium 3.5, Codestral, Devstral) deployable on-premise via Hugging Face — full data control, no third-party API calls when self-hosted.
104
+ - **EU-hosted Mistral cloud** available with a Data Processing Agreement (DPA).
105
+
106
+ For teams that have ruled out US-hosted agents on compliance grounds (regulated sectors, public sector, defense), this is often the only viable Tier B option.
107
+
108
+ ## Caveats
109
+
110
+ - **Windows + Git Bash unsupported.** Mistral Vibe spawns its child shells via PowerShell or `cmd.exe` on Windows and cannot reuse environment variables sourced inside Git Bash. Tracked upstream as [issue #135](https://github.com/mistralai/mistral-vibe/issues/135). Workaround: run `vibe` from PowerShell or WSL.
111
+ - **No pre-prompt hooks.** Vibe has an experimental post-agent-turn hook system (v2.9.0+) but no `BeforePrompt` / `UserPromptSubmit` equivalent. Live coordination state must reach the agent via MCP calls or the `.vibe/live.md` companion regenerated on session-end / handoff — there is no real-time push mechanism.
112
+ - **No `CLAUDE.md` equivalent.** Mistral Vibe does not auto-load a free-form rules file at session start; integration relies on `AGENTS.md` + skills.
113
+ - **CLI freezes documented** on the current version (early v2.x). For production parallel dispatch, `max_concurrent_tasks` is capped at 2 conservatively.
114
+ - **Rate-limit messages are vague** (upstream issue) — when running heavy parallel workloads, expect generic `rate limit exceeded` errors without specific guidance.
115
+ - **Skill discovery overlap.** Vibe auto-discovers both `.vibe/skills/` and `.agents/skills/`. brainclaw writes only to `.agents/skills/brainclaw/SKILL.md` to avoid duplicate definitions; if a project already had a `.vibe/skills/brainclaw/` folder, remove it manually after this integration to avoid two competing definitions.
116
+
117
+ ## See also
118
+
119
+ - [docs/integrations/overview.md](overview.md) — full agent matrix and integration tier model
120
+ - [docs/integrations/mcp.md](mcp.md) — recommended dynamic runtime path
121
+ - [Mistral Vibe official documentation](https://docs.mistral.ai/mistral-vibe/introduction)
122
+ - [Mistral Vibe GitHub repository](https://github.com/mistralai/mistral-vibe) (Apache 2.0)
@@ -1,98 +1,99 @@
1
- # OpenClaw Integration
2
-
3
- ## Why brainclaw for OpenClaw users
4
-
5
- OpenClaw's built-in memory (`MEMORY.md` + daily logs) is great for personal notes and preferences, but it doesn't distinguish between different types of project knowledge. After many conversations, constraints get buried, decisions lose their reasoning, and the agent drifts from its original instructions.
6
-
7
- brainclaw adds a structured memory layer on top:
8
-
9
- | Problem | OpenClaw alone | With brainclaw |
10
- |---|---|---|
11
- | "Don't deploy on Friday" gets forgotten | Buried in MEMORY.md after 50 conversations | Stored as a constraint, always visible |
12
- | Agent repeats a known mistake | No trap system | Traps scored by relevance to current scope |
13
- | Two agents work on same file | No coordination | Claims prevent collisions |
14
- | Decision reasoning is lost | Mixed with daily notes | Preserved as typed decisions, searchable |
15
-
16
- ## How it works
17
-
18
- brainclaw integrates as an OpenClaw **skill**. The skill instructs the agent to:
19
-
20
- 1. Load brainclaw project context before any coding work
21
- 2. Record constraints, traps, and decisions in brainclaw (not MEMORY.md)
22
- 3. Keep MEMORY.md for personal preferences and daily observations
23
- 4. Coordinate with other agents through plans and claims
24
-
25
- ## Installation
26
-
27
- ### Prerequisites
28
-
29
- ```bash
30
- npm install -g brainclaw
31
- ```
32
-
33
- ### Install the skill
34
-
35
- ```bash
36
- brainclaw enable-agent openclaw
37
- ```
38
-
39
- This copies the brainclaw skill to `~/.openclaw/workspace/skills/brainclaw/`.
40
-
41
- Or manually:
42
-
43
- ```bash
44
- mkdir -p ~/.openclaw/workspace/skills/brainclaw
45
- cp "$(npm root -g)/brainclaw/skills/openclaw/SKILL.md" ~/.openclaw/workspace/skills/brainclaw/
46
- ```
47
-
48
- ### Initialize a project
49
-
50
- ```bash
51
- cd /path/to/your/project
52
- brainclaw init
53
- ```
54
-
55
- ### Restart OpenClaw
56
-
57
- ```
58
- /new
59
- ```
60
-
61
- or restart the Gateway. The brainclaw skill will be loaded automatically.
62
-
63
- ## What the agent sees
64
-
65
- After installation, your OpenClaw agent will:
66
-
67
- - Run `brainclaw context` before project work to load constraints, traps, and plans
68
- - Record rules you give it as brainclaw constraints (not just MEMORY.md entries)
69
- - Record problems it discovers as traps (with severity)
70
- - Log architectural decisions with their reasoning
71
- - Clean up with `brainclaw session-end` when finished
72
-
73
- ## Memory split
74
-
75
- The brainclaw skill establishes a clear split:
76
-
77
- - **MEMORY.md** — your preferences, habits, personal context (OpenClaw manages this)
78
- - **brainclaw** — project constraints, traps, decisions, plans (shared with all agents)
79
-
80
- This means if you switch from OpenClaw to Claude Code or Codex for coding, the project memory follows — it's in `.brainclaw/`, not in `~/.openclaw/`.
81
-
82
- ## Multi-agent coordination
83
-
84
- If you use both OpenClaw and a coding agent (Claude Code, Cursor, etc.) on the same project, brainclaw coordinates between them:
85
-
86
- - OpenClaw records a constraint → Claude Code sees it at next session
87
- - Claude Code claims a file scope OpenClaw knows not to edit there
88
- - Either agent creates a planboth see it in their context
89
-
90
- ## Profile
91
-
92
- When loading context for OpenClaw, use the `openclaw` profile for optimized scoring:
93
-
94
- ```bash
95
- brainclaw context --profile openclaw
96
- ```
97
-
98
- This boosts constraints, handoffs, and runtime notes — the items most relevant to an agent that might not be editing code directly but needs to understand the project state.
1
+ # OpenClaw Integration
2
+
3
+ ## Why brainclaw for OpenClaw users
4
+
5
+ OpenClaw's built-in memory (`MEMORY.md` + daily logs) is great for personal notes and preferences, but it doesn't distinguish between different types of project knowledge. After many conversations, constraints get buried, decisions lose their reasoning, and the agent drifts from its original instructions.
6
+
7
+ brainclaw adds a structured memory layer on top:
8
+
9
+ | Problem | OpenClaw alone | With brainclaw |
10
+ |---|---|---|
11
+ | "Don't deploy on Friday" gets forgotten | Buried in MEMORY.md after 50 conversations | Stored as a constraint, always visible |
12
+ | Agent repeats a known mistake | No trap system | Traps scored by relevance to current scope |
13
+ | Two agents work on same file | No coordination | Claims prevent collisions |
14
+ | Decision reasoning is lost | Mixed with daily notes | Preserved as typed decisions, searchable |
15
+
16
+ ## How it works
17
+
18
+ brainclaw integrates as an OpenClaw **skill**. The skill instructs the agent to:
19
+
20
+ 1. Load brainclaw project context before any coding work
21
+ 2. Record constraints, traps, and decisions in brainclaw (not MEMORY.md)
22
+ 3. Keep MEMORY.md for personal preferences and daily observations
23
+ 4. Coordinate with other agents through plans and claims
24
+
25
+ ## Installation
26
+
27
+ ### Prerequisites
28
+
29
+ ```bash
30
+ npm install -g brainclaw
31
+ ```
32
+
33
+ ### Install the skill
34
+
35
+ ```bash
36
+ brainclaw enable-agent openclaw
37
+ ```
38
+
39
+ This copies the brainclaw skill to `~/.openclaw/workspace/skills/brainclaw/`.
40
+
41
+ Or manually:
42
+
43
+ ```bash
44
+ brainclaw export --format openclaw --output /tmp/brainclaw-openclaw-skill.md
45
+ mkdir -p ~/.openclaw/workspace/skills/brainclaw
46
+ cp /tmp/brainclaw-openclaw-skill.md ~/.openclaw/workspace/skills/brainclaw/SKILL.md
47
+ ```
48
+
49
+ ### Initialize a project
50
+
51
+ ```bash
52
+ cd /path/to/your/project
53
+ brainclaw init
54
+ ```
55
+
56
+ ### Restart OpenClaw
57
+
58
+ ```
59
+ /new
60
+ ```
61
+
62
+ or restart the Gateway. The brainclaw skill will be loaded automatically.
63
+
64
+ ## What the agent sees
65
+
66
+ After installation, your OpenClaw agent will:
67
+
68
+ - Run `brainclaw context` before project work to load constraints, traps, and plans
69
+ - Record rules you give it as brainclaw constraints (not just MEMORY.md entries)
70
+ - Record problems it discovers as traps (with severity)
71
+ - Log architectural decisions with their reasoning
72
+ - Clean up with `brainclaw session-end` when finished
73
+
74
+ ## Memory split
75
+
76
+ The brainclaw skill establishes a clear split:
77
+
78
+ - **MEMORY.md** — your preferences, habits, personal context (OpenClaw manages this)
79
+ - **brainclaw** — project constraints, traps, decisions, plans (shared with all agents)
80
+
81
+ This means if you switch from OpenClaw to Claude Code or Codex for coding, the project memory follows — it's in `.brainclaw/`, not in `~/.openclaw/`.
82
+
83
+ ## Multi-agent coordination
84
+
85
+ If you use both OpenClaw and a coding agent (Claude Code, Cursor, etc.) on the same project, brainclaw coordinates between them:
86
+
87
+ - OpenClaw records a constraintClaude Code sees it at next session
88
+ - Claude Code claims a file scope OpenClaw knows not to edit there
89
+ - Either agent creates a plan → both see it in their context
90
+
91
+ ## Profile
92
+
93
+ When loading context for OpenClaw, use the `openclaw` profile for optimized scoring:
94
+
95
+ ```bash
96
+ brainclaw context --profile openclaw
97
+ ```
98
+
99
+ This boosts constraints, handoffs, and runtime notes — the items most relevant to an agent that might not be editing code directly but needs to understand the project state.
@@ -1,84 +1,84 @@
1
- # OpenCode Integration
2
-
3
- brainclaw integrates with OpenCode through MCP tools and AGENTS.md, providing shared memory, plans, claims, and multi-agent coordination.
4
-
5
- ## Auto-setup
6
-
7
- `brainclaw init` detects OpenCode and writes `AGENTS.md` automatically. Or manually:
8
-
9
- ```bash
10
- brainclaw export --format agents-md --write
11
- ```
12
-
13
- ## MCP configuration
14
-
15
- OpenCode reads MCP servers from `opencode.json` at the project root, or `~/.config/opencode/opencode.json` globally:
16
-
17
- ```json
18
- {
19
- "mcp": {
20
- "brainclaw": {
21
- "type": "stdio",
22
- "command": "npx",
23
- "args": ["-y", "brainclaw@latest", "mcp"]
24
- }
25
- }
26
- }
27
- ```
28
-
29
- ## Permissions
30
-
31
- OpenCode uses a per-tool permission map with `allow`, `ask`, or `deny` values:
32
-
33
- ```json
34
- {
35
- "mcp": {
36
- "brainclaw": {
37
- "type": "stdio",
38
- "command": "npx",
39
- "args": ["-y", "brainclaw@latest", "mcp"],
40
- "permissions": {
41
- "bclaw_context": "allow",
42
- "bclaw_work": "allow",
43
- "bclaw_find": "allow",
44
- "bclaw_get": "allow"
45
- }
46
- }
47
- }
48
- }
49
- ```
50
-
51
- brainclaw does not yet emit OpenCode permissions automatically.
52
-
53
- ## Instruction files
54
-
55
- OpenCode reads `AGENTS.md` at the project root — the same file used by Codex. brainclaw writes this during `init` or `export`.
56
-
57
- ## SKILL.md discovery
58
-
59
- OpenCode auto-discovers skills from `.opencode/skills/`, `.claude/skills/`, and `.agents/skills/`. A single `.agents/skills/brainclaw/SKILL.md` is picked up automatically.
60
-
61
- ## Headless invocation
62
-
63
- ```bash
64
- opencode run /path/to/project
65
- ```
66
-
67
- OpenCode also supports `serve` (HTTP API) and `web` (browser UI) modes.
68
-
69
- ## Invoke template
70
-
71
- ```bash
72
- opencode /path/to/project
73
- ```
74
-
75
- ## Subagents
76
-
77
- OpenCode supports native subagents via `mode: subagent` and `@mention` syntax, with per-agent permissions. These are separate from brainclaw's coordination — brainclaw operates above them.
78
-
79
- ## Caveats
80
-
81
- - **No hooks**: OpenCode has a plugin system (JS/TS) but it is not compatible with Claude Code hook format. No pre-prompt injection.
82
- - **No auto-approve writer**: brainclaw does not emit OpenCode `permissions` blocks yet — configure manually for headless.
83
- - **`external_directory` deny**: OpenCode may deny file access outside the project root by default. Ensure brainclaw's store path (`.brainclaw/`) is within the project.
84
- - **Windows**: Requires Node.js on PATH. Works on Windows, Linux, and macOS.
1
+ # OpenCode Integration
2
+
3
+ brainclaw integrates with OpenCode through MCP tools and AGENTS.md, providing shared memory, plans, claims, and multi-agent coordination.
4
+
5
+ ## Auto-setup
6
+
7
+ `brainclaw init` detects OpenCode and writes `AGENTS.md` automatically. Or manually:
8
+
9
+ ```bash
10
+ brainclaw export --format agents-md --write
11
+ ```
12
+
13
+ ## MCP configuration
14
+
15
+ OpenCode reads MCP servers from `opencode.json` at the project root, or `~/.config/opencode/opencode.json` globally:
16
+
17
+ ```json
18
+ {
19
+ "mcp": {
20
+ "brainclaw": {
21
+ "type": "stdio",
22
+ "command": "npx",
23
+ "args": ["-y", "brainclaw@latest", "mcp"]
24
+ }
25
+ }
26
+ }
27
+ ```
28
+
29
+ ## Permissions
30
+
31
+ OpenCode uses a per-tool permission map with `allow`, `ask`, or `deny` values:
32
+
33
+ ```json
34
+ {
35
+ "mcp": {
36
+ "brainclaw": {
37
+ "type": "stdio",
38
+ "command": "npx",
39
+ "args": ["-y", "brainclaw@latest", "mcp"],
40
+ "permissions": {
41
+ "bclaw_context": "allow",
42
+ "bclaw_work": "allow",
43
+ "bclaw_find": "allow",
44
+ "bclaw_get": "allow"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
51
+ brainclaw does not yet emit OpenCode permissions automatically.
52
+
53
+ ## Instruction files
54
+
55
+ OpenCode reads `AGENTS.md` at the project root — the same file used by Codex. brainclaw writes this during `init` or `export`.
56
+
57
+ ## SKILL.md discovery
58
+
59
+ OpenCode auto-discovers skills from `.opencode/skills/`, `.claude/skills/`, and `.agents/skills/`. A single `.agents/skills/brainclaw/SKILL.md` is picked up automatically.
60
+
61
+ ## Headless invocation
62
+
63
+ ```bash
64
+ opencode run /path/to/project
65
+ ```
66
+
67
+ OpenCode also supports `serve` (HTTP API) and `web` (browser UI) modes.
68
+
69
+ ## Invoke template
70
+
71
+ ```bash
72
+ opencode /path/to/project
73
+ ```
74
+
75
+ ## Subagents
76
+
77
+ OpenCode supports native subagents via `mode: subagent` and `@mention` syntax, with per-agent permissions. These are separate from brainclaw's coordination — brainclaw operates above them.
78
+
79
+ ## Caveats
80
+
81
+ - **No hooks**: OpenCode has a plugin system (JS/TS) but it is not compatible with Claude Code hook format. No pre-prompt injection.
82
+ - **No auto-approve writer**: brainclaw does not emit OpenCode `permissions` blocks yet — configure manually for headless.
83
+ - **`external_directory` deny**: OpenCode may deny file access outside the project root by default. Ensure brainclaw's store path (`.brainclaw/`) is within the project.
84
+ - **Windows**: Requires Node.js on PATH. Works on Windows, Linux, and macOS.