brainclaw 0.28.0 → 1.5.3
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.
- package/README.md +193 -170
- package/dist/brainclaw-vscode.vsix +0 -0
- package/dist/cli.js +683 -23
- package/dist/commands/accept.js +3 -0
- package/dist/commands/add-step.js +11 -26
- package/dist/commands/agent-board.js +70 -3
- package/dist/commands/audit.js +19 -0
- package/dist/commands/check-policy.js +54 -0
- package/dist/commands/check-security-mcp.js +145 -0
- package/dist/commands/check-security.js +106 -0
- package/dist/commands/claim-resource.js +1 -0
- package/dist/commands/codev.js +672 -0
- package/dist/commands/compact.js +74 -0
- package/dist/commands/complete-step.js +16 -26
- package/dist/commands/constraint.js +8 -20
- package/dist/commands/decision.js +9 -20
- package/dist/commands/delete-plan.js +10 -12
- package/dist/commands/delete-step.js +16 -0
- package/dist/commands/dispatch.js +163 -0
- package/dist/commands/doctor.js +1122 -49
- package/dist/commands/enable-agent.js +1 -0
- package/dist/commands/export.js +280 -22
- package/dist/commands/handoff.js +33 -0
- package/dist/commands/harvest.js +189 -0
- package/dist/commands/hooks.js +82 -25
- package/dist/commands/inbox.js +169 -0
- package/dist/commands/init.js +38 -31
- package/dist/commands/install-hooks.js +71 -44
- package/dist/commands/link.js +89 -0
- package/dist/commands/list-claims.js +48 -3
- package/dist/commands/list-plans.js +129 -25
- package/dist/commands/loops-handlers.js +409 -0
- package/dist/commands/mcp-read-handlers.js +1628 -0
- package/dist/commands/mcp-schemas.generated.js +74 -0
- package/dist/commands/mcp.js +4244 -1475
- package/dist/commands/plan-resource.js +64 -0
- package/dist/commands/plan.js +12 -26
- package/dist/commands/prune.js +37 -2
- package/dist/commands/reflect.js +20 -7
- package/dist/commands/release-claim.js +11 -6
- package/dist/commands/release-notes.js +170 -0
- package/dist/commands/repair.js +210 -0
- package/dist/commands/run-profile.js +57 -0
- package/dist/commands/sequence.js +113 -0
- package/dist/commands/session-end.js +423 -14
- package/dist/commands/session-start.js +214 -41
- package/dist/commands/setup-security.js +103 -0
- package/dist/commands/setup.js +42 -4
- package/dist/commands/stale.js +109 -0
- package/dist/commands/switch.js +131 -10
- package/dist/commands/trap.js +14 -31
- package/dist/commands/update-handoff.js +63 -4
- package/dist/commands/update-plan.js +21 -28
- package/dist/commands/update-step.js +37 -0
- package/dist/commands/upgrade.js +313 -6
- package/dist/commands/usage.js +102 -0
- package/dist/commands/version.js +20 -0
- package/dist/commands/who.js +124 -0
- package/dist/commands/worktree.js +105 -0
- package/dist/core/actions.js +315 -0
- package/dist/core/agent-capability.js +610 -17
- package/dist/core/agent-context.js +7 -1
- package/dist/core/agent-files.js +1169 -85
- package/dist/core/agent-integrations.js +160 -5
- package/dist/core/agent-inventory.js +2 -0
- package/dist/core/agent-profiles.js +93 -0
- package/dist/core/agent-registry.js +162 -30
- package/dist/core/agentrun-reconciler.js +345 -0
- package/dist/core/agentruns.js +424 -0
- package/dist/core/ai-agent-detection.js +31 -10
- package/dist/core/archival.js +77 -0
- package/dist/core/assignment-sweeper.js +82 -0
- package/dist/core/assignments.js +367 -0
- package/dist/core/audit.js +30 -0
- package/dist/core/bootstrap.js +61 -10
- package/dist/core/brainclaw-version.js +94 -2
- package/dist/core/candidates.js +93 -2
- package/dist/core/claims.js +419 -0
- package/dist/core/codev-metrics.js +77 -0
- package/dist/core/codev-personas.js +31 -0
- package/dist/core/codev-plan-gen.js +35 -0
- package/dist/core/codev-prompts.js +74 -0
- package/dist/core/codev-responses.js +62 -0
- package/dist/core/codev-rounds.js +218 -0
- package/dist/core/config.js +4 -0
- package/dist/core/context.js +454 -34
- package/dist/core/coordination.js +201 -6
- package/dist/core/cross-project.js +230 -16
- package/dist/core/default-profiles/doctor.yaml +11 -0
- package/dist/core/default-profiles/janitor.yaml +11 -0
- package/dist/core/default-profiles/onboarder.yaml +11 -0
- package/dist/core/default-profiles/reviewer.yaml +13 -0
- package/dist/core/dispatcher.js +1189 -0
- package/dist/core/duplicates.js +2 -2
- package/dist/core/entity-operations.js +450 -0
- package/dist/core/entity-registry.js +344 -0
- package/dist/core/event-log.js +1 -0
- package/dist/core/events.js +106 -2
- package/dist/core/execution-adapters.js +154 -0
- package/dist/core/execution-context.js +63 -0
- package/dist/core/execution-profile.js +270 -0
- package/dist/core/execution.js +255 -0
- package/dist/core/facade-schema.js +81 -0
- package/dist/core/federation-cloud.js +99 -0
- package/dist/core/federation-message.js +52 -0
- package/dist/core/federation-transport.js +65 -0
- package/dist/core/gc-semantic.js +482 -0
- package/dist/core/governance.js +247 -0
- package/dist/core/guards.js +19 -0
- package/dist/core/ideation.js +72 -0
- package/dist/core/identity.js +252 -28
- package/dist/core/ids.js +6 -0
- package/dist/core/input-validation.js +2 -2
- package/dist/core/instruction-templates.js +344 -136
- package/dist/core/io.js +90 -11
- package/dist/core/lock.js +6 -2
- package/dist/core/loops/brief-assembly.js +213 -0
- package/dist/core/loops/facade-schema.js +148 -0
- package/dist/core/loops/index.js +7 -0
- package/dist/core/loops/iteration-engine.js +139 -0
- package/dist/core/loops/lock.js +385 -0
- package/dist/core/loops/store.js +201 -0
- package/dist/core/loops/types.js +403 -0
- package/dist/core/loops/verbs.js +534 -0
- package/dist/core/markdown.js +15 -3
- package/dist/core/memory-compactor.js +432 -0
- package/dist/core/memory-git.js +152 -8
- package/dist/core/messaging.js +278 -0
- package/dist/core/migration.js +32 -1
- package/dist/core/mutation-pipeline.js +4 -2
- package/dist/core/operations/memory-mutation.js +129 -0
- package/dist/core/operations/memory-write.js +78 -0
- package/dist/core/operations/plan.js +190 -0
- package/dist/core/policy.js +169 -0
- package/dist/core/repo-analysis.js +67 -0
- package/dist/core/reputation.js +9 -3
- package/dist/core/schema.js +546 -21
- package/dist/core/search.js +21 -2
- package/dist/core/security-cache.js +71 -0
- package/dist/core/security-guard.js +152 -0
- package/dist/core/security-scoring.js +86 -0
- package/dist/core/sequence.js +130 -0
- package/dist/core/socket-client.js +113 -0
- package/dist/core/staleness.js +246 -0
- package/dist/core/state.js +98 -22
- package/dist/core/store-resolution.js +54 -12
- package/dist/core/toml-writer.js +76 -0
- package/dist/core/upgrades/backup.js +232 -0
- package/dist/core/upgrades/health-check.js +169 -0
- package/dist/core/upgrades/patches/candidate-archive.js +145 -0
- package/dist/core/upgrades/patches/handoff-review-strip.js +128 -0
- package/dist/core/upgrades/patches/provenance-rollout.js +136 -0
- package/dist/core/upgrades/schema-version.js +97 -0
- package/dist/core/worktree.js +606 -0
- package/dist/facts.js +114 -0
- package/dist/facts.json +111 -0
- package/docs/architecture/project-refs.md +5 -1
- package/docs/cli.md +690 -43
- package/docs/concepts/ideation-loop.md +317 -0
- package/docs/concepts/loop-engine.md +456 -0
- package/docs/concepts/mcp-governance.md +268 -0
- package/docs/concepts/memory-staleness.md +122 -0
- package/docs/concepts/multi-agent-workflows.md +166 -0
- package/docs/concepts/plans-and-claims.md +31 -6
- package/docs/concepts/project-md-convention.md +35 -0
- package/docs/concepts/troubleshooting.md +220 -0
- package/docs/concepts/upgrade-cli.md +202 -0
- package/docs/concepts/upgrade-dogfood-procedure.md +114 -0
- package/docs/context-format-changelog.md +2 -2
- package/docs/context-format.md +2 -2
- package/docs/index.md +68 -0
- package/docs/integrations/agents.md +15 -16
- package/docs/integrations/cline.md +88 -0
- package/docs/integrations/codex.md +75 -23
- package/docs/integrations/continue.md +60 -0
- package/docs/integrations/copilot.md +67 -9
- package/docs/integrations/kilocode.md +72 -0
- package/docs/integrations/mcp.md +304 -21
- package/docs/integrations/mistral-vibe.md +122 -0
- package/docs/integrations/opencode.md +84 -0
- package/docs/integrations/overview.md +23 -8
- package/docs/integrations/roo.md +74 -0
- package/docs/integrations/windsurf.md +83 -0
- package/docs/mcp-schema-changelog.md +191 -1
- package/docs/playbooks/integration/index.md +121 -0
- package/docs/playbooks/productivity/index.md +102 -0
- package/docs/playbooks/team/index.md +122 -0
- package/docs/product/agent-first-model.md +184 -0
- package/docs/product/entity-model-audit.md +462 -0
- package/docs/quickstart-existing-project.md +135 -0
- package/docs/quickstart.md +124 -37
- package/docs/release-maintenance.md +79 -0
- package/docs/review.md +2 -0
- package/docs/server-operations.md +118 -0
- package/package.json +20 -12
- package/dist/commands/claude-desktop-extension.js +0 -18
- package/dist/commands/diff.js +0 -99
- package/dist/core/claude-desktop-extension.js +0 -224
package/docs/integrations/mcp.md
CHANGED
|
@@ -16,38 +16,321 @@ MCP matters because Brainclaw's value is mostly in dynamic state:
|
|
|
16
16
|
|
|
17
17
|
Static files still help, but they age immediately. MCP is the stronger path for live coordination.
|
|
18
18
|
|
|
19
|
-
That now also includes Brainclaw's own install channel state: `
|
|
19
|
+
That now also includes Brainclaw's own install channel state: `bclaw_context({ kind: "execution" })` surfaces whether a newer npm or local-pack build is available, so the agent can notice upgrades without relying on a human to run `brainclaw version --check`.
|
|
20
20
|
|
|
21
21
|
## Recommended Agent Pattern
|
|
22
22
|
|
|
23
23
|
The default dynamic workflow is:
|
|
24
24
|
|
|
25
|
-
1. `
|
|
26
|
-
2. `
|
|
27
|
-
3. `
|
|
28
|
-
4. `
|
|
29
|
-
5. `
|
|
30
|
-
6. `
|
|
31
|
-
7. `
|
|
25
|
+
1. `bclaw_work` to start the session and load the relevant context in one call (returns compact payload by default — pass `compact: false` for the full context result)
|
|
26
|
+
2. `bclaw_context({ kind: "execution" })` early when the agent needs local tooling signals or package update visibility
|
|
27
|
+
3. `bclaw_context({ kind: "memory" })`, `bclaw_context({ kind: "board" })`, or `bclaw_context({ kind: "delta" })` when the target path changes or full memory is needed beyond the compact summary
|
|
28
|
+
4. `bclaw_find` / `bclaw_get` / `bclaw_create` / `bclaw_update` / `bclaw_remove` / `bclaw_transition` for entity reads and writes
|
|
29
|
+
5. `bclaw_coordinate`, `bclaw_dispatch`, or `bclaw_loop` for assign, consult, review, reroute, summarize, dispatch, or multi-turn loop flows
|
|
30
|
+
6. `bclaw_read_inbox` when resuming delegated work
|
|
31
|
+
7. `bclaw_write_note`, `bclaw_quick_capture`, or `bclaw_create({ entity: "candidate", ... })` when the result should become runtime or durable shared memory
|
|
32
32
|
|
|
33
33
|
This keeps session continuity inside Brainclaw instead of pushing the agent back to manual CLI usage.
|
|
34
34
|
|
|
35
|
+
When a human operator needs the CLI equivalent of `bclaw_write_note`, use `brainclaw runtime-note <text>`.
|
|
36
|
+
|
|
35
37
|
## Available Tools
|
|
36
38
|
|
|
39
|
+
All 59 published MCP tools are discoverable via `tools/list`. Each tool carries an `annotations` object with `tier` and `category` metadata so clients can filter or group tools without server-side hiding.
|
|
40
|
+
|
|
41
|
+
### Tool tiers
|
|
42
|
+
|
|
43
|
+
Every tool has one of three tiers in its `annotations.tier` field:
|
|
44
|
+
|
|
45
|
+
- **facade** — High-level entry points for agents that don't need granular access. Start here.
|
|
46
|
+
- **standard** — Day-to-day coordination tools: plans, claims, messaging, dispatch, review, memory. Returned by default alongside facades.
|
|
47
|
+
- **advanced** — Specialized governance, audit, registry, sequences, and power tools.
|
|
48
|
+
|
|
49
|
+
By default, `tools/list` returns **facade + standard** tools (34 tools). To get all tools including advanced, pass `{ "catalog": "all" }`, `{ "include": "all" }`, or `{ "advanced": true }`. To filter by a single tier, pass `{ "tier": "facade" }`, `{ "tier": "standard" }`, or `{ "tier": "advanced" }`.
|
|
50
|
+
|
|
51
|
+
Published tools remain callable regardless of catalog filtering — the tier only affects discovery via `tools/list`.
|
|
52
|
+
|
|
53
|
+
See [docs/concepts/mcp-governance.md](../concepts/mcp-governance.md) for
|
|
54
|
+
the stability contract of each tier (what counts as a breaking change,
|
|
55
|
+
deprecation window, schema versioning rules). Changelog entries for
|
|
56
|
+
every version live in [docs/mcp-schema-changelog.md](../mcp-schema-changelog.md).
|
|
57
|
+
|
|
58
|
+
### Tool categories
|
|
59
|
+
|
|
60
|
+
Each tool also has an `annotations.category` field: `session`, `context`, `memory`, `coordination`, `loops`, `governance`, or `discovery`.
|
|
61
|
+
|
|
62
|
+
### Facade tools
|
|
63
|
+
|
|
64
|
+
| Tool | Category | Purpose |
|
|
65
|
+
|---|---|---|
|
|
66
|
+
| `bclaw_work` | session | Start session + load context + optionally claim a scope in one call (compact payload by default) |
|
|
67
|
+
| `bclaw_context` | context | Unified context read for memory, execution, board, board summary, and deltas |
|
|
68
|
+
| `bclaw_coordinate` | coordination | Assign, consult, review, ideate, reroute, or summarize across agents |
|
|
69
|
+
| `bclaw_dispatch` | coordination | Analyze, execute, or review dispatch work through one intent-based entry point |
|
|
70
|
+
| `bclaw_loop` | loops | Drive multi-turn review, ideation, implementation, research, or debug loops |
|
|
71
|
+
| `bclaw_setup` | session | Agent-driven onboarding wizard |
|
|
72
|
+
|
|
73
|
+
### Standard tools
|
|
74
|
+
|
|
75
|
+
| Tool | Category | Purpose |
|
|
76
|
+
|---|---|---|
|
|
77
|
+
| `bclaw_bootstrap` | context | Brownfield bootstrap signals, interview prompts, selective import |
|
|
78
|
+
| `bclaw_release_notes` | context | Agent-first release notes with breaking risk assessment |
|
|
79
|
+
| `bclaw_search` | memory | Full-text search across memory items |
|
|
80
|
+
| `bclaw_assignment_events` | coordination | List correlated runtime events for assignments and runs |
|
|
81
|
+
| `bclaw_switch` | session | Switch active project in a multi-project workspace |
|
|
82
|
+
| `bclaw_read_inbox` | coordination | Read messages from an agent inbox |
|
|
83
|
+
| `bclaw_send_message` | coordination | Send assignments, review requests, RFCs, notifications, or threaded replies |
|
|
84
|
+
| `bclaw_ack_message` | coordination | Acknowledge a processed inbox message |
|
|
85
|
+
| `bclaw_write_note` | memory | Record a runtime note |
|
|
86
|
+
| `bclaw_quick_capture` | memory | Capture text and classify it locally as a decision, trap, or runtime note |
|
|
87
|
+
| `bclaw_claim` | coordination | Claim a work scope (advisory lock, auto-worktree) |
|
|
88
|
+
| `bclaw_release_claim` | coordination | Release a claim, optionally updating linked plan status |
|
|
89
|
+
| `bclaw_session_start` | session | Start a session explicitly (granular workflow) |
|
|
90
|
+
| `bclaw_session_end` | session | End session, optionally auto-reflect notes or handoffs |
|
|
91
|
+
| `bclaw_add_step` | coordination | Add a sub-step to a plan item |
|
|
92
|
+
| `bclaw_complete_step` | coordination | Mark a plan sub-step as done |
|
|
93
|
+
| `bclaw_update_step` | coordination | Update a plan sub-step's status, text, or assignee |
|
|
94
|
+
| `bclaw_delete_step` | coordination | Remove a sub-step from a plan |
|
|
95
|
+
| `bclaw_correct_handoff` | coordination | Write an immutable correction handoff that supersedes an earlier one |
|
|
96
|
+
| `bclaw_assignment_update` | coordination | Report assignment lifecycle status |
|
|
97
|
+
| `bclaw_assignment_action` | coordination | Resolve or reject a pending ActionRequired item |
|
|
98
|
+
| `bclaw_harvest_candidates` | coordination | Harvest sandboxed worktree candidate files into the main project store |
|
|
99
|
+
| `bclaw_find` | memory | List canonical entities with filters |
|
|
100
|
+
| `bclaw_get` | memory | Fetch a canonical entity by id or short label |
|
|
101
|
+
| `bclaw_create` | memory | Create a canonical entity |
|
|
102
|
+
| `bclaw_update` | memory | Partially update mutable fields on a canonical entity |
|
|
103
|
+
| `bclaw_remove` | memory | Archive or purge a canonical entity |
|
|
104
|
+
| `bclaw_transition` | memory | Move an entity through its validated state machine |
|
|
105
|
+
|
|
106
|
+
### Advanced tools
|
|
107
|
+
|
|
108
|
+
| Tool | Category | Purpose |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| `bclaw_audit` | governance | Audit log or governance posture report |
|
|
111
|
+
| `bclaw_check_policy` | governance | Pre-execution policy check for a scope |
|
|
112
|
+
| `bclaw_check_security` | governance | Supply chain security scores via Socket.dev |
|
|
113
|
+
| `bclaw_conflict_check` | governance | Check for overlapping claims between agents |
|
|
114
|
+
| `bclaw_doctor` | governance | Health checks on the memory store |
|
|
115
|
+
| `bclaw_history` | governance | Full mutation history of a memory item |
|
|
116
|
+
| `bclaw_estimation_report` | governance | Estimation accuracy report for completed plans |
|
|
117
|
+
| `bclaw_list_agents` | discovery | Registered agent inventory with reputation |
|
|
118
|
+
| `bclaw_list_instructions` | discovery | Raw or resolved instruction listing |
|
|
119
|
+
| `bclaw_get_capabilities` | discovery | List registered project capabilities |
|
|
120
|
+
| `bclaw_list_tools` | discovery | List registered project tools |
|
|
121
|
+
| `bclaw_search_tools` | discovery | Search tools by name or description |
|
|
122
|
+
| `bclaw_get_discovery` | discovery | Scan workspace for MCP configs, skills, hooks |
|
|
123
|
+
| `bclaw_who` | discovery | List active agent sessions on workspace |
|
|
124
|
+
| `bclaw_add_capability` | discovery | Register a project capability |
|
|
125
|
+
| `bclaw_add_tool` | discovery | Register a project tool |
|
|
126
|
+
| `bclaw_list_sequences` | coordination | Coordination sequence listing |
|
|
127
|
+
| `bclaw_create_sequence` | coordination | Create a coordination sequence |
|
|
128
|
+
| `bclaw_update_sequence` | coordination | Update a sequence's status, metadata, or items |
|
|
129
|
+
| `bclaw_get_thread` | coordination | Get all messages in a thread across inboxes |
|
|
130
|
+
| `bclaw_delete_plan` | coordination | Delete a plan item by ID |
|
|
131
|
+
| `bclaw_delete_sequence` | coordination | Delete a sequence by ID |
|
|
132
|
+
| `bclaw_delete_memory` | memory | Delete a memory item by ID |
|
|
133
|
+
| `bclaw_update_memory` | memory | Update a memory item's text or metadata |
|
|
134
|
+
| `bclaw_compact` | memory | LLM-driven semantic memory compaction (two-phase) |
|
|
135
|
+
|
|
136
|
+
### Canonical grammar (standard tier, v1.0+)
|
|
137
|
+
|
|
138
|
+
Phase 3 shipped a unified grammar that replaces the per-entity tools
|
|
139
|
+
listed above. All canonical verbs are in the default `standard` tier
|
|
140
|
+
as of v1.0. The legacy per-entity tools have been removed from the
|
|
141
|
+
catalog (still callable as a migration escape hatch — see the redirect
|
|
142
|
+
warnings they emit).
|
|
143
|
+
|
|
144
|
+
See [docs/concepts/mcp-governance.md](../concepts/mcp-governance.md)
|
|
145
|
+
for the stability contract and [docs/mcp-schema-changelog.md](../mcp-schema-changelog.md)
|
|
146
|
+
for the full 1.0.0 changelog.
|
|
147
|
+
|
|
148
|
+
#### Six CRUD verbs
|
|
149
|
+
|
|
150
|
+
| Verb | Purpose | Replaces |
|
|
151
|
+
|---|---|---|
|
|
152
|
+
| `bclaw_find(entity, filter?)` | List query (default: hides `legacy` + `auto_reflect<0.6`) | `bclaw_list_plans/candidates/claims/actions/assignments/runs` |
|
|
153
|
+
| `bclaw_get(entity, id)` | Fetch one by id or short_label | `bclaw_read_handoff` |
|
|
154
|
+
| `bclaw_create(entity, data)` | Create with auto-stamped provenance | `bclaw_create_plan/candidate` |
|
|
155
|
+
| `bclaw_update(entity, id, patch)` | Partial merge (updatable fields only) | `bclaw_update_plan`, `bclaw_update_memory` |
|
|
156
|
+
| `bclaw_remove(entity, id, purge?)` | Archive (default) or hard-delete | `bclaw_delete_memory`, `bclaw_delete_plan` |
|
|
157
|
+
| `bclaw_transition(entity, id, to, reason?)` | State machine transition with side-effect tags | `bclaw_accept`, `bclaw_reject`, status-update flows |
|
|
158
|
+
|
|
159
|
+
Supported entities: plan, decision, constraint, trap, handoff,
|
|
160
|
+
runtime_note, candidate, claim, action, assignment, agent_run
|
|
161
|
+
(read-only for the latter four). Declarative transition matrix +
|
|
162
|
+
updatable field list live in [src/core/entity-registry.ts](../../src/core/entity-registry.ts).
|
|
163
|
+
|
|
164
|
+
##### `bclaw_find` filter keys
|
|
165
|
+
|
|
166
|
+
The `filter` object accepts the following keys. **Unknown keys are
|
|
167
|
+
rejected with `validation_error`** (pln#460) — a typo like
|
|
168
|
+
`{staus:'todo'}` fails fast instead of silently returning unfiltered
|
|
169
|
+
results.
|
|
170
|
+
|
|
171
|
+
| Key | Type | Applies to | Effect |
|
|
172
|
+
|---|---|---|---|
|
|
173
|
+
| `status` | string | all entities with a `status` field | Exact match on the entity's lifecycle status |
|
|
174
|
+
| `tag` | string | entities with `tags[]` | Returns items where `tags` contains the value |
|
|
175
|
+
| `author` | string | entities with an `author` field | Exact match |
|
|
176
|
+
| `plan_id` | string | handoff, candidate, runtime_note, claim, action, assignment, agent_run | Filter to items linked to a given plan |
|
|
177
|
+
| `source` | string (`auto` / `agent` / `human`) | candidate | Provenance source filter |
|
|
178
|
+
| `auto_generated` | boolean | candidate | `true` keeps only auto-generated candidates, `false` excludes them (matches `source === 'auto'` OR legacy `origin` starting with `session-end`) |
|
|
179
|
+
| `limit` | number (default 50) | all | Max items returned (paging) |
|
|
180
|
+
| `offset` | number (default 0) | all | Paging offset |
|
|
181
|
+
| `includeLegacy` | boolean (default false) | all | Include records with `provenance.kind='legacy'` |
|
|
182
|
+
| `minAutoReflectConfidence` | number 0-1 (default 0.6) | all | Threshold below which `auto_reflect` records are hidden |
|
|
183
|
+
|
|
184
|
+
Notes:
|
|
185
|
+
- `candidate` has an active bucket of `pending` only; accepted / rejected
|
|
186
|
+
candidates are archived on transition and don't appear in `bclaw_find`.
|
|
187
|
+
- Combining filters intersects them (AND, not OR).
|
|
188
|
+
- Filters that don't apply to a given entity (e.g. `plan_id` on `plan`)
|
|
189
|
+
are currently no-ops — they don't error, but they don't match either.
|
|
190
|
+
|
|
191
|
+
#### Cross-project access (pln#359)
|
|
192
|
+
|
|
193
|
+
The canonical grammar (`bclaw_find` / `bclaw_get` / `bclaw_create` /
|
|
194
|
+
`bclaw_update` / `bclaw_remove` / `bclaw_transition`), the read
|
|
195
|
+
dispatcher `bclaw_context`, and the coordination facade `bclaw_coordinate`
|
|
196
|
+
accept an optional `project` parameter that routes the operation to a
|
|
197
|
+
**linked project** instead of the current one. The CLI exposes the same
|
|
198
|
+
parameter as a global `--project <name>` flag.
|
|
199
|
+
|
|
200
|
+
Two link kinds are accepted:
|
|
201
|
+
- `cross_project_links` (sibling/peer projects in `config.yaml`, managed
|
|
202
|
+
via `brainclaw link add/list/remove`).
|
|
203
|
+
- Workspace store-chain children (monorepo-style nested projects).
|
|
204
|
+
|
|
205
|
+
Arbitrary directory paths are rejected — adoption requires an explicit
|
|
206
|
+
link, which gives the user a single point of control over what an agent
|
|
207
|
+
can reach.
|
|
208
|
+
|
|
209
|
+
**Read / write on canonical entities (phase 1a):**
|
|
210
|
+
|
|
211
|
+
```jsonc
|
|
212
|
+
// Read a trap from a sibling project linked as 'brainclaw-site'
|
|
213
|
+
bclaw_get({ entity: 'trap', id: 'trp_795bbfb5', project: 'brainclaw-site' })
|
|
214
|
+
|
|
215
|
+
// Update a plan in the linked site repo
|
|
216
|
+
bclaw_update({ entity: 'plan', id: 'pln_abc', patch: { priority: 'high' }, project: 'brainclaw-site' })
|
|
217
|
+
|
|
218
|
+
// Capture context from a child project in a monorepo
|
|
219
|
+
bclaw_context({ kind: 'memory', project: 'web-app' })
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Identity (`author` / `agent`) is resolved from the **source** project's
|
|
223
|
+
agent registry — an agent does not need to be registered in the target
|
|
224
|
+
to write into it. Audit log entries land in the **target** project.
|
|
225
|
+
Unknown project arguments throw `validation_error` with a hint listing
|
|
226
|
+
the configured links — no silent fallback.
|
|
227
|
+
|
|
228
|
+
**Coordinate / dispatch into a linked project (phase 1b-α):**
|
|
229
|
+
|
|
230
|
+
```jsonc
|
|
231
|
+
// Dispatch the brainclaw-site claude-code agent without leaving brainclaw
|
|
232
|
+
bclaw_coordinate({
|
|
233
|
+
intent: 'assign',
|
|
234
|
+
task: 'Refactor the homepage hero variant',
|
|
235
|
+
scope: 'src/pages/index.astro',
|
|
236
|
+
targetAgents: ['claude-code'],
|
|
237
|
+
project: 'brainclaw-site',
|
|
238
|
+
agent: 'claude-code', // self-attribution from the source side
|
|
239
|
+
})
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Cross-project dispatch is **inbox-only**: the target agent picks up the
|
|
243
|
+
brief async via its own `bclaw_work`. Auto-spawn from the source process
|
|
244
|
+
is force-disabled when `project` is set, because spawn cwd / worktree
|
|
245
|
+
semantics are tied to the target's git repo. A warning surfaces in
|
|
246
|
+
`FacadeResponse.warnings` so the caller knows auto-spawn was downgraded.
|
|
247
|
+
The same logic applies to `intent=consult|review|reroute|ideate`.
|
|
248
|
+
|
|
249
|
+
**CLI parity (phase 1c):**
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
# Read the linked project's plans without leaving the current dir
|
|
253
|
+
brainclaw --project=brainclaw-site list-plans
|
|
254
|
+
|
|
255
|
+
# Write a decision into the linked project
|
|
256
|
+
brainclaw --project=brainclaw-site decision "Switch hero variant to v3"
|
|
257
|
+
|
|
258
|
+
# Scoped variants: --project works on every subcommand. Mutually exclusive
|
|
259
|
+
# with --cwd; use one or the other.
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
#### Unified intent dispatchers
|
|
263
|
+
|
|
264
|
+
| Tool | Consolidates | Example |
|
|
265
|
+
|---|---|---|
|
|
266
|
+
| `bclaw_context(kind, since?)` | `bclaw_get_context` / `bclaw_get_execution_context` / `bclaw_get_agent_board` / `bclaw_get_agent_board_summary` + new `kind='delta'` (P6.4) | `bclaw_context({ kind: 'delta', since: 'sess_abc' })` |
|
|
267
|
+
| `bclaw_dispatch(intent, …)` | `bclaw_dispatch_analysis` / `bclaw_dispatch` / `bclaw_dispatch_review` | `bclaw_dispatch({ intent: 'review', openLoop: true })` |
|
|
268
|
+
|
|
269
|
+
#### Handoff correction (tombstone)
|
|
270
|
+
|
|
37
271
|
| Tool | Purpose |
|
|
38
272
|
|---|---|
|
|
39
|
-
| `
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
273
|
+
| `bclaw_correct_handoff(originalId, text?, narrative?, tags?, reason?)` | Write a new handoff that supersedes an earlier, incorrect one. Original becomes immutable with `superseded_by` back at the correction; correction carries `supersedes`. Federation-safe (both records stay on disk). |
|
|
274
|
+
|
|
275
|
+
Use `bclaw_correct_handoff` instead of `bclaw_update_handoff` — the
|
|
276
|
+
latter was removed from the catalog at v1.0 (direct calls still succeed
|
|
277
|
+
as a migration escape hatch but emit a redirect warning).
|
|
278
|
+
|
|
279
|
+
#### Example gallery
|
|
280
|
+
|
|
281
|
+
```jsonc
|
|
282
|
+
// List all recent high-priority plans (legacy provenance hidden by default)
|
|
283
|
+
bclaw_find({ entity: 'plan', filter: { status: 'in_progress', limit: 10 } })
|
|
284
|
+
|
|
285
|
+
// Include legacy records + lower auto_reflect confidence threshold
|
|
286
|
+
bclaw_find({ entity: 'decision', filter: { includeLegacy: true, minAutoReflectConfidence: 0.3 } })
|
|
287
|
+
|
|
288
|
+
// Fetch a specific handoff by short_label
|
|
289
|
+
bclaw_get({ entity: 'handoff', id: 'hnd#42' })
|
|
290
|
+
|
|
291
|
+
// Create a decision (provenance auto-stamped as kind:user)
|
|
292
|
+
bclaw_create({ entity: 'decision', data: { text: 'switch to postgres', author: 'jberdah' } })
|
|
293
|
+
|
|
294
|
+
// Transition a candidate (validated against transition matrix)
|
|
295
|
+
bclaw_transition({ entity: 'candidate', id: 'cnd_abc', to: 'accepted' })
|
|
296
|
+
|
|
297
|
+
// Get memory delta since a previous session
|
|
298
|
+
bclaw_context({ kind: 'delta', since: 'sess_07c...' })
|
|
299
|
+
|
|
300
|
+
// Compact board summary (replaces bclaw_get_agent_board_summary)
|
|
301
|
+
bclaw_context({ kind: 'board_summary' })
|
|
302
|
+
|
|
303
|
+
// Review dispatch with structured loop
|
|
304
|
+
bclaw_dispatch({ intent: 'review', openLoop: true, reviewMode: 'symmetric' })
|
|
305
|
+
|
|
306
|
+
// Open a memory-confrontation ideation loop (single-agent: champion drives manually)
|
|
307
|
+
bclaw_coordinate({ intent: 'ideate', task: 'Should we extract the dispatcher into a separate package?' })
|
|
308
|
+
|
|
309
|
+
// Multi-agent ideation: critic gets a context-filtered, BM25-ranked brief auto-dispatched
|
|
310
|
+
bclaw_coordinate({
|
|
311
|
+
intent: 'ideate',
|
|
312
|
+
task: 'Should we adopt approach A or approach B?',
|
|
313
|
+
targetAgents: ['codex'],
|
|
314
|
+
})
|
|
315
|
+
|
|
316
|
+
// Correct a handoff instead of mutating it
|
|
317
|
+
bclaw_correct_handoff({ originalId: 'hnd_xyz', reason: 'wrong contract', text: '...' })
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
For the full ideation_loop design (phases, context_filter, iteration
|
|
321
|
+
block, advance_gate, brief assembly, single vs multi-agent UX), see
|
|
322
|
+
[docs/concepts/ideation-loop.md](../concepts/ideation-loop.md). For
|
|
323
|
+
the underlying loop engine, see
|
|
324
|
+
[docs/concepts/loop-engine.md](../concepts/loop-engine.md).
|
|
325
|
+
|
|
326
|
+
#### Deprecation status
|
|
327
|
+
|
|
328
|
+
The v1.0-removed legacy tools named in the changelog emit a
|
|
329
|
+
deprecation warning server-side on each direct call. The warning names
|
|
330
|
+
the canonical replacement. Warnings fired during the 0.8.x window. As
|
|
331
|
+
of v1.0 those tools are removed from every `tools/list` catalog,
|
|
332
|
+
including `{ catalog: "all" }`, but direct calls still succeed as a
|
|
333
|
+
migration escape hatch and keep emitting redirect warnings.
|
|
51
334
|
|
|
52
335
|
## When To Use MCP Versus Other Surfaces
|
|
53
336
|
|
|
@@ -89,7 +372,7 @@ Interview answers are keyed by question ID and may contain:
|
|
|
89
372
|
|
|
90
373
|
## Mutation Safety
|
|
91
374
|
|
|
92
|
-
The MCP server serializes all mutations through a single-writer queue (`McpTaskRunner`). When an agent calls a write tool (e.g. `bclaw_claim`, `bclaw_write_note`, `
|
|
375
|
+
The MCP server serializes all mutations through a single-writer queue (`McpTaskRunner`). When an agent calls a write tool (e.g. `bclaw_claim`, `bclaw_write_note`, `bclaw_create({ entity: "plan", ... })`), the request is enqueued and executed one at a time. This guarantees:
|
|
93
376
|
|
|
94
377
|
- no concurrent writes from the same MCP connection
|
|
95
378
|
- no partial state from interleaved mutations
|
|
@@ -0,0 +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)
|
|
@@ -0,0 +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.
|
|
@@ -45,15 +45,15 @@ The agent gets dynamic context injected at every prompt. The instruction file ca
|
|
|
45
45
|
|
|
46
46
|
### Standard integration (MCP, no hooks)
|
|
47
47
|
|
|
48
|
-
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.
|
|
48
|
+
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.
|
|
49
49
|
|
|
50
|
-
**Today:** Cursor, Windsurf, Cline, Roo, Continue, OpenCode, Codex, Antigravity/Gemini CLI
|
|
50
|
+
**Today:** Cursor, Windsurf, Cline, Roo, Continue, Kilocode, OpenCode, Codex, GitHub Copilot, Antigravity/Gemini CLI, Mistral Vibe
|
|
51
51
|
|
|
52
52
|
### Limited integration (no MCP)
|
|
53
53
|
|
|
54
|
-
The agent cannot call brainclaw tools at all. The instruction file becomes the only source of project context, so it includes everything: constraints, traps, active plans, recent decisions.
|
|
54
|
+
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.
|
|
55
55
|
|
|
56
|
-
**Today:**
|
|
56
|
+
**Today:** Autonomous agents only (OpenClaw, NanoClaw, NemoClaw, PicoClaw, ZeroClaw — wired via `skills/<agent>/SKILL.md`).
|
|
57
57
|
|
|
58
58
|
## Agent integration matrix
|
|
59
59
|
|
|
@@ -65,10 +65,12 @@ The agent cannot call brainclaw tools at all. The instruction file becomes the o
|
|
|
65
65
|
| **Cline** | ✔ project | .clinerules/ | — | ✔ autoApprove | — |
|
|
66
66
|
| **Roo** | ✔ project | .roo/rules/ | — | ✔ alwaysAllow | — |
|
|
67
67
|
| **Continue** | ✔ both | .continue/rules/ | — | — | — |
|
|
68
|
+
| **Kilocode** | ✔ both | .kilo/rules/ + AGENTS.md | — | ✔ alwaysAllow | — |
|
|
68
69
|
| **OpenCode** | ✔ project | AGENTS.md | — | — | — |
|
|
69
70
|
| **Codex** | ✔ global | AGENTS.md | — | — | — |
|
|
70
71
|
| **Gemini CLI** | ✔ global | GEMINI.md | — | — | — |
|
|
71
|
-
| **Copilot** |
|
|
72
|
+
| **GitHub Copilot** | ✔ global + project | .github/copilot-instructions.md | — | manual (per-call) | ✔ brainclaw-context |
|
|
73
|
+
| **Mistral Vibe** | ✔ project + user (TOML) | AGENTS.md | — | `--auto-approve` flag | ✔ universal skill |
|
|
72
74
|
| **OpenClaw** | — | — | — | — | ✔ brainclaw skill |
|
|
73
75
|
|
|
74
76
|
**Legend:** ✔ = fully supported, ◐ = partial (static trigger, not dynamic injection), — = not available
|
|
@@ -85,11 +87,17 @@ That's why brainclaw activates **all available surfaces** by default during setu
|
|
|
85
87
|
|
|
86
88
|
The developer can dial back individual surfaces if needed, but the default is full integration because that's what works.
|
|
87
89
|
|
|
88
|
-
##
|
|
90
|
+
## Parallel and sequential collaboration
|
|
89
91
|
|
|
90
|
-
brainclaw's store mutations are serialized (MCP single-writer queue + file-based lock), so memory writes are safe even under contention.
|
|
92
|
+
brainclaw's store mutations are serialized (MCP single-writer queue + file-based lock), so memory writes are safe even under contention.
|
|
91
93
|
|
|
92
|
-
For
|
|
94
|
+
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.
|
|
95
|
+
|
|
96
|
+
For **sequential work** in the same project, let one agent claim at a time and rely on handoffs to keep continuity across sessions.
|
|
97
|
+
|
|
98
|
+
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.
|
|
99
|
+
|
|
100
|
+
See the README's "Current state" section for the full list of what works today and the residual sharp edges.
|
|
93
101
|
|
|
94
102
|
## Next reads
|
|
95
103
|
|
|
@@ -99,4 +107,11 @@ For now, brainclaw works best when one agent works at a time in a given checkout
|
|
|
99
107
|
- [cursor.md](cursor.md)
|
|
100
108
|
- [codex.md](codex.md)
|
|
101
109
|
- [copilot.md](copilot.md)
|
|
110
|
+
- [continue.md](continue.md)
|
|
111
|
+
- [roo.md](roo.md)
|
|
112
|
+
- [windsurf.md](windsurf.md)
|
|
113
|
+
- [cline.md](cline.md)
|
|
114
|
+
- [kilocode.md](kilocode.md)
|
|
115
|
+
- [mistral-vibe.md](mistral-vibe.md)
|
|
116
|
+
- [opencode.md](opencode.md)
|
|
102
117
|
- [openclaw.md](openclaw.md)
|