brainclaw 1.9.0 → 1.10.0
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 +631 -499
- package/dist/brainclaw-vscode.vsix +0 -0
- package/dist/cli.js +18 -1
- package/dist/commands/code-map.js +129 -0
- package/dist/commands/codev.js +7 -0
- package/dist/commands/harvest.js +1 -1
- package/dist/commands/hooks.js +73 -73
- package/dist/commands/init.js +1 -1
- package/dist/commands/install-hooks.js +78 -78
- package/dist/commands/mcp-read-handlers.js +57 -14
- package/dist/commands/mcp.js +200 -13
- package/dist/commands/run-profile.js +3 -2
- package/dist/commands/switch.js +125 -93
- package/dist/commands/version.js +1 -1
- package/dist/core/agent-capability.js +19 -4
- package/dist/core/agent-files.js +131 -119
- package/dist/core/code-map/backend.js +123 -0
- package/dist/core/code-map/core.js +81 -0
- package/dist/core/code-map/drafts.js +2 -0
- package/dist/core/code-map/extractor.js +29 -0
- package/dist/core/code-map/finalizer.js +191 -0
- package/dist/core/code-map/freshness.js +108 -0
- package/dist/core/code-map/ids.js +0 -0
- package/dist/core/code-map/importable.js +35 -0
- package/dist/core/code-map/indexes.js +197 -0
- package/dist/core/code-map/lang/java/imports.scm +17 -0
- package/dist/core/code-map/lang/java/index.js +254 -0
- package/dist/core/code-map/lang/java/tags.scm +48 -0
- package/dist/core/code-map/lang/php/imports.scm +21 -0
- package/dist/core/code-map/lang/php/index.js +251 -0
- package/dist/core/code-map/lang/php/tags.scm +44 -0
- package/dist/core/code-map/lang/provider.js +9 -0
- package/dist/core/code-map/lang/providers.js +24 -0
- package/dist/core/code-map/lang/python/imports.scm +90 -0
- package/dist/core/code-map/lang/python/index.js +364 -0
- package/dist/core/code-map/lang/python/tags.scm +81 -0
- package/dist/core/code-map/lang/query-runtime.js +374 -0
- package/dist/core/code-map/lang/registry.js +125 -0
- package/dist/core/code-map/lang/typescript/imports.scm +90 -0
- package/dist/core/code-map/lang/typescript/index.js +306 -0
- package/dist/core/code-map/lang/typescript/tags.js.scm +106 -0
- package/dist/core/code-map/lang/typescript/tags.scm +151 -0
- package/dist/core/code-map/lock.js +210 -0
- package/dist/core/code-map/materialized.js +51 -0
- package/dist/core/code-map/memory-reader.js +59 -0
- package/dist/core/code-map/paths.js +53 -0
- package/dist/core/code-map/query.js +568 -0
- package/dist/core/code-map/refresh.js +0 -0
- package/dist/core/code-map/resolve.js +177 -0
- package/dist/core/code-map/store.js +206 -0
- package/dist/core/code-map/types.js +288 -0
- package/dist/core/code-map/vocabulary.js +57 -0
- package/dist/core/code-map/wasm-loader.js +294 -0
- package/dist/core/code-map/work-section.js +206 -0
- package/dist/core/codev-prompts.js +38 -38
- package/dist/core/codev-rounds.js +4 -0
- package/dist/core/default-profiles/doctor.yaml +11 -11
- package/dist/core/default-profiles/janitor.yaml +11 -11
- package/dist/core/default-profiles/onboarder.yaml +11 -11
- package/dist/core/default-profiles/reviewer.yaml +13 -13
- package/dist/core/dispatcher.js +1 -1
- package/dist/core/entity-operations.js +29 -3
- package/dist/core/execution-adapters.js +11 -10
- package/dist/core/execution-profile.js +58 -0
- package/dist/core/execution.js +1 -1
- package/dist/core/facade-schema.js +9 -0
- package/dist/core/instruction-templates.js +2 -0
- package/dist/core/loops/verbs.js +0 -1
- package/dist/core/mcp-command-resolution.js +3 -1
- package/dist/core/messaging.js +2 -2
- package/dist/core/protocol-skills.js +164 -164
- package/dist/core/runtime-signals.js +1 -1
- package/dist/core/search.js +19 -2
- package/dist/core/security-guard.js +207 -207
- package/dist/core/spawn-check.js +16 -2
- package/dist/core/staleness.js +1 -1
- package/dist/core/store-resolution.js +67 -11
- package/dist/core/worktree.js +18 -18
- package/dist/facts.js +9 -5
- package/dist/facts.json +8 -4
- package/dist/vendor/web-tree-sitter/tree-sitter.js +3980 -0
- package/dist/vendor/web-tree-sitter/tree-sitter.wasm +0 -0
- package/dist/wasm/tree-sitter-java.wasm +0 -0
- package/dist/wasm/tree-sitter-javascript.wasm +0 -0
- package/dist/wasm/tree-sitter-php.wasm +0 -0
- package/dist/wasm/tree-sitter-python.wasm +0 -0
- package/dist/wasm/tree-sitter-tsx.wasm +0 -0
- package/dist/wasm/tree-sitter-typescript.wasm +0 -0
- package/dist/wasm/tree-sitter.wasm +0 -0
- package/docs/PROTOCOL.md +1 -1
- package/docs/adapters/openclaw.md +43 -43
- package/docs/architecture/project-refs.md +328 -328
- package/docs/cli.md +2131 -2093
- package/docs/code-map.md +198 -0
- package/docs/concepts/coordination.md +52 -52
- package/docs/concepts/coordinator-runbook.md +129 -129
- package/docs/concepts/dispatch-lifecycle.md +245 -245
- package/docs/concepts/event-log-store.md +928 -928
- package/docs/concepts/ideation-loop.md +317 -317
- package/docs/concepts/loop-engine.md +520 -511
- package/docs/concepts/mcp-governance.md +268 -268
- package/docs/concepts/memory.md +84 -84
- package/docs/concepts/multi-agent-workflows.md +167 -167
- package/docs/concepts/observer-protocol.md +361 -361
- package/docs/concepts/plans-and-claims.md +217 -217
- package/docs/concepts/project-md-convention.md +35 -35
- package/docs/concepts/runtime-notes.md +38 -38
- package/docs/concepts/troubleshooting.md +254 -254
- package/docs/concepts/workspace-bootstrapping.md +142 -142
- package/docs/context-format-changelog.md +35 -35
- package/docs/context-format.md +48 -48
- package/docs/index.md +65 -65
- package/docs/integrations/agents.md +158 -158
- package/docs/integrations/claude-code.md +23 -23
- package/docs/integrations/cline.md +77 -77
- package/docs/integrations/continue.md +55 -55
- package/docs/integrations/copilot.md +68 -68
- package/docs/integrations/cursor.md +23 -23
- package/docs/integrations/kilocode.md +72 -72
- package/docs/integrations/mcp.md +385 -378
- package/docs/integrations/mistral-vibe.md +122 -122
- package/docs/integrations/openclaw.md +92 -92
- package/docs/integrations/opencode.md +84 -84
- package/docs/integrations/overview.md +115 -115
- package/docs/integrations/roo.md +71 -71
- package/docs/integrations/windsurf.md +77 -77
- package/docs/mcp-schema-changelog.md +364 -356
- package/docs/playbooks/integration/index.md +121 -121
- package/docs/playbooks/orchestration.md +37 -0
- package/docs/playbooks/productivity/index.md +99 -99
- package/docs/playbooks/team/index.md +117 -117
- package/docs/product/agent-first-model.md +184 -184
- package/docs/product/entity-model-audit.md +462 -462
- package/docs/product/positioning.md +86 -86
- package/docs/quickstart-existing-project.md +107 -107
- package/docs/quickstart.md +183 -183
- package/docs/release-maintenance.md +79 -79
- package/docs/reputation.md +52 -52
- package/docs/review.md +45 -45
- package/docs/security.md +212 -212
- package/docs/server-operations.md +118 -118
- package/docs/storage.md +106 -106
- package/package.json +86 -66
- package/docs/concepts/event-log-store-critique-A.md +0 -333
- package/docs/concepts/event-log-store-critique-B.md +0 -353
- package/docs/concepts/event-log-store-phase0-measurements.md +0 -58
- package/docs/concepts/event-log-store-proposal-A.md +0 -365
- package/docs/concepts/event-log-store-proposal-B.md +0 -404
- package/docs/concepts/identity-model-proposal.md +0 -371
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
# Workspace Bootstrapping
|
|
2
|
-
|
|
3
|
-
brainclaw is workspace-aware.
|
|
4
|
-
Shared memory is not assumed to exist everywhere by default.
|
|
5
|
-
|
|
6
|
-
## Why bootstrap exists
|
|
7
|
-
|
|
8
|
-
A workspace may be:
|
|
9
|
-
|
|
10
|
-
- already initialized
|
|
11
|
-
- known to the agent integration layer but not initialized locally
|
|
12
|
-
- entirely new
|
|
13
|
-
|
|
14
|
-
Bootstrap is the process that turns a workspace into a brainclaw-aware workspace.
|
|
15
|
-
|
|
16
|
-
## What bootstrap does
|
|
17
|
-
|
|
18
|
-
Bootstrap is more than creating a folder.
|
|
19
|
-
It establishes the first shared memory foundation for the workspace:
|
|
20
|
-
|
|
21
|
-
- inspects the repository structure
|
|
22
|
-
- detects the AI coding agent environment
|
|
23
|
-
- seeds stable workspace identity (`project_id`, `agent_id`)
|
|
24
|
-
- creates the initial storage structure
|
|
25
|
-
- writes to the detected agent's native instruction file (Cursor, Claude Code, Windsurf, etc.)
|
|
26
|
-
- creates `AGENTS.md` and `.github/copilot-instructions.md`
|
|
27
|
-
|
|
28
|
-
## Empty memory: one rule
|
|
29
|
-
|
|
30
|
-
"Bootstrap" historically named three different systems (init scaffolding, the
|
|
31
|
-
`bclaw_bootstrap` brownfield extractor, and the bootstrap ideation loop). When
|
|
32
|
-
the memory store is empty, every surface — the `bclaw_work` hint, the
|
|
33
|
-
`bclaw_setup` quick-init preview, and the `brainclaw init` preflight — now
|
|
34
|
-
emits the same decision rule (`resolveEmptyMemoryRecommendation`):
|
|
35
|
-
|
|
36
|
-
- **Repo with existing content** → run `bclaw_bootstrap` (CLI: `brainclaw bootstrap`)
|
|
37
|
-
to extract initial context from docs, manifests, native agent files, and git
|
|
38
|
-
history.
|
|
39
|
-
- **Greenfield repo** (nothing to extract) → open a bootstrap loop to ideate
|
|
40
|
-
the project vision: `bclaw_coordinate(intent='ideate', preset='bootstrap')`
|
|
41
|
-
(CLI: `brainclaw bootstrap-loop`).
|
|
42
|
-
|
|
43
|
-
The two routes are chainable in either order: extract first, then open a loop
|
|
44
|
-
for whatever vision the docs could not provide — or ideate first, then extract
|
|
45
|
-
once content exists. On greenfield, the brownfield preflight scan is skipped
|
|
46
|
-
entirely (there is nothing to harvest yet).
|
|
47
|
-
|
|
48
|
-
## Good integration pattern
|
|
49
|
-
|
|
50
|
-
1. check whether the workspace is initialized
|
|
51
|
-
2. if yes, retrieve fresh memory
|
|
52
|
-
3. if not, bootstrap when allowed
|
|
53
|
-
4. then use shared memory normally
|
|
54
|
-
|
|
55
|
-
## Why this matters for agents
|
|
56
|
-
|
|
57
|
-
If shared memory is absent, that should not always be interpreted as "there is no relevant context".
|
|
58
|
-
It may simply mean the workspace has not been onboarded yet.
|
|
59
|
-
|
|
60
|
-
This lets a single machine support multiple very different workspaces without forcing one static instruction layer to fit all of them equally well.
|
|
61
|
-
|
|
62
|
-
## init = single project entry point
|
|
63
|
-
|
|
64
|
-
`brainclaw init` is the single code path for turning a project into a
|
|
65
|
-
brainclaw-aware workspace, whether invoked from a terminal, from the
|
|
66
|
-
`bclaw_setup` MCP tool's quick-init step, or from a multi-repo
|
|
67
|
-
`brainclaw setup`. After detecting the local AI agent, init runs the
|
|
68
|
-
per-agent slice of the machine prerequisites (the same writes `setup`
|
|
69
|
-
performs at machine scope, scoped to the detected agent) so an agent
|
|
70
|
-
landing in the carte-blanche / fresh-repo case does not need a separate
|
|
71
|
-
shell-out + session reload. The slice is idempotent — each `ensure*`
|
|
72
|
-
function returns "skipped" when the agent's user-scope config doesn't
|
|
73
|
-
exist, and the writes are short-circuited in `BRAINCLAW_TEST_MODE` or
|
|
74
|
-
when `--skip-agent-bootstrap` is passed. `setup` is rescoped to
|
|
75
|
-
multi-repo / machine-bootstrap; `setup-machine` is the explicit
|
|
76
|
-
machine-only path.
|
|
77
|
-
|
|
78
|
-
### `init --force`
|
|
79
|
-
|
|
80
|
-
`--force` rebuilds managed identity fields (project_id, current_agent,
|
|
81
|
-
storage_dir, topology) but **merges through the existing config** so
|
|
82
|
-
curator personalisations (redaction patterns, sensitive paths,
|
|
83
|
-
governance overrides, claim TTL, cross-project links, custom markdown
|
|
84
|
-
caps) survive the reset. Before any write, a sibling backup is taken at
|
|
85
|
-
`.brainclaw.bak-<timestamp>/` — the standard recovery-backups pattern
|
|
86
|
-
used by `brainclaw upgrade`. Recovery: `brainclaw upgrade --rollback`.
|
|
87
|
-
|
|
88
|
-
## Solo-agent fresh defaults
|
|
89
|
-
|
|
90
|
-
A fresh `brainclaw init` seeds `governance.curators` with the human
|
|
91
|
-
running init. Without this, the default `approval_policy: 'review'`
|
|
92
|
-
combined with `curators: []` trapped every reflective note in pending
|
|
93
|
-
forever — a surprise that doesn't show up until enough memory has
|
|
94
|
-
accumulated to notice. The merge logic preserves any explicit curator
|
|
95
|
-
list on an existing store, so this only takes effect on fresh installs.
|
|
96
|
-
|
|
97
|
-
On an empty store, `bclaw_work` carries an explicit
|
|
98
|
-
`bclaw_create(entity='plan')` hint in `next_actions` alongside the
|
|
99
|
-
bootstrap recommendation: the bootstrap covers *vision*, the plan
|
|
100
|
-
affordance covers *work* itself. The two are independent — both can
|
|
101
|
-
appear simultaneously.
|
|
102
|
-
|
|
103
|
-
## Multi-project workspaces
|
|
104
|
-
|
|
105
|
-
A workspace may contain multiple brainclaw-initialized child projects (each with its own `.brainclaw/` store). In this topology:
|
|
106
|
-
|
|
107
|
-
- The workspace root holds shared instructions, constraints, and coordination state
|
|
108
|
-
- Each child project holds project-specific memory (decisions, traps, plans)
|
|
109
|
-
- The store chain walks upward: child → repo → workspace → user
|
|
110
|
-
|
|
111
|
-
### Working with child projects
|
|
112
|
-
|
|
113
|
-
Agents and operators can address child projects without `cd`:
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
brainclaw switch apps/lodestar # set active project
|
|
117
|
-
brainclaw plan list # now targets lodestar's store
|
|
118
|
-
brainclaw switch --clear # back to workspace root
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Or use environment variables:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
export BRAINCLAW_PROJECT=lodestar
|
|
125
|
-
brainclaw context # resolves lodestar's store
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Or one-off overrides:
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
brainclaw --cwd apps/lodestar plan list
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### Project discovery
|
|
135
|
-
|
|
136
|
-
`brainclaw switch --list` discovers child projects via:
|
|
137
|
-
|
|
138
|
-
1. Global project registry
|
|
139
|
-
2. Workspace config `projects.known`
|
|
140
|
-
3. Filesystem scan for subdirectories containing `.brainclaw/`
|
|
141
|
-
|
|
142
|
-
The bootstrap analysis (`analyzeRepository`) also detects brainclaw-native workspace complexity (child stores, folder strategy, known projects) alongside classic monorepo markers.
|
|
1
|
+
# Workspace Bootstrapping
|
|
2
|
+
|
|
3
|
+
brainclaw is workspace-aware.
|
|
4
|
+
Shared memory is not assumed to exist everywhere by default.
|
|
5
|
+
|
|
6
|
+
## Why bootstrap exists
|
|
7
|
+
|
|
8
|
+
A workspace may be:
|
|
9
|
+
|
|
10
|
+
- already initialized
|
|
11
|
+
- known to the agent integration layer but not initialized locally
|
|
12
|
+
- entirely new
|
|
13
|
+
|
|
14
|
+
Bootstrap is the process that turns a workspace into a brainclaw-aware workspace.
|
|
15
|
+
|
|
16
|
+
## What bootstrap does
|
|
17
|
+
|
|
18
|
+
Bootstrap is more than creating a folder.
|
|
19
|
+
It establishes the first shared memory foundation for the workspace:
|
|
20
|
+
|
|
21
|
+
- inspects the repository structure
|
|
22
|
+
- detects the AI coding agent environment
|
|
23
|
+
- seeds stable workspace identity (`project_id`, `agent_id`)
|
|
24
|
+
- creates the initial storage structure
|
|
25
|
+
- writes to the detected agent's native instruction file (Cursor, Claude Code, Windsurf, etc.)
|
|
26
|
+
- creates `AGENTS.md` and `.github/copilot-instructions.md`
|
|
27
|
+
|
|
28
|
+
## Empty memory: one rule
|
|
29
|
+
|
|
30
|
+
"Bootstrap" historically named three different systems (init scaffolding, the
|
|
31
|
+
`bclaw_bootstrap` brownfield extractor, and the bootstrap ideation loop). When
|
|
32
|
+
the memory store is empty, every surface — the `bclaw_work` hint, the
|
|
33
|
+
`bclaw_setup` quick-init preview, and the `brainclaw init` preflight — now
|
|
34
|
+
emits the same decision rule (`resolveEmptyMemoryRecommendation`):
|
|
35
|
+
|
|
36
|
+
- **Repo with existing content** → run `bclaw_bootstrap` (CLI: `brainclaw bootstrap`)
|
|
37
|
+
to extract initial context from docs, manifests, native agent files, and git
|
|
38
|
+
history.
|
|
39
|
+
- **Greenfield repo** (nothing to extract) → open a bootstrap loop to ideate
|
|
40
|
+
the project vision: `bclaw_coordinate(intent='ideate', preset='bootstrap')`
|
|
41
|
+
(CLI: `brainclaw bootstrap-loop`).
|
|
42
|
+
|
|
43
|
+
The two routes are chainable in either order: extract first, then open a loop
|
|
44
|
+
for whatever vision the docs could not provide — or ideate first, then extract
|
|
45
|
+
once content exists. On greenfield, the brownfield preflight scan is skipped
|
|
46
|
+
entirely (there is nothing to harvest yet).
|
|
47
|
+
|
|
48
|
+
## Good integration pattern
|
|
49
|
+
|
|
50
|
+
1. check whether the workspace is initialized
|
|
51
|
+
2. if yes, retrieve fresh memory
|
|
52
|
+
3. if not, bootstrap when allowed
|
|
53
|
+
4. then use shared memory normally
|
|
54
|
+
|
|
55
|
+
## Why this matters for agents
|
|
56
|
+
|
|
57
|
+
If shared memory is absent, that should not always be interpreted as "there is no relevant context".
|
|
58
|
+
It may simply mean the workspace has not been onboarded yet.
|
|
59
|
+
|
|
60
|
+
This lets a single machine support multiple very different workspaces without forcing one static instruction layer to fit all of them equally well.
|
|
61
|
+
|
|
62
|
+
## init = single project entry point
|
|
63
|
+
|
|
64
|
+
`brainclaw init` is the single code path for turning a project into a
|
|
65
|
+
brainclaw-aware workspace, whether invoked from a terminal, from the
|
|
66
|
+
`bclaw_setup` MCP tool's quick-init step, or from a multi-repo
|
|
67
|
+
`brainclaw setup`. After detecting the local AI agent, init runs the
|
|
68
|
+
per-agent slice of the machine prerequisites (the same writes `setup`
|
|
69
|
+
performs at machine scope, scoped to the detected agent) so an agent
|
|
70
|
+
landing in the carte-blanche / fresh-repo case does not need a separate
|
|
71
|
+
shell-out + session reload. The slice is idempotent — each `ensure*`
|
|
72
|
+
function returns "skipped" when the agent's user-scope config doesn't
|
|
73
|
+
exist, and the writes are short-circuited in `BRAINCLAW_TEST_MODE` or
|
|
74
|
+
when `--skip-agent-bootstrap` is passed. `setup` is rescoped to
|
|
75
|
+
multi-repo / machine-bootstrap; `setup-machine` is the explicit
|
|
76
|
+
machine-only path.
|
|
77
|
+
|
|
78
|
+
### `init --force`
|
|
79
|
+
|
|
80
|
+
`--force` rebuilds managed identity fields (project_id, current_agent,
|
|
81
|
+
storage_dir, topology) but **merges through the existing config** so
|
|
82
|
+
curator personalisations (redaction patterns, sensitive paths,
|
|
83
|
+
governance overrides, claim TTL, cross-project links, custom markdown
|
|
84
|
+
caps) survive the reset. Before any write, a sibling backup is taken at
|
|
85
|
+
`.brainclaw.bak-<timestamp>/` — the standard recovery-backups pattern
|
|
86
|
+
used by `brainclaw upgrade`. Recovery: `brainclaw upgrade --rollback`.
|
|
87
|
+
|
|
88
|
+
## Solo-agent fresh defaults
|
|
89
|
+
|
|
90
|
+
A fresh `brainclaw init` seeds `governance.curators` with the human
|
|
91
|
+
running init. Without this, the default `approval_policy: 'review'`
|
|
92
|
+
combined with `curators: []` trapped every reflective note in pending
|
|
93
|
+
forever — a surprise that doesn't show up until enough memory has
|
|
94
|
+
accumulated to notice. The merge logic preserves any explicit curator
|
|
95
|
+
list on an existing store, so this only takes effect on fresh installs.
|
|
96
|
+
|
|
97
|
+
On an empty store, `bclaw_work` carries an explicit
|
|
98
|
+
`bclaw_create(entity='plan')` hint in `next_actions` alongside the
|
|
99
|
+
bootstrap recommendation: the bootstrap covers *vision*, the plan
|
|
100
|
+
affordance covers *work* itself. The two are independent — both can
|
|
101
|
+
appear simultaneously.
|
|
102
|
+
|
|
103
|
+
## Multi-project workspaces
|
|
104
|
+
|
|
105
|
+
A workspace may contain multiple brainclaw-initialized child projects (each with its own `.brainclaw/` store). In this topology:
|
|
106
|
+
|
|
107
|
+
- The workspace root holds shared instructions, constraints, and coordination state
|
|
108
|
+
- Each child project holds project-specific memory (decisions, traps, plans)
|
|
109
|
+
- The store chain walks upward: child → repo → workspace → user
|
|
110
|
+
|
|
111
|
+
### Working with child projects
|
|
112
|
+
|
|
113
|
+
Agents and operators can address child projects without `cd`:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
brainclaw switch apps/lodestar # set active project
|
|
117
|
+
brainclaw plan list # now targets lodestar's store
|
|
118
|
+
brainclaw switch --clear # back to workspace root
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Or use environment variables:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
export BRAINCLAW_PROJECT=lodestar
|
|
125
|
+
brainclaw context # resolves lodestar's store
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Or one-off overrides:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
brainclaw --cwd apps/lodestar plan list
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Project discovery
|
|
135
|
+
|
|
136
|
+
`brainclaw switch --list` discovers child projects via:
|
|
137
|
+
|
|
138
|
+
1. Global project registry
|
|
139
|
+
2. Workspace config `projects.known`
|
|
140
|
+
3. Filesystem scan for subdirectories containing `.brainclaw/`
|
|
141
|
+
|
|
142
|
+
The bootstrap analysis (`analyzeRepository`) also detects brainclaw-native workspace complexity (child stores, folder strategy, known projects) alongside classic monorepo markers.
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# Context Format Changelog
|
|
2
|
-
|
|
3
|
-
## 1.3 (planned / not yet emitted as `context_schema`)
|
|
4
|
-
|
|
5
|
-
- Added `available_capabilities` field to structured context containing registered project capabilities with metadata (id, name, category)
|
|
6
|
-
- Added `available_tools` field to structured context containing registered project tools with metadata (id, name, type)
|
|
7
|
-
- Enhanced text output to include "Available Capabilities" and "Available Tools" sections when metadata is present
|
|
8
|
-
- Added discovery hints pointing users to `bclaw_get_capabilities`, `bclaw_list_tools`, and `bclaw_search_tools` MCP tools
|
|
9
|
-
- These fields are currently additive enrichments around the `1.2` contract; update `CONTEXT_SCHEMA_VERSION` before treating this section as the shipped schema version
|
|
10
|
-
|
|
11
|
-
## 1.2
|
|
12
|
-
|
|
13
|
-
- Added `context_diff` to expose compact memory deltas since a session started.
|
|
14
|
-
- Clarified the public contract for contradiction-aware session context refreshes.
|
|
15
|
-
- Kept the contract additive and backward-compatible with `1.1`.
|
|
16
|
-
|
|
17
|
-
## 1.1
|
|
18
|
-
|
|
19
|
-
- Added explicit `context_schema` rendering in markdown and template outputs.
|
|
20
|
-
- Added `agent_tooling.agents_rules`.
|
|
21
|
-
- Added skill metadata flags: `scripts_present`, `references_present`, `assets_present`.
|
|
22
|
-
- Added MCP inventory metadata: `availability`, `source`.
|
|
23
|
-
- Kept the contract additive and backward-compatible with `1.0`.
|
|
24
|
-
|
|
25
|
-
## 1.0
|
|
26
|
-
|
|
27
|
-
- Baseline contract introduced with:
|
|
28
|
-
- `digest`
|
|
29
|
-
- `memory_density`
|
|
30
|
-
- `bootstrap_available`
|
|
31
|
-
- `derived_signals`
|
|
32
|
-
- `execution_context`
|
|
33
|
-
- `agent_tooling`
|
|
34
|
-
- `scoped_activity`
|
|
35
|
-
- `selected`
|
|
1
|
+
# Context Format Changelog
|
|
2
|
+
|
|
3
|
+
## 1.3 (planned / not yet emitted as `context_schema`)
|
|
4
|
+
|
|
5
|
+
- Added `available_capabilities` field to structured context containing registered project capabilities with metadata (id, name, category)
|
|
6
|
+
- Added `available_tools` field to structured context containing registered project tools with metadata (id, name, type)
|
|
7
|
+
- Enhanced text output to include "Available Capabilities" and "Available Tools" sections when metadata is present
|
|
8
|
+
- Added discovery hints pointing users to `bclaw_get_capabilities`, `bclaw_list_tools`, and `bclaw_search_tools` MCP tools
|
|
9
|
+
- These fields are currently additive enrichments around the `1.2` contract; update `CONTEXT_SCHEMA_VERSION` before treating this section as the shipped schema version
|
|
10
|
+
|
|
11
|
+
## 1.2
|
|
12
|
+
|
|
13
|
+
- Added `context_diff` to expose compact memory deltas since a session started.
|
|
14
|
+
- Clarified the public contract for contradiction-aware session context refreshes.
|
|
15
|
+
- Kept the contract additive and backward-compatible with `1.1`.
|
|
16
|
+
|
|
17
|
+
## 1.1
|
|
18
|
+
|
|
19
|
+
- Added explicit `context_schema` rendering in markdown and template outputs.
|
|
20
|
+
- Added `agent_tooling.agents_rules`.
|
|
21
|
+
- Added skill metadata flags: `scripts_present`, `references_present`, `assets_present`.
|
|
22
|
+
- Added MCP inventory metadata: `availability`, `source`.
|
|
23
|
+
- Kept the contract additive and backward-compatible with `1.0`.
|
|
24
|
+
|
|
25
|
+
## 1.0
|
|
26
|
+
|
|
27
|
+
- Baseline contract introduced with:
|
|
28
|
+
- `digest`
|
|
29
|
+
- `memory_density`
|
|
30
|
+
- `bootstrap_available`
|
|
31
|
+
- `derived_signals`
|
|
32
|
+
- `execution_context`
|
|
33
|
+
- `agent_tooling`
|
|
34
|
+
- `scoped_activity`
|
|
35
|
+
- `selected`
|
package/docs/context-format.md
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
# Context Format
|
|
2
|
-
|
|
3
|
-
`brainclaw context` (CLI) and `bclaw_context` (MCP) expose a versioned public contract for agent consumers.
|
|
4
|
-
|
|
5
|
-
Current version: `1.2`
|
|
6
|
-
|
|
7
|
-
## Stable top-level fields
|
|
8
|
-
|
|
9
|
-
- `context_schema`
|
|
10
|
-
- `digest`
|
|
11
|
-
- `memory_density`
|
|
12
|
-
- `bootstrap_available`
|
|
13
|
-
- `derived_signals`
|
|
14
|
-
- `execution_context`
|
|
15
|
-
- `agent_tooling`
|
|
16
|
-
- `scoped_activity`
|
|
17
|
-
- `context_diff`
|
|
18
|
-
- `selected`
|
|
19
|
-
|
|
20
|
-
## Compatibility policy
|
|
21
|
-
|
|
22
|
-
- Additive changes bump the minor version.
|
|
23
|
-
- Breaking changes bump the major version.
|
|
24
|
-
- Fields listed above are treated as public and stable for agent consumers.
|
|
25
|
-
- Future enrichments should prefer optional fields over reshaping existing ones.
|
|
26
|
-
|
|
27
|
-
## `1.2` additions over `1.1`
|
|
28
|
-
|
|
29
|
-
- `context_diff` is available for session-aware deltas through `brainclaw context --since-session` (CLI) and `bclaw_context(kind="delta", since=<session_id>)` (MCP).
|
|
30
|
-
- `context_schema: 1.2` is emitted across JSON, markdown, template, and MCP structured content.
|
|
31
|
-
|
|
32
|
-
## `1.1` additions over `1.0`
|
|
33
|
-
|
|
34
|
-
- `context_schema` is now explicitly surfaced in markdown and template renders.
|
|
35
|
-
- `agent_tooling` includes `agents_rules`.
|
|
36
|
-
- `agent_tooling.skills[]` includes bounded capability markers:
|
|
37
|
-
- `scripts_present`
|
|
38
|
-
- `references_present`
|
|
39
|
-
- `assets_present`
|
|
40
|
-
- `agent_tooling.mcp_servers[]` includes:
|
|
41
|
-
- `availability`
|
|
42
|
-
- `source`
|
|
43
|
-
|
|
44
|
-
## Semantics
|
|
45
|
-
|
|
46
|
-
- `execution_context` and `agent_tooling` are opportunistic and may be omitted when not useful.
|
|
47
|
-
- `derived_signals` are non-canonical bootstrap hints, not accepted project memory.
|
|
48
|
-
- `agent_tooling` inventories local capabilities and constraints; it does not imply project decisions.
|
|
1
|
+
# Context Format
|
|
2
|
+
|
|
3
|
+
`brainclaw context` (CLI) and `bclaw_context` (MCP) expose a versioned public contract for agent consumers.
|
|
4
|
+
|
|
5
|
+
Current version: `1.2`
|
|
6
|
+
|
|
7
|
+
## Stable top-level fields
|
|
8
|
+
|
|
9
|
+
- `context_schema`
|
|
10
|
+
- `digest`
|
|
11
|
+
- `memory_density`
|
|
12
|
+
- `bootstrap_available`
|
|
13
|
+
- `derived_signals`
|
|
14
|
+
- `execution_context`
|
|
15
|
+
- `agent_tooling`
|
|
16
|
+
- `scoped_activity`
|
|
17
|
+
- `context_diff`
|
|
18
|
+
- `selected`
|
|
19
|
+
|
|
20
|
+
## Compatibility policy
|
|
21
|
+
|
|
22
|
+
- Additive changes bump the minor version.
|
|
23
|
+
- Breaking changes bump the major version.
|
|
24
|
+
- Fields listed above are treated as public and stable for agent consumers.
|
|
25
|
+
- Future enrichments should prefer optional fields over reshaping existing ones.
|
|
26
|
+
|
|
27
|
+
## `1.2` additions over `1.1`
|
|
28
|
+
|
|
29
|
+
- `context_diff` is available for session-aware deltas through `brainclaw context --since-session` (CLI) and `bclaw_context(kind="delta", since=<session_id>)` (MCP).
|
|
30
|
+
- `context_schema: 1.2` is emitted across JSON, markdown, template, and MCP structured content.
|
|
31
|
+
|
|
32
|
+
## `1.1` additions over `1.0`
|
|
33
|
+
|
|
34
|
+
- `context_schema` is now explicitly surfaced in markdown and template renders.
|
|
35
|
+
- `agent_tooling` includes `agents_rules`.
|
|
36
|
+
- `agent_tooling.skills[]` includes bounded capability markers:
|
|
37
|
+
- `scripts_present`
|
|
38
|
+
- `references_present`
|
|
39
|
+
- `assets_present`
|
|
40
|
+
- `agent_tooling.mcp_servers[]` includes:
|
|
41
|
+
- `availability`
|
|
42
|
+
- `source`
|
|
43
|
+
|
|
44
|
+
## Semantics
|
|
45
|
+
|
|
46
|
+
- `execution_context` and `agent_tooling` are opportunistic and may be omitted when not useful.
|
|
47
|
+
- `derived_signals` are non-canonical bootstrap hints, not accepted project memory.
|
|
48
|
+
- `agent_tooling` inventories local capabilities and constraints; it does not imply project decisions.
|
package/docs/index.md
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
# Documentation Index
|
|
2
|
-
|
|
3
|
-
Use this page as the entry point into the packaged Markdown documentation.
|
|
4
|
-
|
|
5
|
-
## Getting Started
|
|
6
|
-
|
|
7
|
-
- [quickstart.md](quickstart.md) — fastest onboarding path for a new project (greenfield)
|
|
8
|
-
- [quickstart-existing-project.md](quickstart-existing-project.md) — joining a project that already has `.brainclaw/`
|
|
9
|
-
- [server-operations.md](server-operations.md) — remote server, DGX, SSH, and multi-project operator workflow
|
|
10
|
-
- [integrations/overview.md](integrations/overview.md) — integration model by agent surface
|
|
11
|
-
|
|
12
|
-
## Guides
|
|
13
|
-
|
|
14
|
-
- [integrations/mcp.md](integrations/mcp.md) — recommended runtime path for MCP-capable agents
|
|
15
|
-
- [integrations/agents.md](integrations/agents.md) — agent integration principles and setup details
|
|
16
|
-
- [release-maintenance.md](release-maintenance.md) — release checklist for CLI/MCP/context-schema changes
|
|
17
|
-
- [review.md](review.md) — reflective workflow and candidate promotion
|
|
18
|
-
- [storage.md](storage.md) — storage model and canonical vs derived state
|
|
19
|
-
- [security.md](security.md) — security model and guardrails
|
|
20
|
-
|
|
21
|
-
## Concepts
|
|
22
|
-
|
|
23
|
-
- [concepts/memory.md](concepts/memory.md)
|
|
24
|
-
- [concepts/plans-and-claims.md](concepts/plans-and-claims.md)
|
|
25
|
-
- [concepts/runtime-notes.md](concepts/runtime-notes.md)
|
|
26
|
-
- [concepts/coordination.md](concepts/coordination.md)
|
|
27
|
-
- [concepts/multi-agent-workflows.md](concepts/multi-agent-workflows.md)
|
|
28
|
-
- [concepts/workspace-bootstrapping.md](concepts/workspace-bootstrapping.md)
|
|
29
|
-
- [concepts/troubleshooting.md](concepts/troubleshooting.md) — runbook for degraded coordination state
|
|
30
|
-
- [concepts/memory-staleness.md](concepts/memory-staleness.md)
|
|
31
|
-
- [concepts/loop-engine.md](concepts/loop-engine.md)
|
|
32
|
-
- [concepts/ideation-loop.md](concepts/ideation-loop.md) — memory-confrontation ideation loop (v1.5.0+)
|
|
33
|
-
- [concepts/mcp-governance.md](concepts/mcp-governance.md)
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [cli.md](cli.md) — CLI reference
|
|
38
|
-
- [context-format.md](context-format.md) — public context contract
|
|
39
|
-
- [context-format-changelog.md](context-format-changelog.md)
|
|
40
|
-
- [mcp-schema-changelog.md](mcp-schema-changelog.md)
|
|
41
|
-
|
|
42
|
-
## Agent-Specific Notes
|
|
43
|
-
|
|
44
|
-
- [integrations/claude-code.md](integrations/claude-code.md)
|
|
45
|
-
- [integrations/codex.md](integrations/codex.md)
|
|
46
|
-
- [integrations/cursor.md](integrations/cursor.md)
|
|
47
|
-
- [integrations/copilot.md](integrations/copilot.md)
|
|
48
|
-
- [integrations/continue.md](integrations/continue.md)
|
|
49
|
-
- [integrations/roo.md](integrations/roo.md)
|
|
50
|
-
- [integrations/windsurf.md](integrations/windsurf.md)
|
|
51
|
-
- [integrations/opencode.md](integrations/opencode.md)
|
|
1
|
+
# Documentation Index
|
|
2
|
+
|
|
3
|
+
Use this page as the entry point into the packaged Markdown documentation.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
- [quickstart.md](quickstart.md) — fastest onboarding path for a new project (greenfield)
|
|
8
|
+
- [quickstart-existing-project.md](quickstart-existing-project.md) — joining a project that already has `.brainclaw/`
|
|
9
|
+
- [server-operations.md](server-operations.md) — remote server, DGX, SSH, and multi-project operator workflow
|
|
10
|
+
- [integrations/overview.md](integrations/overview.md) — integration model by agent surface
|
|
11
|
+
|
|
12
|
+
## Guides
|
|
13
|
+
|
|
14
|
+
- [integrations/mcp.md](integrations/mcp.md) — recommended runtime path for MCP-capable agents
|
|
15
|
+
- [integrations/agents.md](integrations/agents.md) — agent integration principles and setup details
|
|
16
|
+
- [release-maintenance.md](release-maintenance.md) — release checklist for CLI/MCP/context-schema changes
|
|
17
|
+
- [review.md](review.md) — reflective workflow and candidate promotion
|
|
18
|
+
- [storage.md](storage.md) — storage model and canonical vs derived state
|
|
19
|
+
- [security.md](security.md) — security model and guardrails
|
|
20
|
+
|
|
21
|
+
## Concepts
|
|
22
|
+
|
|
23
|
+
- [concepts/memory.md](concepts/memory.md)
|
|
24
|
+
- [concepts/plans-and-claims.md](concepts/plans-and-claims.md)
|
|
25
|
+
- [concepts/runtime-notes.md](concepts/runtime-notes.md)
|
|
26
|
+
- [concepts/coordination.md](concepts/coordination.md)
|
|
27
|
+
- [concepts/multi-agent-workflows.md](concepts/multi-agent-workflows.md)
|
|
28
|
+
- [concepts/workspace-bootstrapping.md](concepts/workspace-bootstrapping.md)
|
|
29
|
+
- [concepts/troubleshooting.md](concepts/troubleshooting.md) — runbook for degraded coordination state
|
|
30
|
+
- [concepts/memory-staleness.md](concepts/memory-staleness.md)
|
|
31
|
+
- [concepts/loop-engine.md](concepts/loop-engine.md)
|
|
32
|
+
- [concepts/ideation-loop.md](concepts/ideation-loop.md) — memory-confrontation ideation loop (v1.5.0+)
|
|
33
|
+
- [concepts/mcp-governance.md](concepts/mcp-governance.md)
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [cli.md](cli.md) — CLI reference
|
|
38
|
+
- [context-format.md](context-format.md) — public context contract
|
|
39
|
+
- [context-format-changelog.md](context-format-changelog.md)
|
|
40
|
+
- [mcp-schema-changelog.md](mcp-schema-changelog.md)
|
|
41
|
+
|
|
42
|
+
## Agent-Specific Notes
|
|
43
|
+
|
|
44
|
+
- [integrations/claude-code.md](integrations/claude-code.md)
|
|
45
|
+
- [integrations/codex.md](integrations/codex.md)
|
|
46
|
+
- [integrations/cursor.md](integrations/cursor.md)
|
|
47
|
+
- [integrations/copilot.md](integrations/copilot.md)
|
|
48
|
+
- [integrations/continue.md](integrations/continue.md)
|
|
49
|
+
- [integrations/roo.md](integrations/roo.md)
|
|
50
|
+
- [integrations/windsurf.md](integrations/windsurf.md)
|
|
51
|
+
- [integrations/opencode.md](integrations/opencode.md)
|
|
52
52
|
- [integrations/kilocode.md](integrations/kilocode.md)
|
|
53
53
|
- [integrations/mistral-vibe.md](integrations/mistral-vibe.md)
|
|
54
54
|
- [integrations/hermes.md](integrations/hermes.md)
|
|
55
55
|
- [integrations/openclaw.md](integrations/openclaw.md)
|
|
56
|
-
|
|
57
|
-
## Audience Design Constraints
|
|
58
|
-
|
|
59
|
-
Internal design reference — constraints that guide brainclaw development per target audience.
|
|
60
|
-
|
|
61
|
-
- [playbooks/productivity/](playbooks/productivity/index.md) — end-users & solo devs
|
|
62
|
-
- [playbooks/team/](playbooks/team/index.md) — teams & ops
|
|
63
|
-
- [playbooks/integration/](playbooks/integration/index.md) — AI builders
|
|
64
|
-
|
|
65
|
-
## Design And Proposals
|
|
66
|
-
|
|
67
|
-
- [architecture/project-refs.md](architecture/project-refs.md) — target navigation model, not the fully shipped surface
|
|
68
|
-
- [product/positioning.md](product/positioning.md)
|
|
69
|
-
- [adapters/openclaw.md](adapters/openclaw.md)
|
|
56
|
+
|
|
57
|
+
## Audience Design Constraints
|
|
58
|
+
|
|
59
|
+
Internal design reference — constraints that guide brainclaw development per target audience.
|
|
60
|
+
|
|
61
|
+
- [playbooks/productivity/](playbooks/productivity/index.md) — end-users & solo devs
|
|
62
|
+
- [playbooks/team/](playbooks/team/index.md) — teams & ops
|
|
63
|
+
- [playbooks/integration/](playbooks/integration/index.md) — AI builders
|
|
64
|
+
|
|
65
|
+
## Design And Proposals
|
|
66
|
+
|
|
67
|
+
- [architecture/project-refs.md](architecture/project-refs.md) — target navigation model, not the fully shipped surface
|
|
68
|
+
- [product/positioning.md](product/positioning.md)
|
|
69
|
+
- [adapters/openclaw.md](adapters/openclaw.md)
|