brainclaw 1.8.0 → 1.9.1

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.
Files changed (178) hide show
  1. package/README.md +592 -505
  2. package/dist/brainclaw-vscode.vsix +0 -0
  3. package/dist/cli.js +138 -13
  4. package/dist/commands/add-step.js +1 -1
  5. package/dist/commands/bootstrap.js +2 -26
  6. package/dist/commands/check-security-mcp.js +50 -33
  7. package/dist/commands/check-security.js +86 -43
  8. package/dist/commands/claim.js +22 -21
  9. package/dist/commands/confirm.js +26 -0
  10. package/dist/commands/context-diff.js +1 -1
  11. package/dist/commands/dispatch-watch.js +142 -0
  12. package/dist/commands/doctor.js +113 -2
  13. package/dist/commands/estimation-report.js +115 -16
  14. package/dist/commands/harvest.js +286 -23
  15. package/dist/commands/hooks.js +73 -73
  16. package/dist/commands/init.js +124 -22
  17. package/dist/commands/install-hooks.js +78 -78
  18. package/dist/commands/loops-handlers.js +4 -0
  19. package/dist/commands/mcp-read-handlers.js +253 -41
  20. package/dist/commands/mcp.js +664 -102
  21. package/dist/commands/memory.js +21 -17
  22. package/dist/commands/migrate.js +81 -17
  23. package/dist/commands/prune.js +78 -4
  24. package/dist/commands/reflect.js +26 -20
  25. package/dist/commands/register-agent.js +57 -1
  26. package/dist/commands/repair.js +20 -0
  27. package/dist/commands/session-end.js +15 -6
  28. package/dist/commands/session-start.js +18 -1
  29. package/dist/commands/setup-security.js +39 -18
  30. package/dist/commands/setup.js +26 -27
  31. package/dist/commands/stale.js +16 -2
  32. package/dist/commands/switch.js +26 -5
  33. package/dist/commands/uninstall.js +126 -34
  34. package/dist/commands/update-step.js +6 -0
  35. package/dist/commands/version.js +1 -1
  36. package/dist/commands/worktree.js +60 -0
  37. package/dist/core/actions.js +12 -3
  38. package/dist/core/agent-capability.js +30 -17
  39. package/dist/core/agent-files.js +963 -666
  40. package/dist/core/agent-integrations.js +0 -3
  41. package/dist/core/agent-inventory.js +67 -0
  42. package/dist/core/agent-registry.js +163 -29
  43. package/dist/core/agentrun-reconciler.js +33 -2
  44. package/dist/core/agentruns.js +7 -1
  45. package/dist/core/ai-agent-detection.js +31 -44
  46. package/dist/core/archival.js +15 -9
  47. package/dist/core/assignment-reconciler.js +56 -0
  48. package/dist/core/assignment-sweeper.js +127 -4
  49. package/dist/core/assignments.js +69 -11
  50. package/dist/core/bootstrap.js +233 -67
  51. package/dist/core/brainclaw-version.js +22 -0
  52. package/dist/core/candidates.js +21 -1
  53. package/dist/core/claims.js +313 -150
  54. package/dist/core/codev-prompts.js +38 -38
  55. package/dist/core/config.js +6 -1
  56. package/dist/core/context-diff.js +148 -20
  57. package/dist/core/context.js +129 -8
  58. package/dist/core/coordination.js +22 -3
  59. package/dist/core/default-profiles/doctor.yaml +11 -11
  60. package/dist/core/default-profiles/janitor.yaml +11 -11
  61. package/dist/core/default-profiles/onboarder.yaml +11 -11
  62. package/dist/core/default-profiles/reviewer.yaml +13 -13
  63. package/dist/core/dispatch-status.js +79 -5
  64. package/dist/core/dispatcher.js +65 -12
  65. package/dist/core/entity-operations.js +74 -27
  66. package/dist/core/entity-registry.js +31 -5
  67. package/dist/core/event-log.js +138 -21
  68. package/dist/core/events/checkpoint.js +258 -0
  69. package/dist/core/events/genesis.js +220 -0
  70. package/dist/core/events/journal.js +507 -0
  71. package/dist/core/events/materialize.js +126 -0
  72. package/dist/core/events/registry-post-image.js +110 -0
  73. package/dist/core/events/verify.js +109 -0
  74. package/dist/core/execution-adapters.js +23 -0
  75. package/dist/core/execution.js +1 -1
  76. package/dist/core/facade-schema.js +38 -0
  77. package/dist/core/gc-semantic.js +130 -5
  78. package/dist/core/handoff-snapshot.js +68 -0
  79. package/dist/core/ids.js +19 -8
  80. package/dist/core/instruction-templates.js +34 -115
  81. package/dist/core/io.js +39 -3
  82. package/dist/core/json-store.js +10 -1
  83. package/dist/core/lock.js +153 -28
  84. package/dist/core/loops/bootstrap-acquire.js +25 -1
  85. package/dist/core/loops/facade-schema.js +2 -0
  86. package/dist/core/loops/hooks/survey-signals-baseline.js +36 -0
  87. package/dist/core/loops/index.js +1 -0
  88. package/dist/core/loops/presets/bootstrap.js +7 -0
  89. package/dist/core/loops/store.js +17 -0
  90. package/dist/core/loops/verbs.js +24 -2
  91. package/dist/core/markdown.js +8 -76
  92. package/dist/core/mcp-command-resolution.js +245 -0
  93. package/dist/core/memory-compactor.js +5 -3
  94. package/dist/core/memory-lifecycle.js +282 -0
  95. package/dist/core/merge-risk.js +150 -0
  96. package/dist/core/messaging.js +10 -3
  97. package/dist/core/migration.js +11 -1
  98. package/dist/core/observer-mode.js +26 -0
  99. package/dist/core/operations/memory-mutation.js +90 -65
  100. package/dist/core/operations/plan.js +27 -1
  101. package/dist/core/protocol-skills.js +210 -0
  102. package/dist/core/reflection-safety.js +6 -7
  103. package/dist/core/reputation.js +84 -2
  104. package/dist/core/runtime-signals.js +72 -10
  105. package/dist/core/runtime.js +84 -1
  106. package/dist/core/schema.js +114 -0
  107. package/dist/core/search.js +19 -2
  108. package/dist/core/security-detectors.js +125 -0
  109. package/dist/core/security-extract.js +189 -0
  110. package/dist/core/security-guard.js +217 -139
  111. package/dist/core/security-packages.js +121 -0
  112. package/dist/core/security-scoring.js +76 -9
  113. package/dist/core/security.js +34 -2
  114. package/dist/core/sequence.js +11 -2
  115. package/dist/core/setup-flow.js +141 -13
  116. package/dist/core/spawn-check.js +16 -2
  117. package/dist/core/staleness.js +73 -2
  118. package/dist/core/state.js +250 -54
  119. package/dist/core/store-resolution.js +45 -12
  120. package/dist/core/worktree.js +90 -26
  121. package/dist/facts.js +8 -8
  122. package/dist/facts.json +7 -7
  123. package/docs/PROTOCOL.md +223 -0
  124. package/docs/adapters/openclaw.md +43 -43
  125. package/docs/architecture/project-refs.md +328 -328
  126. package/docs/cli.md +2097 -2096
  127. package/docs/concepts/coordination.md +52 -52
  128. package/docs/concepts/coordinator-runbook.md +129 -0
  129. package/docs/concepts/dispatch-lifecycle.md +245 -245
  130. package/docs/concepts/event-log-store.md +928 -0
  131. package/docs/concepts/ideation-loop.md +317 -317
  132. package/docs/concepts/loop-engine.md +520 -511
  133. package/docs/concepts/mcp-governance.md +268 -268
  134. package/docs/concepts/memory.md +89 -88
  135. package/docs/concepts/multi-agent-workflows.md +167 -167
  136. package/docs/concepts/observer-protocol.md +361 -0
  137. package/docs/concepts/parallel-merge-protocol.md +71 -0
  138. package/docs/concepts/plans-and-claims.md +217 -174
  139. package/docs/concepts/project-md-convention.md +35 -35
  140. package/docs/concepts/runtime-notes.md +38 -38
  141. package/docs/concepts/skills.md +78 -0
  142. package/docs/concepts/troubleshooting.md +254 -254
  143. package/docs/concepts/workspace-bootstrapping.md +142 -81
  144. package/docs/context-format-changelog.md +35 -35
  145. package/docs/context-format.md +48 -48
  146. package/docs/index.md +65 -65
  147. package/docs/integrations/agents.md +162 -162
  148. package/docs/integrations/claude-code.md +23 -23
  149. package/docs/integrations/cline.md +87 -88
  150. package/docs/integrations/codex.md +2 -2
  151. package/docs/integrations/continue.md +60 -60
  152. package/docs/integrations/copilot.md +82 -80
  153. package/docs/integrations/cursor.md +23 -23
  154. package/docs/integrations/kilocode.md +72 -72
  155. package/docs/integrations/mcp.md +377 -377
  156. package/docs/integrations/mistral-vibe.md +122 -122
  157. package/docs/integrations/openclaw.md +99 -98
  158. package/docs/integrations/opencode.md +84 -84
  159. package/docs/integrations/overview.md +122 -122
  160. package/docs/integrations/roo.md +74 -74
  161. package/docs/integrations/windsurf.md +83 -83
  162. package/docs/mcp-schema-changelog.md +360 -329
  163. package/docs/playbooks/integration/index.md +121 -121
  164. package/docs/playbooks/orchestration.md +37 -0
  165. package/docs/playbooks/productivity/index.md +99 -99
  166. package/docs/playbooks/team/index.md +117 -117
  167. package/docs/product/agent-first-model.md +184 -184
  168. package/docs/product/entity-model-audit.md +462 -462
  169. package/docs/product/positioning.md +86 -86
  170. package/docs/quickstart-existing-project.md +107 -107
  171. package/docs/quickstart.md +148 -147
  172. package/docs/release-maintenance.md +79 -79
  173. package/docs/reputation.md +52 -52
  174. package/docs/review.md +45 -45
  175. package/docs/security.md +212 -53
  176. package/docs/server-operations.md +118 -118
  177. package/docs/storage.md +110 -108
  178. package/package.json +86 -69
