brainclaw 0.19.5 → 0.19.7
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/LICENSE +0 -0
- package/README.md +22 -20
- package/dist/cli.js +0 -0
- package/dist/commands/accept.js +102 -104
- package/dist/commands/adapter-openclaw-import.js +0 -0
- package/dist/commands/add-step.js +3 -5
- package/dist/commands/agent-board.js +0 -0
- package/dist/commands/audit.js +0 -0
- package/dist/commands/bootstrap.js +0 -0
- package/dist/commands/capability.js +3 -5
- package/dist/commands/changes.js +0 -0
- package/dist/commands/check-constraints.js +0 -0
- package/dist/commands/claim-resource.js +0 -0
- package/dist/commands/claim.js +14 -12
- package/dist/commands/complete-step.js +3 -5
- package/dist/commands/constraint.js +3 -5
- package/dist/commands/context-diff.js +0 -0
- package/dist/commands/context.js +0 -0
- package/dist/commands/decision.js +3 -6
- package/dist/commands/delete-plan.js +3 -5
- package/dist/commands/diff.js +0 -0
- package/dist/commands/doctor.js +0 -0
- package/dist/commands/enable-agent.js +0 -0
- package/dist/commands/env.js +0 -0
- package/dist/commands/estimation-report.js +0 -0
- package/dist/commands/explore.js +0 -0
- package/dist/commands/export.js +0 -0
- package/dist/commands/handoff.js +3 -5
- package/dist/commands/history.js +0 -0
- package/dist/commands/hooks.js +0 -0
- package/dist/commands/init.js +0 -0
- package/dist/commands/install-hooks.js +0 -0
- package/dist/commands/instruction.js +16 -9
- package/dist/commands/list-agents.js +0 -0
- package/dist/commands/list-claims.js +0 -0
- package/dist/commands/list-instructions.js +0 -0
- package/dist/commands/list-plans.js +0 -0
- package/dist/commands/mcp-worker.js +0 -0
- package/dist/commands/mcp.js +11 -21
- package/dist/commands/memory.js +4 -7
- package/dist/commands/metrics.js +0 -0
- package/dist/commands/plan-resource.js +0 -0
- package/dist/commands/plan.js +3 -5
- package/dist/commands/prune-candidates.js +0 -0
- package/dist/commands/prune.js +27 -25
- package/dist/commands/pull.js +0 -0
- package/dist/commands/push.js +0 -0
- package/dist/commands/rebuild.js +0 -0
- package/dist/commands/reflect-runtime-note.js +0 -0
- package/dist/commands/reflect.js +3 -5
- package/dist/commands/register-agent.js +0 -0
- package/dist/commands/reject.js +0 -0
- package/dist/commands/release-claim.js +23 -20
- package/dist/commands/release-claims.js +22 -21
- package/dist/commands/review.js +0 -0
- package/dist/commands/rollback.js +2 -2
- package/dist/commands/runtime-note.js +0 -0
- package/dist/commands/runtime-status.js +0 -0
- package/dist/commands/search.js +0 -0
- package/dist/commands/session-end.js +0 -0
- package/dist/commands/session-start.js +0 -0
- package/dist/commands/set-trust.js +0 -0
- package/dist/commands/setup.js +0 -0
- package/dist/commands/show-candidate.js +0 -0
- package/dist/commands/star-candidate.js +0 -0
- package/dist/commands/status.js +0 -0
- package/dist/commands/sync.js +0 -0
- package/dist/commands/tool.js +3 -5
- package/dist/commands/trap.js +3 -5
- package/dist/commands/update-handoff.js +3 -5
- package/dist/commands/update-plan.js +3 -5
- package/dist/commands/upgrade.js +2 -2
- package/dist/commands/use-candidate.js +0 -0
- package/dist/commands/version.js +0 -0
- package/dist/commands/watch.js +0 -0
- package/dist/commands/whoami.js +0 -0
- package/dist/core/agent-context.js +0 -0
- package/dist/core/agent-files.js +0 -0
- package/dist/core/agent-integrations.js +0 -0
- package/dist/core/agent-inventory.js +0 -0
- package/dist/core/agent-registry.js +0 -0
- package/dist/core/ai-agent-detection.js +0 -0
- package/dist/core/audit.js +25 -25
- package/dist/core/bootstrap.js +0 -0
- package/dist/core/brainclaw-version.js +0 -0
- package/dist/core/candidates.js +10 -6
- package/dist/core/circuit-breaker.js +0 -0
- package/dist/core/claims.js +10 -8
- package/dist/core/config.js +0 -0
- package/dist/core/context-diff.js +0 -0
- package/dist/core/context.js +0 -0
- package/dist/core/contradictions.js +0 -0
- package/dist/core/coordination.js +2 -2
- package/dist/core/cross-project.js +0 -0
- package/dist/core/duplicates.js +0 -0
- package/dist/core/event-log.js +0 -0
- package/dist/core/events.js +0 -0
- package/dist/core/execution-context.js +0 -0
- package/dist/core/freshness.js +0 -0
- package/dist/core/global-registry.js +0 -0
- package/dist/core/host.js +0 -0
- package/dist/core/identity.js +0 -0
- package/dist/core/ids.js +0 -0
- package/dist/core/input-validation.js +0 -0
- package/dist/core/instructions.js +4 -2
- package/dist/core/io.js +8 -0
- package/dist/core/json-store.js +0 -0
- package/dist/core/lifecycle.js +0 -0
- package/dist/core/lock.js +18 -2
- package/dist/core/logger.js +0 -0
- package/dist/core/machine-profile.js +0 -0
- package/dist/core/markdown.js +0 -0
- package/dist/core/memory-git.js +0 -0
- package/dist/core/migration.js +0 -0
- package/dist/core/project-registry.js +0 -0
- package/dist/core/reflection-safety.js +0 -0
- package/dist/core/repo-analysis.js +0 -0
- package/dist/core/reputation.js +0 -0
- package/dist/core/runtime.js +18 -14
- package/dist/core/schema.js +0 -0
- package/dist/core/search.js +0 -0
- package/dist/core/security.js +0 -0
- package/dist/core/setup-state.js +0 -0
- package/dist/core/state.js +21 -4
- package/dist/core/store-resolution.js +0 -0
- package/dist/core/sync-remote.js +0 -0
- package/dist/core/traps.js +0 -0
- package/docs/adapters/openclaw.md +43 -0
- package/docs/cli.md +1230 -0
- package/docs/concepts/coordination.md +52 -0
- package/docs/concepts/memory.md +87 -0
- package/docs/concepts/plans-and-claims.md +139 -0
- package/docs/concepts/runtime-notes.md +38 -0
- package/docs/concepts/workspace-bootstrapping.md +40 -0
- package/docs/context-format-changelog.md +35 -0
- package/docs/context-format.md +48 -0
- package/docs/integrations/agents.md +169 -0
- package/docs/integrations/claude-code.md +23 -0
- package/docs/integrations/codex.md +23 -0
- package/docs/integrations/copilot.md +21 -0
- package/docs/integrations/cursor.md +23 -0
- package/docs/integrations/mcp.md +51 -0
- package/docs/integrations/overview.md +61 -0
- package/docs/mcp-schema-changelog.md +108 -0
- package/docs/product/positioning.md +97 -0
- package/docs/quickstart.md +99 -0
- package/docs/reputation.md +52 -0
- package/docs/review.md +43 -0
- package/docs/security.md +53 -0
- package/docs/storage.md +81 -0
- package/package.json +7 -6
package/docs/cli.md
ADDED
|
@@ -0,0 +1,1230 @@
|
|
|
1
|
+
# CLI Reference
|
|
2
|
+
|
|
3
|
+
Commands grouped by purpose. All commands are available as `brainclaw` or its alias `bclaw`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Initialize and Inspect
|
|
8
|
+
|
|
9
|
+
### `brainclaw setup`
|
|
10
|
+
|
|
11
|
+
Global onboarding wizard — detects AI agents, installs global Brainclaw prerequisites, installs agent/MCP config, gitignores generated workspace-local integration files, and initialises multiple repositories in one pass. This is the required machine-level bootstrap before `brainclaw init`. It scans each root itself plus its direct child repositories, and ignores internal Brainclaw memory repos such as `.brainclaw/`.
|
|
12
|
+
|
|
13
|
+
| Option | Description |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `--roots <paths>` | Comma-separated root directories to scan for git repos (skips interactive prompt) |
|
|
16
|
+
| `--agents <agents>` | Agents to configure: `all`, `detected`, or comma-separated names (e.g. `claude-code,cursor`) |
|
|
17
|
+
| `--repos <mode>` | Repo selection: `all`, `current`, or comma-separated numbers (e.g. `1,3`) |
|
|
18
|
+
| `-y, --yes` | Accept all defaults non-interactively |
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
brainclaw setup # interactive wizard
|
|
22
|
+
brainclaw setup --yes # non-interactive, detected agent, current dir
|
|
23
|
+
brainclaw setup --roots ~/Projects --agents detected # scan ~/Projects, configure detected agent only
|
|
24
|
+
brainclaw setup --roots ~/Projects,~/work --agents all # all agents, multiple roots
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**MCP usage (agent-driven):** Use `bclaw_setup` with the resume pattern — call without `step` to start, then pass `step` + `choice` to advance through each stage (`project_roots` → `repo_selection` → `agent_selection`).
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### `brainclaw init`
|
|
32
|
+
|
|
33
|
+
Initialize workspace state for the current project root. Detects the AI agent environment and writes to its native instruction file. `brainclaw setup` must have been run first on this machine. Do not run `init` from inside `.brainclaw/`; that directory is Brainclaw's own memory store, not a project root.
|
|
34
|
+
|
|
35
|
+
| Option | Description |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `-y, --yes` | Non-interactive, accept all defaults |
|
|
38
|
+
| `--force` | Overwrite existing initialization |
|
|
39
|
+
| `--compact` | Generate a compact instruction file |
|
|
40
|
+
| `--topology <value>` | Storage topology (e.g. `sidecar` to store outside the repo) |
|
|
41
|
+
| `--project-mode <value>` | Project mode (e.g. `multi-project`) |
|
|
42
|
+
| `--project-strategy <value>` | Project strategy (e.g. `folder`) |
|
|
43
|
+
| `--no-analyze-repo` | Skip automatic repository analysis |
|
|
44
|
+
| `--scan` | Scan repository for existing conventions |
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
brainclaw init
|
|
48
|
+
brainclaw init -y
|
|
49
|
+
brainclaw init --force
|
|
50
|
+
brainclaw init --topology sidecar
|
|
51
|
+
brainclaw init --project-mode multi-project --project-strategy folder
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### `brainclaw status`
|
|
55
|
+
|
|
56
|
+
Show the current state of project memory.
|
|
57
|
+
|
|
58
|
+
| Option | Description |
|
|
59
|
+
|---|---|
|
|
60
|
+
| `--json` | Output as JSON |
|
|
61
|
+
| `--markdown` | Output as Markdown |
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
brainclaw status
|
|
65
|
+
brainclaw status --json
|
|
66
|
+
brainclaw status --markdown
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### `brainclaw doctor`
|
|
70
|
+
|
|
71
|
+
Run health checks on config, state, and generated views.
|
|
72
|
+
|
|
73
|
+
| Option | Description |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `--json` | Output as JSON |
|
|
76
|
+
| `--migration-check` | Check for pending migrations |
|
|
77
|
+
| `--fix-agent-ignore` | Add missing `.gitignore` entries for generated local Brainclaw agent files |
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
brainclaw doctor
|
|
81
|
+
brainclaw doctor --json
|
|
82
|
+
brainclaw doctor --migration-check
|
|
83
|
+
brainclaw doctor --fix-agent-ignore
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
When Brainclaw detects generated local agent files such as `.mcp.json` or `.claude/settings.local.json` inside a Git repo, `doctor` warns if they are not ignored or are still tracked. `--fix-agent-ignore` only updates `.gitignore`; if a file is already tracked you still need to untrack it with `git rm --cached <path>`.
|
|
87
|
+
|
|
88
|
+
### `brainclaw rebuild`
|
|
89
|
+
|
|
90
|
+
Regenerate `project.md` from canonical state. No options.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
brainclaw rebuild
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### `brainclaw bootstrap`
|
|
97
|
+
|
|
98
|
+
Bootstrap shared memory for a new agent or project context.
|
|
99
|
+
|
|
100
|
+
| Option | Description |
|
|
101
|
+
|---|---|
|
|
102
|
+
| `--for <agent>` | Target agent name |
|
|
103
|
+
| `--json` | Output as JSON |
|
|
104
|
+
| `--refresh` | Force refresh even if bootstrap data is recent |
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
brainclaw bootstrap --for copilot
|
|
108
|
+
brainclaw bootstrap --for claude --refresh --json
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### `brainclaw env`
|
|
112
|
+
|
|
113
|
+
Display environment and tooling detection information.
|
|
114
|
+
|
|
115
|
+
| Option | Description |
|
|
116
|
+
|---|---|
|
|
117
|
+
| `--json` | Output as JSON |
|
|
118
|
+
| `--agent-tooling` | Show detected agent tooling details |
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
brainclaw env
|
|
122
|
+
brainclaw env --json
|
|
123
|
+
brainclaw env --agent-tooling
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Memory Management
|
|
129
|
+
|
|
130
|
+
### `brainclaw memory create <type> <text>`
|
|
131
|
+
|
|
132
|
+
Create a canonical memory item. Supported types are `decision`, `constraint`, `trap`, and `handoff`.
|
|
133
|
+
|
|
134
|
+
| Option | Description |
|
|
135
|
+
|---|---|
|
|
136
|
+
| `--tag <tag>` | Tag for categorization (repeatable) |
|
|
137
|
+
| `--path <path>` | Scope to a file or folder path |
|
|
138
|
+
| `--author <name>` | Author name |
|
|
139
|
+
| `--outcome <outcome>` | Decision outcome: `approved`, `rejected`, `deferred`, `pending` |
|
|
140
|
+
| `--category <category>` | Constraint category: `architecture`, `performance`, `security`, `reliability`, `compatibility`, `process`, `other` |
|
|
141
|
+
| `--status <status>` | Trap status: `active`, `resolved`, `expired` |
|
|
142
|
+
| `--severity <severity>` | Trap severity: `low`, `medium`, `high` |
|
|
143
|
+
| `--visibility <visibility>` | Trap visibility: `shared`, `machine`, `private` |
|
|
144
|
+
| `--host <host>` | Optional host identifier override for machine/private traps |
|
|
145
|
+
| `--project <name>` | Optional project namespace |
|
|
146
|
+
| `--plan <id>` | Optional linked plan item ID |
|
|
147
|
+
| `--from <name>` | Required for `handoff` |
|
|
148
|
+
| `--to <name>` | Required for `handoff` |
|
|
149
|
+
| `--ttl <duration>` | Time-to-live for expiring traps |
|
|
150
|
+
| `--store <target>` | Store level: `local` (default), `repo`, `workspace`, `user` |
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
brainclaw memory create decision "OAuth goes through auth-gateway" --tag auth
|
|
154
|
+
brainclaw memory create decision "Use async/await instead of callbacks" --outcome approved --plan pln_001
|
|
155
|
+
brainclaw memory create constraint "Payments module frozen until 2026-04-01" --tag payments
|
|
156
|
+
brainclaw memory create trap "Checkout E2E tests are flaky on Windows" --severity high --tag tests
|
|
157
|
+
brainclaw memory create trap "Windows SSH is misconfigured" --status resolved --severity medium --tag windows
|
|
158
|
+
brainclaw memory create handoff "Validate new refund endpoint" --from backend --to qa --project payments
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### `brainclaw memory list`
|
|
162
|
+
|
|
163
|
+
List canonical memory items across decisions, constraints, traps, and handoffs.
|
|
164
|
+
|
|
165
|
+
| Option | Description |
|
|
166
|
+
|---|---|
|
|
167
|
+
| `--type <type>` | Filter by `decision`, `constraint`, `trap`, or `handoff` |
|
|
168
|
+
| `--json` | Output as JSON |
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
brainclaw memory list
|
|
172
|
+
brainclaw memory list --type constraint
|
|
173
|
+
brainclaw memory list --type handoff --json
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### `brainclaw memory update <id>`
|
|
177
|
+
|
|
178
|
+
Update an existing canonical memory item by `id` or short label.
|
|
179
|
+
|
|
180
|
+
| Option | Description |
|
|
181
|
+
|---|---|
|
|
182
|
+
| `--text <text>` | Replace the main text |
|
|
183
|
+
| `--tag <tag>` | Replace tags |
|
|
184
|
+
| `--path <path>` | Replace related paths |
|
|
185
|
+
| `--outcome <outcome>` | Decision outcome |
|
|
186
|
+
| `--category <category>` | Constraint category |
|
|
187
|
+
| `--status <status>` | Constraint, trap, or handoff status |
|
|
188
|
+
| `--severity <severity>` | Trap severity |
|
|
189
|
+
| `--project <name>` | Handoff project namespace |
|
|
190
|
+
| `--plan <id>` | Linked plan item ID |
|
|
191
|
+
| `--from <name>` | Handoff source |
|
|
192
|
+
| `--to <name>` | Handoff destination |
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
brainclaw memory update dec_001 --text "Use JWT everywhere" --outcome approved
|
|
196
|
+
brainclaw memory update cnd_001 --status resolved --category process
|
|
197
|
+
brainclaw memory update trp_001 --status resolved
|
|
198
|
+
brainclaw memory update hnd_001 --status accepted --to alice
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### `brainclaw memory delete <id>`
|
|
202
|
+
|
|
203
|
+
Delete a canonical memory item by `id` or short label.
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
brainclaw memory delete dec_001
|
|
207
|
+
brainclaw memory delete hnd_001
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Legacy aliases `decision`, `constraint`, `trap`, and `handoff` remain available for compatibility, but `brainclaw memory ...` is now the primary CLI surface.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Project Metadata
|
|
215
|
+
|
|
216
|
+
### `brainclaw capability add <name> <description>`
|
|
217
|
+
|
|
218
|
+
Register a project capability.
|
|
219
|
+
|
|
220
|
+
| Option | Description |
|
|
221
|
+
|---|---|
|
|
222
|
+
| `--tag <tag>` | Tag for categorization as category (repeatable) |
|
|
223
|
+
| `--author <name>` | Author name |
|
|
224
|
+
| `--store <target>` | Store level: `local` (default), `repo`, `workspace`, `user` |
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
brainclaw capability add "API Rate Limiting" "Manages request rate limiting for external APIs" --tag architecture
|
|
228
|
+
brainclaw capability add "Database Migrations" "Handles schema migrations safely" --tag reliability
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### `brainclaw capability list`
|
|
232
|
+
|
|
233
|
+
List all registered project capabilities.
|
|
234
|
+
|
|
235
|
+
### `brainclaw capability describe <id>`
|
|
236
|
+
|
|
237
|
+
Show full details of a capability.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
### `brainclaw tool add <name> <description>`
|
|
242
|
+
|
|
243
|
+
Register a project tool.
|
|
244
|
+
|
|
245
|
+
| Option | Description |
|
|
246
|
+
|---|---|
|
|
247
|
+
| `--type <type>` | Tool type: `workflow`, `validator`, `generator`, `utility`, `explorer` |
|
|
248
|
+
| `--tag <tag>` | Tag for categorization (repeatable) |
|
|
249
|
+
| `--author <name>` | Author name |
|
|
250
|
+
| `--store <target>` | Store level: `local` (default), `repo`, `workspace`, `user` |
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
brainclaw tool add "npm-test" "Runs npm test suite" --type validator
|
|
254
|
+
brainclaw tool add "docker-build" "Builds Docker image" --type generator --tag containers
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### `brainclaw tool list`
|
|
258
|
+
|
|
259
|
+
List all registered project tools.
|
|
260
|
+
|
|
261
|
+
### `brainclaw tool describe <id>`
|
|
262
|
+
|
|
263
|
+
Show full details of a tool.
|
|
264
|
+
|
|
265
|
+
### `brainclaw tool search <query>`
|
|
266
|
+
|
|
267
|
+
Search tools by name, description, or tags.
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
brainclaw tool search "docker"
|
|
271
|
+
brainclaw tool search "test" --type validator
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
### `brainclaw explore`
|
|
277
|
+
|
|
278
|
+
Browse all registered project capabilities and tools in a unified view.
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
brainclaw explore
|
|
282
|
+
brainclaw explore --query "validation"
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Legacy memory aliases
|
|
286
|
+
|
|
287
|
+
The legacy top-level commands `brainclaw decision`, `brainclaw constraint`, `brainclaw trap`, and `brainclaw handoff` are still available for compatibility. New scripts and docs should prefer `brainclaw memory create ...`.
|
|
288
|
+
|
|
289
|
+
### `brainclaw instruction <text>`
|
|
290
|
+
|
|
291
|
+
Create a layered shared instruction.
|
|
292
|
+
|
|
293
|
+
| Option | Description |
|
|
294
|
+
|---|---|
|
|
295
|
+
| `--layer <layer>` | Layer: `global`, `project`, or `agent` |
|
|
296
|
+
| `--project <name>` | Project scope |
|
|
297
|
+
| `--agent <name>` | Agent scope |
|
|
298
|
+
| `--tag <tag>` | Tag for categorization (repeatable) |
|
|
299
|
+
| `--author <name>` | Author name |
|
|
300
|
+
| `--supersedes <id>` | ID of the instruction this replaces |
|
|
301
|
+
| `--store <target>` | Store level: `local` (default), `repo`, `workspace`, `user` |
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
brainclaw instruction "Read project memory before edits"
|
|
305
|
+
brainclaw instruction "Use auth gateway conventions" --layer project --project auth
|
|
306
|
+
brainclaw instruction "Summarize blockers explicitly" --layer agent --agent openclaw
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### `brainclaw runtime-note <text>`
|
|
310
|
+
|
|
311
|
+
Record an operational observation during a session.
|
|
312
|
+
|
|
313
|
+
| Option | Description |
|
|
314
|
+
|---|---|
|
|
315
|
+
| `--agent <name>` | Authoring agent |
|
|
316
|
+
| `--project <name>` | Associated project |
|
|
317
|
+
| `--plan <id>` | Associated plan ID |
|
|
318
|
+
| `--visibility <scope>` | Visibility scope (e.g. `machine`) |
|
|
319
|
+
| `--host <name>` | Pin to a specific host |
|
|
320
|
+
| `--tag <tag>` | Tag for categorization (repeatable) |
|
|
321
|
+
| `--ttl <duration>` | Time-to-live (e.g. `7d`, `24h`) |
|
|
322
|
+
| `--auto-reflect` | Automatically promote to a review candidate |
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
brainclaw runtime-note "Started auth rollout" --agent copilot
|
|
326
|
+
brainclaw runtime-note "Node not on PATH on this host" --visibility machine
|
|
327
|
+
brainclaw runtime-note "Use auth gateway for new routes" --auto-reflect
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## Memory Review
|
|
333
|
+
|
|
334
|
+
### `brainclaw reflect [text]`
|
|
335
|
+
|
|
336
|
+
Promote a memory item or free-form text into a review candidate.
|
|
337
|
+
|
|
338
|
+
| Option | Description |
|
|
339
|
+
|---|---|
|
|
340
|
+
| `--type <type>` | Candidate type (e.g. `trap`, `decision`, `constraint`) |
|
|
341
|
+
| `--batch` | Process multiple items in batch mode |
|
|
342
|
+
| `--session <id>` | Restrict to a specific session |
|
|
343
|
+
| `--tag <tag>` | Tag for categorization (repeatable) |
|
|
344
|
+
| `--author <name>` | Author name |
|
|
345
|
+
| `--source <source>` | Source identifier |
|
|
346
|
+
| `--severity <level>` | Severity: `low`, `medium`, or `high` |
|
|
347
|
+
| `--from <date>` | Start date filter |
|
|
348
|
+
| `--to <date>` | End date filter |
|
|
349
|
+
| `--path <path>` | Scope to a file or folder path |
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
brainclaw reflect "Always validate TTL before use" --type trap --severity medium
|
|
353
|
+
brainclaw reflect --batch --session sess_42
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### `brainclaw reflect-runtime-note <id>`
|
|
357
|
+
|
|
358
|
+
Turn a runtime note into a shared review candidate.
|
|
359
|
+
|
|
360
|
+
| Option | Description |
|
|
361
|
+
|---|---|
|
|
362
|
+
| `--type <type>` | Override candidate type |
|
|
363
|
+
| `--host <name>` | Pin to a specific host |
|
|
364
|
+
| `--all-hosts` | Make visible on all hosts |
|
|
365
|
+
| `--suggest` | Show suggested type without writing |
|
|
366
|
+
| `--json` | Output as JSON |
|
|
367
|
+
| `--tag <tag>` | Tag for categorization (repeatable) |
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
brainclaw reflect-runtime-note rtn_001
|
|
371
|
+
brainclaw reflect-runtime-note rtn_001 --type trap --tag windows
|
|
372
|
+
brainclaw reflect-runtime-note rtn_001 --suggest
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### `brainclaw review`
|
|
376
|
+
|
|
377
|
+
Review pending candidates for promotion or rejection.
|
|
378
|
+
|
|
379
|
+
| Option | Description |
|
|
380
|
+
|---|---|
|
|
381
|
+
| `--json` | Output as JSON |
|
|
382
|
+
| `--type <type>` | Filter by candidate type |
|
|
383
|
+
| `--prioritized` | Sort by priority |
|
|
384
|
+
| `--only-overdue` | Show only overdue items |
|
|
385
|
+
| `--assignee <name>` | Filter by assignee |
|
|
386
|
+
| `--for-curator <name>` | Show items for a specific curator |
|
|
387
|
+
| `--take <n>` | Limit to N items |
|
|
388
|
+
| `--claim <name>` | Claim items for a curator |
|
|
389
|
+
| `--auto` | Auto-accept high-confidence candidates |
|
|
390
|
+
| `--auto-by <name>` | Set author for auto-accepted items |
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
brainclaw review --prioritized
|
|
394
|
+
brainclaw review --for-curator curator-a --take 10 --claim curator-a
|
|
395
|
+
brainclaw review --auto --auto-by curator-bot
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### `brainclaw show-candidate <id>`
|
|
399
|
+
|
|
400
|
+
Show details of a specific candidate.
|
|
401
|
+
|
|
402
|
+
| Option | Description |
|
|
403
|
+
|---|---|
|
|
404
|
+
| `--related` | Show related items |
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
brainclaw show-candidate cnd_001
|
|
408
|
+
brainclaw show-candidate cnd_001 --related
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### `brainclaw star-candidate <id>`
|
|
412
|
+
|
|
413
|
+
Star a candidate to mark it as noteworthy without accepting it yet.
|
|
414
|
+
|
|
415
|
+
| Option | Description |
|
|
416
|
+
|---|---|
|
|
417
|
+
| `--by <name>` | Name of the reviewer |
|
|
418
|
+
|
|
419
|
+
```bash
|
|
420
|
+
brainclaw star-candidate cnd_001 --by curator-a
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### `brainclaw use-candidate <id>`
|
|
424
|
+
|
|
425
|
+
Mark a candidate as used (applied in practice) without formally accepting it.
|
|
426
|
+
|
|
427
|
+
| Option | Description |
|
|
428
|
+
|---|---|
|
|
429
|
+
| `--by <name>` | Name of the reviewer |
|
|
430
|
+
| `--context <text>` | Context or note about how it was used |
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
brainclaw use-candidate cnd_001 --by copilot --context "Applied in auth refactor"
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
### `brainclaw accept <id>`
|
|
437
|
+
|
|
438
|
+
Accept a candidate and promote it to shared memory.
|
|
439
|
+
|
|
440
|
+
| Option | Description |
|
|
441
|
+
|---|---|
|
|
442
|
+
| `--by <name>` | Name of the accepting curator |
|
|
443
|
+
|
|
444
|
+
```bash
|
|
445
|
+
brainclaw accept cnd_001 --by curator-a
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
### `brainclaw reject <id>`
|
|
449
|
+
|
|
450
|
+
Reject a candidate.
|
|
451
|
+
|
|
452
|
+
| Option | Description |
|
|
453
|
+
|---|---|
|
|
454
|
+
| `--by <name>` | Name of the rejecting curator |
|
|
455
|
+
| `--reason <text>` | Reason for rejection |
|
|
456
|
+
|
|
457
|
+
```bash
|
|
458
|
+
brainclaw reject cnd_002 --by curator-a --reason "Too host-specific"
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### `brainclaw prune-candidates`
|
|
462
|
+
|
|
463
|
+
Remove old, stale candidates.
|
|
464
|
+
|
|
465
|
+
| Option | Description |
|
|
466
|
+
|---|---|
|
|
467
|
+
| `--days <n>` | Age threshold in days |
|
|
468
|
+
| `--dry-run` | Preview without deleting |
|
|
469
|
+
|
|
470
|
+
```bash
|
|
471
|
+
brainclaw prune-candidates --days 30
|
|
472
|
+
brainclaw prune-candidates --days 14 --dry-run
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
## Listing and Querying
|
|
478
|
+
|
|
479
|
+
### `brainclaw plan list`
|
|
480
|
+
|
|
481
|
+
List plan items.
|
|
482
|
+
|
|
483
|
+
| Option | Description |
|
|
484
|
+
|---|---|
|
|
485
|
+
| `--json` | Output as JSON |
|
|
486
|
+
| `--status <status>` | Filter by status |
|
|
487
|
+
| `--type <type>` | Filter by type: `feat`, `fix`, `chore`, `spike`, `doc` |
|
|
488
|
+
| `--assignee <name>` | Filter by assignee |
|
|
489
|
+
| `--project <name>` | Filter by project |
|
|
490
|
+
| `--all` | Include completed and dropped plans |
|
|
491
|
+
|
|
492
|
+
```bash
|
|
493
|
+
brainclaw plan list
|
|
494
|
+
brainclaw plan list --status blocked --project auth
|
|
495
|
+
brainclaw plan list --json --all
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
Legacy alias: `brainclaw list-plans`
|
|
499
|
+
|
|
500
|
+
### `brainclaw claim list`
|
|
501
|
+
|
|
502
|
+
List active claims. Displays the short `session_id` to distinguish concurrent agent instances.
|
|
503
|
+
|
|
504
|
+
| Option | Description |
|
|
505
|
+
|---|---|
|
|
506
|
+
| `--json` | Output as JSON |
|
|
507
|
+
| `--all` | Include released claims |
|
|
508
|
+
| `--project <name>` | Filter by project |
|
|
509
|
+
| `--plan <id>` | Filter by plan ID |
|
|
510
|
+
| `--agent <name>` | Filter by agent |
|
|
511
|
+
|
|
512
|
+
```bash
|
|
513
|
+
brainclaw claim list
|
|
514
|
+
brainclaw claim list --agent copilot --project auth
|
|
515
|
+
brainclaw claim list --all --json
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
Legacy alias: `brainclaw list-claims`
|
|
519
|
+
|
|
520
|
+
### `brainclaw list-agents`
|
|
521
|
+
|
|
522
|
+
List registered agent and human identities.
|
|
523
|
+
|
|
524
|
+
| Option | Description |
|
|
525
|
+
|---|---|
|
|
526
|
+
| `--json` | Output as JSON |
|
|
527
|
+
| `--with-reputation` | Include reputation scores |
|
|
528
|
+
|
|
529
|
+
```bash
|
|
530
|
+
brainclaw list-agents
|
|
531
|
+
brainclaw list-agents --json --with-reputation
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
### `brainclaw list-instructions`
|
|
535
|
+
|
|
536
|
+
List raw instruction entries or the resolved instruction stack.
|
|
537
|
+
|
|
538
|
+
| Option | Description |
|
|
539
|
+
|---|---|
|
|
540
|
+
| `--json` | Output as JSON |
|
|
541
|
+
| `--layer <layer>` | Filter by layer: `global`, `project`, or `agent` |
|
|
542
|
+
| `--project <name>` | Filter by project |
|
|
543
|
+
| `--agent <name>` | Filter by agent |
|
|
544
|
+
| `--active` | Show only active instructions |
|
|
545
|
+
| `--resolved` | Show the resolved stack for a given context |
|
|
546
|
+
| `--for <path>` | Resolve instructions for a specific file or path |
|
|
547
|
+
|
|
548
|
+
```bash
|
|
549
|
+
brainclaw list-instructions --active
|
|
550
|
+
brainclaw list-instructions --resolved --for auth/routes.ts --agent openclaw
|
|
551
|
+
brainclaw list-instructions --layer project --project auth
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
### `brainclaw search <query>`
|
|
555
|
+
|
|
556
|
+
Search across shared memory.
|
|
557
|
+
|
|
558
|
+
| Option | Description |
|
|
559
|
+
|---|---|
|
|
560
|
+
| `--section <name>` | Restrict search to a memory section |
|
|
561
|
+
| `--since <date>` | Filter by creation date |
|
|
562
|
+
| `--tag <tag>` | Filter by tag |
|
|
563
|
+
| `--pending` | Include pending/unreviewed items |
|
|
564
|
+
| `--max-results <n>` | Maximum number of results |
|
|
565
|
+
| `--json` | Output as JSON |
|
|
566
|
+
|
|
567
|
+
```bash
|
|
568
|
+
brainclaw search "auth gateway"
|
|
569
|
+
brainclaw search "flaky" --section traps --tag tests --max-results 10
|
|
570
|
+
brainclaw search "rollout" --since 2026-01-01 --json
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
## Planning and Coordination
|
|
576
|
+
|
|
577
|
+
### `brainclaw plan create <text>`
|
|
578
|
+
|
|
579
|
+
Create a shared work item.
|
|
580
|
+
|
|
581
|
+
| Option | Description |
|
|
582
|
+
|---|---|
|
|
583
|
+
| `--priority <level>` | Priority: `low`, `medium`, or `high` |
|
|
584
|
+
| `--assignee <name>` | Assign to an agent or person |
|
|
585
|
+
| `--project <name>` | Associated project |
|
|
586
|
+
| `--tag <tag>` | Tag for categorization (repeatable) |
|
|
587
|
+
| `--path <path>` | Scope to a file or folder path |
|
|
588
|
+
| `--depends-on <id>` | ID of a plan this depends on |
|
|
589
|
+
| `--author <name>` | Author name |
|
|
590
|
+
| `--estimate <minutes>` | Estimated effort in integer minutes (e.g. `--estimate 30`) |
|
|
591
|
+
| `--store <target>` | Store level: `local` (default), `repo`, `workspace`, `user` |
|
|
592
|
+
|
|
593
|
+
```bash
|
|
594
|
+
brainclaw plan create "Coordinate auth rollout" --priority high --assignee copilot
|
|
595
|
+
brainclaw plan create "Refactor payments module" --project payments --estimate 90 --author alice
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
Legacy compatibility: `brainclaw plan "Coordinate auth rollout"`
|
|
599
|
+
|
|
600
|
+
### `brainclaw add-step <planId> <text>`
|
|
601
|
+
|
|
602
|
+
Add a step to an existing plan.
|
|
603
|
+
|
|
604
|
+
| Option | Description |
|
|
605
|
+
|---|---|
|
|
606
|
+
| `--assign <name>` | Assign the step to an agent or person |
|
|
607
|
+
|
|
608
|
+
```bash
|
|
609
|
+
brainclaw add-step pln_001 "Write unit tests for new endpoint"
|
|
610
|
+
brainclaw add-step pln_001 "Deploy to staging" --assign devops-bot
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
### `brainclaw complete-step <planId> <stepId>`
|
|
614
|
+
|
|
615
|
+
Mark a step in a plan as completed. No options.
|
|
616
|
+
|
|
617
|
+
```bash
|
|
618
|
+
brainclaw complete-step pln_001 step_001
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
### `brainclaw plan update <id>`
|
|
622
|
+
|
|
623
|
+
Update plan status or ownership.
|
|
624
|
+
|
|
625
|
+
| Option | Description |
|
|
626
|
+
|---|---|
|
|
627
|
+
| `--status <status>` | Status: `todo`, `in_progress`, `blocked`, `done`, or `dropped` |
|
|
628
|
+
| `--assignee <name>` | Reassign the plan |
|
|
629
|
+
| `--project <name>` | Change associated project |
|
|
630
|
+
| `--priority <level>` | Change priority |
|
|
631
|
+
| `--actual-effort <effort>` | Record actual effort (e.g. `20min`, `1h30m`) |
|
|
632
|
+
|
|
633
|
+
```bash
|
|
634
|
+
brainclaw plan update pln_001 --status done
|
|
635
|
+
brainclaw plan update pln_001 --status in_progress --assignee alice --actual-effort 45
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
Legacy alias: `brainclaw update-plan <id>`
|
|
639
|
+
|
|
640
|
+
### `brainclaw plan delete <id>`
|
|
641
|
+
|
|
642
|
+
Delete a shared plan item by `id` or short label.
|
|
643
|
+
|
|
644
|
+
```bash
|
|
645
|
+
brainclaw plan delete pln_001
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
Legacy alias: `brainclaw delete-plan <id>`
|
|
649
|
+
|
|
650
|
+
### `brainclaw estimation-report`
|
|
651
|
+
|
|
652
|
+
Display an ASCII chart of estimated vs. actual effort ratios across plans.
|
|
653
|
+
|
|
654
|
+
| Option | Description |
|
|
655
|
+
|---|---|
|
|
656
|
+
| `--agent <name>` | Filter by agent |
|
|
657
|
+
| `--json` | Output as JSON |
|
|
658
|
+
|
|
659
|
+
```bash
|
|
660
|
+
brainclaw estimation-report
|
|
661
|
+
brainclaw estimation-report --agent copilot --json
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
### `brainclaw update-handoff <id>`
|
|
665
|
+
|
|
666
|
+
Update an existing handoff.
|
|
667
|
+
|
|
668
|
+
| Option | Description |
|
|
669
|
+
|---|---|
|
|
670
|
+
| `--status <status>` | New status |
|
|
671
|
+
| `--to <name>` | Change recipient |
|
|
672
|
+
|
|
673
|
+
```bash
|
|
674
|
+
brainclaw update-handoff hnd_001 --status done
|
|
675
|
+
brainclaw update-handoff hnd_001 --to alice
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
---
|
|
679
|
+
|
|
680
|
+
## Claims and Coordination
|
|
681
|
+
|
|
682
|
+
### `brainclaw claim create <description>`
|
|
683
|
+
|
|
684
|
+
Claim ownership over a file, folder, or scope.
|
|
685
|
+
|
|
686
|
+
| Option | Description |
|
|
687
|
+
|---|---|
|
|
688
|
+
| `--agent <name>` | Claiming agent |
|
|
689
|
+
| `--scope <path>` | File or folder being claimed |
|
|
690
|
+
| `--project <name>` | Associated project |
|
|
691
|
+
| `--plan <id>` | Associated plan ID |
|
|
692
|
+
| `--ttl <duration>` | Time-to-live for the claim |
|
|
693
|
+
| `--store <target>` | Store level: `local` (default), `repo`, `workspace` |
|
|
694
|
+
|
|
695
|
+
```bash
|
|
696
|
+
brainclaw claim create "Taking auth rollout" --agent copilot --scope src/auth/ --plan pln_001
|
|
697
|
+
brainclaw claim create "Editing payments module" --scope src/payments/ --ttl 2h
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
Legacy compatibility: `brainclaw claim "Taking auth rollout" --scope src/auth/`
|
|
701
|
+
|
|
702
|
+
### `brainclaw claim release <id>`
|
|
703
|
+
|
|
704
|
+
Release a claim and optionally advance the linked plan status.
|
|
705
|
+
|
|
706
|
+
| Option | Description |
|
|
707
|
+
|---|---|
|
|
708
|
+
| `--plan-status <status>` | Set the linked plan status on release |
|
|
709
|
+
|
|
710
|
+
```bash
|
|
711
|
+
brainclaw claim release clm_001
|
|
712
|
+
brainclaw claim release clm_001 --plan-status done
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
Legacy alias: `brainclaw release-claim <id>`
|
|
716
|
+
|
|
717
|
+
### `brainclaw release-claims`
|
|
718
|
+
|
|
719
|
+
Release multiple claims derived from a Git diff.
|
|
720
|
+
|
|
721
|
+
| Option | Description |
|
|
722
|
+
|---|---|
|
|
723
|
+
| `--from-git-diff` | Derive scopes from a Git diff |
|
|
724
|
+
| `--ref1 <ref>` | First Git ref for the diff |
|
|
725
|
+
| `--ref2 <ref>` | Second Git ref for the diff |
|
|
726
|
+
|
|
727
|
+
```bash
|
|
728
|
+
brainclaw release-claims --from-git-diff --ref1 main --ref2 HEAD
|
|
729
|
+
```
|
|
730
|
+
|
|
731
|
+
### `brainclaw agent-board`
|
|
732
|
+
|
|
733
|
+
Display a coordination snapshot showing agent activity and file ownership.
|
|
734
|
+
|
|
735
|
+
| Option | Description |
|
|
736
|
+
|---|---|
|
|
737
|
+
| `--agent <name>` | Focus on a specific agent |
|
|
738
|
+
| `--project <name>` | Filter by project |
|
|
739
|
+
| `--for <path>` | Show board for a specific file or path |
|
|
740
|
+
| `--host <name>` | Filter by host |
|
|
741
|
+
| `--all-hosts` | Show data across all hosts |
|
|
742
|
+
| `--json` | Output as JSON |
|
|
743
|
+
| `--with-reputation` | Include reputation scores |
|
|
744
|
+
| `--capabilities` | Show agent capabilities |
|
|
745
|
+
| `--suggest` | Suggest the best agent for unclaimed work |
|
|
746
|
+
|
|
747
|
+
```bash
|
|
748
|
+
brainclaw agent-board --agent copilot --project auth
|
|
749
|
+
brainclaw agent-board --for src/auth/routes.ts --json
|
|
750
|
+
brainclaw agent-board --suggest --capabilities
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
---
|
|
754
|
+
|
|
755
|
+
## Context and Agents
|
|
756
|
+
|
|
757
|
+
### `brainclaw context`
|
|
758
|
+
|
|
759
|
+
Generate compact, prompt-ready context for agents.
|
|
760
|
+
|
|
761
|
+
| Option | Description |
|
|
762
|
+
|---|---|
|
|
763
|
+
| `--for <path>` | Scope context to a file or path |
|
|
764
|
+
| `--project <name>` | Filter by project |
|
|
765
|
+
| `--agent <name>` | Filter by agent |
|
|
766
|
+
| `--host <name>` | Filter by host |
|
|
767
|
+
| `--all-hosts` | Include items from all hosts |
|
|
768
|
+
| `--profile <name>` | Use a named context profile |
|
|
769
|
+
| `--include-pending` | Include unreviewed candidates |
|
|
770
|
+
| `--max-items <n>` | Maximum number of items to include |
|
|
771
|
+
| `--max-chars <n>` | Maximum total characters |
|
|
772
|
+
| `--digest` | Output a condensed digest |
|
|
773
|
+
| `--since-session` | Only include items since the last session start |
|
|
774
|
+
| `--no-bootstrap` | Skip bootstrap data |
|
|
775
|
+
| `--refresh-bootstrap` | Force refresh of bootstrap data |
|
|
776
|
+
| `--template <name>` | Use a named output template |
|
|
777
|
+
| `--compact-template` | Use the compact template variant |
|
|
778
|
+
| `--explain` | Show scoring and selection rationale |
|
|
779
|
+
| `--json` | Output as JSON |
|
|
780
|
+
|
|
781
|
+
```bash
|
|
782
|
+
brainclaw context --for src/auth/routes.ts --digest
|
|
783
|
+
brainclaw context --json --max-chars 1200
|
|
784
|
+
brainclaw context --explain
|
|
785
|
+
brainclaw context --since-session --max-items 20
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
### `brainclaw context-diff`
|
|
789
|
+
|
|
790
|
+
Show what has changed in shared memory since a reference point.
|
|
791
|
+
|
|
792
|
+
| Option | Description |
|
|
793
|
+
|---|---|
|
|
794
|
+
| `--since <date>` | Start date for the diff |
|
|
795
|
+
| `--session <id>` | Compare against a specific session start |
|
|
796
|
+
| `--json` | Output as JSON |
|
|
797
|
+
|
|
798
|
+
```bash
|
|
799
|
+
brainclaw context-diff --session sess_42
|
|
800
|
+
brainclaw context-diff --since 2026-03-10 --json
|
|
801
|
+
```
|
|
802
|
+
|
|
803
|
+
### `brainclaw register-agent <name>`
|
|
804
|
+
|
|
805
|
+
Register a durable human or agent identity.
|
|
806
|
+
|
|
807
|
+
| Option | Description |
|
|
808
|
+
|---|---|
|
|
809
|
+
| `--kind <kind>` | Identity kind (e.g. `agent`, `human`) |
|
|
810
|
+
| `--capability <cap>` | Add a capability (repeatable) |
|
|
811
|
+
| `--replace-capabilities` | Replace all existing capabilities |
|
|
812
|
+
| `--generate-fingerprint` | Generate a unique fingerprint |
|
|
813
|
+
| `--set-current` | Set as the current active agent |
|
|
814
|
+
| `--curator` | Mark as a memory curator |
|
|
815
|
+
| `--json` | Output as JSON |
|
|
816
|
+
|
|
817
|
+
```bash
|
|
818
|
+
brainclaw register-agent copilot --kind agent --set-current
|
|
819
|
+
brainclaw register-agent alice --kind human --curator
|
|
820
|
+
brainclaw register-agent my-bot --capability code-review --capability testing --generate-fingerprint
|
|
821
|
+
```
|
|
822
|
+
|
|
823
|
+
### `brainclaw enable-agent <name>`
|
|
824
|
+
|
|
825
|
+
Enable an existing agent and optionally update its capabilities.
|
|
826
|
+
Built-in integration names include `claude-code`, `cursor`, `windsurf`, `cline`, `codex`, `opencode`, `antigravity`, `continue`, `roo`, and `github-copilot`.
|
|
827
|
+
|
|
828
|
+
| Option | Description |
|
|
829
|
+
|---|---|
|
|
830
|
+
| `--kind <kind>` | Identity kind |
|
|
831
|
+
| `--capability <cap>` | Add a capability (repeatable) |
|
|
832
|
+
| `--generate-fingerprint` | Regenerate fingerprint |
|
|
833
|
+
| `--set-current` | Set as the current active agent |
|
|
834
|
+
| `--json` | Output as JSON |
|
|
835
|
+
|
|
836
|
+
```bash
|
|
837
|
+
brainclaw enable-agent github-copilot --set-current
|
|
838
|
+
brainclaw enable-agent opencode
|
|
839
|
+
brainclaw enable-agent antigravity
|
|
840
|
+
brainclaw enable-agent my-bot --capability refactor --json
|
|
841
|
+
```
|
|
842
|
+
|
|
843
|
+
### `brainclaw whoami`
|
|
844
|
+
|
|
845
|
+
Show the current agent identity.
|
|
846
|
+
|
|
847
|
+
| Option | Description |
|
|
848
|
+
|---|---|
|
|
849
|
+
| `--json` | Output as JSON |
|
|
850
|
+
|
|
851
|
+
```bash
|
|
852
|
+
brainclaw whoami
|
|
853
|
+
brainclaw whoami --json
|
|
854
|
+
```
|
|
855
|
+
|
|
856
|
+
### `brainclaw set-trust <agent>`
|
|
857
|
+
|
|
858
|
+
Set the trust level for an agent.
|
|
859
|
+
|
|
860
|
+
| Option | Description |
|
|
861
|
+
|---|---|
|
|
862
|
+
| `--level <level>` | Trust level |
|
|
863
|
+
| `--reset-breaker` | Reset the circuit breaker for this agent |
|
|
864
|
+
| `--json` | Output as JSON |
|
|
865
|
+
|
|
866
|
+
```bash
|
|
867
|
+
brainclaw set-trust copilot --level high
|
|
868
|
+
brainclaw set-trust flaky-bot --reset-breaker --json
|
|
869
|
+
```
|
|
870
|
+
|
|
871
|
+
---
|
|
872
|
+
|
|
873
|
+
## Sessions
|
|
874
|
+
|
|
875
|
+
### `brainclaw session-start`
|
|
876
|
+
|
|
877
|
+
Mark the start of an agent work session.
|
|
878
|
+
|
|
879
|
+
| Option | Description |
|
|
880
|
+
|---|---|
|
|
881
|
+
| `--agent <name>` | Agent starting the session |
|
|
882
|
+
| `--context <text>` | Context note for the session |
|
|
883
|
+
| `--model <id>` | AI model identifier (e.g. `claude-sonnet-4-6`) |
|
|
884
|
+
| `--json` | Output as JSON |
|
|
885
|
+
|
|
886
|
+
```bash
|
|
887
|
+
brainclaw session-start --agent copilot
|
|
888
|
+
brainclaw session-start --agent claude --model claude-sonnet-4-6 --json
|
|
889
|
+
```
|
|
890
|
+
|
|
891
|
+
At session start, Brainclaw also warns when generated local agent files in the current Git repo are missing from `.gitignore` or are still tracked. Use `brainclaw doctor --fix-agent-ignore` to repair missing ignore entries.
|
|
892
|
+
|
|
893
|
+
### `brainclaw session-end`
|
|
894
|
+
|
|
895
|
+
Mark the end of an agent work session.
|
|
896
|
+
|
|
897
|
+
| Option | Description |
|
|
898
|
+
|---|---|
|
|
899
|
+
| `--session <id>` | Session ID to close |
|
|
900
|
+
| `--agent <name>` | Agent ending the session |
|
|
901
|
+
| `--summary <text>` | Summary of work done |
|
|
902
|
+
| `--auto-reflect` | Automatically reflect runtime notes from the session |
|
|
903
|
+
| `--auto-release` | Automatically release all claims held during the session |
|
|
904
|
+
| `--reflect-handoff` | Reflect any open handoffs as candidates |
|
|
905
|
+
| `--json` | Output as JSON |
|
|
906
|
+
|
|
907
|
+
```bash
|
|
908
|
+
brainclaw session-end --auto-release
|
|
909
|
+
brainclaw session-end --session sess_42 --summary "Completed auth refactor" --auto-reflect --auto-release
|
|
910
|
+
```
|
|
911
|
+
|
|
912
|
+
---
|
|
913
|
+
|
|
914
|
+
## Export and Integrations
|
|
915
|
+
|
|
916
|
+
### `brainclaw export`
|
|
917
|
+
|
|
918
|
+
Export memory as a native agent instruction file.
|
|
919
|
+
|
|
920
|
+
| Option | Description |
|
|
921
|
+
|---|---|
|
|
922
|
+
| `--format <format>` | Target format: `copilot-instructions`, `cursor-rules`, `agents-md`, `claude-md`, `gemini-md`, `windsurf`, `cline`, `roo`, or `continue` |
|
|
923
|
+
| `--detect` | Auto-detect the running agent and write to its native file |
|
|
924
|
+
| `--write` | Write output to the native file path (instead of stdout); generated workspace files are treated as local and added to `.gitignore` |
|
|
925
|
+
| `--shared` | Keep the main exported instruction file versionable when used with `--write`; companion MCP/settings files stay local |
|
|
926
|
+
| `--output <path>` | Write to a custom output path |
|
|
927
|
+
| `--project <name>` | Filter by project |
|
|
928
|
+
| `--agent <name>` | Filter by agent |
|
|
929
|
+
|
|
930
|
+
```bash
|
|
931
|
+
brainclaw export --detect
|
|
932
|
+
brainclaw export --format copilot-instructions --write # .github/copilot-instructions.md
|
|
933
|
+
brainclaw export --format claude-md --write # CLAUDE.md
|
|
934
|
+
brainclaw export --format gemini-md --write # GEMINI.md
|
|
935
|
+
brainclaw export --format cursor-rules --write # .cursor/rules/brainclaw.md
|
|
936
|
+
brainclaw export --format windsurf --write # .windsurfrules
|
|
937
|
+
brainclaw export --format cline --write # .clinerules/brainclaw.md
|
|
938
|
+
brainclaw export --format agents-md --write # AGENTS.md (Codex, OpenCode)
|
|
939
|
+
brainclaw export --format roo --write # .roo/rules/brainclaw.md
|
|
940
|
+
brainclaw export --format continue --write # .continue/rules/brainclaw.md
|
|
941
|
+
brainclaw export --format claude-md --write --shared # publish CLAUDE.md intentionally
|
|
942
|
+
brainclaw export --format claude-md # stdout
|
|
943
|
+
```
|
|
944
|
+
|
|
945
|
+
`brainclaw export --write` is local-first by default: the generated workspace file and any companion MCP/settings files are added to `.gitignore`. Use `--shared` only when you intentionally want the main instruction file to be committed. `brainclaw export --detect` also writes companion MCP config where relevant, including `opencode.json` for OpenCode and `.gemini/antigravity/mcp_config.json` for Antigravity/Gemini when the local environment is available.
|
|
946
|
+
|
|
947
|
+
### `brainclaw adapter-openclaw-import [file]`
|
|
948
|
+
|
|
949
|
+
Import OpenClaw runtime events into reflective candidates.
|
|
950
|
+
|
|
951
|
+
| Option | Description |
|
|
952
|
+
|---|---|
|
|
953
|
+
| `--session <id>` | Restrict import to a specific session |
|
|
954
|
+
| `--dry-run` | Preview without writing |
|
|
955
|
+
| `--source <name>` | Override source identifier |
|
|
956
|
+
| `--author <name>` | Author name for imported items |
|
|
957
|
+
|
|
958
|
+
```bash
|
|
959
|
+
brainclaw adapter-openclaw-import ./openclaw-events.json --dry-run
|
|
960
|
+
brainclaw adapter-openclaw-import --session sess_42
|
|
961
|
+
```
|
|
962
|
+
|
|
963
|
+
See [adapters/openclaw.md](adapters/openclaw.md).
|
|
964
|
+
|
|
965
|
+
---
|
|
966
|
+
|
|
967
|
+
## Hooks and Git
|
|
968
|
+
|
|
969
|
+
### `brainclaw install-hooks`
|
|
970
|
+
|
|
971
|
+
Install Git hooks for constraint checking.
|
|
972
|
+
|
|
973
|
+
| Option | Description |
|
|
974
|
+
|---|---|
|
|
975
|
+
| `--force` | Overwrite existing hooks |
|
|
976
|
+
|
|
977
|
+
```bash
|
|
978
|
+
brainclaw install-hooks
|
|
979
|
+
brainclaw install-hooks --force
|
|
980
|
+
```
|
|
981
|
+
|
|
982
|
+
### `brainclaw hooks`
|
|
983
|
+
|
|
984
|
+
Show or manage installed hooks.
|
|
985
|
+
|
|
986
|
+
| Option | Description |
|
|
987
|
+
|---|---|
|
|
988
|
+
| `--target <path>` | Target directory for hooks |
|
|
989
|
+
|
|
990
|
+
```bash
|
|
991
|
+
brainclaw hooks
|
|
992
|
+
brainclaw hooks --target .git/hooks
|
|
993
|
+
```
|
|
994
|
+
|
|
995
|
+
### `brainclaw diff`
|
|
996
|
+
|
|
997
|
+
Show a diff of memory changes.
|
|
998
|
+
|
|
999
|
+
| Option | Description |
|
|
1000
|
+
|---|---|
|
|
1001
|
+
| `--since <date>` | Start date for the diff |
|
|
1002
|
+
| `--json` | Output as JSON |
|
|
1003
|
+
|
|
1004
|
+
```bash
|
|
1005
|
+
brainclaw diff --since 2026-03-01
|
|
1006
|
+
brainclaw diff --json
|
|
1007
|
+
```
|
|
1008
|
+
|
|
1009
|
+
### `brainclaw check-constraints`
|
|
1010
|
+
|
|
1011
|
+
Check active constraints against staged or specified files.
|
|
1012
|
+
|
|
1013
|
+
| Option | Description |
|
|
1014
|
+
|---|---|
|
|
1015
|
+
| `--staged` | Check files currently staged in Git |
|
|
1016
|
+
| `--files <paths>` | Comma-separated list of files to check |
|
|
1017
|
+
| `--json` | Output as JSON |
|
|
1018
|
+
|
|
1019
|
+
```bash
|
|
1020
|
+
brainclaw check-constraints --staged
|
|
1021
|
+
brainclaw check-constraints --files src/payments/index.ts --json
|
|
1022
|
+
```
|
|
1023
|
+
|
|
1024
|
+
---
|
|
1025
|
+
|
|
1026
|
+
## Sync and Distribution
|
|
1027
|
+
|
|
1028
|
+
### `brainclaw sync`
|
|
1029
|
+
|
|
1030
|
+
Summarize memory state and optionally create local Git commits.
|
|
1031
|
+
|
|
1032
|
+
| Option | Description |
|
|
1033
|
+
|---|---|
|
|
1034
|
+
| `--commit` | Create a Git commit |
|
|
1035
|
+
| `--message <text>` | Commit message |
|
|
1036
|
+
| `--summary-only` | Print summary without writing |
|
|
1037
|
+
| `--scope <path>` | Limit sync to a path |
|
|
1038
|
+
| `--include-machine-runtime` | Include machine-local runtime notes |
|
|
1039
|
+
| `--remote <name>` | Remote name for push |
|
|
1040
|
+
|
|
1041
|
+
```bash
|
|
1042
|
+
brainclaw sync --commit --message "chore: sync memory"
|
|
1043
|
+
brainclaw sync --summary-only
|
|
1044
|
+
brainclaw sync --commit --include-machine-runtime --remote origin
|
|
1045
|
+
```
|
|
1046
|
+
|
|
1047
|
+
### `brainclaw pull`
|
|
1048
|
+
|
|
1049
|
+
Pull shared memory from a remote.
|
|
1050
|
+
|
|
1051
|
+
| Option | Description |
|
|
1052
|
+
|---|---|
|
|
1053
|
+
| `--remote <name>` | Remote name |
|
|
1054
|
+
| `--json` | Output as JSON |
|
|
1055
|
+
|
|
1056
|
+
```bash
|
|
1057
|
+
brainclaw pull
|
|
1058
|
+
brainclaw pull --remote origin --json
|
|
1059
|
+
```
|
|
1060
|
+
|
|
1061
|
+
### `brainclaw push`
|
|
1062
|
+
|
|
1063
|
+
Push shared memory to a remote.
|
|
1064
|
+
|
|
1065
|
+
| Option | Description |
|
|
1066
|
+
|---|---|
|
|
1067
|
+
| `--remote <name>` | Remote name |
|
|
1068
|
+
| `--message <text>` | Commit message for the push |
|
|
1069
|
+
| `--json` | Output as JSON |
|
|
1070
|
+
|
|
1071
|
+
```bash
|
|
1072
|
+
brainclaw push --remote origin
|
|
1073
|
+
brainclaw push --remote origin --message "chore: push memory state" --json
|
|
1074
|
+
```
|
|
1075
|
+
|
|
1076
|
+
---
|
|
1077
|
+
|
|
1078
|
+
## Monitoring and Maintenance
|
|
1079
|
+
|
|
1080
|
+
### `brainclaw watch`
|
|
1081
|
+
|
|
1082
|
+
Watch for memory changes in real time.
|
|
1083
|
+
|
|
1084
|
+
| Option | Description |
|
|
1085
|
+
|---|---|
|
|
1086
|
+
| `--interval <ms>` | Polling interval in milliseconds |
|
|
1087
|
+
| `--auto-claim` | Automatically claim files touched by the agent |
|
|
1088
|
+
| `--agent <name>` | Agent name for auto-claim |
|
|
1089
|
+
|
|
1090
|
+
```bash
|
|
1091
|
+
brainclaw watch
|
|
1092
|
+
brainclaw watch --interval 5000 --auto-claim --agent copilot
|
|
1093
|
+
```
|
|
1094
|
+
|
|
1095
|
+
### `brainclaw metrics`
|
|
1096
|
+
|
|
1097
|
+
Show memory usage and activity metrics.
|
|
1098
|
+
|
|
1099
|
+
| Option | Description |
|
|
1100
|
+
|---|---|
|
|
1101
|
+
| `--json` | Output as JSON |
|
|
1102
|
+
| `--since <date>` | Start date for metrics |
|
|
1103
|
+
|
|
1104
|
+
```bash
|
|
1105
|
+
brainclaw metrics
|
|
1106
|
+
brainclaw metrics --since 2026-01-01 --json
|
|
1107
|
+
```
|
|
1108
|
+
|
|
1109
|
+
### `brainclaw prune`
|
|
1110
|
+
|
|
1111
|
+
Remove expired memory items.
|
|
1112
|
+
|
|
1113
|
+
| Option | Description |
|
|
1114
|
+
|---|---|
|
|
1115
|
+
| `--expired` | Prune only TTL-expired items |
|
|
1116
|
+
|
|
1117
|
+
```bash
|
|
1118
|
+
brainclaw prune --expired
|
|
1119
|
+
```
|
|
1120
|
+
|
|
1121
|
+
### `brainclaw rollback`
|
|
1122
|
+
|
|
1123
|
+
Roll back a memory item to a previous state.
|
|
1124
|
+
|
|
1125
|
+
| Option | Description |
|
|
1126
|
+
|---|---|
|
|
1127
|
+
| `--audit-id <id>` | Audit event ID to roll back to |
|
|
1128
|
+
| `--item-id <id>` | Specific item ID to roll back |
|
|
1129
|
+
| `--dry-run` | Preview without writing |
|
|
1130
|
+
| `--json` | Output as JSON |
|
|
1131
|
+
|
|
1132
|
+
```bash
|
|
1133
|
+
brainclaw rollback --item-id dec_001 --dry-run
|
|
1134
|
+
brainclaw rollback --audit-id aud_042 --json
|
|
1135
|
+
```
|
|
1136
|
+
|
|
1137
|
+
### `brainclaw audit`
|
|
1138
|
+
|
|
1139
|
+
Show the audit log of memory changes.
|
|
1140
|
+
|
|
1141
|
+
| Option | Description |
|
|
1142
|
+
|---|---|
|
|
1143
|
+
| `--since <date>` | Start date filter |
|
|
1144
|
+
| `--actor <name>` | Filter by actor |
|
|
1145
|
+
| `--action <type>` | Filter by action type |
|
|
1146
|
+
| `--limit <n>` | Maximum number of entries |
|
|
1147
|
+
| `--json` | Output as JSON |
|
|
1148
|
+
|
|
1149
|
+
```bash
|
|
1150
|
+
brainclaw audit --since 2026-03-01 --actor copilot
|
|
1151
|
+
brainclaw audit --action accept --limit 20 --json
|
|
1152
|
+
```
|
|
1153
|
+
|
|
1154
|
+
### `brainclaw history <id>`
|
|
1155
|
+
|
|
1156
|
+
Show the change history for a specific memory item. No options.
|
|
1157
|
+
|
|
1158
|
+
```bash
|
|
1159
|
+
brainclaw history dec_001
|
|
1160
|
+
brainclaw history cnd_042
|
|
1161
|
+
```
|
|
1162
|
+
|
|
1163
|
+
---
|
|
1164
|
+
|
|
1165
|
+
## Server and MCP
|
|
1166
|
+
|
|
1167
|
+
### `brainclaw mcp`
|
|
1168
|
+
|
|
1169
|
+
Start the MCP (Model Context Protocol) server over stdio. Used by AI agents that support MCP tooling. No options.
|
|
1170
|
+
|
|
1171
|
+
```bash
|
|
1172
|
+
brainclaw mcp
|
|
1173
|
+
```
|
|
1174
|
+
|
|
1175
|
+
#### Available MCP tools
|
|
1176
|
+
|
|
1177
|
+
**Read tools** (no trust requirement):
|
|
1178
|
+
|
|
1179
|
+
| Tool | Description |
|
|
1180
|
+
|---|---|
|
|
1181
|
+
| `bclaw_get_context` | Full workspace context (constraints, decisions, traps, plans, handoffs) |
|
|
1182
|
+
| `bclaw_bootstrap` | Derive brownfield bootstrap signals from repo docs and git history |
|
|
1183
|
+
| `bclaw_get_execution_context` | Inspect local execution environment and agent tooling signals |
|
|
1184
|
+
| `bclaw_read_handoff` | Read an open handoff ticket with git diff and state snapshot |
|
|
1185
|
+
| `bclaw_get_agent_board` | Live plan + claim board with active sessions |
|
|
1186
|
+
| `bclaw_search` | Full-text BM25 search across all memory items |
|
|
1187
|
+
| `bclaw_estimation_report` | Estimation accuracy report for completed plans |
|
|
1188
|
+
| `bclaw_list_plans` | List plan items with the same filters as `brainclaw plan list` |
|
|
1189
|
+
| `bclaw_list_claims` | List claims with the same filters as `brainclaw claim list` |
|
|
1190
|
+
| `bclaw_list_agents` | List registered agents, optionally with bounded reputation summaries |
|
|
1191
|
+
| `bclaw_list_instructions` | List raw or resolved shared instructions |
|
|
1192
|
+
| `bclaw_list_candidates` | List pending or archived review candidates |
|
|
1193
|
+
|
|
1194
|
+
**Write tools** (contributor trust or above):
|
|
1195
|
+
|
|
1196
|
+
| Tool | Description |
|
|
1197
|
+
|---|---|
|
|
1198
|
+
| `bclaw_write_note` | Add a runtime note (supports TTL and auto-reflect) |
|
|
1199
|
+
| `bclaw_create_candidate` | Create a memory candidate (decision, constraint, trap, handoff) |
|
|
1200
|
+
| `bclaw_accept` | Accept a pending candidate into canonical memory |
|
|
1201
|
+
| `bclaw_reject` | Reject a pending candidate |
|
|
1202
|
+
| `bclaw_claim` | Claim a work scope (advisory lock) |
|
|
1203
|
+
| `bclaw_release_claim` | Release a claim, optionally updating the linked plan status |
|
|
1204
|
+
| `bclaw_session_start` | Start an agent session and register identity |
|
|
1205
|
+
| `bclaw_session_end` | End session, optionally auto-reflect notes as candidates |
|
|
1206
|
+
| `bclaw_create_plan` | Create a new plan item |
|
|
1207
|
+
| `bclaw_update_plan` | Update plan status, actual effort, priority, or assignee |
|
|
1208
|
+
| `bclaw_add_step` | Add a sub-step to a plan item |
|
|
1209
|
+
| `bclaw_complete_step` | Mark a plan sub-step as done |
|
|
1210
|
+
|
|
1211
|
+
---
|
|
1212
|
+
|
|
1213
|
+
## Version Management
|
|
1214
|
+
|
|
1215
|
+
### `brainclaw version`
|
|
1216
|
+
|
|
1217
|
+
Show or manage the brainclaw version.
|
|
1218
|
+
|
|
1219
|
+
| Option | Description |
|
|
1220
|
+
|---|---|
|
|
1221
|
+
| `--check` | Check for a newer version |
|
|
1222
|
+
| `--publish-local` | Pack and publish locally (uses `npm pack`) |
|
|
1223
|
+
| `--release-notes <text>` | Release notes for `--publish-local` |
|
|
1224
|
+
| `--json` | Output as JSON |
|
|
1225
|
+
|
|
1226
|
+
```bash
|
|
1227
|
+
brainclaw version
|
|
1228
|
+
brainclaw version --check
|
|
1229
|
+
brainclaw version --publish-local --release-notes "Add estimation-report command"
|
|
1230
|
+
```
|