brainclaw 1.5.3 → 1.5.5
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 +21 -74
- package/README.md +62 -38
- package/dist/brainclaw-vscode.vsix +0 -0
- package/dist/cli.js +72 -6
- package/dist/commands/assignment-resource.js +182 -0
- package/dist/commands/init.js +158 -22
- package/dist/commands/mcp-read-handlers.js +8 -4
- package/dist/commands/mcp-schemas.generated.js +196 -1
- package/dist/commands/mcp.js +12 -5
- package/dist/commands/setup.js +87 -48
- package/dist/commands/switch.js +4 -0
- package/dist/core/agentruns.js +10 -0
- package/dist/core/assignments.js +29 -10
- package/dist/core/context.js +1 -1
- package/dist/core/coordination.js +1 -1
- package/dist/core/entity-operations.js +38 -1
- package/dist/core/entity-registry.js +11 -10
- package/dist/core/schema.js +3 -0
- package/dist/core/store-resolution.js +26 -16
- package/dist/facts.js +3 -3
- package/dist/facts.json +2 -2
- package/docs/cli.md +115 -30
- package/docs/integrations/agents.md +14 -14
- package/docs/integrations/codex.md +15 -12
- package/docs/integrations/mcp.md +10 -4
- package/docs/integrations/overview.md +12 -3
- package/docs/mcp-schema-changelog.md +1 -1
- package/docs/playbooks/productivity/index.md +3 -3
- package/docs/product/positioning.md +10 -10
- package/docs/quickstart-existing-project.md +48 -28
- package/docs/quickstart.md +42 -28
- package/package.json +2 -2
package/docs/cli.md
CHANGED
|
@@ -62,9 +62,9 @@ brainclaw --cwd /other/path status # one-off override without switching
|
|
|
62
62
|
|
|
63
63
|
## Initialize and Inspect
|
|
64
64
|
|
|
65
|
-
### `brainclaw setup`
|
|
66
|
-
|
|
67
|
-
Global onboarding wizard — detects AI agents, installs global Brainclaw prerequisites,
|
|
65
|
+
### `brainclaw setup`
|
|
66
|
+
|
|
67
|
+
Global onboarding wizard — bootstraps the machine, detects AI agents, installs global Brainclaw prerequisites, writes agent/MCP config, gitignores generated workspace-local integration files, and initialises multiple repositories in one pass. It scans each root itself plus its direct child repositories, and ignores internal Brainclaw memory repos such as `.brainclaw/`.
|
|
68
68
|
|
|
69
69
|
| Option | Description |
|
|
70
70
|
|---|---|
|
|
@@ -80,32 +80,57 @@ brainclaw setup --roots ~/Projects --agents detected # scan ~/Projects, confi
|
|
|
80
80
|
brainclaw setup --roots ~/Projects,~/work --agents all # all agents, multiple roots
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
**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`).
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
### `brainclaw
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
| Option | Description |
|
|
92
|
-
|---|---|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
**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`).
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### `brainclaw setup-machine`
|
|
88
|
+
|
|
89
|
+
Machine-only onboarding. Detects available agents, writes the machine-level MCP/user config Brainclaw manages, refreshes machine inventory, and stops there — no repository scan, no `.brainclaw/` init in the current working tree.
|
|
90
|
+
|
|
91
|
+
| Option | Description |
|
|
92
|
+
|---|---|
|
|
93
|
+
| `--agents <agents>` | Agents to configure: `all`, `detected`, or comma-separated names |
|
|
94
|
+
| `-y, --yes` | Accept all defaults non-interactively |
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
brainclaw setup-machine
|
|
98
|
+
brainclaw setup-machine --yes
|
|
99
|
+
brainclaw setup-machine --agents codex,cursor
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Use this when Brainclaw is new on the current machine and you want to make the MCP surface visible to your coding agent before touching any project. The usual follow-up is `brainclaw init` inside the project you want to create or refresh.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### `brainclaw init`
|
|
107
|
+
|
|
108
|
+
Create or refresh Brainclaw state for the current project root. Detects the AI agent environment, writes or refreshes its native instruction file, and installs a git post-merge hook for automatic claim release. `init` is now safe to rerun on an already initialized project: it preserves canonical memory and refreshes the managed Brainclaw and detected-agent files. Do not run `init` from inside `.brainclaw/`; that directory is Brainclaw's own memory store, not a project root.
|
|
109
|
+
|
|
110
|
+
| Option | Description |
|
|
111
|
+
|---|---|
|
|
112
|
+
| `-y, --yes` | Non-interactive, accept all defaults |
|
|
113
|
+
| `--force` | Rebuild managed initialization from Brainclaw defaults while preserving canonical memory data |
|
|
114
|
+
| `--compact` | Generate a compact instruction file |
|
|
115
|
+
| `--topology <value>` | Storage topology (e.g. `sidecar` to store outside the repo) |
|
|
116
|
+
| `--project-mode <value>` | Project mode (e.g. `multi-project`) |
|
|
98
117
|
| `--project-strategy <value>` | Project strategy (e.g. `folder`) |
|
|
99
118
|
| `--no-analyze-repo` | Skip automatic repository analysis |
|
|
100
119
|
| `--scan` | Scan repository for existing conventions |
|
|
101
120
|
|
|
102
121
|
```bash
|
|
103
|
-
brainclaw init
|
|
104
|
-
brainclaw init -y
|
|
105
|
-
brainclaw init --force
|
|
106
|
-
brainclaw init --topology sidecar
|
|
107
|
-
brainclaw init --project-mode multi-project --project-strategy folder
|
|
108
|
-
```
|
|
122
|
+
brainclaw init
|
|
123
|
+
brainclaw init -y
|
|
124
|
+
brainclaw init --force
|
|
125
|
+
brainclaw init --topology sidecar
|
|
126
|
+
brainclaw init --project-mode multi-project --project-strategy folder
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Common onboarding split:
|
|
130
|
+
|
|
131
|
+
- new machine → `brainclaw setup-machine --yes`
|
|
132
|
+
- current project (new or already using Brainclaw) → `brainclaw init`
|
|
133
|
+
- explicit second agent on an existing Brainclaw project → `brainclaw enable-agent <agent-name>`
|
|
109
134
|
|
|
110
135
|
### `brainclaw machine-profile`
|
|
111
136
|
|
|
@@ -758,9 +783,29 @@ brainclaw claim list --agent copilot --project auth
|
|
|
758
783
|
brainclaw claim list --all --json
|
|
759
784
|
```
|
|
760
785
|
|
|
761
|
-
Legacy alias: `brainclaw list-claims`
|
|
762
|
-
|
|
763
|
-
### `brainclaw list
|
|
786
|
+
Legacy alias: `brainclaw list-claims`
|
|
787
|
+
|
|
788
|
+
### `brainclaw assignment list`
|
|
789
|
+
|
|
790
|
+
List assignments. By default this shows only non-terminal assignments; use `--all` to include `completed`, `cancelled`, `expired`, and `rerouted`.
|
|
791
|
+
|
|
792
|
+
| Option | Description |
|
|
793
|
+
|---|---|
|
|
794
|
+
| `--json` | Output as JSON |
|
|
795
|
+
| `--all` | Include terminal assignments |
|
|
796
|
+
| `--status <status>` | Filter by assignment status |
|
|
797
|
+
| `--agent <name>` | Filter by agent |
|
|
798
|
+
| `--claim <id>` | Filter by claim ID |
|
|
799
|
+
| `--plan <id>` | Filter by plan ID |
|
|
800
|
+
| `--sequence <id>` | Filter by sequence ID |
|
|
801
|
+
|
|
802
|
+
```bash
|
|
803
|
+
brainclaw assignment list
|
|
804
|
+
brainclaw assignment list --status blocked
|
|
805
|
+
brainclaw assignment list --all --json
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
### `brainclaw list-agents`
|
|
764
809
|
|
|
765
810
|
List registered agent and human identities.
|
|
766
811
|
|
|
@@ -1113,9 +1158,49 @@ brainclaw claim release clm_001
|
|
|
1113
1158
|
brainclaw claim release clm_001 --plan-status done
|
|
1114
1159
|
```
|
|
1115
1160
|
|
|
1116
|
-
Legacy alias: `brainclaw release-claim <id>`
|
|
1117
|
-
|
|
1118
|
-
### `brainclaw
|
|
1161
|
+
Legacy alias: `brainclaw release-claim <id>`
|
|
1162
|
+
|
|
1163
|
+
### `brainclaw assignment get <id>`
|
|
1164
|
+
|
|
1165
|
+
Show one assignment with its lifecycle timestamps and links.
|
|
1166
|
+
|
|
1167
|
+
| Option | Description |
|
|
1168
|
+
|---|---|
|
|
1169
|
+
| `--json` | Output as JSON |
|
|
1170
|
+
|
|
1171
|
+
```bash
|
|
1172
|
+
brainclaw assignment get asgn_001
|
|
1173
|
+
brainclaw assignment get asgn_001 --json
|
|
1174
|
+
```
|
|
1175
|
+
|
|
1176
|
+
### `brainclaw assignment update <id>`
|
|
1177
|
+
|
|
1178
|
+
Advance an assignment to a supported lifecycle status through the canonical assignment FSM.
|
|
1179
|
+
|
|
1180
|
+
| Option | Description |
|
|
1181
|
+
|---|---|
|
|
1182
|
+
| `--status <status>` | Target assignment status |
|
|
1183
|
+
| `--reason <text>` | Optional status reason recorded on the assignment |
|
|
1184
|
+
|
|
1185
|
+
```bash
|
|
1186
|
+
brainclaw assignment update asgn_001 --status started
|
|
1187
|
+
brainclaw assignment update asgn_001 --status cancelled --reason "Supervisor aborted the lane"
|
|
1188
|
+
```
|
|
1189
|
+
|
|
1190
|
+
### `brainclaw assignment cancel <id>`
|
|
1191
|
+
|
|
1192
|
+
Supervisor/admin shortcut for `brainclaw assignment update <id> --status cancelled`.
|
|
1193
|
+
|
|
1194
|
+
| Option | Description |
|
|
1195
|
+
|---|---|
|
|
1196
|
+
| `--reason <text>` | Optional cancellation reason recorded on the assignment |
|
|
1197
|
+
|
|
1198
|
+
```bash
|
|
1199
|
+
brainclaw assignment cancel asgn_001
|
|
1200
|
+
brainclaw assignment cancel asgn_001 --reason "Superseded by reroute"
|
|
1201
|
+
```
|
|
1202
|
+
|
|
1203
|
+
### `brainclaw release-claims`
|
|
1119
1204
|
|
|
1120
1205
|
Release multiple claims derived from a Git diff.
|
|
1121
1206
|
|
|
@@ -62,20 +62,20 @@ Skill-based integration via `skills/<agent>/SKILL.md`:
|
|
|
62
62
|
|
|
63
63
|
## Setting up agent integration
|
|
64
64
|
|
|
65
|
-
### Automatic (recommended)
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
brainclaw setup
|
|
69
|
-
brainclaw init
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Or ask your coding agent to do it:
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
"
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
The agent can use `bclaw_setup` to walk through the process interactively.
|
|
65
|
+
### Automatic (recommended)
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
brainclaw setup-machine # machine-level: detects agents, creates global configs
|
|
69
|
+
brainclaw init # project-level: creates or refreshes .brainclaw/, writes agent files
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Or ask your coding agent to do it:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
"Inspect this package, explain what brainclaw does, then install it and initialize or join this project"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The agent can use `bclaw_setup` to walk through the process interactively.
|
|
79
79
|
|
|
80
80
|
### Per-agent manual setup
|
|
81
81
|
|
|
@@ -4,7 +4,14 @@ brainclaw integrates with OpenAI's Codex CLI through MCP tools and shared instru
|
|
|
4
4
|
|
|
5
5
|
## Auto-setup
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Codex setup is split across machine and project scope:
|
|
8
|
+
|
|
9
|
+
- `brainclaw setup-machine --agents codex --yes` writes the machine-level MCP config at `~/.codex/config.toml`
|
|
10
|
+
- `brainclaw init` creates or refreshes the current project's Brainclaw state and writes `AGENTS.md`
|
|
11
|
+
|
|
12
|
+
If the project already has `.brainclaw/`, rerunning `brainclaw init` is safe and refreshes the managed Brainclaw/Codex files for the current machine.
|
|
13
|
+
|
|
14
|
+
To regenerate project instructions manually:
|
|
8
15
|
|
|
9
16
|
```bash
|
|
10
17
|
brainclaw export --format agents-md --write
|
|
@@ -12,17 +19,13 @@ brainclaw export --format agents-md --write
|
|
|
12
19
|
|
|
13
20
|
## MCP configuration
|
|
14
21
|
|
|
15
|
-
Codex reads MCP servers from a machine-level config (`~/.codex/
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"args": ["-y", "brainclaw@latest", "mcp"]
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
22
|
+
Codex reads MCP servers from a machine-level config (`~/.codex/config.toml` on most installs). brainclaw is registered as:
|
|
23
|
+
|
|
24
|
+
```toml
|
|
25
|
+
[mcp_servers.brainclaw]
|
|
26
|
+
command = "npx"
|
|
27
|
+
args = ["-y", "brainclaw@latest", "mcp"]
|
|
28
|
+
startup_timeout_ms = 20000
|
|
26
29
|
```
|
|
27
30
|
|
|
28
31
|
Per-session MCP config can also be passed via `--additional-mcp-config @<file>` when invoking Codex.
|
package/docs/integrations/mcp.md
CHANGED
|
@@ -156,10 +156,16 @@ for the full 1.0.0 changelog.
|
|
|
156
156
|
| `bclaw_remove(entity, id, purge?)` | Archive (default) or hard-delete | `bclaw_delete_memory`, `bclaw_delete_plan` |
|
|
157
157
|
| `bclaw_transition(entity, id, to, reason?)` | State machine transition with side-effect tags | `bclaw_accept`, `bclaw_reject`, status-update flows |
|
|
158
158
|
|
|
159
|
-
Supported entities: plan, decision, constraint, trap, handoff,
|
|
160
|
-
runtime_note, candidate, claim, action, assignment, agent_run
|
|
161
|
-
(
|
|
162
|
-
|
|
159
|
+
Supported entities: plan, decision, constraint, trap, handoff,
|
|
160
|
+
runtime_note, candidate, claim, action, assignment, agent_run
|
|
161
|
+
(with assignment lifecycle now writable through `bclaw_transition` and
|
|
162
|
+
`bclaw_remove`; `agent_run` remains read-only). Declarative transition matrix +
|
|
163
|
+
updatable field list live in [src/core/entity-registry.ts](../../src/core/entity-registry.ts).
|
|
164
|
+
|
|
165
|
+
For assignments specifically:
|
|
166
|
+
- `bclaw_transition(entity="assignment", id=..., to="cancelled", reason=...)` is the canonical supervisor/admin cancel path.
|
|
167
|
+
- `bclaw_remove(entity="assignment", id=...)` archives by cancelling the assignment.
|
|
168
|
+
- `bclaw_remove(entity="assignment", id=..., purge=true)` hard-deletes the assignment record.
|
|
163
169
|
|
|
164
170
|
##### `bclaw_find` filter keys
|
|
165
171
|
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# Integration Overview
|
|
2
2
|
|
|
3
|
-
Brainclaw works alongside your existing coding agents. It does not replace them — it gives them a shared memory and coordination layer they can all read from and write to.
|
|
3
|
+
Brainclaw works alongside your existing coding agents. It does not replace them — it gives them a shared memory and coordination layer they can all read from and write to.
|
|
4
|
+
|
|
5
|
+
## Onboarding model
|
|
6
|
+
|
|
7
|
+
There are two separate setup scopes:
|
|
8
|
+
|
|
9
|
+
- **Machine scope** — `brainclaw setup-machine` (or the broader `brainclaw setup`) detects agents on this machine and writes the machine-level MCP/user config Brainclaw manages.
|
|
10
|
+
- **Project scope** — `brainclaw init` creates or refreshes `.brainclaw/` for the current repository and rewrites the managed project/agent files safely.
|
|
11
|
+
|
|
12
|
+
That split is deliberate. A fresh machine may need MCP registration before any repository is touched, while an existing project may already have `.brainclaw/` and only need a safe refresh for the arriving agent.
|
|
4
13
|
|
|
5
14
|
## How agents connect to brainclaw
|
|
6
15
|
|
|
@@ -43,11 +52,11 @@ The agent gets dynamic context injected at every prompt. The instruction file ca
|
|
|
43
52
|
|
|
44
53
|
**Today:** Claude Code
|
|
45
54
|
|
|
46
|
-
### Standard integration (MCP, no hooks)
|
|
55
|
+
### Standard integration (MCP, no hooks)
|
|
47
56
|
|
|
48
57
|
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
58
|
|
|
50
|
-
**Today:** Cursor, Windsurf, Cline, Roo, Continue, Kilocode, OpenCode, Codex, GitHub Copilot, Antigravity/Gemini CLI, Mistral Vibe
|
|
59
|
+
**Today:** Cursor, Windsurf, Cline, Roo, Continue, Kilocode, OpenCode, Codex, GitHub Copilot, Antigravity/Gemini CLI, Mistral Vibe
|
|
51
60
|
|
|
52
61
|
### Limited integration (no MCP)
|
|
53
62
|
|
|
@@ -82,7 +82,7 @@ will still succeed. A follow-up PR will strip the dead handler code.
|
|
|
82
82
|
changelog records the published MCP surface fingerprint. When a tool
|
|
83
83
|
name, tier, category, or input schema changes, the test fails until
|
|
84
84
|
this section is updated.
|
|
85
|
-
- MCP public surface fingerprint: `sha256:
|
|
85
|
+
- MCP public surface fingerprint: `sha256:724085642dc3e2d7`
|
|
86
86
|
|
|
87
87
|
See `docs/integrations/mcp.md` for the full canonical surface + an
|
|
88
88
|
example gallery per verb. See `docs/concepts/mcp-governance.md` for
|
|
@@ -89,9 +89,9 @@ Context profiles are hardcoded in `context.ts` with fixed section weights (plans
|
|
|
89
89
|
`rollback.ts` can revert a single item to its previous state via audit snapshots, but there is no batch undo ("undo all changes from session X"), no point-in-time restore, no "undo last 5 edits" convenience.
|
|
90
90
|
**Impact:** If an agent writes bad memory, cleanup is manual and item-by-item.
|
|
91
91
|
|
|
92
|
-
### No init repair path
|
|
93
|
-
If `brainclaw init` partially fails or produces a bad config, there is no `brainclaw repair`
|
|
94
|
-
**Impact:** Corrupted setups require manual intervention that non-tech creators cannot do.
|
|
92
|
+
### No init repair path
|
|
93
|
+
If `brainclaw init` partially fails or produces a bad config, there is still no focused `brainclaw repair-init` path. Re-running `brainclaw init` is now a safe upsert for existing projects, and `--force` rebuilds the managed setup from defaults while preserving canonical memory, but `bclaw_doctor` still auto-repairs very little.
|
|
94
|
+
**Impact:** Corrupted setups require manual intervention that non-tech creators cannot do.
|
|
95
95
|
|
|
96
96
|
### Cross-project learning is manual only
|
|
97
97
|
Projects are siloed. Federation exists (`federation-transport.ts`) but requires explicit config and manual push/pull. There is no auto-detection of common learnings across projects (e.g., "3 projects use React, here are shared patterns"). No cross-project search.
|
|
@@ -65,16 +65,16 @@ Local-first gives teams:
|
|
|
65
65
|
- Git history for shared project state
|
|
66
66
|
- compatibility with enterprise or offline environments
|
|
67
67
|
|
|
68
|
-
## License
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
The
|
|
73
|
-
|
|
74
|
-
- the local-first brainclaw core is
|
|
75
|
-
- remote shared-memory, hosted collaboration, advanced dashboards, and related private add-ons will stay separate commercial products
|
|
76
|
-
|
|
77
|
-
The
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
brainclaw core is published under the **MIT License**.
|
|
71
|
+
|
|
72
|
+
The product split is:
|
|
73
|
+
|
|
74
|
+
- the local-first brainclaw core is MIT
|
|
75
|
+
- remote shared-memory, hosted collaboration, advanced dashboards, and related private add-ons will stay separate commercial products
|
|
76
|
+
|
|
77
|
+
The MIT core covers the local coordination layer:
|
|
78
78
|
|
|
79
79
|
- local project memory
|
|
80
80
|
- local MCP and CLI workflows
|
|
@@ -6,13 +6,17 @@ If the repo is brand new and `.brainclaw/` is absent, see [quickstart.md](quicks
|
|
|
6
6
|
|
|
7
7
|
## When to use this page
|
|
8
8
|
|
|
9
|
-
| Situation | Use |
|
|
10
|
-
|---|---|
|
|
11
|
-
| Repo has no `.brainclaw/` | [quickstart.md](quickstart.md) (`brainclaw init`) |
|
|
12
|
-
| Repo has `.brainclaw/`, you've never worked here | **this page** (`brainclaw
|
|
13
|
-
| Repo has memory but it was scraped from docs/git, not curated | [bootstrap](concepts/workspace-bootstrapping.md) (`brainclaw bootstrap --apply`) |
|
|
14
|
-
|
|
15
|
-
The three commands target different lifecycle stages:
|
|
9
|
+
| Situation | Use |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Repo has no `.brainclaw/` | [quickstart.md](quickstart.md) (`brainclaw init`) |
|
|
12
|
+
| Repo has `.brainclaw/`, you've never worked here | **this page** (`brainclaw init` upsert + discovery) |
|
|
13
|
+
| Repo has memory but it was scraped from docs/git, not curated | [bootstrap](concepts/workspace-bootstrapping.md) (`brainclaw bootstrap --apply`) |
|
|
14
|
+
|
|
15
|
+
The three commands now target different lifecycle stages:
|
|
16
|
+
- `setup-machine` bootstraps the current machine
|
|
17
|
+
- `init` creates or refreshes project setup safely
|
|
18
|
+
- `bootstrap` extracts project context into memory
|
|
19
|
+
- `enable-agent` explicitly joins another agent to the same project
|
|
16
20
|
|
|
17
21
|
## Step 0 — verify your install is compatible
|
|
18
22
|
|
|
@@ -30,23 +34,39 @@ npm install -g brainclaw@latest
|
|
|
30
34
|
|
|
31
35
|
(or pull the team's local-pack tarball from `.releases/` if the project doesn't publish to npm.)
|
|
32
36
|
|
|
33
|
-
## Step 1 —
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
brainclaw
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
## Step 1 — bootstrap this machine if needed
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
brainclaw setup-machine --yes
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Run this once on a fresh machine so Brainclaw can configure the agents it detects before you touch any project-level state.
|
|
44
|
+
|
|
45
|
+
## Step 2 — refresh project setup for the current agent
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
brainclaw init
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
On a project that already has `.brainclaw/`, `brainclaw init` acts as a safe upsert. It preserves the existing memory and refreshes the managed Brainclaw and detected-agent files for the machine you're using now.
|
|
52
|
+
|
|
53
|
+
If you want the explicit path for a different or additional agent, run:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
brainclaw enable-agent <agent-name>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`<agent-name>` is one of `claude-code`, `codex`, `copilot`, `cursor`, `cline`, `windsurf`, `continue`, `kilocode`, `roo`, `opencode`, `antigravity`, etc. (see [docs/integrations/overview.md](integrations/overview.md) for the full list).
|
|
60
|
+
|
|
61
|
+
These commands:
|
|
62
|
+
- Detect the agent in your environment (env vars, installed CLIs, IDE)
|
|
63
|
+
- Writes the agent's native instruction file (`CLAUDE.md`, `.cursor/rules/`, `AGENTS.md`, etc.) from the project's current memory
|
|
64
|
+
- Wires the MCP server config so the agent can call brainclaw at runtime
|
|
65
|
+
- Adds the generated files to `.gitignore` (they're regenerated locally per developer)
|
|
66
|
+
|
|
67
|
+
If you use multiple agents on the same project, run `enable-agent` once per agent.
|
|
68
|
+
|
|
69
|
+
## Step 3 — read what already exists
|
|
50
70
|
|
|
51
71
|
Before touching code, load the project's accumulated knowledge so you don't re-discover what others already learned.
|
|
52
72
|
|
|
@@ -74,7 +94,7 @@ For a narrower view focused on the area you're about to touch:
|
|
|
74
94
|
bclaw_context(kind="memory", path="src/<area>/")
|
|
75
95
|
```
|
|
76
96
|
|
|
77
|
-
## Step
|
|
97
|
+
## Step 4 — discover in-flight work
|
|
78
98
|
|
|
79
99
|
Several things may be already underway when you arrive:
|
|
80
100
|
|
|
@@ -100,7 +120,7 @@ bclaw_context(kind="board")
|
|
|
100
120
|
|
|
101
121
|
The board surfaces all four (plans, claims, sequences, handoffs) in one structured response.
|
|
102
122
|
|
|
103
|
-
## Step
|
|
123
|
+
## Step 5 — pick what to work on
|
|
104
124
|
|
|
105
125
|
You have a few honest options:
|
|
106
126
|
|
|
@@ -110,7 +130,7 @@ You have a few honest options:
|
|
|
110
130
|
|
|
111
131
|
In all three cases, the workflow is then the same: `bclaw_work(intent="execute", scope=…, planId=…)` opens a session, claims the scope (with an isolated git worktree), and loads the relevant context.
|
|
112
132
|
|
|
113
|
-
## Step
|
|
133
|
+
## Step 6 — verify your setup is healthy before commiting changes
|
|
114
134
|
|
|
115
135
|
Once you've started working, sanity-check:
|
|
116
136
|
|
|
@@ -124,7 +144,7 @@ This runs a series of checks: state validity, MCP runtime health (post-pln#478),
|
|
|
124
144
|
|
|
125
145
|
- **Creating a new project** → [quickstart.md](quickstart.md)
|
|
126
146
|
- **Extracting context from an existing repo without `.brainclaw/`** → [bootstrap](concepts/workspace-bootstrapping.md)
|
|
127
|
-
- **Setting up brainclaw on your machine for the first time** → [docs/integrations/overview.md](integrations/overview.md) (the `brainclaw setup` flow)
|
|
147
|
+
- **Setting up brainclaw on your machine for the first time** → [docs/integrations/overview.md](integrations/overview.md) (`brainclaw setup-machine` or the broader `brainclaw setup` flow)
|
|
128
148
|
- **Recovering from a degraded state** → [docs/concepts/troubleshooting.md](concepts/troubleshooting.md)
|
|
129
149
|
|
|
130
150
|
## See also
|
package/docs/quickstart.md
CHANGED
|
@@ -6,32 +6,46 @@ Get brainclaw running in your project in under 5 minutes.
|
|
|
6
6
|
|
|
7
7
|
If you're about to cut a release that changes the CLI, MCP, or context surface, run the checklist in [release-maintenance.md](release-maintenance.md) before publishing a local pack or npm build.
|
|
8
8
|
|
|
9
|
-
## Step 1: Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install -g brainclaw
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Requires Node.js 20+. Verify with `brainclaw --version`.
|
|
16
|
-
|
|
17
|
-
## Step 2:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
9
|
+
## Step 1: Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g brainclaw
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires Node.js 20+. Verify with `brainclaw --version`.
|
|
16
|
+
|
|
17
|
+
## Step 2: Bootstrap this machine
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
brainclaw setup-machine --yes
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This configures the agents Brainclaw can see on the current machine and writes the machine-level MCP/user files it manages. It does **not** initialize the current repository yet.
|
|
24
|
+
|
|
25
|
+
## Step 3: Initialize or refresh your project
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
cd your-project
|
|
29
|
+
brainclaw init
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**What happens:**
|
|
33
|
+
- Creates `.brainclaw/` when the project is new, or refreshes it safely when it already exists
|
|
34
|
+
- Detects your coding agent (Claude Code, Codex, Cursor, Copilot, Cline, Mistral Vibe, etc.)
|
|
35
|
+
- Refreshes the detected agent's project and machine integration files when applicable
|
|
36
|
+
- Writes instruction files (`CLAUDE.md`, `AGENTS.md`, `.cursor/rules/brainclaw.md`, etc.)
|
|
37
|
+
- Installs session hooks (if supported by your agent)
|
|
38
|
+
- Adds `.brainclaw/` to `.gitignore`
|
|
39
|
+
|
|
40
|
+
If you want the explicit path for a second or late-arriving agent on an already initialized project, use:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
brainclaw enable-agent <agent-name>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If you have multiple repos, use `brainclaw setup --yes` instead — it bootstraps the machine, scans your project directories, and initializes everything at once.
|
|
47
|
+
|
|
48
|
+
## Step 4: Restart your agent
|
|
35
49
|
|
|
36
50
|
Your coding agent needs to reload to pick up the new MCP configuration.
|
|
37
51
|
|
|
@@ -44,7 +58,7 @@ Your coding agent needs to reload to pick up the new MCP configuration.
|
|
|
44
58
|
| **Windsurf** | Reload the editor |
|
|
45
59
|
| **Copilot** | Reload VS Code window (uses instruction file, not MCP) |
|
|
46
60
|
|
|
47
|
-
## Step
|
|
61
|
+
## Step 5: Verify it works
|
|
48
62
|
|
|
49
63
|
After reloading, tell your agent:
|
|
50
64
|
|
|
@@ -62,7 +76,7 @@ brainclaw agent-board # what each agent sees
|
|
|
62
76
|
brainclaw context # current project memory
|
|
63
77
|
```
|
|
64
78
|
|
|
65
|
-
## Step
|
|
79
|
+
## Step 6: Start using brainclaw
|
|
66
80
|
|
|
67
81
|
### For agents with MCP (most agents)
|
|
68
82
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brainclaw",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
4
4
|
"description": "Shared project memory for humans and coding agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"handoff",
|
|
53
53
|
"local-first"
|
|
54
54
|
],
|
|
55
|
-
"license": "
|
|
55
|
+
"license": "MIT",
|
|
56
56
|
"homepage": "https://brainclaw.dev",
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"commander": "^14.0.3",
|