package/docs/storage.md CHANGED
@@ -1,108 +1,110 @@
1
- # Storage Model
2
-
3
- brainclaw is local-first and workspace-centric.
4
-
5
- ## Default structure
6
-
7
- ```text
8
- .brainclaw/
9
- config.yaml ← Project configuration
10
- project.md ← Derived readable view (best-effort, regenerable)
11
- events.jsonl ← Append-only event log (agent notifications)
12
- audit.log ← Append-only audit trail (before/after snapshots)
13
- memory/
14
- constraints/ ← Canonical constraint entries (one JSON per entity)
15
- decisions/ ← Canonical decision entries
16
- traps/ ← Canonical trap entries
17
- instructions/ ← Layered shared instructions
18
- coordination/
19
- plans/ ← Shared plan items
20
- claims/ ← Active scope claims
21
- handoffs/ ← Handoff records
22
- sessions/ ← Session state
23
- runtime/ ← Runtime notes (shared, machine, private)
24
- inbox/ ← Candidate review queue
25
- discovery/
26
- bootstrap/ ← Bootstrap profiles and seeds
27
- agents/ ← Agent registration and identity
28
- ```
29
-
30
- ## Design principles
31
-
32
- ### Canonical state is split
33
- Each entity is stored as its own JSON file (e.g. `memory/decisions/dec_abc123.json`).
34
-
35
- Benefits:
36
-
37
- - readable diffs in `.brainclaw/.git`
38
- - easier merges
39
- - clear provenance per entity
40
- - O(1) lookup by ID (direct file access)
41
- - no giant monolithic memory blob
42
- - isolated corruption (one bad file does not affect others)
43
-
44
- ### Derived views are best-effort
45
- `project.md` is a **derived view** regenerated from canonical state via `rebuildProjectMd()`. It is not a write target it can always be rebuilt from the JSON files using `brainclaw rebuild`.
46
-
47
- Failures to regenerate `project.md` are logged but never block mutations. If it gets stale, `brainclaw doctor` detects the drift.
48
-
49
- ### All mutations go through a single pipeline
50
- Every write to `.brainclaw/` is serialized through `mutate()` (`src/core/mutation-pipeline.ts`):
51
-
52
- 1. **Store-wide lock** advisory file lock at `.brainclaw/.store-mutation` (5s timeout, 10s expiry)
53
- 2. **Reentrant** — nested mutations within the same process are safe
54
- 3. **Atomic writes** — individual files use temp-file + rename pattern
55
- 4. **Git versioned** — `.brainclaw/.git` tracks all changes for rollback
56
-
57
- For agents using MCP (the recommended path), mutations are additionally serialized by the MCP server's `McpTaskRunner` a FIFO queue that runs one task at a time. This provides two layers of write safety:
58
-
59
- | Layer | Scope | Mechanism |
60
- |---|---|---|
61
- | **McpTaskRunner** | Single MCP server process | FIFO queue, one active Worker thread |
62
- | **mutate() file lock** | Cross-process (CLI + MCP) | Advisory `.store-mutation` lock file |
63
-
64
- Agents should always use MCP tools for mutations. The CLI is for human operators, scripting, and fallback workflows.
65
-
66
- ### Topology can vary
67
-
68
- Depending on configuration, storage may be:
69
-
70
- | Topology | Behavior |
71
- |---|---|
72
- | `embedded` (default) | `.brainclaw/` inside the repo, tracked by Git |
73
- | `sidecar` | `.brainclaw/` inside the repo but gitignored |
74
- | `local-only` | Outside the repo, never tracked |
75
-
76
- ## What belongs in canonical memory
77
-
78
- - decisions
79
- - constraints
80
- - traps
81
- - layered instructions
82
- - handoffs
83
- - plans
84
-
85
- ## What stays operational
86
-
87
- - machine-local runtime notes
88
- - private notes
89
- - short-lived observations (with optional TTL)
90
- - reflective candidates awaiting review
91
- - event log and audit trail
92
-
93
- ## Why this model matters
94
-
95
- The storage model is part of the product value:
96
-
97
- - local-first no cloud dependency
98
- - inspectable — plain text + JSON
99
- - Git-friendlyentity-per-file, readable diffs
100
- - reversible`.brainclaw/.git` history + rollback
101
- - mutation-safeserialized writes, atomic file operations
102
- - suitable for both humans and agents
103
-
104
- ## Related pages
105
-
106
- - [concepts/memory.md](concepts/memory.md)
107
- - [concepts/runtime-notes.md](concepts/runtime-notes.md)
108
- - [security.md](security.md)
1
+ # Storage Model
2
+
3
+ brainclaw is local-first and workspace-centric.
4
+
5
+ ## Default structure
6
+
7
+ ```text
8
+ .brainclaw/
9
+ config.yaml ← Project configuration
10
+ project.md ← Legacy derived readable view (best-effort, regenerable)
11
+ events.jsonl ← Append-only event log (agent notifications)
12
+ audit.log ← Append-only audit trail (before/after snapshots)
13
+ memory/
14
+ constraints/ ← Canonical constraint entries (one JSON per entity)
15
+ decisions/ ← Canonical decision entries
16
+ traps/ ← Canonical trap entries
17
+ instructions/ ← Layered shared instructions
18
+ coordination/
19
+ plans/ ← Shared plan items
20
+ claims/ ← Active scope claims
21
+ handoffs/ ← Handoff records
22
+ sessions/ ← Session state
23
+ runtime/ ← Runtime notes (shared, machine, private)
24
+ inbox/ ← Candidate review queue
25
+ discovery/
26
+ bootstrap/ ← Bootstrap profiles and seeds
27
+ agents/ ← Agent registration and identity
28
+ ```
29
+
30
+ ## Design principles
31
+
32
+ ### Canonical state is split
33
+ Each entity is stored as its own JSON file (e.g. `memory/decisions/dec_abc123.json`).
34
+
35
+ Benefits:
36
+
37
+ - readable diffs in `.brainclaw/.git`
38
+ - easier merges
39
+ - clear provenance per entity
40
+ - O(1) lookup by ID (direct file access)
41
+ - no giant monolithic memory blob
42
+ - isolated corruption (one bad file does not affect others)
43
+
44
+ ### Derived views are best-effort
45
+ `.brainclaw/project.md` is a **legacy derived view** regenerated from canonical state via `rebuildProjectMd()`. It is not a write target and no longer carries live claims, plans, handoffs, or runtime state — use `brainclaw agent-board`, `brainclaw context`, or MCP board/context tools for that operational data.
46
+
47
+ Root `PROJECT.md` is different: it is the durable project vision and should contain stable product, architecture, and contribution guidance that does not expire every session.
48
+
49
+ Failures to regenerate `project.md` are logged but never block mutations. If it gets stale, `brainclaw doctor` detects the drift.
50
+
51
+ ### All mutations go through a single pipeline
52
+ Every write to `.brainclaw/` is serialized through `mutate()` (`src/core/mutation-pipeline.ts`):
53
+
54
+ 1. **Store-wide lock** — advisory file lock at `.brainclaw/.store-mutation` (5s timeout, 10s expiry)
55
+ 2. **Reentrant** — nested mutations within the same process are safe
56
+ 3. **Atomic writes** — individual files use temp-file + rename pattern
57
+ 4. **Git versioned** `.brainclaw/.git` tracks all changes for rollback
58
+
59
+ For agents using MCP (the recommended path), mutations are additionally serialized by the MCP server's `McpTaskRunner` — a FIFO queue that runs one task at a time. This provides two layers of write safety:
60
+
61
+ | Layer | Scope | Mechanism |
62
+ |---|---|---|
63
+ | **McpTaskRunner** | Single MCP server process | FIFO queue, one active Worker thread |
64
+ | **mutate() file lock** | Cross-process (CLI + MCP) | Advisory `.store-mutation` lock file |
65
+
66
+ Agents should always use MCP tools for mutations. The CLI is for human operators, scripting, and fallback workflows.
67
+
68
+ ### Topology can vary
69
+
70
+ Depending on configuration, storage may be:
71
+
72
+ | Topology | Behavior |
73
+ |---|---|
74
+ | `embedded` (default) | `.brainclaw/` inside the repo, tracked by Git |
75
+ | `sidecar` | `.brainclaw/` inside the repo but gitignored |
76
+ | `local-only` | Outside the repo, never tracked |
77
+
78
+ ## What belongs in canonical memory
79
+
80
+ - decisions
81
+ - constraints
82
+ - traps
83
+ - layered instructions
84
+ - handoffs
85
+ - plans
86
+
87
+ ## What stays operational
88
+
89
+ - machine-local runtime notes
90
+ - private notes
91
+ - short-lived observations (with optional TTL)
92
+ - reflective candidates awaiting review
93
+ - event log and audit trail
94
+
95
+ ## Why this model matters
96
+
97
+ The storage model is part of the product value:
98
+
99
+ - local-firstno cloud dependency
100
+ - inspectableplain text + JSON
101
+ - Git-friendlyentity-per-file, readable diffs
102
+ - reversible `.brainclaw/.git` history + rollback
103
+ - mutation-safe — serialized writes, atomic file operations
104
+ - suitable for both humans and agents
105
+
106
+ ## Related pages
107
+
108
+ - [concepts/memory.md](concepts/memory.md)
109
+ - [concepts/runtime-notes.md](concepts/runtime-notes.md)
110
+ - [security.md](security.md)
package/package.json CHANGED
@@ -1,69 +1,86 @@
1
- {
2
- "name": "brainclaw",
3
- "version": "1.8.0",
4
- "description": "Shared project memory for humans and coding agents.",
5
- "type": "module",
6
- "bin": {
7
- "brainclaw": "dist/cli.js",
8
- "bclaw": "dist/cli.js"
9
- },
10
- "files": [
11
- "dist/**/*.js",
12
- "dist/core/default-profiles/*.yaml",
13
- "dist/brainclaw-vscode.vsix",
14
- "dist/facts.json",
15
- "docs/**/*.md",
16
- "README.md",
17
- "LICENSE"
18
- ],
19
- "publishConfig": {
20
- "access": "public"
21
- },
22
- "engines": {
23
- "node": ">=20.0.0"
24
- },
25
- "scripts": {
26
- "clean:build": "node scripts/clean-build.mjs dist dist-test",
27
- "clean:dist": "node scripts/clean-build.mjs dist",
28
- "clean:dist-test": "node scripts/clean-build.mjs dist-test",
29
- "build": "npm run clean:dist && tsc && node scripts/copy-default-profiles.mjs && node scripts/build-vsix.mjs",
30
- "build:cli": "npm run clean:dist && tsc && node scripts/copy-default-profiles.mjs",
31
- "emit:facts": "npm run build:cli && node scripts/emit-site-facts.mjs",
32
- "dev": "npm run clean:dist && tsc && node scripts/copy-default-profiles.mjs && node dist/cli.js",
33
- "dev:mcp": "tsc && node scripts/copy-default-profiles.mjs",
34
- "build:mcp-schemas": "npm run clean:dist && tsc && node scripts/build-mcp-schemas.mjs",
35
- "dev:link": "npm link && echo 'Symlink created: global brainclaw → local repo. MCP agents now use dist/ directly.'",
36
- "build:test": "npm run build && npm run clean:dist-test && tsc -p tsconfig.test.json",
37
- "pack:check": "node scripts/check-pack.mjs",
38
- "test": "npm run build:test && node scripts/run-tests.mjs default",
39
- "test:unit": "npm run build:test && node scripts/run-tests.mjs unit",
40
- "test:smoke": "npm run build:test && node scripts/run-tests.mjs smoke",
41
- "test:e2e": "npm run build:test && node scripts/run-tests.mjs e2e",
42
- "test:all": "npm run build:test && node scripts/run-tests.mjs all",
43
- "test:coverage": "npm run build:test && c8 --all --src dist-test/src --reporter=text-summary --reporter=lcov --exclude=dist-test/tests/** --exclude=dist-test/scripts/** node scripts/run-tests.mjs default",
44
- "test:coverage:check": "npm run build:test && c8 --all --check-coverage --lines 55 --functions 60 --branches 65 --statements 55 --src dist-test/src --reporter=text-summary --exclude=dist-test/tests/** --exclude=dist-test/scripts/** node scripts/run-tests.mjs default",
45
- "prepublishOnly": "npm run build && node scripts/emit-site-facts.mjs && npm run pack:check"
46
- },
47
- "keywords": [
48
- "cli",
49
- "memory",
50
- "agents",
51
- "coding-agents",
52
- "project-context",
53
- "handoff",
54
- "local-first"
55
- ],
56
- "license": "MIT",
57
- "homepage": "https://brainclaw.dev",
58
- "dependencies": {
59
- "commander": "^14.0.3",
60
- "yaml": "^2.7.1",
61
- "zod": "^4.4.3"
62
- },
63
- "devDependencies": {
64
- "@types/node": "^24.12.2",
65
- "ajv": "^8.20.0",
66
- "c8": "^11.0.0",
67
- "typescript": "^6.0.3"
68
- }
69
- }
1
+ {
2
+ "name": "brainclaw",
3
+ "version": "1.9.1",
4
+ "description": "Shared project memory for humans and coding agents.",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/jberdah/brainclaw.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/jberdah/brainclaw/issues"
12
+ },
13
+ "homepage": "https://brainclaw.dev",
14
+ "bin": {
15
+ "brainclaw": "dist/cli.js",
16
+ "bclaw": "dist/cli.js"
17
+ },
18
+ "files": [
19
+ "dist/**/*.js",
20
+ "dist/core/default-profiles/*.yaml",
21
+ "dist/brainclaw-vscode.vsix",
22
+ "dist/facts.json",
23
+ "docs/**/*.md",
24
+ "!docs/concepts/*proposal*.md",
25
+ "!docs/concepts/*critique*.md",
26
+ "!docs/concepts/*phase0-measurements*.md",
27
+ "README.md",
28
+ "LICENSE"
29
+ ],
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "engines": {
34
+ "node": ">=20.0.0"
35
+ },
36
+ "scripts": {
37
+ "clean:build": "node scripts/clean-build.mjs dist dist-test",
38
+ "clean:dist": "node scripts/clean-build.mjs dist",
39
+ "clean:dist-test": "node scripts/clean-build.mjs dist-test",
40
+ "build": "npm run build:cli && node scripts/build-vsix.mjs --optional",
41
+ "build:cli": "npm run clean:dist && tsc && node scripts/copy-default-profiles.mjs",
42
+ "build:release": "npm run build:cli && node scripts/emit-site-facts.mjs && node scripts/build-vsix.mjs",
43
+ "emit:facts": "npm run build:cli && node scripts/emit-site-facts.mjs",
44
+ "dev": "npm run clean:dist && tsc && node scripts/copy-default-profiles.mjs && node dist/cli.js",
45
+ "dev:mcp": "tsc && node scripts/copy-default-profiles.mjs",
46
+ "build:mcp-schemas": "npm run clean:dist && tsc && node scripts/build-mcp-schemas.mjs",
47
+ "dev:link": "npm link && echo 'Symlink created: global brainclaw → local repo. MCP agents now use dist/ directly.'",
48
+ "build:test": "npm run build:cli && npm run clean:dist-test && tsc -p tsconfig.test.json",
49
+ "pack:check": "node scripts/check-pack.mjs",
50
+ "lint": "eslint .",
51
+ "lint:fix": "eslint . --fix",
52
+ "test": "npm run build:test && node scripts/run-tests.mjs default",
53
+ "test:unit": "npm run build:test && node scripts/run-tests.mjs unit",
54
+ "test:smoke": "npm run build:test && node scripts/run-tests.mjs smoke",
55
+ "test:e2e": "npm run build:test && node scripts/run-tests.mjs e2e",
56
+ "test:all": "npm run build:test && node scripts/run-tests.mjs all",
57
+ "test:cross": "npm run build:test && node scripts/test-cross.mjs default",
58
+ "test:coverage": "npm run build:test && c8 --all --src dist-test/src --reporter=text-summary --reporter=lcov --exclude=dist-test/tests/** --exclude=dist-test/scripts/** node scripts/run-tests.mjs default",
59
+ "test:coverage:check": "npm run build:test && c8 --all --check-coverage --lines 55 --functions 60 --branches 65 --statements 55 --src dist-test/src --reporter=text-summary --exclude=dist-test/tests/** --exclude=dist-test/scripts/** node scripts/run-tests.mjs default",
60
+ "prepublishOnly": "npm run build:release && npm run pack:check"
61
+ },
62
+ "keywords": [
63
+ "cli",
64
+ "memory",
65
+ "agents",
66
+ "coding-agents",
67
+ "project-context",
68
+ "handoff",
69
+ "local-first"
70
+ ],
71
+ "license": "MIT",
72
+ "dependencies": {
73
+ "commander": "^14.0.3",
74
+ "yaml": "^2.7.1",
75
+ "zod": "^4.4.3"
76
+ },
77
+ "devDependencies": {
78
+ "@eslint/js": "^10.0.1",
79
+ "@types/node": "^24.12.2",
80
+ "ajv": "^8.20.0",
81
+ "c8": "^11.0.0",
82
+ "eslint": "^10.5.0",
83
+ "typescript": "^6.0.3",
84
+ "typescript-eslint": "^8.61.1"
85
+ }
86
+ }