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,130 +1,130 @@
1
- # Integration Overview
2
-
3
- Brainclaw works alongside your existing coding agents. It does not replace them — it gives them a shared memory and coordination layer they can all read from and write to.
4
-
5
- For coordination internals — what happens when brainclaw spawns or routes work to another agent (claims, assignments, brief-ack sentinels, stdout/stderr log files, FSM transitions) — see [../concepts/dispatch-lifecycle.md](../concepts/dispatch-lifecycle.md).
6
-
7
- ## Onboarding model
8
-
9
- There are two separate setup scopes:
10
-
11
- - **Machine scope** — `brainclaw setup-machine` (or the broader `brainclaw setup`) detects agents on this machine and writes the machine-level MCP/user config Brainclaw manages.
12
- - **Project scope** — `brainclaw init` creates or refreshes `.brainclaw/` for the current repository and rewrites the managed project/agent files safely.
13
-
14
- That split is deliberate. A fresh machine may need MCP registration before any repository is touched, while an existing project may already have `.brainclaw/` and only need a safe refresh for the arriving agent.
15
-
16
- ## How agents connect to brainclaw
17
-
18
- Brainclaw reaches each agent through multiple surfaces. Not every agent supports every surface, and that's fine — brainclaw adapts what it writes based on what the agent can handle.
19
-
20
- | Surface | What it does | When it activates |
21
- |---|---|---|
22
- | **MCP tools** | The agent calls brainclaw directly to read context, create plans, claim files, and coordinate. This is the richest integration. | During every prompt, when the agent decides to call a tool |
23
- | **Instruction file** | A markdown file in the agent's native format that explains how to use brainclaw and lists active project constraints. | Read once at session start |
24
- | **Hooks** | Brainclaw injects fresh context into the agent's prompt automatically, without the agent asking. | Every prompt (where supported) |
25
- | **Auto-approve** | MCP tool calls are pre-approved so the agent doesn't have to ask the developer for permission each time. | Every MCP call (where supported) |
26
- | **Skills / Commands** | A shortcut the developer can trigger manually to refresh brainclaw context. | On demand |
27
-
28
- ## What goes where: core vs run
29
-
30
- Instruction files contain **core** content — things that don't change between prompts:
31
-
32
- - Why brainclaw matters for this project
33
- - The session protocol (what to call and when)
34
- - Active constraints
35
- - Project instructions
36
-
37
- Everything else is **run** content — it changes constantly and belongs in the dynamic context delivered through MCP or hooks:
38
-
39
- - Active plans and their status
40
- - Who is working where (claims)
41
- - Known traps (scored by relevance to the current file)
42
- - Handoffs between agents
43
- - Runtime notes
44
-
45
- This separation keeps instruction files clean and focused. The agent gets the stable rules from the file and the live state from MCP.
46
-
47
- ## Three levels of integration
48
-
49
- Brainclaw adapts its instruction file content based on what each agent can do:
50
-
51
- ### Full integration (MCP + hooks)
52
-
53
- The agent gets dynamic context injected at every prompt. The instruction file can be lightweight — just the protocol and constraints. Everything else comes through hooks and MCP calls.
54
-
55
- **Today:** Claude Code
56
-
57
- ### Standard integration (MCP, no hooks)
58
-
59
- The agent can call brainclaw tools but doesn't get automatic context injection. The instruction file is more directive — it tells the agent it MUST call specific tools before working, and includes the most critical traps statically. For agents without hooks, an opt-in `.live.md` companion (regenerated on session-end and handoff) carries plans, claims, traps, candidates, and handoffs as a parity backstop.
60
-
1
+ # Integration Overview
2
+
3
+ Brainclaw works alongside your existing coding agents. It does not replace them — it gives them a shared memory and coordination layer they can all read from and write to.
4
+
5
+ For coordination internals — what happens when brainclaw spawns or routes work to another agent (claims, assignments, brief-ack sentinels, stdout/stderr log files, FSM transitions) — see [../concepts/dispatch-lifecycle.md](../concepts/dispatch-lifecycle.md).
6
+
7
+ ## Onboarding model
8
+
9
+ There are two separate setup scopes:
10
+
11
+ - **Machine scope** — `brainclaw setup-machine` (or the broader `brainclaw setup`) detects agents on this machine and writes the machine-level MCP/user config Brainclaw manages.
12
+ - **Project scope** — `brainclaw init` creates or refreshes `.brainclaw/` for the current repository and rewrites the managed project/agent files safely.
13
+
14
+ That split is deliberate. A fresh machine may need MCP registration before any repository is touched, while an existing project may already have `.brainclaw/` and only need a safe refresh for the arriving agent.
15
+
16
+ ## How agents connect to brainclaw
17
+
18
+ Brainclaw reaches each agent through multiple surfaces. Not every agent supports every surface, and that's fine — brainclaw adapts what it writes based on what the agent can handle.
19
+
20
+ | Surface | What it does | When it activates |
21
+ |---|---|---|
22
+ | **MCP tools** | The agent calls brainclaw directly to read context, create plans, claim files, and coordinate. This is the richest integration. | During every prompt, when the agent decides to call a tool |
23
+ | **Instruction file** | A markdown file in the agent's native format that explains how to use brainclaw and lists active project constraints. | Read once at session start |
24
+ | **Hooks** | Brainclaw injects fresh context into the agent's prompt automatically, without the agent asking. | Every prompt (where supported) |
25
+ | **Auto-approve** | MCP tool calls are pre-approved so the agent doesn't have to ask the developer for permission each time. | Every MCP call (where supported) |
26
+ | **Skills / Commands** | A shortcut the developer can trigger manually to refresh brainclaw context. | On demand |
27
+
28
+ ## What goes where: core vs run
29
+
30
+ Instruction files contain **core** content — things that don't change between prompts:
31
+
32
+ - Why brainclaw matters for this project
33
+ - The session protocol (what to call and when)
34
+ - Active constraints
35
+ - Project instructions
36
+
37
+ Everything else is **run** content — it changes constantly and belongs in the dynamic context delivered through MCP or hooks:
38
+
39
+ - Active plans and their status
40
+ - Who is working where (claims)
41
+ - Known traps (scored by relevance to the current file)
42
+ - Handoffs between agents
43
+ - Runtime notes
44
+
45
+ This separation keeps instruction files clean and focused. The agent gets the stable rules from the file and the live state from MCP.
46
+
47
+ ## Three levels of integration
48
+
49
+ Brainclaw adapts its instruction file content based on what each agent can do:
50
+
51
+ ### Full integration (MCP + hooks)
52
+
53
+ The agent gets dynamic context injected at every prompt. The instruction file can be lightweight — just the protocol and constraints. Everything else comes through hooks and MCP calls.
54
+
55
+ **Today:** Claude Code
56
+
57
+ ### Standard integration (MCP, no hooks)
58
+
59
+ The agent can call brainclaw tools but doesn't get automatic context injection. The instruction file is more directive — it tells the agent it MUST call specific tools before working, and includes the most critical traps statically. For agents without hooks, an opt-in `.live.md` companion (regenerated on session-end and handoff) carries plans, claims, traps, candidates, and handoffs as a parity backstop.
60
+
61
61
  **Today:** Cursor, Windsurf, Cline, Roo, Continue, Kilocode, OpenCode, Codex, GitHub Copilot, Antigravity/Gemini CLI, Mistral Vibe, Hermes
