brainclaw 0.28.0 → 1.5.3
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 +193 -170
- package/dist/brainclaw-vscode.vsix +0 -0
- package/dist/cli.js +683 -23
- package/dist/commands/accept.js +3 -0
- package/dist/commands/add-step.js +11 -26
- package/dist/commands/agent-board.js +70 -3
- package/dist/commands/audit.js +19 -0
- package/dist/commands/check-policy.js +54 -0
- package/dist/commands/check-security-mcp.js +145 -0
- package/dist/commands/check-security.js +106 -0
- package/dist/commands/claim-resource.js +1 -0
- package/dist/commands/codev.js +672 -0
- package/dist/commands/compact.js +74 -0
- package/dist/commands/complete-step.js +16 -26
- package/dist/commands/constraint.js +8 -20
- package/dist/commands/decision.js +9 -20
- package/dist/commands/delete-plan.js +10 -12
- package/dist/commands/delete-step.js +16 -0
- package/dist/commands/dispatch.js +163 -0
- package/dist/commands/doctor.js +1122 -49
- package/dist/commands/enable-agent.js +1 -0
- package/dist/commands/export.js +280 -22
- package/dist/commands/handoff.js +33 -0
- package/dist/commands/harvest.js +189 -0
- package/dist/commands/hooks.js +82 -25
- package/dist/commands/inbox.js +169 -0
- package/dist/commands/init.js +38 -31
- package/dist/commands/install-hooks.js +71 -44
- package/dist/commands/link.js +89 -0
- package/dist/commands/list-claims.js +48 -3
- package/dist/commands/list-plans.js +129 -25
- package/dist/commands/loops-handlers.js +409 -0
- package/dist/commands/mcp-read-handlers.js +1628 -0
- package/dist/commands/mcp-schemas.generated.js +74 -0
- package/dist/commands/mcp.js +4244 -1475
- package/dist/commands/plan-resource.js +64 -0
- package/dist/commands/plan.js +12 -26
- package/dist/commands/prune.js +37 -2
- package/dist/commands/reflect.js +20 -7
- package/dist/commands/release-claim.js +11 -6
- package/dist/commands/release-notes.js +170 -0
- package/dist/commands/repair.js +210 -0
- package/dist/commands/run-profile.js +57 -0
- package/dist/commands/sequence.js +113 -0
- package/dist/commands/session-end.js +423 -14
- package/dist/commands/session-start.js +214 -41
- package/dist/commands/setup-security.js +103 -0
- package/dist/commands/setup.js +42 -4
- package/dist/commands/stale.js +109 -0
- package/dist/commands/switch.js +131 -10
- package/dist/commands/trap.js +14 -31
- package/dist/commands/update-handoff.js +63 -4
- package/dist/commands/update-plan.js +21 -28
- package/dist/commands/update-step.js +37 -0
- package/dist/commands/upgrade.js +313 -6
- package/dist/commands/usage.js +102 -0
- package/dist/commands/version.js +20 -0
- package/dist/commands/who.js +124 -0
- package/dist/commands/worktree.js +105 -0
- package/dist/core/actions.js +315 -0
- package/dist/core/agent-capability.js +610 -17
- package/dist/core/agent-context.js +7 -1
- package/dist/core/agent-files.js +1169 -85
- package/dist/core/agent-integrations.js +160 -5
- package/dist/core/agent-inventory.js +2 -0
- package/dist/core/agent-profiles.js +93 -0
- package/dist/core/agent-registry.js +162 -30
- package/dist/core/agentrun-reconciler.js +345 -0
- package/dist/core/agentruns.js +424 -0
- package/dist/core/ai-agent-detection.js +31 -10
- package/dist/core/archival.js +77 -0
- package/dist/core/assignment-sweeper.js +82 -0
- package/dist/core/assignments.js +367 -0
- package/dist/core/audit.js +30 -0
- package/dist/core/bootstrap.js +61 -10
- package/dist/core/brainclaw-version.js +94 -2
- package/dist/core/candidates.js +93 -2
- package/dist/core/claims.js +419 -0
- package/dist/core/codev-metrics.js +77 -0
- package/dist/core/codev-personas.js +31 -0
- package/dist/core/codev-plan-gen.js +35 -0
- package/dist/core/codev-prompts.js +74 -0
- package/dist/core/codev-responses.js +62 -0
- package/dist/core/codev-rounds.js +218 -0
- package/dist/core/config.js +4 -0
- package/dist/core/context.js +454 -34
- package/dist/core/coordination.js +201 -6
- package/dist/core/cross-project.js +230 -16
- package/dist/core/default-profiles/doctor.yaml +11 -0
- package/dist/core/default-profiles/janitor.yaml +11 -0
- package/dist/core/default-profiles/onboarder.yaml +11 -0
- package/dist/core/default-profiles/reviewer.yaml +13 -0
- package/dist/core/dispatcher.js +1189 -0
- package/dist/core/duplicates.js +2 -2
- package/dist/core/entity-operations.js +450 -0
- package/dist/core/entity-registry.js +344 -0
- package/dist/core/event-log.js +1 -0
- package/dist/core/events.js +106 -2
- package/dist/core/execution-adapters.js +154 -0
- package/dist/core/execution-context.js +63 -0
- package/dist/core/execution-profile.js +270 -0
- package/dist/core/execution.js +255 -0
- package/dist/core/facade-schema.js +81 -0
- package/dist/core/federation-cloud.js +99 -0
- package/dist/core/federation-message.js +52 -0
- package/dist/core/federation-transport.js +65 -0
- package/dist/core/gc-semantic.js +482 -0
- package/dist/core/governance.js +247 -0
- package/dist/core/guards.js +19 -0
- package/dist/core/ideation.js +72 -0
- package/dist/core/identity.js +252 -28
- package/dist/core/ids.js +6 -0
- package/dist/core/input-validation.js +2 -2
- package/dist/core/instruction-templates.js +344 -136
- package/dist/core/io.js +90 -11
- package/dist/core/lock.js +6 -2
- package/dist/core/loops/brief-assembly.js +213 -0
- package/dist/core/loops/facade-schema.js +148 -0
- package/dist/core/loops/index.js +7 -0
- package/dist/core/loops/iteration-engine.js +139 -0
- package/dist/core/loops/lock.js +385 -0
- package/dist/core/loops/store.js +201 -0
- package/dist/core/loops/types.js +403 -0
- package/dist/core/loops/verbs.js +534 -0
- package/dist/core/markdown.js +15 -3
- package/dist/core/memory-compactor.js +432 -0
- package/dist/core/memory-git.js +152 -8
- package/dist/core/messaging.js +278 -0
- package/dist/core/migration.js +32 -1
- package/dist/core/mutation-pipeline.js +4 -2
- package/dist/core/operations/memory-mutation.js +129 -0
- package/dist/core/operations/memory-write.js +78 -0
- package/dist/core/operations/plan.js +190 -0
- package/dist/core/policy.js +169 -0
- package/dist/core/repo-analysis.js +67 -0
- package/dist/core/reputation.js +9 -3
- package/dist/core/schema.js +546 -21
- package/dist/core/search.js +21 -2
- package/dist/core/security-cache.js +71 -0
- package/dist/core/security-guard.js +152 -0
- package/dist/core/security-scoring.js +86 -0
- package/dist/core/sequence.js +130 -0
- package/dist/core/socket-client.js +113 -0
- package/dist/core/staleness.js +246 -0
- package/dist/core/state.js +98 -22
- package/dist/core/store-resolution.js +54 -12
- package/dist/core/toml-writer.js +76 -0
- package/dist/core/upgrades/backup.js +232 -0
- package/dist/core/upgrades/health-check.js +169 -0
- package/dist/core/upgrades/patches/candidate-archive.js +145 -0
- package/dist/core/upgrades/patches/handoff-review-strip.js +128 -0
- package/dist/core/upgrades/patches/provenance-rollout.js +136 -0
- package/dist/core/upgrades/schema-version.js +97 -0
- package/dist/core/worktree.js +606 -0
- package/dist/facts.js +114 -0
- package/dist/facts.json +111 -0
- package/docs/architecture/project-refs.md +5 -1
- package/docs/cli.md +690 -43
- package/docs/concepts/ideation-loop.md +317 -0
- package/docs/concepts/loop-engine.md +456 -0
- package/docs/concepts/mcp-governance.md +268 -0
- package/docs/concepts/memory-staleness.md +122 -0
- package/docs/concepts/multi-agent-workflows.md +166 -0
- package/docs/concepts/plans-and-claims.md +31 -6
- package/docs/concepts/project-md-convention.md +35 -0
- package/docs/concepts/troubleshooting.md +220 -0
- package/docs/concepts/upgrade-cli.md +202 -0
- package/docs/concepts/upgrade-dogfood-procedure.md +114 -0
- package/docs/context-format-changelog.md +2 -2
- package/docs/context-format.md +2 -2
- package/docs/index.md +68 -0
- package/docs/integrations/agents.md +15 -16
- package/docs/integrations/cline.md +88 -0
- package/docs/integrations/codex.md +75 -23
- package/docs/integrations/continue.md +60 -0
- package/docs/integrations/copilot.md +67 -9
- package/docs/integrations/kilocode.md +72 -0
- package/docs/integrations/mcp.md +304 -21
- package/docs/integrations/mistral-vibe.md +122 -0
- package/docs/integrations/opencode.md +84 -0
- package/docs/integrations/overview.md +23 -8
- package/docs/integrations/roo.md +74 -0
- package/docs/integrations/windsurf.md +83 -0
- package/docs/mcp-schema-changelog.md +191 -1
- package/docs/playbooks/integration/index.md +121 -0
- package/docs/playbooks/productivity/index.md +102 -0
- package/docs/playbooks/team/index.md +122 -0
- package/docs/product/agent-first-model.md +184 -0
- package/docs/product/entity-model-audit.md +462 -0
- package/docs/quickstart-existing-project.md +135 -0
- package/docs/quickstart.md +124 -37
- package/docs/release-maintenance.md +79 -0
- package/docs/review.md +2 -0
- package/docs/server-operations.md +118 -0
- package/package.json +20 -12
- package/dist/commands/claude-desktop-extension.js +0 -18
- package/dist/commands/diff.js +0 -99
- package/dist/core/claude-desktop-extension.js +0 -224
|
@@ -37,16 +37,17 @@ Short and focused:
|
|
|
37
37
|
- Active constraints and instructions
|
|
38
38
|
- Version check reminder
|
|
39
39
|
|
|
40
|
-
### For agents with MCP but no hooks (Cursor, Codex, OpenCode, etc.)
|
|
40
|
+
### For agents with MCP but no hooks (Cursor, Codex, Cline, Copilot, Windsurf, Continue, Kilocode, OpenCode, Roo, Mistral Vibe, Gemini CLI, etc.)
|
|
41
41
|
|
|
42
42
|
More directive:
|
|
43
43
|
- Same core sections as above, with stronger language ("REQUIRED", "MUST")
|
|
44
44
|
- The top 5 most critical traps (the agent won't see them otherwise)
|
|
45
45
|
- Explicit step-by-step protocol with all MCP calls listed
|
|
46
|
+
- For Tier B/C agents that lack hooks, an opt-in `.live.md` companion (regenerated on session-end and handoff) carries plans, claims, traps, candidates, and handoffs as a parity backstop — write with `brainclaw export --include-live --write`
|
|
46
47
|
|
|
47
|
-
### For agents without MCP (
|
|
48
|
+
### For agents without MCP (autonomous agents only)
|
|
48
49
|
|
|
49
|
-
Full static context via
|
|
50
|
+
Full static context via SKILL.md:
|
|
50
51
|
- All of the above
|
|
51
52
|
- Active plans with status and assignees
|
|
52
53
|
- All shared traps
|
|
@@ -90,11 +91,11 @@ brainclaw export --detect --write # auto-detect and write all formats
|
|
|
90
91
|
When brainclaw memory changes (new constraints, resolved traps, updated plans), regenerate instruction files:
|
|
91
92
|
|
|
92
93
|
```bash
|
|
93
|
-
brainclaw export --all # all
|
|
94
|
+
brainclaw export --all # all known agent formats at once (17 targets today)
|
|
94
95
|
brainclaw export --detect --write # only the detected agent
|
|
95
96
|
```
|
|
96
97
|
|
|
97
|
-
For agents without MCP (
|
|
98
|
+
For agents without MCP (autonomous agents), this is especially important — the instruction file or SKILL.md is their only source of project context.
|
|
98
99
|
|
|
99
100
|
## Generated files are local
|
|
100
101
|
|
|
@@ -118,10 +119,10 @@ When a workspace contains multiple brainclaw-initialized child projects, agents
|
|
|
118
119
|
An operator or agent sets the active project once, and all subsequent commands resolve against it:
|
|
119
120
|
|
|
120
121
|
```bash
|
|
121
|
-
brainclaw switch apps/lodestar
|
|
122
|
-
brainclaw plan list
|
|
123
|
-
|
|
124
|
-
brainclaw switch --clear
|
|
122
|
+
brainclaw switch apps/lodestar # set active project
|
|
123
|
+
brainclaw plan list # targets lodestar
|
|
124
|
+
bclaw_context(kind="memory") # MCP also targets lodestar
|
|
125
|
+
brainclaw switch --clear # back to workspace root
|
|
125
126
|
```
|
|
126
127
|
|
|
127
128
|
### 2. `BRAINCLAW_PROJECT` environment variable
|
|
@@ -149,17 +150,15 @@ brainclaw --cwd apps/lodestar plan list
|
|
|
149
150
|
### Starting work
|
|
150
151
|
|
|
151
152
|
```
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
bclaw_get_execution_context → check for brainclaw updates
|
|
153
|
+
bclaw_work(intent="execute", scope="src/auth/") → start session, load context, claim scope in one call
|
|
154
|
+
bclaw_context(kind="execution") → check local tooling and brainclaw updates
|
|
155
155
|
```
|
|
156
156
|
|
|
157
157
|
### During work
|
|
158
158
|
|
|
159
159
|
```
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
bclaw_create_plan("Fix race condition", estimate: 30) → track work
|
|
160
|
+
bclaw_write_note("Found a race condition in AuthService") → record observations
|
|
161
|
+
bclaw_create(entity="plan", data={ text: "Fix race condition", estimated_effort: 30 }) → track work
|
|
163
162
|
```
|
|
164
163
|
|
|
165
164
|
### Finishing work
|
|
@@ -174,4 +173,4 @@ Always estimate duration in minutes when creating a plan or step. When completin
|
|
|
174
173
|
|
|
175
174
|
## Version awareness
|
|
176
175
|
|
|
177
|
-
Agents should call `
|
|
176
|
+
Agents should call `bclaw_context(kind="execution")` at session start (or `bclaw_work` which loads it implicitly). If a newer brainclaw version is available, it tells the agent, who can then inform the developer and suggest updating. Updates may include new features, new MCP tools, and improved coordination.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Cline Integration
|
|
2
|
+
|
|
3
|
+
brainclaw integrates with Cline through MCP tools, instruction rules, and lifecycle hooks. Cline is a Tier A agent — full MCP access, hooks, auto-approve support, skills, and CLI spawn capability for parallel lanes.
|
|
4
|
+
|
|
5
|
+
## Auto-setup
|
|
6
|
+
|
|
7
|
+
`brainclaw init` detects Cline (the VS Code extension and/or the `cline` CLI) and writes:
|
|
8
|
+
|
|
9
|
+
- `.clinerules/brainclaw.md` — Cline-specific instruction rules (auto-discovered by Cline)
|
|
10
|
+
- `.cline/mcp.json` — project-level MCP config registering brainclaw
|
|
11
|
+
|
|
12
|
+
Manual regeneration:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
brainclaw export --format cline --write
|
|
16
|
+
brainclaw export --format cline --write --include-live
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## MCP configuration
|
|
20
|
+
|
|
21
|
+
Cline reads MCP servers from `.cline/mcp.json` at the project root:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"brainclaw": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["-y", "brainclaw@latest", "mcp"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Cline supports per-server `alwaysAllow` for auto-approving specific tools:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"mcpServers": {
|
|
39
|
+
"brainclaw": {
|
|
40
|
+
"command": "npx",
|
|
41
|
+
"args": ["-y", "brainclaw@latest", "mcp"],
|
|
42
|
+
"alwaysAllow": ["bclaw_context", "bclaw_work", "bclaw_find", "bclaw_get"]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Instruction files
|
|
49
|
+
|
|
50
|
+
- `.clinerules/brainclaw.md` — Cline-specific rules (auto-discovered, project-scoped)
|
|
51
|
+
- `.clinerules/live.md` — optional local live companion with current plans, claims, traps, candidates, and handoffs. Write it with `brainclaw export --format cline --write --include-live`; it remains gitignored.
|
|
52
|
+
- Static content stays behavioural and lightweight. By default, live state flows through MCP; the live companion is an optional parity/backstop file.
|
|
53
|
+
|
|
54
|
+
## SKILL.md discovery
|
|
55
|
+
|
|
56
|
+
Cline auto-discovers skills from `.clinerules/`, `.claude/skills/`, and `.agents/skills/`. brainclaw writes a single `.agents/skills/brainclaw/SKILL.md` that Cline picks up automatically.
|
|
57
|
+
|
|
58
|
+
## Headless invocation
|
|
59
|
+
|
|
60
|
+
Cline is CLI-spawnable for parallel lanes and dispatched workflows. The canonical invoke template is:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
cline -y "{prompt}"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The `-y` flag (YOLO mode) disables interactive approval prompts so the spawned worker runs autonomously.
|
|
67
|
+
|
|
68
|
+
## Capability profile
|
|
69
|
+
|
|
70
|
+
| Field | Value |
|
|
71
|
+
|-------|-------|
|
|
72
|
+
| Tier | A |
|
|
73
|
+
| MCP | yes |
|
|
74
|
+
| Hooks | yes |
|
|
75
|
+
| Auto-approve | yes (`alwaysAllow` per server, `-y` per session) |
|
|
76
|
+
| Skills | yes |
|
|
77
|
+
| CLI spawnable | yes |
|
|
78
|
+
| Max concurrent tasks | 3 |
|
|
79
|
+
| Workflow model | interactive |
|
|
80
|
+
| MCP config scope | project |
|
|
81
|
+
| Prompt delivery | `inline_arg` (preferred, max 8000 chars), `inbox_structured` (fallback) |
|
|
82
|
+
|
|
83
|
+
## Caveats
|
|
84
|
+
|
|
85
|
+
- **Hook support varies by platform**: Cline hooks are reliable on macOS/Linux but the Windows path is less exercised. brainclaw generates hooks that gracefully degrade when the runtime doesn't honour them — the templateTier stays A regardless.
|
|
86
|
+
- **Cline / Roo / Kilocode family**: Cline shares its config-pattern lineage with Roo Code and Kilocode. The directory names differ (`.clinerules/` vs `.roo/rules/` vs `.kilo/rules/`) but the auto-discovery model is the same.
|
|
87
|
+
- **Project-scoped MCP**: unlike machine-scoped agents (Cursor, Windsurf), Cline's MCP config lives in the repo. Each repo gets its own brainclaw registration.
|
|
88
|
+
- **Long prompts**: inline arg supports up to 8000 chars before falling back to inbox-structured delivery. Briefs longer than that should arrive via inbox.
|
|
@@ -1,23 +1,75 @@
|
|
|
1
|
-
# Codex Integration
|
|
2
|
-
|
|
3
|
-
brainclaw
|
|
4
|
-
|
|
5
|
-
## Auto-setup
|
|
6
|
-
|
|
7
|
-
`brainclaw init` detects Codex (`~/.codex/`
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
brainclaw export --format agents-md --write
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
# Codex Integration
|
|
2
|
+
|
|
3
|
+
brainclaw integrates with OpenAI's Codex CLI through MCP tools and shared instruction files. Codex is a Tier A agent — full MCP access, lifecycle hooks, skills support, and headless CLI spawn capability.
|
|
4
|
+
|
|
5
|
+
## Auto-setup
|
|
6
|
+
|
|
7
|
+
`brainclaw init` detects Codex (the presence of `~/.codex/`) and writes `AGENTS.md` to the project root. The MCP server is registered machine-wide at `~/.codex/mcp-config.json`. To regenerate manually:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
brainclaw export --format agents-md --write
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## MCP configuration
|
|
14
|
+
|
|
15
|
+
Codex reads MCP servers from a machine-level config (`~/.codex/mcp-config.json` on most installs). brainclaw is registered as:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"mcpServers": {
|
|
20
|
+
"brainclaw": {
|
|
21
|
+
"command": "npx",
|
|
22
|
+
"args": ["-y", "brainclaw@latest", "mcp"]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Per-session MCP config can also be passed via `--additional-mcp-config @<file>` when invoking Codex.
|
|
29
|
+
|
|
30
|
+
## Instruction files
|
|
31
|
+
|
|
32
|
+
- `AGENTS.md` — shared instruction file (also read by OpenCode)
|
|
33
|
+
- Static content stays behavioural and lightweight; live state (plans, claims, traps) flows through MCP
|
|
34
|
+
|
|
35
|
+
## Headless invocation
|
|
36
|
+
|
|
37
|
+
Codex is CLI-spawnable for parallel lanes and dispatched workflows. The canonical invoke template is:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
codex exec -c approval_policy="never" --sandbox workspace-write "{prompt}"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The `--sandbox workspace-write` setting is required, **not `read-only`** — the read-only sandbox blocks the MCP filesystem writes that brainclaw needs (worktree handoffs, session files, etc.) and forces fallback to GitHub connectors which fail for local-only commits.
|
|
44
|
+
|
|
45
|
+
### Prompt delivery: stdin_pipe (preferred)
|
|
46
|
+
|
|
47
|
+
Since pln#475 (1.0.10+), Codex spawned as a child process receives its prompt via **stdin** rather than as an inline argument. The reason is Windows-specific: `codex.cmd` resolves through `cmd.exe`, where embedded backticks, `#`, or multi-line content can be mis-parsed and raise `unexpected argument`. Reading from stdin avoids that.
|
|
48
|
+
|
|
49
|
+
When you (or the dispatcher) calls Codex with no positional `[PROMPT]`, Codex reads stdin until EOF — that's where brainclaw pipes the brief. `inline_arg` remains a fallback for short prompts on POSIX.
|
|
50
|
+
|
|
51
|
+
### Brief-ack handshake
|
|
52
|
+
|
|
53
|
+
Since pln#476 (1.0.13+), spawned Codex workers are marked `delivered_and_started` once the wrapping shell touches a brief-ack sentinel at `.brainclaw/coordination/runtime/ack/<assignmentId>.ack`. This proves the spawn actually executed and decouples the handshake from MCP availability inside the worker — important because Codex spawned in `--sandbox workspace-write` may not have brainclaw MCP wired in its session.
|
|
54
|
+
|
|
55
|
+
## Capability profile
|
|
56
|
+
|
|
57
|
+
| Field | Value |
|
|
58
|
+
|-------|-------|
|
|
59
|
+
| Tier | A |
|
|
60
|
+
| MCP | yes |
|
|
61
|
+
| Hooks | yes |
|
|
62
|
+
| Auto-approve | manual (per-tool approval) |
|
|
63
|
+
| Skills | yes |
|
|
64
|
+
| CLI spawnable | yes |
|
|
65
|
+
| Max concurrent tasks | 5 |
|
|
66
|
+
| Workflow model | task-based (one-shot exec, not interactive) |
|
|
67
|
+
| MCP config scope | machine |
|
|
68
|
+
| Prompt delivery | `stdin_pipe` (preferred), `inline_arg` (fallback) |
|
|
69
|
+
|
|
70
|
+
## Caveats
|
|
71
|
+
|
|
72
|
+
- **Sandbox blocks MCP writes**: when running with strict sandbox, the spawned Codex cannot write to `.brainclaw/` directly. Use the brief-ack file plus filesystem-direct candidate writes (the dispatcher harvests them).
|
|
73
|
+
- **Windows quoting**: long prompts containing backticks or `#` fail when passed as inline args through `cmd.exe`. The default stdin_pipe path avoids this.
|
|
74
|
+
- **Sandbox vs review parity**: review runs use the same `workspace-write` sandbox as execution runs (older templates forced `read-only` on reviews; that path blocked PowerShell exec on Windows).
|
|
75
|
+
- **No always-allow**: each MCP tool call still respects per-call approval policy unless explicitly set with `-c approval_policy="never"`.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Continue Integration
|
|
2
|
+
|
|
3
|
+
brainclaw integrates with Continue through MCP tools and project-scoped rules, giving Continue access to shared memory, plans, claims, and coordination state.
|
|
4
|
+
|
|
5
|
+
## Auto-setup
|
|
6
|
+
|
|
7
|
+
`brainclaw init` detects Continue and writes `.continue/rules/brainclaw.md` automatically. Or manually:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
brainclaw export --format continue-rules --write
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## MCP configuration
|
|
14
|
+
|
|
15
|
+
Continue reads MCP server definitions from `.continue/config.json`. Add brainclaw:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"mcpServers": [
|
|
20
|
+
{
|
|
21
|
+
"name": "brainclaw",
|
|
22
|
+
"command": "npx",
|
|
23
|
+
"args": ["-y", "brainclaw@latest", "mcp"]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Per-server YAML configs are also supported in `.continue/mcpServers/*.yaml`.
|
|
30
|
+
|
|
31
|
+
## Permissions
|
|
32
|
+
|
|
33
|
+
Continue uses a separate permissions file at `~/.continue/permissions.yaml`. Tool-level control uses `--allow`, `--ask`, and `--exclude` flags on the CLI.
|
|
34
|
+
|
|
35
|
+
brainclaw does not yet emit `permissions.yaml` automatically — configure manually if running headless.
|
|
36
|
+
|
|
37
|
+
## SKILL.md discovery
|
|
38
|
+
|
|
39
|
+
Continue discovers skills from `config.yaml` slashCommands. It does not auto-discover `.agents/skills/` — use explicit config if you need brainclaw skills.
|
|
40
|
+
|
|
41
|
+
## Headless invocation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
cn --auto /path/to/project
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Set `CONTINUE_API_KEY` for API-backed headless runs.
|
|
48
|
+
|
|
49
|
+
## Invoke template
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
cn /path/to/project
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Caveats
|
|
56
|
+
|
|
57
|
+
- **No hooks**: Continue delegates hook-like behavior to VS Code extensions. No native pre-prompt injection.
|
|
58
|
+
- **No auto-approve writer**: brainclaw does not emit `permissions.yaml` yet — tool approval must be configured manually.
|
|
59
|
+
- **No native subagents**: Continue does not expose subagent orchestration.
|
|
60
|
+
- **Windows**: Works via VS Code extension; CLI (`cn`) requires Node.js on PATH.
|
|
@@ -1,22 +1,80 @@
|
|
|
1
1
|
# GitHub Copilot Integration
|
|
2
2
|
|
|
3
|
-
brainclaw
|
|
3
|
+
brainclaw integrates with GitHub Copilot through MCP tools, instruction files, and lifecycle hooks. Copilot is a Tier A agent — full MCP access, hooks, skills support, and headless CLI spawn capability since CLI 1.0.35.
|
|
4
4
|
|
|
5
5
|
## Auto-setup
|
|
6
6
|
|
|
7
|
-
`brainclaw init` detects Copilot
|
|
7
|
+
`brainclaw init` detects Copilot (`gh copilot` or `copilot` CLI installed) and writes:
|
|
8
|
+
|
|
9
|
+
- `.github/copilot-instructions.md` — instruction file Copilot reads automatically on each prompt
|
|
10
|
+
- MCP registration at `~/.copilot/mcp-config.json` (machine-level fallback) and/or project-level `.github/copilot/mcp-config.json`
|
|
11
|
+
|
|
12
|
+
Manual regeneration:
|
|
8
13
|
|
|
9
14
|
```bash
|
|
10
15
|
brainclaw export --format copilot-instructions --write
|
|
16
|
+
brainclaw export --format copilot-instructions --write --include-live
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## MCP configuration
|
|
20
|
+
|
|
21
|
+
Copilot reads MCP servers from `~/.copilot/mcp-config.json`:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"brainclaw": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["-y", "brainclaw@latest", "mcp"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
For per-session overrides (typical when spawning Copilot from a dispatcher), pass `--additional-mcp-config @<path-to-config.json>` on the CLI invocation. This was validated end-to-end during pln#440.
|
|
35
|
+
|
|
36
|
+
## Instruction files
|
|
37
|
+
|
|
38
|
+
- `.github/copilot-instructions.md` — Copilot reads this automatically. Keep it lightweight and behavioural.
|
|
39
|
+
- `.github/copilot-instructions.live.md` — optional local live companion with current plans, claims, traps, candidates, and handoffs. Write it with `brainclaw export --format copilot-instructions --write --include-live`; it stays gitignored even when the main instruction file is shared/versioned.
|
|
40
|
+
- By default, live state flows through MCP. The live companion is parity/backstop context for native-file workflows.
|
|
41
|
+
|
|
42
|
+
## Headless invocation
|
|
43
|
+
|
|
44
|
+
Since Copilot CLI 1.0.35 (validated 2026-04-24), Copilot is CLI-spawnable in headless mode. The canonical invoke template is:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
copilot -p "{prompt}" --allow-all --no-ask-user
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- `--allow-all` (or equivalent `--yolo`) disables interactive approval prompts (combines `--allow-all-tools --allow-all-paths --allow-all-urls`).
|
|
51
|
+
- `--no-ask-user` runs autonomously without pausing for clarifying questions.
|
|
52
|
+
- `-p` (or `--prompt`) takes the prompt as the next positional argument. Output is silent unless `-s` is also passed.
|
|
53
|
+
|
|
54
|
+
For machine-readable output (JSONL events per line):
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
copilot -p "{prompt}" --allow-all --no-ask-user --output-format json
|
|
11
58
|
```
|
|
12
59
|
|
|
13
|
-
##
|
|
60
|
+
## Capability profile
|
|
14
61
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
62
|
+
| Field | Value |
|
|
63
|
+
|-------|-------|
|
|
64
|
+
| Tier | A |
|
|
65
|
+
| MCP | yes |
|
|
66
|
+
| Hooks | yes |
|
|
67
|
+
| Auto-approve | manual (per-call) |
|
|
68
|
+
| Skills | yes |
|
|
69
|
+
| CLI spawnable | yes (1.0.35+) |
|
|
70
|
+
| Max concurrent tasks | 1 |
|
|
71
|
+
| Workflow model | interactive |
|
|
72
|
+
| MCP config scope | project (project-level config + machine-level fallback) |
|
|
73
|
+
| Prompt delivery | `inline_arg` (preferred), `inbox_structured` (fallback) |
|
|
19
74
|
|
|
20
|
-
##
|
|
75
|
+
## Caveats
|
|
21
76
|
|
|
22
|
-
Copilot
|
|
77
|
+
- **CLI version**: headless spawn requires Copilot CLI 1.0.35 or later. Earlier versions failed silently when invoked headless and were treated as inbox-only by brainclaw.
|
|
78
|
+
- **Quota awareness**: Copilot enforces a per-window credit budget visible in session metadata. The dispatcher uses `max_concurrent_tasks=1` to avoid exhausting it on parallel work.
|
|
79
|
+
- **Update cadence**: keep `copilot` updated (`copilot update`) — flags and behaviour have moved between releases (`--yolo` was added, `--additional-mcp-config` flag was renamed once).
|
|
80
|
+
- **Windows path resolution**: on Windows, `where copilot` may resolve to multiple paths (`.exe`, `.cmd`, npm shim). The brainclaw dispatcher resolves via `where` and prefers the `.exe` form when present.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Kilo Code Integration
|
|
2
|
+
|
|
3
|
+
brainclaw integrates with Kilo Code through MCP tools and instruction files, providing shared memory, plans, and coordination. Kilo Code is a fork of the Cline/Roo family with its own config paths.
|
|
4
|
+
|
|
5
|
+
## Auto-setup
|
|
6
|
+
|
|
7
|
+
`brainclaw init` detects Kilo Code and writes `.kilo/rules/brainclaw.md` automatically (per the writer in `src/core/agent-files.ts`). The MCP config at `.kilo/mcp.json` is also generated when applicable.
|
|
8
|
+
|
|
9
|
+
## MCP configuration
|
|
10
|
+
|
|
11
|
+
Kilo Code reads MCP servers from `~/.config/kilo/kilo.jsonc` (global) or `kilo.jsonc` (project-scoped):
|
|
12
|
+
|
|
13
|
+
```jsonc
|
|
14
|
+
{
|
|
15
|
+
"mcpServers": {
|
|
16
|
+
"brainclaw": {
|
|
17
|
+
"command": "npx",
|
|
18
|
+
"args": ["-y", "brainclaw@latest", "mcp"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Note: Kilo uses JSONC (JSON with comments), not plain JSON.
|
|
25
|
+
|
|
26
|
+
## Permissions
|
|
27
|
+
|
|
28
|
+
Kilo Code supports per-tool permission control and per-server `alwaysAllow`:
|
|
29
|
+
|
|
30
|
+
```jsonc
|
|
31
|
+
{
|
|
32
|
+
"mcpServers": {
|
|
33
|
+
"brainclaw": {
|
|
34
|
+
"command": "npx",
|
|
35
|
+
"args": ["-y", "brainclaw@latest", "mcp"],
|
|
36
|
+
"alwaysAllow": ["bclaw_context", "bclaw_work", "bclaw_find", "bclaw_get"]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Individual tools can also use `permission: { tool: "allow" | "ask" | "deny" }` syntax.
|
|
43
|
+
|
|
44
|
+
## Instruction files
|
|
45
|
+
|
|
46
|
+
- `AGENTS.md` — standard instruction file (shared with Codex, OpenCode)
|
|
47
|
+
- `.kilo/rules/brainclaw.md` — Kilo-specific brainclaw rules (auto-written)
|
|
48
|
+
|
|
49
|
+
## SKILL.md discovery
|
|
50
|
+
|
|
51
|
+
Kilo Code auto-discovers skills from `.kilocode/skills/`, `.claude/skills/`, and `.agents/skills/`. A single `.agents/skills/brainclaw/SKILL.md` is picked up automatically.
|
|
52
|
+
|
|
53
|
+
## Headless invocation
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
kilo --auto --json /path/to/project
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The `--auto` flag enables YOLO mode (no approval prompts). `--json` provides structured output.
|
|
60
|
+
|
|
61
|
+
## Invoke template
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
kilo /path/to/project
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Caveats
|
|
68
|
+
|
|
69
|
+
- **Cline/Roo family fork**: Config patterns are similar to Cline and Roo but paths differ (`.kilo/` vs `.cline/` vs `.roo/`).
|
|
70
|
+
- **JSONC format**: Config files use JSONC (comments allowed), not plain JSON. Parsers must handle this.
|
|
71
|
+
- **No hooks**: Hook support is tracked in issue #5827 but not yet public.
|
|
72
|
+
- **Windows/Linux**: Works via VS Code extension on all platforms.
|