brainclaw 0.19.7 → 0.19.10

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.
@@ -2,7 +2,7 @@ import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import YAML from 'yaml';
4
4
  import { memoryDir, memoryPath, readFileSync, writeFileAtomic, resolveEntityDir } from './io.js';
5
- import { AgentIdentityDocumentSchema, BootstrapProfileDocumentSchema, CandidateSchema, ClaimSchema, ConfigSchema, MemorySeedDocumentSchema, ConstraintSchema, CurrentSessionStateSchema, DecisionSchema, HandoffSchema, InstructionEntrySchema, PlanItemSchema, ProjectIdentityDocumentSchema, RuntimeNoteSchema, SessionSnapshotSchema, TrapSchema, } from './schema.js';
5
+ import { BootstrapApplicationReceiptSchema, BootstrapImportPlanDocumentSchema, AgentIdentityDocumentSchema, BootstrapProfileDocumentSchema, CandidateSchema, ClaimSchema, ConfigSchema, MemorySeedDocumentSchema, ConstraintSchema, CurrentSessionStateSchema, DecisionSchema, HandoffSchema, InstructionEntrySchema, PlanItemSchema, ProjectIdentityDocumentSchema, RuntimeNoteSchema, SessionSnapshotSchema, TrapSchema, } from './schema.js';
6
6
  export class MigrationError extends Error {
7
7
  kind;
8
8
  documentType;
@@ -16,6 +16,8 @@ export class MigrationError extends Error {
16
16
  const CURRENT_SCHEMA_VERSION = 2;
17
17
  const registry = {
18
18
  agent_identity: createRegistryEntry(AgentIdentityDocumentSchema),
19
+ bootstrap_application: createRegistryEntry(BootstrapApplicationReceiptSchema),
20
+ bootstrap_import_plan: createRegistryEntry(BootstrapImportPlanDocumentSchema),
19
21
  bootstrap_profile: createRegistryEntry(BootstrapProfileDocumentSchema),
20
22
  candidate: createRegistryEntry(CandidateSchema),
21
23
  claim: createRegistryEntry(ClaimSchema),
@@ -145,6 +147,8 @@ export function scanMigrationStatus(cwd) {
145
147
  collectSingle(entries, memoryPath('project.identity.json', cwd), 'project_identity');
146
148
  collectSingle(entries, memoryPath('.current-session', cwd), 'current_session');
147
149
  collectSingle(entries, memoryPath(path.join('bootstrap', 'profile.json'), cwd), 'bootstrap_profile');
150
+ collectSingle(entries, memoryPath(path.join('bootstrap', 'import-plan.json'), cwd), 'bootstrap_import_plan');
151
+ collectSingle(entries, memoryPath(path.join('bootstrap', 'last-application.json'), cwd), 'bootstrap_application');
148
152
  const effectiveCwd = cwd ?? process.cwd();
149
153
  collectDirectory(entries, resolveEntityDir('constraints', effectiveCwd, 'read'), 'constraint');
150
154
  collectDirectory(entries, resolveEntityDir('decisions', effectiveCwd, 'read'), 'decision');
@@ -161,7 +165,7 @@ export function scanMigrationStatus(cwd) {
161
165
  collectDirectory(entries, resolveEntityDir('runtime-hosts', effectiveCwd, 'read'), 'runtime_note', true);
162
166
  collectDirectory(entries, resolveEntityDir('runtime-private', effectiveCwd, 'read'), 'runtime_note', true);
163
167
  collectDirectory(entries, resolveEntityDir('instructions', effectiveCwd, 'read'), 'instruction');
164
- collectDirectory(entries, resolveEntityDir('bootstrap', effectiveCwd, 'read'), 'memory_seed');
168
+ collectDirectory(entries, path.join(resolveEntityDir('bootstrap', effectiveCwd, 'read'), 'seeds'), 'memory_seed');
165
169
  collectDirectory(entries, resolveEntityDir('agents', effectiveCwd, 'read'), 'agent_identity');
166
170
  collectDirectory(entries, resolveEntityDir('sessions', effectiveCwd, 'read'), 'session_snapshot');
167
171
  return entries.sort((a, b) => a.path.localeCompare(b.path));
@@ -451,6 +451,7 @@ export const MemorySeedKindSchema = z.enum([
451
451
  export const MemorySeedSourceKindSchema = z.enum([
452
452
  'readme',
453
453
  'agents_md',
454
+ 'native_instruction',
454
455
  'manifest',
455
456
  'repo_analysis',
456
457
  'git',
@@ -483,6 +484,74 @@ export const BootstrapProfileDocumentSchema = z.object({
483
484
  agents_md_present: z.boolean().default(false),
484
485
  seed_count: z.number().int().nonnegative(),
485
486
  target: z.string().optional(),
487
+ workspace_kind: z.enum(['empty', 'existing']).optional(),
488
+ confidence: MemorySeedConfidenceSchema.optional(),
489
+ native_instruction_files: z.array(z.string()).default([]),
490
+ gaps: z.array(z.string()).default([]),
491
+ });
492
+ export const BootstrapSuggestionTargetSchema = z.enum(['instruction', 'decision', 'constraint', 'trap']);
493
+ export const BootstrapSuggestionDocumentSchema = z.object({
494
+ schema_version: z.number().int().positive().optional(),
495
+ id: z.string(),
496
+ target: BootstrapSuggestionTargetSchema,
497
+ text: z.string(),
498
+ rationale: z.string(),
499
+ confidence: MemorySeedConfidenceSchema,
500
+ source_seed_ids: z.array(z.string()).default([]),
501
+ source_refs: z.array(z.string()).default([]),
502
+ layer: z.enum(['global', 'project', 'agent']).optional(),
503
+ scope: z.string().optional(),
504
+ tags: z.array(z.string()).default([]),
505
+ related_paths: z.array(z.string()).optional(),
506
+ reversible: z.boolean().default(true),
507
+ });
508
+ export const BootstrapInterviewAudienceSchema = z.enum(['cli', 'ide_chat', 'any']);
509
+ export const BootstrapInterviewQuestionSchema = z.object({
510
+ id: z.string(),
511
+ prompt: z.string(),
512
+ rationale: z.string(),
513
+ priority: z.enum(['high', 'medium', 'low']),
514
+ audience: BootstrapInterviewAudienceSchema.default('any'),
515
+ response_kind: z.enum(['short_text', 'long_text', 'boolean', 'list']).default('short_text'),
516
+ gap_keys: z.array(z.string()).default([]),
517
+ });
518
+ export const BootstrapInterviewPlanSchema = z.object({
519
+ schema_version: z.number().int().positive().optional(),
520
+ derived_at: z.string(),
521
+ workspace_kind: z.enum(['empty', 'existing']).optional(),
522
+ audience: BootstrapInterviewAudienceSchema.default('any'),
523
+ summary: z.string(),
524
+ question_count: z.number().int().nonnegative(),
525
+ questions: z.array(BootstrapInterviewQuestionSchema).default([]),
526
+ });
527
+ export const BootstrapImportPlanDocumentSchema = z.object({
528
+ schema_version: z.number().int().positive().optional(),
529
+ derived_at: z.string(),
530
+ target: z.string().optional(),
531
+ workspace_kind: z.enum(['empty', 'existing']).optional(),
532
+ confidence: MemorySeedConfidenceSchema.optional(),
533
+ summary: z.string(),
534
+ requires_confirmation: z.boolean().default(true),
535
+ gaps: z.array(z.string()).default([]),
536
+ suggestion_count: z.number().int().nonnegative(),
537
+ suggestions: z.array(BootstrapSuggestionDocumentSchema).default([]),
538
+ interview: BootstrapInterviewPlanSchema.optional(),
539
+ });
540
+ export const BootstrapManagedArtifactSchema = z.object({
541
+ kind: z.enum(['instruction', 'decision', 'constraint', 'trap']),
542
+ id: z.string(),
543
+ suggestion_id: z.string(),
544
+ rollback_action: z.enum(['deactivate', 'delete']).default('delete'),
545
+ });
546
+ export const BootstrapApplicationReceiptSchema = z.object({
547
+ schema_version: z.number().int().positive().optional(),
548
+ applied_at: z.string(),
549
+ proposal_derived_at: z.string(),
550
+ target: z.string().optional(),
551
+ workspace_kind: z.enum(['empty', 'existing']).optional(),
552
+ managed_artifacts: z.array(BootstrapManagedArtifactSchema).default([]),
553
+ suggestion_ids: z.array(z.string()).default([]),
554
+ uninstalled_at: z.string().optional(),
486
555
  });
487
556
  export const AgentIntegrationNameSchema = z.enum([
488
557
  'github-copilot',
package/docs/cli.md CHANGED
@@ -1,6 +1,15 @@
1
1
  # CLI Reference
2
2
 
3
- Commands grouped by purpose. All commands are available as `brainclaw` or its alias `bclaw`.
3
+ The CLI is Brainclaw's explicit operator, scripting, release, and fallback surface. All commands are available as `brainclaw` or its alias `bclaw`.
4
+
5
+ For capable coding agents, prefer MCP for dynamic runtime state:
6
+
7
+ - `bclaw_bootstrap` instead of manual bootstrap polling
8
+ - `bclaw_get_context` instead of repeated raw CLI context calls
9
+ - `bclaw_list_plans` / `bclaw_list_claims` / `bclaw_get_agent_board` for live coordination views
10
+ - `bclaw_claim`, `bclaw_write_note`, and `bclaw_session_end` for session continuity
11
+
12
+ Use the CLI when a human operator is driving the workflow, when you are scripting setup or release operations, or when MCP is not the integration path.
4
13
 
5
14
  ---
6
15
 
@@ -97,15 +106,24 @@ brainclaw rebuild
97
106
 
98
107
  Bootstrap shared memory for a new agent or project context.
99
108
 
109
+ For capable agents, the MCP equivalent is `bclaw_bootstrap`. Use the CLI when a human is driving onboarding, reviewing the import proposal, or operating in fallback mode.
110
+
100
111
  | Option | Description |
101
112
  |---|---|
102
113
  | `--for <agent>` | Target agent name |
103
114
  | `--json` | Output as JSON |
104
115
  | `--refresh` | Force refresh even if bootstrap data is recent |
116
+ | `--interview` | Render adaptive interview prompts instead of the bootstrap summary |
117
+ | `--audience <audience>` | Filter interview prompts for `cli`, `ide_chat`, or `any` |
118
+ | `--apply` | Import the current bootstrap proposal into canonical memory |
119
+ | `--uninstall` | Deactivate the last bootstrap-managed import |
120
+ | `-y, --yes` | Skip confirmation prompts for apply/uninstall |
105
121
 
106
122
  ```bash
107
123
  brainclaw bootstrap --for copilot
108
124
  brainclaw bootstrap --for claude --refresh --json
125
+ brainclaw bootstrap --interview --audience cli
126
+ brainclaw bootstrap --apply -y
109
127
  ```
110
128
 
111
129
  ### `brainclaw env`
@@ -574,6 +592,8 @@ brainclaw search "rollout" --since 2026-01-01 --json
574
592
 
575
593
  ## Planning and Coordination
576
594
 
595
+ For capable agents, prefer the MCP plan and claim tools for live runtime interactions. The CLI remains the operator and scripting form of the same coordination model.
596
+
577
597
  ### `brainclaw plan create <text>`
578
598
 
579
599
  Create a shared work item.
@@ -10,30 +10,43 @@ That means brainclaw integration should not rely on only one mechanism such as:
10
10
  - a single skill
11
11
  - a single startup command
12
12
 
13
- ## Better approach
14
-
15
- Use multiple points of contact:
16
-
17
- - lightweight system instructions
18
- - project-specific context retrieval
19
- - prompt-ready generated context
20
- - MCP tools when available
21
- - board and status views
22
- - workflow reminders around plans, claims, and handoffs
13
+ ## Better approach
14
+
15
+ Use multiple points of contact:
16
+
17
+ - lightweight system instructions
18
+ - project-specific context retrieval through MCP when available
19
+ - prompt-ready generated context
20
+ - native agent files for local reminders
21
+ - MCP tools for dynamic state
22
+ - board and status views
23
+ - workflow reminders around plans, claims, and handoffs
24
+
25
+ ## Surface hierarchy
26
+
27
+ The default order is:
28
+
29
+ 1. MCP for live state
30
+ 2. native agent files for local workflow guidance
31
+ 3. readable files as fallback
32
+ 4. CLI for setup, operator tasks, scripting, and fallback workflows
33
+
34
+ This keeps dynamic state dynamic instead of trying to encode it permanently into static instructions.
23
35
 
24
36
  ## System instructions vs project instructions
25
37
 
26
38
  Keep these separate.
27
39
 
28
- ### System instructions
29
- How the agent should use brainclaw.
40
+ ### System instructions
41
+ How the agent should use brainclaw.
30
42
 
31
43
  Examples:
32
44
 
33
- - check workspace memory before significant changes
34
- - bootstrap if the workspace is not initialized and the workflow allows it
35
- - respect file claims
36
- - update shared plan status when appropriate
45
+ - check workspace memory before significant changes
46
+ - prefer MCP over manual CLI calls when MCP is available
47
+ - bootstrap if the workspace is not initialized and the workflow allows it
48
+ - respect file claims
49
+ - update shared plan status when appropriate
37
50
 
38
51
  ### Project instructions
39
52
  What is true for the current workspace.
@@ -86,9 +99,9 @@ By default, `--write` treats generated workspace files as local setup and adds t
86
99
 
87
100
  If a repo already contains tracked local agent files from an older setup, `brainclaw session-start` warns at the beginning of work and `brainclaw doctor --fix-agent-ignore` can repair the missing `.gitignore` entries. Tracked files still need to be untracked manually with Git after the ignore rules are in place.
88
101
 
89
- ## MCP server workflow
90
-
91
- The brainclaw MCP server exposes all memory operations as tools that agents can call directly.
102
+ ## MCP server workflow
103
+
104
+ The brainclaw MCP server exposes the dynamic Brainclaw workflow directly. For capable agents, this is the nominal runtime path.
92
105
 
93
106
  ### Starting the MCP server
94
107
 
@@ -116,19 +129,19 @@ Most agents pick this up via their MCP config file (`.mcp.json`, `~/.cursor/mcp.
116
129
  | `bclaw_bootstrap` | Initialize the workspace if not already done |
117
130
  | `bclaw_get_execution_context` | Get execution context (identity, claims, active plans) |
118
131
 
119
- ## Session lifecycle
120
-
121
- ### Starting a session
122
-
123
- ```bash
124
- brainclaw session-start --agent my-agent --model claude-opus-4-5
132
+ ## Session lifecycle
133
+
134
+ ### Starting a session
135
+
136
+ ```bash
137
+ brainclaw session-start --agent my-agent --model claude-opus-4-5
125
138
  ```
126
139
 
127
140
  This registers the agent's identity and optionally records the model being used. Other agents can see active sessions in `list-claims` and `board`.
128
141
 
129
- ### During the session
130
-
131
- At each significant step:
142
+ ### During the session
143
+
144
+ For MCP-capable agents, prefer the MCP equivalents of these actions. The CLI examples below are the operator and fallback form of the same lifecycle.
132
145
 
133
146
  ```bash
134
147
  brainclaw context --json # load fresh project state
@@ -146,7 +159,7 @@ brainclaw session-end --auto-release
146
159
 
147
160
  This releases all active claims held by the current agent and updates plan statuses.
148
161
 
149
- ## Generated files are local-only
162
+ ## Generated files are local-only
150
163
 
151
164
  Agent config files generated by brainclaw — `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.cursor/rules/brainclaw.md`, `.windsurfrules`, `.github/copilot-instructions.md` — are **not committed to Git**.
152
165
 
@@ -12,12 +12,12 @@ brainclaw export --format claude-md --write
12
12
 
13
13
  ## Recommended approach
14
14
 
15
- - add lightweight usage instructions for brainclaw in `CLAUDE.md`
16
- - use `.brainclaw/project.md` as a readable baseline
17
- - prefer MCP for dynamic retrieval when available
15
+ - use MCP as the default runtime path for dynamic retrieval and writes
16
+ - keep `CLAUDE.md` lightweight and behavioral: it should tell Claude Code when to call Brainclaw, not carry all mutable workspace state
17
+ - use `.brainclaw/project.md` as a readable fallback baseline, not as the primary live source of truth
18
18
  - use hooks or workflow checks when a stronger reminder is needed
19
19
 
20
20
  ## Key idea
21
21
 
22
22
  Claude Code should not carry all workspace state in static instructions.
23
- brainclaw provides the living workspace layer.
23
+ brainclaw provides the living workspace layer through MCP plus local workflow guidance.
@@ -12,12 +12,12 @@ brainclaw export --format agents-md --write
12
12
 
13
13
  ## Recommended approach
14
14
 
15
- - keep a lightweight instruction telling Codex to consult brainclaw
16
- - let Codex read `.brainclaw/project.md` when simple file context is enough
17
- - use MCP for fresher scoped context when available
18
- - encourage use of plans, claims, and handoffs during multi-step work
15
+ - use MCP as the default runtime path for fresh context, plans, claims, and runtime notes
16
+ - keep `AGENTS.md` lightweight and behavioral: it should remind Codex how to use Brainclaw, not duplicate live state
17
+ - use `.brainclaw/project.md` only as a readable fallback when MCP is unavailable or when a human wants a simple snapshot
18
+ - encourage plans, claims, and handoffs during multi-step work
19
19
 
20
20
  ## Good role for brainclaw here
21
21
 
22
22
  Codex stays the coding agent.
23
- brainclaw provides the shared workspace context and coordination layer.
23
+ brainclaw provides the live workspace context and coordination layer.
@@ -12,9 +12,10 @@ brainclaw export --format copilot-instructions --write
12
12
 
13
13
  ## Recommended approach
14
14
 
15
- - point Copilot to `.brainclaw/project.md` or use fresh context retrieval
15
+ - use MCP whenever the Copilot surface supports it for fresh context and coordination views
16
+ - keep `.github/copilot-instructions.md` lightweight and behavioral
17
+ - use `.brainclaw/project.md` as readable fallback, not as the only live context source
16
18
  - use plans, claims, and handoffs to reduce ambiguity across sessions
17
- - use MCP where supported for dynamic collaboration views
18
19
 
19
20
  ## Why this matters
20
21
 
@@ -12,12 +12,12 @@ brainclaw export --format cursor-rules --write
12
12
 
13
13
  ## Recommended approach
14
14
 
15
- - the generated `.cursor/rules/brainclaw.md` tells Cursor to consult brainclaw before significant edits
16
- - use `.brainclaw/project.md` for readable shared state
17
- - use MCP for dynamic retrieval when available
15
+ - use MCP as the default dynamic path for context, board state, plans, and claims
16
+ - let the generated `.cursor/rules/brainclaw.md` tell Cursor when to consult Brainclaw and how to stay inside the workflow
17
+ - use `.brainclaw/project.md` only as readable fallback shared state
18
18
  - rely on claims and plans when multiple agents or humans are active in the same repo
19
19
 
20
20
  ## Key point
21
21
 
22
22
  Cursor rules describe behavior.
23
- brainclaw provides the living shared state those rules should point to.
23
+ brainclaw provides the living shared state those rules should point to through MCP.
@@ -1,24 +1,40 @@
1
1
  # MCP Integration
2
2
 
3
- brainclaw can expose collaboration and context views through MCP-readable tools.
3
+ MCP is the primary Brainclaw integration path for capable coding agents.
4
4
 
5
- ## Why MCP matters
5
+ Use it whenever the agent can retrieve or mutate shared state directly instead of relying only on static files.
6
6
 
7
- MCP is especially useful when the agent should retrieve fresh workspace state directly instead of relying only on static files.
7
+ ## Why MCP Is The Nominal Path
8
8
 
9
- That is valuable for:
9
+ MCP matters because Brainclaw's value is mostly in dynamic state:
10
10
 
11
- - ranked context retrieval
12
- - collaboration board views
13
- - write flows such as runtime notes
14
- - scoped activity retrieval
11
+ - fresh context for the exact path being edited
12
+ - current board state
13
+ - active plans and claims
14
+ - runtime observations
15
+ - handoffs and review queues
15
16
 
16
- ## Available tools
17
+ Static files still help, but they age immediately. MCP is the stronger path for live coordination.
18
+
19
+ ## Recommended Agent Pattern
20
+
21
+ The default dynamic workflow is:
22
+
23
+ 1. `bclaw_session_start` to open work and get the current board/context
24
+ 2. `bclaw_get_context` when the target path or task changes
25
+ 3. `bclaw_list_plans` and `bclaw_list_claims` to inspect active work
26
+ 4. `bclaw_claim` before editing
27
+ 5. `bclaw_write_note` for runtime observations
28
+ 6. `bclaw_session_end` to close cleanly and hand work off
29
+
30
+ This keeps session continuity inside Brainclaw instead of pushing the agent back to manual CLI usage.
31
+
32
+ ## Available Tools
17
33
 
18
34
  | Tool | Purpose |
19
35
  |---|---|
20
36
  | `bclaw_get_context` | Ranked prompt-ready context, supports `digest: true` |
21
- | `bclaw_bootstrap` | Derive brownfield bootstrap signals when memory is still sparse |
37
+ | `bclaw_bootstrap` | Derive brownfield bootstrap signals, adaptive interview prompts, and an import proposal when memory is still sparse |
22
38
  | `bclaw_get_execution_context` | Inspect local execution context and agent tooling |
23
39
  | `bclaw_write_note` | Record a runtime note, supports `autoReflect: true` |
24
40
  | `bclaw_read_handoff` | Read active handoffs |
@@ -30,22 +46,35 @@ That is valuable for:
30
46
  | `bclaw_list_candidates` | Pending or archived review queue listing |
31
47
  | `bclaw_search` | Full-text search across memory |
32
48
 
33
- ## Recommended use
49
+ ## When To Use MCP Versus Other Surfaces
34
50
 
35
- Use MCP as the dynamic access path for:
51
+ | Need | Best surface |
52
+ |---|---|
53
+ | Fresh path-scoped context | MCP |
54
+ | Current plans, claims, board state | MCP |
55
+ | Runtime writes with session continuity | MCP |
56
+ | Local behavioral reminders inside the agent UI | native agent files |
57
+ | Human inspection or scripting | CLI |
58
+ | Simple readable fallback | `.brainclaw/project.md` |
36
59
 
37
- - fresh context
38
- - runtime coordination views
39
- - structured list views for plans, claims, agents, instructions, and review queues
40
- - shared board state
41
- - write operations that should preserve session continuity
60
+ ## Starting The Server
42
61
 
43
- Readable files still matter, but MCP gives a stronger path for dynamic state.
62
+ ```bash
63
+ brainclaw mcp
64
+ ```
44
65
 
45
- ## Practical layering
66
+ In practice, most agents pick this up through generated MCP config such as `.mcp.json`, `~/.cursor/mcp.json`, or other agent-specific config files written by `brainclaw setup`, `brainclaw init`, or `brainclaw export`.
46
67
 
47
- | Surface | When to use |
48
- |---|---|
49
- | Files (`.brainclaw/project.md`) | Simple readable fallback, always available |
50
- | CLI | Explicit operational entry point, scripting |
51
- | MCP | Best dynamic integration path for capable agents |
68
+ ## Important Rule
69
+
70
+ If the agent has MCP available, do not treat the CLI as the primary runtime interface.
71
+
72
+ The CLI remains valuable for:
73
+
74
+ - setup
75
+ - bootstrap by a human operator
76
+ - scripting
77
+ - release and packaging
78
+ - debugging and fallback access
79
+
80
+ But for capable agents, MCP should be the first-class path for dynamic state.
@@ -1,61 +1,74 @@
1
1
  # Integration Overview
2
2
 
3
- brainclaw is designed to work with existing coding agents, not replace them.
4
-
5
- ## Current limitation
6
-
7
- For now, Brainclaw should be used for sequential multi-agent collaboration, not true parallel editing in the same checkout.
8
-
9
- One agent can hand work to another, and the next agent can recover good project context through shared memory, plans, claims, and handoffs. But without dedicated Git worktrees per agent/session, running several coding agents concurrently on the same project checkout is still risky and can create conflicts or unstable local state.
10
-
11
- ## Integration surfaces
12
-
13
- brainclaw can integrate through several surfaces:
14
-
15
- - **Readable files** `.brainclaw/project.md`, `AGENTS.md`, `GEMINI.md`, `.github/copilot-instructions.md`
16
- - **Native agent files** — `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.cursor/rules/brainclaw.md`, `.windsurfrules`, etc. (via `brainclaw export`)
17
- - **CLI commands** — direct operational entry point
18
- - **MCP tools** — dynamic access path for capable agents
19
- - **System or project instructions** static guidance for how to use brainclaw
20
-
21
- ## Recommended pattern
3
+ Brainclaw is designed to work with existing coding agents, not replace them.
4
+
5
+ The key integration rule is simple:
6
+
7
+ 1. use MCP for dynamic shared state when the agent supports it
8
+ 2. use native agent files for local behavioral guidance
9
+ 3. use the CLI for setup, operator workflows, scripting, and fallback access
10
+
11
+ ## Current Limitation
12
+
13
+ For now, Brainclaw should be used for sequential multi-agent collaboration, not true parallel editing in the same checkout.
14
+
15
+ One agent can hand work to another, and the next agent can recover good project context through shared memory, plans, claims, and handoffs. But without dedicated Git worktrees per agent/session, running several coding agents concurrently on the same project checkout is still risky and can create conflicts or unstable local state.
16
+
17
+ ## Integration Surfaces
18
+
19
+ brainclaw can integrate through several surfaces, but they do not have the same role.
20
+
21
+ | Surface | Role |
22
+ |---|---|
23
+ | **MCP tools** | primary dynamic access path for context, plans, claims, board views, and runtime writes |
24
+ | **Native agent files** | local guidance in the agent's own surface: `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.cursor/rules/brainclaw.md`, `.windsurfrules`, etc. |
25
+ | **Readable files** | fallback readable state such as `.brainclaw/project.md` |
26
+ | **CLI commands** | setup, scripting, release, inspection, and fallback workflows |
27
+ | **System/project instructions** | static reminders about how Brainclaw should be used in this workspace |
28
+
29
+ ## Recommended Pattern
22
30
 
23
31
  A good default pattern is:
24
32
 
25
- 1. use lightweight system instructions to tell the agent how to use brainclaw
26
- 2. retrieve fresh workspace context before significant edits
27
- 3. use shared plans and claims during execution
28
- 4. use handoffs and runtime notes when switching work or surfacing issues
33
+ 1. give the agent lightweight static instructions about how to use Brainclaw
34
+ 2. let it retrieve fresh workspace state through MCP before significant edits
35
+ 3. rely on plans, claims, and handoffs during execution
36
+ 4. keep native files and readable project state available as fallback context
37
+ 5. use hooks or repeated reminders where the host surface supports them
38
+
39
+ ## Native Files Are Support, Not The Live Source Of Truth
29
40
 
30
- ## Important principle
41
+ Generated files such as `CLAUDE.md` or `.cursor/rules/brainclaw.md` are useful because they keep Brainclaw visible inside the agent surface already in use.
31
42
 
32
- Do not rely on a single point of contact.
43
+ They are not meant to replace:
33
44
 
34
- Agents are not perfectly reliable at following instructions every time.
35
- The strongest integrations combine:
45
+ - fresh context retrieval
46
+ - live board state
47
+ - current claims
48
+ - recent runtime notes
49
+ - current handoffs
36
50
 
37
- - instructions (static)
38
- - readable workspace state (file)
39
- - MCP or CLI access (dynamic)
40
- - repeated reminders in the workflow
41
- - optional hooks where supported
51
+ For those, use MCP when available.
42
52
 
43
- ## Getting the native file written automatically
53
+ ## Getting The Native File Written Automatically
54
+
55
+ Run `brainclaw init` and Brainclaw will detect the current agent surface and write the appropriate local file automatically.
44
56
 
45
- Run `brainclaw init` — it detects the running agent and writes to its native file automatically.
46
57
  That includes OpenCode (`AGENTS.md` + `opencode.json`) and Antigravity/Gemini CLI (`GEMINI.md` + machine-local MCP config) when those environments are present.
47
58
 
48
59
  Or at any time:
49
60
 
50
61
  ```bash
51
- brainclaw export --detect
62
+ brainclaw export --detect --write
52
63
  ```
53
64
 
54
- ## Related pages
65
+ By default, generated workspace files are treated as local setup and added to `.gitignore`. `--shared` should only be used when you intentionally want the main exported instruction file to be versioned.
55
66
 
56
- - [agents.md](agents.md)
57
- - [mcp.md](mcp.md)
58
- - [copilot.md](copilot.md)
59
- - [cursor.md](cursor.md)
67
+ ## Choose Your Next Page
68
+
69
+ - [mcp.md](mcp.md) — the nominal path for capable agents
70
+ - [agents.md](agents.md) — integration principles that apply to every agent
60
71
  - [claude-code.md](claude-code.md)
61
72
  - [codex.md](codex.md)
73
+ - [cursor.md](cursor.md)
74
+ - [copilot.md](copilot.md)
@@ -24,6 +24,9 @@ This document tracks all breaking and notable changes to the brainclaw MCP serve
24
24
  - Constraints can now have a category: architecture, performance, security, reliability, compatibility, process, other
25
25
  - Decisions can now have an outcome: approved, rejected, deferred, pending
26
26
  - Doctor check `metadata_consistency` — validates capability and tool completeness
27
+ - `bclaw_bootstrap` now returns adaptive interview prompts alongside the import proposal when bootstrap confidence is incomplete
28
+ - `structuredContent.import_plan.interview` exposes `summary`, `question_count`, and audience-tagged questions
29
+ - Questions can be targeted to `cli`, `ide_chat`, or `any`
27
30
 
28
31
  **Changed**
29
32
  - MCP schema version bumped to 0.6.0 to reflect new metadata discovery capabilities
@@ -65,32 +65,31 @@ Local-first gives teams:
65
65
  - Git history for shared project state
66
66
  - compatibility with enterprise or offline environments
67
67
 
68
- ## Licensing
68
+ ## License direction
69
69
 
70
- brainclaw is published under the **Business Source License 1.1 (BSL 1.1)**.
70
+ Today, brainclaw is published under the **Business Source License 1.1 (BSL 1.1)**.
71
71
 
72
- ### What this means in practice
72
+ The direction after the closed beta is simpler:
73
73
 
74
- | Use case | Status |
75
- |----------|--------|
76
- | Personal use, open-source projects | Free |
77
- | Internal team or company use | Free |
78
- | Embedding brainclaw in a product or service you sell | Requires a commercial license |
79
- | Competitive products that replicate brainclaw's core value | Requires a commercial license |
74
+ - the local-first brainclaw core is intended to move to MIT
75
+ - remote shared-memory, hosted collaboration, advanced dashboards, and related private add-ons will stay separate commercial products
80
76
 
81
- ### Why BSL instead of MIT
77
+ The intended MIT core covers the local coordination layer:
82
78
 
83
- MIT gives users complete freedom, including the freedom to take the source, wrap it, and resell it as a competing product without contributing back. For a small independent project, that means large vendors can capture the market before the original author can sustain the work.
79
+ - local project memory
80
+ - local MCP and CLI workflows
81
+ - onboarding and bootstrap
82
+ - plans, claims, handoffs, and runtime notes
83
+ - local agent integrations
84
84
 
85
- BSL 1.1 preserves all the practical freedoms of open source (inspect, use, modify, contribute) while protecting the economic viability of the project. It is used by projects like MariaDB, HashiCorp Vault, and Sentry.
85
+ The commercial side is meant to cover capabilities that go beyond the local-first core:
86
86
 
87
- ### Conversion to MIT
87
+ - shared memory through the cloud for agents working across machines
88
+ - hosted sync and collaboration services
89
+ - advanced dashboards
90
+ - private add-ons around those hosted features
88
91
 
89
- The BSL includes an automatic conversion clause: the license converts to **MIT** after 4 years from each release date. Every version of brainclaw will eventually become fully open source.
90
-
91
- ### Commercial licensing
92
-
93
- If your use case requires a commercial license, contact the project author. The intent is not to restrict legitimate internal use — it is to prevent competitive product embedding without a fair contribution back to the project.
92
+ The goal is not to ship a stripped-down teaser. The goal is to keep the public core complete and useful on its own, while keeping remote and hosted features in a separate product line.
94
93
 
95
94
  ## Positioning summary
96
95