62
-
63
- ### Limited integration (no MCP)
64
-
65
- The agent cannot call brainclaw tools at all. The instruction file or SKILL.md becomes the only source of project context, so it includes everything: constraints, traps, active plans, recent decisions.
66
-
67
- **Today:** Autonomous agents only (OpenClaw, NanoClaw, NemoClaw, PicoClaw, ZeroClaw — wired via `skills/<agent>/SKILL.md`).
68
-
69
- ## Agent integration matrix
70
-
71
- | Agent | MCP | Instruction file | Hooks | Auto-approve | Skills |
72
- |---|---|---|---|---|---|
73
- | **Claude Code** | ✔ project + global | CLAUDE.md | ✔ pre-prompt + stop | ✔ permissions | ✔ /brainclaw |
74
- | **Cursor** | ✔ global | .cursor/rules/ + MDC | alwaysApply MDC | — | |
75
- | **Windsurf** | ✔ global | .windsurfrules | session trigger | | — |
76
- | **Cline** | ✔ project | .clinerules/ | — | ✔ autoApprove | — |
77
- | **Roo** | ✔ project | .roo/rules/ | — | ✔ alwaysAllow | — |
78
- | **Continue** | ✔ both | .continue/rules/ | — | | — |
79
- | **Kilocode** | ✔ both | .kilo/rules/ + AGENTS.md | — | ✔ alwaysAllow | |
80
- | **OpenCode** | ✔ project | AGENTS.md | — | — | |
81
- | **Codex** | ✔ global | AGENTS.md | — | — | |
82
- | **Gemini CLI** | ✔ global | GEMINI.md | — | — | — |
83
- | **GitHub Copilot** | ✔ global + project | .github/copilot-instructions.md | | manual (per-call) | ✔ brainclaw-context |
62
+
63
+ ### Limited integration (no MCP)
64
+
65
+ The agent cannot call brainclaw tools at all. The instruction file or SKILL.md becomes the only source of project context, so it includes everything: constraints, traps, active plans, recent decisions.
66
+
67
+ **Today:** Autonomous agents only (OpenClaw, NanoClaw, NemoClaw, PicoClaw, ZeroClaw — wired via `skills/<agent>/SKILL.md`).
68
+
69
+ ## Agent integration matrix
70
+
71
+ | Agent | MCP | Instruction file | Hooks | Auto-approve | Skills |
72
+ |---|---|---|---|---|---|
73
+ | **Claude Code** | ✔ project + global | CLAUDE.md | ✔ pre-prompt + stop | ✔ permissions | ✔ /brainclaw |
74
+ | **Cursor** | ✔ global | .cursor/rules/ + MDC | workspace hooks | — | universal skills |
75
+ | **Windsurf** | ✔ global | .windsurfrules + .windsurf/rules/ | | alwaysAllow | — |
76
+ | **Cline** | ✔ project | .clinerules/ | — | ✔ autoApprove | — |
77
+ | **Roo** | ✔ project | .roo/rules/ | — | ✔ alwaysAllow | — |
78
+ | **Continue** | ✔ both | .continue/rules/ | — | permissions.yaml | — |
79
+ | **Kilocode** | ✔ both | .kilo/rules/ + AGENTS.md | — | ✔ alwaysAllow | universal skills |
80
+ | **OpenCode** | ✔ project | AGENTS.md | — | — | universal skills |
81
+ | **Codex** | ✔ global | AGENTS.md | — | — | universal skills |
82
+ | **Gemini CLI** | ✔ global | GEMINI.md | — | — | — |
83
+ | **GitHub Copilot** | ✔ project | .github/copilot-instructions.md | workspace hooks | manual (per-call) | ✔ brainclaw-context + universal skills |
84
84
  | **Mistral Vibe** | ✔ project + user (TOML) | AGENTS.md | — | `--auto-approve` flag | ✔ universal skill |
