brainclaw 0.19.5 → 0.19.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/README.md +22 -20
- package/dist/cli.js +0 -0
- package/dist/commands/accept.js +0 -0
- package/dist/commands/adapter-openclaw-import.js +0 -0
- package/dist/commands/add-step.js +0 -0
- package/dist/commands/agent-board.js +0 -0
- package/dist/commands/audit.js +0 -0
- package/dist/commands/bootstrap.js +0 -0
- package/dist/commands/capability.js +0 -0
- package/dist/commands/changes.js +0 -0
- package/dist/commands/check-constraints.js +0 -0
- package/dist/commands/claim-resource.js +0 -0
- package/dist/commands/claim.js +0 -0
- package/dist/commands/complete-step.js +0 -0
- package/dist/commands/constraint.js +0 -0
- package/dist/commands/context-diff.js +0 -0
- package/dist/commands/context.js +0 -0
- package/dist/commands/decision.js +0 -0
- package/dist/commands/delete-plan.js +0 -0
- package/dist/commands/diff.js +0 -0
- package/dist/commands/doctor.js +0 -0
- package/dist/commands/enable-agent.js +0 -0
- package/dist/commands/env.js +0 -0
- package/dist/commands/estimation-report.js +0 -0
- package/dist/commands/explore.js +0 -0
- package/dist/commands/export.js +0 -0
- package/dist/commands/handoff.js +0 -0
- package/dist/commands/history.js +0 -0
- package/dist/commands/hooks.js +0 -0
- package/dist/commands/init.js +0 -0
- package/dist/commands/install-hooks.js +0 -0
- package/dist/commands/instruction.js +0 -0
- package/dist/commands/list-agents.js +0 -0
- package/dist/commands/list-claims.js +0 -0
- package/dist/commands/list-instructions.js +0 -0
- package/dist/commands/list-plans.js +0 -0
- package/dist/commands/mcp-worker.js +0 -0
- package/dist/commands/mcp.js +0 -0
- package/dist/commands/memory.js +0 -0
- package/dist/commands/metrics.js +0 -0
- package/dist/commands/plan-resource.js +0 -0
- package/dist/commands/plan.js +0 -0
- package/dist/commands/prune-candidates.js +0 -0
- package/dist/commands/prune.js +0 -0
- package/dist/commands/pull.js +0 -0
- package/dist/commands/push.js +0 -0
- package/dist/commands/rebuild.js +0 -0
- package/dist/commands/reflect-runtime-note.js +0 -0
- package/dist/commands/reflect.js +0 -0
- package/dist/commands/register-agent.js +0 -0
- package/dist/commands/reject.js +0 -0
- package/dist/commands/release-claim.js +0 -0
- package/dist/commands/release-claims.js +0 -0
- package/dist/commands/review.js +0 -0
- package/dist/commands/rollback.js +0 -0
- package/dist/commands/runtime-note.js +0 -0
- package/dist/commands/runtime-status.js +0 -0
- package/dist/commands/search.js +0 -0
- package/dist/commands/session-end.js +0 -0
- package/dist/commands/session-start.js +0 -0
- package/dist/commands/set-trust.js +0 -0
- package/dist/commands/setup.js +0 -0
- package/dist/commands/show-candidate.js +0 -0
- package/dist/commands/star-candidate.js +0 -0
- package/dist/commands/status.js +0 -0
- package/dist/commands/sync.js +0 -0
- package/dist/commands/tool.js +0 -0
- package/dist/commands/trap.js +0 -0
- package/dist/commands/update-handoff.js +0 -0
- package/dist/commands/update-plan.js +0 -0
- package/dist/commands/upgrade.js +0 -0
- package/dist/commands/use-candidate.js +0 -0
- package/dist/commands/version.js +0 -0
- package/dist/commands/watch.js +0 -0
- package/dist/commands/whoami.js +0 -0
- package/dist/core/agent-context.js +0 -0
- package/dist/core/agent-files.js +0 -0
- package/dist/core/agent-integrations.js +0 -0
- package/dist/core/agent-inventory.js +0 -0
- package/dist/core/agent-registry.js +0 -0
- package/dist/core/ai-agent-detection.js +0 -0
- package/dist/core/audit.js +0 -0
- package/dist/core/bootstrap.js +0 -0
- package/dist/core/brainclaw-version.js +0 -0
- package/dist/core/candidates.js +0 -0
- package/dist/core/circuit-breaker.js +0 -0
- package/dist/core/claims.js +0 -0
- package/dist/core/config.js +0 -0
- package/dist/core/context-diff.js +0 -0
- package/dist/core/context.js +0 -0
- package/dist/core/contradictions.js +0 -0
- package/dist/core/coordination.js +0 -0
- package/dist/core/cross-project.js +0 -0
- package/dist/core/duplicates.js +0 -0
- package/dist/core/event-log.js +0 -0
- package/dist/core/events.js +0 -0
- package/dist/core/execution-context.js +0 -0
- package/dist/core/freshness.js +0 -0
- package/dist/core/global-registry.js +0 -0
- package/dist/core/host.js +0 -0
- package/dist/core/identity.js +0 -0
- package/dist/core/ids.js +0 -0
- package/dist/core/input-validation.js +0 -0
- package/dist/core/instructions.js +0 -0
- package/dist/core/io.js +0 -0
- package/dist/core/json-store.js +0 -0
- package/dist/core/lifecycle.js +0 -0
- package/dist/core/lock.js +0 -0
- package/dist/core/logger.js +0 -0
- package/dist/core/machine-profile.js +0 -0
- package/dist/core/markdown.js +0 -0
- package/dist/core/memory-git.js +0 -0
- package/dist/core/migration.js +0 -0
- package/dist/core/project-registry.js +0 -0
- package/dist/core/reflection-safety.js +0 -0
- package/dist/core/repo-analysis.js +0 -0
- package/dist/core/reputation.js +0 -0
- package/dist/core/runtime.js +0 -0
- package/dist/core/schema.js +0 -0
- package/dist/core/search.js +0 -0
- package/dist/core/security.js +0 -0
- package/dist/core/setup-state.js +0 -0
- package/dist/core/state.js +0 -0
- package/dist/core/store-resolution.js +0 -0
- package/dist/core/sync-remote.js +0 -0
- package/dist/core/traps.js +0 -0
- package/docs/adapters/openclaw.md +43 -0
- package/docs/cli.md +1230 -0
- package/docs/concepts/coordination.md +52 -0
- package/docs/concepts/memory.md +87 -0
- package/docs/concepts/plans-and-claims.md +139 -0
- package/docs/concepts/runtime-notes.md +38 -0
- package/docs/concepts/workspace-bootstrapping.md +40 -0
- package/docs/context-format-changelog.md +35 -0
- package/docs/context-format.md +48 -0
- package/docs/integrations/agents.md +169 -0
- package/docs/integrations/claude-code.md +23 -0
- package/docs/integrations/codex.md +23 -0
- package/docs/integrations/copilot.md +21 -0
- package/docs/integrations/cursor.md +23 -0
- package/docs/integrations/mcp.md +51 -0
- package/docs/integrations/overview.md +61 -0
- package/docs/mcp-schema-changelog.md +108 -0
- package/docs/product/positioning.md +97 -0
- package/docs/quickstart.md +99 -0
- package/docs/reputation.md +52 -0
- package/docs/review.md +43 -0
- package/docs/security.md +53 -0
- package/docs/storage.md +81 -0
- package/package.json +3 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Cursor Integration
|
|
2
|
+
|
|
3
|
+
brainclaw works well next to Cursor because Cursor can already operate with project rules and can benefit from explicit workspace context.
|
|
4
|
+
|
|
5
|
+
## Auto-setup
|
|
6
|
+
|
|
7
|
+
`brainclaw init` detects Cursor (`CURSOR_TRACE_ID`) and writes `.cursor/rules/brainclaw.md` automatically. Or manually:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
brainclaw export --format cursor-rules --write
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Recommended approach
|
|
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
|
|
18
|
+
- rely on claims and plans when multiple agents or humans are active in the same repo
|
|
19
|
+
|
|
20
|
+
## Key point
|
|
21
|
+
|
|
22
|
+
Cursor rules describe behavior.
|
|
23
|
+
brainclaw provides the living shared state those rules should point to.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# MCP Integration
|
|
2
|
+
|
|
3
|
+
brainclaw can expose collaboration and context views through MCP-readable tools.
|
|
4
|
+
|
|
5
|
+
## Why MCP matters
|
|
6
|
+
|
|
7
|
+
MCP is especially useful when the agent should retrieve fresh workspace state directly instead of relying only on static files.
|
|
8
|
+
|
|
9
|
+
That is valuable for:
|
|
10
|
+
|
|
11
|
+
- ranked context retrieval
|
|
12
|
+
- collaboration board views
|
|
13
|
+
- write flows such as runtime notes
|
|
14
|
+
- scoped activity retrieval
|
|
15
|
+
|
|
16
|
+
## Available tools
|
|
17
|
+
|
|
18
|
+
| Tool | Purpose |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `bclaw_get_context` | Ranked prompt-ready context, supports `digest: true` |
|
|
21
|
+
| `bclaw_bootstrap` | Derive brownfield bootstrap signals when memory is still sparse |
|
|
22
|
+
| `bclaw_get_execution_context` | Inspect local execution context and agent tooling |
|
|
23
|
+
| `bclaw_write_note` | Record a runtime note, supports `autoReflect: true` |
|
|
24
|
+
| `bclaw_read_handoff` | Read active handoffs |
|
|
25
|
+
| `bclaw_get_agent_board` | Coordination snapshot |
|
|
26
|
+
| `bclaw_list_plans` | Structured plan listing with CLI-equivalent filters |
|
|
27
|
+
| `bclaw_list_claims` | Structured claim listing with CLI-equivalent filters |
|
|
28
|
+
| `bclaw_list_agents` | Registered agent inventory, optionally with bounded reputation |
|
|
29
|
+
| `bclaw_list_instructions` | Raw or resolved instruction listing |
|
|
30
|
+
| `bclaw_list_candidates` | Pending or archived review queue listing |
|
|
31
|
+
| `bclaw_search` | Full-text search across memory |
|
|
32
|
+
|
|
33
|
+
## Recommended use
|
|
34
|
+
|
|
35
|
+
Use MCP as the dynamic access path for:
|
|
36
|
+
|
|
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
|
|
42
|
+
|
|
43
|
+
Readable files still matter, but MCP gives a stronger path for dynamic state.
|
|
44
|
+
|
|
45
|
+
## Practical layering
|
|
46
|
+
|
|
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 |
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Integration Overview
|
|
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
|
|
22
|
+
|
|
23
|
+
A good default pattern is:
|
|
24
|
+
|
|
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
|
|
29
|
+
|
|
30
|
+
## Important principle
|
|
31
|
+
|
|
32
|
+
Do not rely on a single point of contact.
|
|
33
|
+
|
|
34
|
+
Agents are not perfectly reliable at following instructions every time.
|
|
35
|
+
The strongest integrations combine:
|
|
36
|
+
|
|
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
|
|
42
|
+
|
|
43
|
+
## Getting the native file written automatically
|
|
44
|
+
|
|
45
|
+
Run `brainclaw init` — it detects the running agent and writes to its native file automatically.
|
|
46
|
+
That includes OpenCode (`AGENTS.md` + `opencode.json`) and Antigravity/Gemini CLI (`GEMINI.md` + machine-local MCP config) when those environments are present.
|
|
47
|
+
|
|
48
|
+
Or at any time:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
brainclaw export --detect
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Related pages
|
|
55
|
+
|
|
56
|
+
- [agents.md](agents.md)
|
|
57
|
+
- [mcp.md](mcp.md)
|
|
58
|
+
- [copilot.md](copilot.md)
|
|
59
|
+
- [cursor.md](cursor.md)
|
|
60
|
+
- [claude-code.md](claude-code.md)
|
|
61
|
+
- [codex.md](codex.md)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# brainclaw MCP Schema Changelog
|
|
2
|
+
|
|
3
|
+
This document tracks all breaking and notable changes to the brainclaw MCP server protocol.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 0.6.0 (current)
|
|
8
|
+
|
|
9
|
+
**Added**
|
|
10
|
+
- `bclaw_get_capabilities` — list all registered project capabilities with optional filtering by category
|
|
11
|
+
- Returns array of capabilities with id, name, category, and tags
|
|
12
|
+
- Supports category filtering parameter
|
|
13
|
+
- `bclaw_list_tools` — list all registered project tools with optional filtering by type
|
|
14
|
+
- Returns array of tools with id, name, type, and tags
|
|
15
|
+
- Supports type and tag filtering parameters
|
|
16
|
+
- `bclaw_search_tools` — full-text search across project tools
|
|
17
|
+
- Filters by query string, type, and tags
|
|
18
|
+
- Returns matching tools with detailed metadata
|
|
19
|
+
- Enhanced `bclaw_get_context` to include metadata discovery:
|
|
20
|
+
- New `available_capabilities` field in structured content (array of capability objects)
|
|
21
|
+
- New `available_tools` field in structured content (array of tool objects)
|
|
22
|
+
- Suggestions section in text output showing relevant capabilities and tools (up to 5 each)
|
|
23
|
+
- Support for `category` and `outcome` fields in `bclaw_create_candidate`:
|
|
24
|
+
- Constraints can now have a category: architecture, performance, security, reliability, compatibility, process, other
|
|
25
|
+
- Decisions can now have an outcome: approved, rejected, deferred, pending
|
|
26
|
+
- Doctor check `metadata_consistency` — validates capability and tool completeness
|
|
27
|
+
|
|
28
|
+
**Changed**
|
|
29
|
+
- MCP schema version bumped to 0.6.0 to reflect new metadata discovery capabilities
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 0.5.0
|
|
34
|
+
|
|
35
|
+
**Added**
|
|
36
|
+
- `bclaw_delete_memory` — delete a constraint, decision, or trap by ID (trusted trust required)
|
|
37
|
+
- Searches across store chain to locate item
|
|
38
|
+
- Supports deletion from any store level (local, repo, workspace, user)
|
|
39
|
+
- Returns `deleted_id`, `item_type`, `store_level` in response
|
|
40
|
+
- `bclaw_update_memory` — update text/tags or move an item to a different store level (trusted trust required)
|
|
41
|
+
- Supports updating constraint, decision, or trap in-place
|
|
42
|
+
- `moveToStore` parameter enables moving items between levels (local → repo → workspace → user)
|
|
43
|
+
- Returns `updated_id`, `item_type`, `previous_store`, `new_store` in response
|
|
44
|
+
- Doctor checks `scope_hygiene` and `cross_level_duplicates` — warn about machine-level items at project scope and potential duplicates across store levels
|
|
45
|
+
|
|
46
|
+
**Changed**
|
|
47
|
+
- `bclaw_get_context` and related tools now properly merge instructions from parent stores in the chain
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 0.4.0
|
|
52
|
+
|
|
53
|
+
**Added**
|
|
54
|
+
- `bclaw_create_plan` — create a plan item from an agent (contributor trust required)
|
|
55
|
+
- `bclaw_update_plan` — update status, actual effort, priority, or assignee of a plan item
|
|
56
|
+
- `bclaw_add_step` — add a sub-step to a plan item
|
|
57
|
+
- `bclaw_complete_step` — mark a plan sub-step as done
|
|
58
|
+
- All plan management tools return structured `plan_id`, `step_id`, `status`, `progress` fields
|
|
59
|
+
|
|
60
|
+
**Fixed**
|
|
61
|
+
- `bclaw_release_claim`: `planStatus` parameter was declared in the schema but not applied — now correctly updates the linked plan's status when provided
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 0.3.0
|
|
66
|
+
|
|
67
|
+
**Added**
|
|
68
|
+
- `initialize` handshake support (MCP protocol conformance)
|
|
69
|
+
- `schema_version: "0.3.0"` field in all `structuredContent` responses
|
|
70
|
+
- Write tools: `bclaw_write_note`, `bclaw_create_candidate`, `bclaw_accept`, `bclaw_reject`, `bclaw_claim`, `bclaw_release_claim`, `bclaw_session_start`, `bclaw_session_end`
|
|
71
|
+
- `bclaw_search` tool — full-text BM25 search across all memory items
|
|
72
|
+
- Trust-level access control on write tools (contributor / trusted / curator)
|
|
73
|
+
- `context_schema` field in `bclaw_get_context` structured responses
|
|
74
|
+
- Explicit identity arguments on mutation tools:
|
|
75
|
+
- `agentId` on `bclaw_write_note`, `bclaw_create_candidate`, `bclaw_claim`, `bclaw_session_start`, `bclaw_session_end`
|
|
76
|
+
- `byId` on `bclaw_accept`, `bclaw_reject`
|
|
77
|
+
- Stable MCP tool errors:
|
|
78
|
+
- `identity_error`
|
|
79
|
+
- `trust_error`
|
|
80
|
+
- `validation_error`
|
|
81
|
+
|
|
82
|
+
**Changed**
|
|
83
|
+
- All read tool responses now include `schema_version` in `structuredContent`
|
|
84
|
+
- `bclaw_get_context` `structuredContent` flattens the full `ContextResult` object
|
|
85
|
+
- `bclaw_get_context` now exposes `context_schema: "1.2"` and additive fields from the current public context contract
|
|
86
|
+
- Mutation tools now require a registered identity on write paths; `agent`/`agentId` and `by`/`byId` must resolve to the same registered identity when both are provided
|
|
87
|
+
- `bclaw_reject` is now restricted to `trusted` / `curator` agents, aligned with `bclaw_accept`
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 0.2.0
|
|
92
|
+
|
|
93
|
+
**Added**
|
|
94
|
+
- `bclaw_get_agent_board` read tool
|
|
95
|
+
- `bclaw_read_handoff` read tool
|
|
96
|
+
- Tool prefix renamed: `tmem_` → `bclaw_`
|
|
97
|
+
|
|
98
|
+
**Changed**
|
|
99
|
+
- Environment variables renamed: `TEAM_MEMORY_*` → `BRAINCLAW_*`
|
|
100
|
+
- Storage directory renamed: `.memory/` → `.brainclaw/`
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 0.1.0
|
|
105
|
+
|
|
106
|
+
**Initial**
|
|
107
|
+
- `bclaw_get_context` read tool (was `tmem_get_context`)
|
|
108
|
+
- Basic stdio NDJSON transport
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Positioning
|
|
2
|
+
|
|
3
|
+
brainclaw is a **local-first coordination layer for humans and coding agents**.
|
|
4
|
+
|
|
5
|
+
It is not trying to become another coding agent, another hosted team platform, or another opaque memory service.
|
|
6
|
+
|
|
7
|
+
## The problem
|
|
8
|
+
|
|
9
|
+
Coding agents are good at local generation but weak at shared project state.
|
|
10
|
+
|
|
11
|
+
They often struggle with:
|
|
12
|
+
|
|
13
|
+
- remembering active constraints
|
|
14
|
+
- keeping track of recent decisions
|
|
15
|
+
- avoiding known traps
|
|
16
|
+
- coordinating shared plans
|
|
17
|
+
- handling handoffs cleanly
|
|
18
|
+
- avoiding collisions on files
|
|
19
|
+
- adapting instructions across different workspaces on the same machine
|
|
20
|
+
|
|
21
|
+
Traditional agent instruction files help, but they are relatively static.
|
|
22
|
+
They do not provide a living coordination layer for a workspace.
|
|
23
|
+
|
|
24
|
+
## What brainclaw does differently
|
|
25
|
+
|
|
26
|
+
brainclaw turns the workspace into a shared layer of:
|
|
27
|
+
|
|
28
|
+
- project memory
|
|
29
|
+
- implementation state
|
|
30
|
+
- coordination state
|
|
31
|
+
- prompt-ready context
|
|
32
|
+
|
|
33
|
+
Instead of relying only on fixed instruction files, brainclaw exposes fresh workspace state through files, CLI commands, and MCP tools.
|
|
34
|
+
|
|
35
|
+
It also writes directly to each agent's native instruction format — `CLAUDE.md`, `.cursor/rules/`, `.windsurfrules`, etc. — so the right context is always in the right place.
|
|
36
|
+
|
|
37
|
+
## What brainclaw is not
|
|
38
|
+
|
|
39
|
+
- a replacement for your coding agents
|
|
40
|
+
- a project management SaaS
|
|
41
|
+
- a black-box orchestration platform
|
|
42
|
+
- a cloud memory layer
|
|
43
|
+
- a replacement for Git
|
|
44
|
+
|
|
45
|
+
It sits next to existing tools and helps them collaborate more like a development team.
|
|
46
|
+
|
|
47
|
+
## Core product promise
|
|
48
|
+
|
|
49
|
+
brainclaw helps coding agents and humans work together around a shared workspace by making the important things explicit:
|
|
50
|
+
|
|
51
|
+
- what the project should remember
|
|
52
|
+
- what is currently being worked on
|
|
53
|
+
- who is touching which files
|
|
54
|
+
- what needs to be handed off
|
|
55
|
+
- what context is relevant right now
|
|
56
|
+
|
|
57
|
+
## Why local-first matters
|
|
58
|
+
|
|
59
|
+
Local-first gives teams:
|
|
60
|
+
|
|
61
|
+
- full control over data
|
|
62
|
+
- no network dependency
|
|
63
|
+
- no hidden storage
|
|
64
|
+
- plain text and JSON artifacts
|
|
65
|
+
- Git history for shared project state
|
|
66
|
+
- compatibility with enterprise or offline environments
|
|
67
|
+
|
|
68
|
+
## Licensing
|
|
69
|
+
|
|
70
|
+
brainclaw is published under the **Business Source License 1.1 (BSL 1.1)**.
|
|
71
|
+
|
|
72
|
+
### What this means in practice
|
|
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 |
|
|
80
|
+
|
|
81
|
+
### Why BSL instead of MIT
|
|
82
|
+
|
|
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.
|
|
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.
|
|
86
|
+
|
|
87
|
+
### Conversion to MIT
|
|
88
|
+
|
|
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.
|
|
94
|
+
|
|
95
|
+
## Positioning summary
|
|
96
|
+
|
|
97
|
+
> A local-first coordination layer for humans and coding agents.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Quickstart
|
|
2
|
+
|
|
3
|
+
This guide walks through the shortest path to getting value from brainclaw.
|
|
4
|
+
|
|
5
|
+
## Important limitation for now
|
|
6
|
+
|
|
7
|
+
Do not run multiple coding agents in parallel on the same project checkout yet.
|
|
8
|
+
|
|
9
|
+
brainclaw is already useful for sequential collaboration: one agent can pick up where another stopped, inspect shared context, and continue from explicit plans, claims, traps, and handoffs. But until Brainclaw supports dedicated Git worktrees per agent/session, parallel edits in the same checkout are still likely to create more Git and workspace problems than they solve.
|
|
10
|
+
|
|
11
|
+
For now, prefer:
|
|
12
|
+
|
|
13
|
+
1. one active editing agent per checkout
|
|
14
|
+
2. explicit handoffs between agents
|
|
15
|
+
3. claims and context to keep continuity between sessions
|
|
16
|
+
|
|
17
|
+
## 1. Bootstrap and initialize the workspace
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
brainclaw setup --yes
|
|
21
|
+
brainclaw init
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`setup` installs the machine-level prerequisites and agent integrations. `init` then creates the workspace state, seeds stable identity, and prepares the project memory structure.
|
|
25
|
+
If an AI coding agent is detected in the environment, brainclaw also writes to its native instruction file automatically.
|
|
26
|
+
|
|
27
|
+
## 2. Capture the first important facts
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
brainclaw memory create decision "OAuth migration now goes through auth-gateway" --tag auth
|
|
31
|
+
brainclaw memory create constraint "Payments module frozen until 2026-04-01" --tag payments
|
|
32
|
+
brainclaw memory create trap "Checkout E2E tests are flaky on Windows" --severity high --tag tests
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
These become part of the shared project memory.
|
|
36
|
+
|
|
37
|
+
## 3. Create a shared plan
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
brainclaw plan create "Coordinate auth rollout" --priority high
|
|
41
|
+
brainclaw plan list
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 4. Claim work before editing
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
brainclaw claim create "Taking auth rollout" --agent copilot --scope src/auth/ --plan pln_001
|
|
48
|
+
brainclaw claim list --plan pln_001
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Claims reduce collisions, but they are not a substitute for isolated worktrees yet.
|
|
52
|
+
Use them mainly to coordinate sequential work or human/agent awareness in the same repo.
|
|
53
|
+
|
|
54
|
+
## 5. Create an explicit handoff
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
brainclaw memory create handoff "Review auth patch" --from copilot --to claude --plan pln_001
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 6. Generate context for an agent
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
brainclaw context --for src/auth/routes.ts --digest
|
|
64
|
+
brainclaw context --json --max-chars 1200
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Use this to prepare compact context before edits or reviews.
|
|
68
|
+
|
|
69
|
+
## 7. Export to your agent's native instruction file
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
brainclaw export --detect # auto-detects running agent, writes to its file
|
|
73
|
+
brainclaw export --format claude-md --write # writes CLAUDE.md and gitignores it by default
|
|
74
|
+
brainclaw export --format cursor-rules --write # writes .cursor/rules/brainclaw.md and gitignores it by default
|
|
75
|
+
brainclaw export --format claude-md --write --shared # only if you intentionally want to commit it
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## 8. Inspect the current board
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
brainclaw status
|
|
82
|
+
brainclaw agent-board --agent copilot
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Recommended first workflow
|
|
86
|
+
|
|
87
|
+
1. initialize the workspace
|
|
88
|
+
2. record 3–5 important decisions or traps
|
|
89
|
+
3. create one shared plan
|
|
90
|
+
4. use claims for touched folders
|
|
91
|
+
5. generate context before edits
|
|
92
|
+
6. hand off explicitly when switching between agents
|
|
93
|
+
|
|
94
|
+
## Next reads
|
|
95
|
+
|
|
96
|
+
- [cli.md](cli.md) — full command reference
|
|
97
|
+
- [concepts/memory.md](concepts/memory.md)
|
|
98
|
+
- [concepts/plans-and-claims.md](concepts/plans-and-claims.md)
|
|
99
|
+
- [integrations/overview.md](integrations/overview.md)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Reputation
|
|
2
|
+
|
|
3
|
+
Reputation in brainclaw is a bounded trust signal, not a gamified score system.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Its role is to support:
|
|
8
|
+
|
|
9
|
+
- review routing
|
|
10
|
+
- context ranking tie-breakers
|
|
11
|
+
- continuity summaries
|
|
12
|
+
|
|
13
|
+
It is **not** a leaderboard or a mutable points ledger.
|
|
14
|
+
|
|
15
|
+
## How it works
|
|
16
|
+
|
|
17
|
+
Three subscores are tracked:
|
|
18
|
+
|
|
19
|
+
| Subscore | What it measures |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `contribution_quality` | Quality and adoption of contributed items |
|
|
22
|
+
| `review_reliability` | Consistency of review participation |
|
|
23
|
+
| `continuity_hygiene` | Session and claim hygiene behaviour |
|
|
24
|
+
|
|
25
|
+
These feed an internal bounded score named `internal_trust` computed from a rolling window of recent observable behavior.
|
|
26
|
+
|
|
27
|
+
## Configuration
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
reputation:
|
|
31
|
+
enabled: true
|
|
32
|
+
visibility: summary # 'summary' or 'internal-only'
|
|
33
|
+
decay_days: 30
|
|
34
|
+
ranking_weight: 0.15
|
|
35
|
+
resume_weight: 0.35
|
|
36
|
+
mcp_exposure: true
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Where reputation surfaces
|
|
40
|
+
|
|
41
|
+
- `status --json` — internal snapshot (when enabled)
|
|
42
|
+
- `context` — compact `resume_summary` + small ranking bonus
|
|
43
|
+
- `list-agents --with-reputation` — bounded public summaries
|
|
44
|
+
- `agent-board --with-reputation` — aggregate + selected agent summary
|
|
45
|
+
- `doctor --json` — high-level metrics only
|
|
46
|
+
- MCP board consumers — opt-in with `includeReputation`
|
|
47
|
+
|
|
48
|
+
## Product caution
|
|
49
|
+
|
|
50
|
+
This feature is advanced and should stay secondary to the core product story.
|
|
51
|
+
The primary value of brainclaw is shared workspace coordination, not reputation mechanics.
|
|
52
|
+
Quality matters more than volume. Semantic relevance still dominates ranking.
|
package/docs/review.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Review and Reflection
|
|
2
|
+
|
|
3
|
+
brainclaw includes a reflective layer so not every observation has to become canonical memory immediately.
|
|
4
|
+
|
|
5
|
+
## Why this exists
|
|
6
|
+
|
|
7
|
+
Some facts are:
|
|
8
|
+
|
|
9
|
+
- durable and worth keeping
|
|
10
|
+
- useful but still uncertain
|
|
11
|
+
- too local or too temporary to promote immediately
|
|
12
|
+
|
|
13
|
+
A review layer helps filter and promote the right items.
|
|
14
|
+
|
|
15
|
+
## Typical flow
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
runtime-note → reflect-runtime-note → review candidate → accept / reject
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
1. capture a runtime note (`brainclaw runtime-note`)
|
|
22
|
+
2. reflect it into a candidate when useful (`brainclaw reflect-runtime-note`)
|
|
23
|
+
3. review the candidate (`brainclaw review`)
|
|
24
|
+
4. accept or reject it (`brainclaw accept` / `brainclaw reject`)
|
|
25
|
+
|
|
26
|
+
## Star and use signals
|
|
27
|
+
|
|
28
|
+
Before formal review, candidates can accumulate signals:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
brainclaw star-candidate cnd_001 --by copilot # passive interest
|
|
32
|
+
brainclaw use-candidate cnd_001 --by copilot --context "auth rollout" # active reuse
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`review --prioritized` uses these signals (along with freshness and semantic relevance) to surface the most important candidates.
|
|
36
|
+
|
|
37
|
+
## curator role
|
|
38
|
+
|
|
39
|
+
The `curator` trust level has direct promote access. Other roles create candidates for review.
|
|
40
|
+
|
|
41
|
+
## Why this is valuable
|
|
42
|
+
|
|
43
|
+
This keeps canonical memory cleaner while still preserving useful observations long enough to evaluate them.
|
package/docs/security.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
brainclaw is designed to be safe by default.
|
|
4
|
+
|
|
5
|
+
## Security model
|
|
6
|
+
|
|
7
|
+
### No network access
|
|
8
|
+
The CLI does not need to call external services to function.
|
|
9
|
+
|
|
10
|
+
### No telemetry
|
|
11
|
+
brainclaw does not collect or send usage data.
|
|
12
|
+
|
|
13
|
+
### No secret management
|
|
14
|
+
brainclaw is not a vault and should not be treated like one.
|
|
15
|
+
|
|
16
|
+
### Plain-text visibility
|
|
17
|
+
The storage model is intentionally inspectable.
|
|
18
|
+
That makes review easier, but it also means users must be careful about what they write and commit.
|
|
19
|
+
|
|
20
|
+
## Built-in safety behaviors
|
|
21
|
+
|
|
22
|
+
brainclaw warns when content appears sensitive, for example when text includes patterns such as:
|
|
23
|
+
|
|
24
|
+
- `api_key`
|
|
25
|
+
- `secret`
|
|
26
|
+
- `token`
|
|
27
|
+
- `password`
|
|
28
|
+
|
|
29
|
+
It can also warn about sensitive paths such as:
|
|
30
|
+
|
|
31
|
+
- `.env`
|
|
32
|
+
- `secrets/`
|
|
33
|
+
|
|
34
|
+
Redaction behavior is configurable in `config.yaml`:
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
security:
|
|
38
|
+
mode: warn # 'warn' or 'strict'
|
|
39
|
+
strict_redaction: false # if true, blocks entries with sensitive content
|
|
40
|
+
block_sensitive_paths: true
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Recommended stance
|
|
44
|
+
|
|
45
|
+
- do not store secrets
|
|
46
|
+
- review what gets committed
|
|
47
|
+
- keep machine-local observations machine-local when appropriate
|
|
48
|
+
- use stricter redaction settings in sensitive environments
|
|
49
|
+
|
|
50
|
+
## Important nuance
|
|
51
|
+
|
|
52
|
+
brainclaw reduces hidden behavior, but it does not remove the need for operational discipline.
|
|
53
|
+
It warns; the team still decides what belongs in shared memory.
|
package/docs/storage.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Storage Model
|
|
2
|
+
|
|
3
|
+
brainclaw is local-first and workspace-centric.
|
|
4
|
+
|
|
5
|
+
## Default structure
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
.brainclaw/
|
|
9
|
+
project.md ← Human & agent readable view (auto-generated)
|
|
10
|
+
config.yaml ← Project configuration
|
|
11
|
+
instructions/ ← Layered shared instructions
|
|
12
|
+
plans/ ← Shared plan items
|
|
13
|
+
constraints/ ← Canonical constraint entries
|
|
14
|
+
decisions/ ← Canonical decision entries
|
|
15
|
+
traps/ ← Canonical trap entries
|
|
16
|
+
handoffs/ ← Canonical handoff entries
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Design principles
|
|
20
|
+
|
|
21
|
+
### Canonical state is split
|
|
22
|
+
Each entity is stored as its own JSON file.
|
|
23
|
+
|
|
24
|
+
Benefits:
|
|
25
|
+
|
|
26
|
+
- readable diffs
|
|
27
|
+
- easier merges
|
|
28
|
+
- clear provenance
|
|
29
|
+
- straightforward automation
|
|
30
|
+
- no giant monolithic memory blob
|
|
31
|
+
|
|
32
|
+
### Human-readable view is generated
|
|
33
|
+
`project.md` is regenerated from canonical state on every write.
|
|
34
|
+
|
|
35
|
+
Benefits:
|
|
36
|
+
|
|
37
|
+
- agents can read a simple file
|
|
38
|
+
- humans get an inspectable summary
|
|
39
|
+
- the source of truth remains structured
|
|
40
|
+
|
|
41
|
+
### Topology can vary
|
|
42
|
+
|
|
43
|
+
Depending on configuration, storage may be:
|
|
44
|
+
|
|
45
|
+
| Topology | Behavior |
|
|
46
|
+
|---|---|
|
|
47
|
+
| `embedded` (default) | `.brainclaw/` inside the repo, tracked by Git |
|
|
48
|
+
| `sidecar` | `.brainclaw/` inside the repo but gitignored |
|
|
49
|
+
| `local-only` | Outside the repo, never tracked |
|
|
50
|
+
|
|
51
|
+
## What belongs in canonical memory
|
|
52
|
+
|
|
53
|
+
- decisions
|
|
54
|
+
- constraints
|
|
55
|
+
- traps
|
|
56
|
+
- layered instructions
|
|
57
|
+
- handoffs
|
|
58
|
+
- plans
|
|
59
|
+
|
|
60
|
+
## What may stay more operational
|
|
61
|
+
|
|
62
|
+
- machine-local runtime notes
|
|
63
|
+
- private notes
|
|
64
|
+
- short-lived observations
|
|
65
|
+
- reflective candidates awaiting review
|
|
66
|
+
|
|
67
|
+
## Why this model matters
|
|
68
|
+
|
|
69
|
+
The storage model is part of the product value:
|
|
70
|
+
|
|
71
|
+
- local-first
|
|
72
|
+
- inspectable
|
|
73
|
+
- Git-friendly
|
|
74
|
+
- reversible
|
|
75
|
+
- suitable for both humans and agents
|
|
76
|
+
|
|
77
|
+
## Related pages
|
|
78
|
+
|
|
79
|
+
- [concepts/memory.md](concepts/memory.md)
|
|
80
|
+
- [concepts/runtime-notes.md](concepts/runtime-notes.md)
|
|
81
|
+
- [security.md](security.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brainclaw",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.6",
|
|
4
4
|
"description": "Shared project memory for humans and coding agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist/**/*.js",
|
|
12
|
+
"docs/**/*.md",
|
|
13
|
+
"!docs/plan.md",
|
|
12
14
|
"README.md",
|
|
13
15
|
"LICENSE"
|
|
14
16
|
],
|