85
85
  | **Hermes** | ✔ global (YAML) | AGENTS.md | — | — | ✔ universal skill |
86
86
  | **OpenClaw** | — | — | — | — | ✔ brainclaw skill |
87
-
88
- **Legend:** ✔ = fully supported, ◐ = partial (static trigger, not dynamic injection), — = not available
89
-
90
- ## Why maximum integration by default
91
-
92
- Without active pressure, agents ignore brainclaw. This is a consistent finding from real usage: if brainclaw only declares an MCP server and doesn't push the agent to use it, the agent never calls it.
93
-
94
- That's why brainclaw activates **all available surfaces** by default during setup:
95
-
96
- - The MCP server and instruction file are always configured (non-negotiable)
97
- - Auto-approve and hooks are enabled where supported (opt-out possible)
98
- - The instruction file includes a "why this matters" section so the agent understands why it should care
99
-
100
- The developer can dial back individual surfaces if needed, but the default is full integration because that's what works.
101
-
102
- ## Parallel and sequential collaboration
103
-
104
- brainclaw's store mutations are serialized (MCP single-writer queue + file-based lock), so memory writes are safe even under contention.
105
-
106
- For **parallel work**, dispatch a sequence with `bclaw_dispatch(intent="execute")` — each lane gets its own auto-worktree under `~/.brainclaw/worktrees/<project-hash>/`, and the coordinator integrates with an octopus merge. For **review-fix loops**, `bclaw_coordinate(intent="review", open_loop=true, review_mode="symmetric")` runs an alternating review-and-fix conversation across two slots without shared-checkout collisions. These are the supported parallel paths today.
107
-
108
- For **sequential work** in the same project, let one agent claim at a time and rely on handoffs to keep continuity across sessions.
109
-
110
- What is **still risky**: running two agents in the *same* working tree without per-claim worktrees. That path can still produce Git conflicts and confusing file-level state — use the dispatch path (auto-worktree per claim) instead.
111
-
112
- See the README's "Current state" section for the full list of what works today and the residual sharp edges.
113
-
114
- ## Next reads
115
-
116
- - [mcp.md](mcp.md) — the dynamic runtime path for capable agents
117
- - [agents.md](agents.md) — integration principles and setup details
118
- - [claude-code.md](claude-code.md)
119
- - [cursor.md](cursor.md)
120
- - [codex.md](codex.md)
121
- - [copilot.md](copilot.md)
122
- - [continue.md](continue.md)
123
- - [roo.md](roo.md)
124
- - [windsurf.md](windsurf.md)
125
- - [cline.md](cline.md)
87
+
88
+ **Legend:** ✔ = fully supported, ◐ = partial (static trigger, not dynamic injection), — = not available
89
+
90
+ ## Why maximum integration by default
91
+
92
+ Without active pressure, agents ignore brainclaw. This is a consistent finding from real usage: if brainclaw only declares an MCP server and doesn't push the agent to use it, the agent never calls it.
93
+
94
+ That's why brainclaw activates **all available surfaces** by default during setup:
95
+
96
+ - The MCP server and instruction file are always configured (non-negotiable)
97
+ - Auto-approve and hooks are enabled where supported (opt-out possible)
98
+ - The instruction file includes a "why this matters" section so the agent understands why it should care
99
+
100
+ The developer can dial back individual surfaces if needed, but the default is full integration because that's what works.
101
+
102
+ ## Parallel and sequential collaboration
103
+
104
+ brainclaw's store mutations are serialized (MCP single-writer queue + file-based lock), so memory writes are safe even under contention.
105
+
106
+ For **parallel work**, dispatch a sequence with `bclaw_dispatch(intent="execute")` — each lane gets its own auto-worktree under `~/.brainclaw/worktrees/<project-hash>/`, and the coordinator integrates with an octopus merge. For **review-fix loops**, `bclaw_coordinate(intent="review", open_loop=true, review_mode="symmetric")` runs an alternating review-and-fix conversation across two slots without shared-checkout collisions. These are the supported parallel paths today.
107
+
108
+ For **sequential work** in the same project, let one agent claim at a time and rely on handoffs to keep continuity across sessions.
109
+
110
+ What is **still risky**: running two agents in the *same* working tree without per-claim worktrees. That path can still produce Git conflicts and confusing file-level state — use the dispatch path (auto-worktree per claim) instead.
111
+
112
+ See the README's "Current state" section for the full list of what works today and the residual sharp edges.
113
+
114
+ ## Next reads
115
+
116
+ - [mcp.md](mcp.md) — the dynamic runtime path for capable agents
117
+ - [agents.md](agents.md) — integration principles and setup details
118
+ - [claude-code.md](claude-code.md)
119
+ - [cursor.md](cursor.md)
120
+ - [codex.md](codex.md)
121
+ - [copilot.md](copilot.md)
122
+ - [continue.md](continue.md)
123
+ - [roo.md](roo.md)
124
+ - [windsurf.md](windsurf.md)
125
+ - [cline.md](cline.md)
126
126
  - [kilocode.md](kilocode.md)
127
127
  - [mistral-vibe.md](mistral-vibe.md)
128
128
  - [hermes.md](hermes.md)
129
129
  - [opencode.md](opencode.md)
130
- - [openclaw.md](openclaw.md)
130
+ - [openclaw.md](openclaw.md)
@@ -1,74 +1,74 @@
1
- # Roo Integration
2
-
3
- brainclaw integrates with Roo through MCP tools and project-scoped rules, providing shared memory, plans, and multi-agent coordination.
4
-
5
- ## Auto-setup
6
-
7
- `brainclaw init` detects Roo and writes `.roo/rules/brainclaw.md` automatically. Or manually:
8
-
9
- ```bash
10
- brainclaw export --format roo-rules --write
11
- ```
12
-
13
- ## MCP configuration
14
-
15
- Roo reads MCP servers from `.roo/mcp.json` (project-scoped) or the global `mcp_settings.json`. Add brainclaw:
16
-
17
- ```json
18
- {
19
- "mcpServers": {
20
- "brainclaw": {
21
- "command": "npx",
22
- "args": ["-y", "brainclaw@latest", "mcp"]
23
- }
24
- }
25
- }
26
- ```
27
-
28
- ## Permissions
29
-
30
- Roo supports per-server auto-approval via `alwaysAllow` array, plus a global toggle:
31
-
32
- ```json
33
- {
34
- "mcpServers": {
35
- "brainclaw": {
36
- "command": "npx",
37
- "args": ["-y", "brainclaw@latest", "mcp"],
38
- "alwaysAllow": ["bclaw_context", "bclaw_work", "bclaw_find", "bclaw_get"]
39
- }
40
- }
41
- }
42
- ```
43
-
44
- brainclaw emits `alwaysAllow` with all known tool names during setup.
45
-
46
- ## Instruction files
47
-
48
- - `.roo/instructions.md` — global instructions (Roo reads at session start)
49
- - `.roo/rules/` — rule files, equivalent to `.clinerules/`
50
- - `.rooignore` — file-level ignore patterns (respects `.gitignore` syntax)
51
-
52
- Roo also supports mode-specific rules and skills (e.g., `skills-code/`, `skills-architect/`).
53
-
54
- ## SKILL.md discovery
55
-
56
- Roo auto-discovers skills from `.roo/skills/`, `.agents/skills/`, and `.claude/skills/`. A single `.agents/skills/brainclaw/SKILL.md` is picked up automatically.
57
-
58
- ## Headless invocation
59
-
60
- Roo headless is available via Cloud Agents only (no local CLI headless mode).
61
-
62
- ## Invoke template
63
-
64
- ```
65
- # From within VS Code with Roo extension
66
- # Use -y flag for auto-approve in supported contexts
67
- ```
68
-
69
- ## Caveats
70
-
71
- - **No hooks**: Hook support is proposed but unreleased as of April 2026.
72
- - **No local headless CLI**: Headless dispatch requires Roo Cloud Agents.
73
- - **Cline family**: Roo is a Cline fork — config patterns are similar but paths differ (`.roo/` vs `.cline/`).
74
- - **Windows/Linux**: Works via VS Code extension on all platforms.
1
+ # Roo Integration
2
+
3
+ brainclaw integrates with Roo through MCP tools and project-scoped rules, providing shared memory, plans, and multi-agent coordination.
4
+
5
+ ## Auto-setup
6
+
7
+ `brainclaw init` detects Roo and writes `.roo/rules/brainclaw.md` automatically. Or manually:
8
+
9
+ ```bash
10
+ brainclaw export --format roo --write
11
+ ```
12
+
13
+ ## MCP configuration
14
+
15
+ Roo reads MCP servers from `.roo/mcp.json` (project-scoped) or the global `mcp_settings.json`. Add brainclaw:
16
+
17
+ ```json
18
+ {
19
+ "mcpServers": {
20
+ "brainclaw": {
21
+ "command": "npx",
22
+ "args": ["-y", "brainclaw@latest", "mcp"]
23
+ }
24
+ }
25
+ }
26
+ ```
27
+
28
+ ## Permissions
29
+
30
+ Roo supports per-server auto-approval via `alwaysAllow` array, plus a global toggle:
31
+
32
+ ```json
33
+ {
34
+ "mcpServers": {
35
+ "brainclaw": {
36
+ "command": "npx",
37
+ "args": ["-y", "brainclaw@latest", "mcp"],
38
+ "alwaysAllow": ["bclaw_context", "bclaw_work", "bclaw_find", "bclaw_get"]
39
+ }
40
+ }
41
+ }
42
+ ```
43
+
44
+ brainclaw emits `alwaysAllow` with all known tool names during setup.
45
+
46
+ ## Instruction files
47
+
48
+ - `.roo/instructions.md` — global instructions (Roo reads at session start)
49
+ - `.roo/rules/` — rule files, equivalent to `.clinerules/`
50
+ - `.rooignore` — file-level ignore patterns (respects `.gitignore` syntax)
51
+
52
+ Roo also supports mode-specific rules and skills (e.g., `skills-code/`, `skills-architect/`).
53
+
54
+ ## SKILL.md discovery
55
+
56
+ Roo auto-discovers skills from `.roo/skills/`, `.agents/skills/`, and `.claude/skills/`. A single `.agents/skills/brainclaw/SKILL.md` is picked up automatically.
57
+
58
+ ## Headless invocation
59
+
60
+ Roo headless is available via Cloud Agents only (no local CLI headless mode).
61
+
62
+ ## Invoke template
63
+
64
+ ```
65
+ # From within VS Code with Roo extension
66
+ # Use -y flag for auto-approve in supported contexts
67
+ ```
68
+
69
+ ## Caveats
70
+
71
+ - **No hooks**: Hook support is proposed but unreleased as of April 2026.
72
+ - **No local headless CLI**: Headless dispatch requires Roo Cloud Agents.
73
+ - **Cline family**: Roo is a Cline fork — config patterns are similar but paths differ (`.roo/` vs `.cline/`).
74
+ - **Windows/Linux**: Works via VS Code extension on all platforms.
@@ -1,83 +1,83 @@
1
- # Windsurf Integration
2
-
3
- brainclaw integrates with Windsurf through MCP tools and instruction rules, providing shared memory, plans, and coordination state to Cascade.
4
-
5
- ## Auto-setup
6
-
7
- `brainclaw init` detects Windsurf and writes `.windsurfrules` automatically. Or manually:
8
-
9
- ```bash
10
- brainclaw export --format windsurfrules --write
11
- ```
12
-
13
- ## MCP configuration
14
-
15
- Windsurf reads MCP servers from a **machine-scoped** config file:
16
-
17
- ```
18
- ~/.codeium/windsurf/mcp_config.json
19
- ```
20
-
21
- Add brainclaw:
22
-
23
- ```json
24
- {
25
- "mcpServers": {
26
- "brainclaw": {
27
- "command": "npx",
28
- "args": ["-y", "brainclaw@latest", "mcp"]
29
- }
30
- }
31
- }
32
- ```
33
-
34
- Note: this is a global config — it applies to all Windsurf projects on the machine.
35
-
36
- ## Permissions
37
-
38
- Windsurf supports `alwaysAllow` as an array on each MCP server entry:
39
-
40
- ```json
41
- {
42
- "mcpServers": {
43
- "brainclaw": {
44
- "command": "npx",
45
- "args": ["-y", "brainclaw@latest", "mcp"],
46
- "alwaysAllow": ["bclaw_context", "bclaw_work", "bclaw_find", "bclaw_get"]
47
- }
48
- }
49
- }
50
- ```
51
-
52
- brainclaw does not yet emit `alwaysAllow` for Windsurf automatically.
53
-
54
- ## Instruction files
55
-
56
- - `.windsurf/rules/*.md` — modern format (recommended), multiple rule files
57
- - `.windsurfrules` — legacy single-file format (still supported)
58
-
59
- brainclaw currently emits the legacy format. Modern `.windsurf/rules/` support is planned.
60
-
61
- ## SKILL.md discovery
62
-
63
- Windsurf uses `.windsurf/workflows/*.md` for slash-command workflows (12k char max). It does not auto-discover `.agents/skills/`. Skills must be wired as workflows manually.
64
-
65
- ## Headless invocation
66
-
67
- Windsurf does not offer a headless CLI. It runs as a Docker-based environment — no `-p` flag equivalent.
68
-
69
- ## Invoke template
70
-
71
- ```
72
- # Windsurf is GUI-only — no CLI invoke
73
- # Use within the Windsurf IDE (Cascade panel)
74
- ```
75
-
76
- ## Caveats
77
-
78
- - **Machine-scoped MCP**: The config at `~/.codeium/windsurf/mcp_config.json` is global, not per-project. All projects share the same server list.
79
- - **No hooks**: Cascade Hooks exist but are limited to logging — no pre-prompt injection.
80
- - **Legacy format**: brainclaw currently writes `.windsurfrules` (single file). Modern `.windsurf/rules/` multi-file support is planned (P5).
81
- - **No headless**: Cannot be used as a brainclaw dispatch target.
82
- - **Plan Mode**: Windsurf's "megaplan" mode is separate from brainclaw plans — they don't conflict but don't interoperate.
83
- - **Windows/Linux**: Works on all platforms via the Windsurf IDE.
1
+ # Windsurf Integration
2
+
3
+ brainclaw integrates with Windsurf through MCP tools and instruction rules, providing shared memory, plans, and coordination state to Cascade.
4
+
5
+ ## Auto-setup
6
+
7
+ `brainclaw init` detects Windsurf and writes `.windsurfrules` automatically. Or manually:
8
+
9
+ ```bash
10
+ brainclaw export --format windsurf --write
11
+ ```
12
+
13
+ ## MCP configuration
14
+
15
+ Windsurf reads MCP servers from a **machine-scoped** config file:
16
+
17
+ ```
18
+ ~/.codeium/windsurf/mcp_config.json
19
+ ```
20
+
21
+ Add brainclaw:
22
+
23
+ ```json
24
+ {
25
+ "mcpServers": {
26
+ "brainclaw": {
27
+ "command": "npx",
28
+ "args": ["-y", "brainclaw@latest", "mcp"]
29
+ }
30
+ }
31
+ }
32
+ ```
33
+
34
+ Note: this is a global config — it applies to all Windsurf projects on the machine.
35
+
36
+ ## Permissions
37
+
38
+ Windsurf supports `alwaysAllow` as an array on each MCP server entry:
39
+
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "brainclaw": {
44
+ "command": "npx",
45
+ "args": ["-y", "brainclaw@latest", "mcp"],
46
+ "alwaysAllow": ["bclaw_context", "bclaw_work", "bclaw_find", "bclaw_get"]
47
+ }
48
+ }
49
+ }
50
+ ```
51
+
52
+ `brainclaw setup-machine` emits the Windsurf MCP config with `alwaysAllow` for the Brainclaw tool surface.
53
+
54
+ ## Instruction files
55
+
56
+ - `.windsurf/rules/*.md` — modern format (recommended), multiple rule files
57
+ - `.windsurfrules` — legacy single-file format (still supported)
58
+
59
+ `brainclaw export --format windsurf --write` writes the legacy `.windsurfrules` instruction file. Project setup also writes `.windsurf/rules/brainclaw.md` when Windsurf is selected, so modern rule discovery is covered.
60
+
61
+ ## SKILL.md discovery
62
+
63
+ Windsurf uses `.windsurf/workflows/*.md` for slash-command workflows (12k char max). It does not auto-discover `.agents/skills/`. Skills must be wired as workflows manually.
64
+
65
+ ## Headless invocation
66
+
67
+ Windsurf does not offer a headless CLI. It runs as a Docker-based environment — no `-p` flag equivalent.
68
+
69
+ ## Invoke template
70
+
71
+ ```
72
+ # Windsurf is GUI-only — no CLI invoke
73
+ # Use within the Windsurf IDE (Cascade panel)
74
+ ```
75
+
76
+ ## Caveats
77
+
78
+ - **Machine-scoped MCP**: The config at `~/.codeium/windsurf/mcp_config.json` is global, not per-project. All projects share the same server list.
79
+ - **No hooks**: Cascade Hooks exist but are limited to logging — no pre-prompt injection.
80
+ - **Two rule paths**: `.windsurfrules` remains the portable export target; `.windsurf/rules/brainclaw.md` is written during project setup for modern Windsurf rule discovery.
81
+ - **No headless**: Cannot be used as a brainclaw dispatch target.
82
+ - **Plan Mode**: Windsurf's "megaplan" mode is separate from brainclaw plans — they don't conflict but don't interoperate.
83
+ - **Windows/Linux**: Works on all platforms via the Windsurf IDE.