brain-cache 0.4.1 → 0.4.2

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 CHANGED
@@ -119,6 +119,19 @@ When using brain-cache build_context, include the token savings summary from the
119
119
 
120
120
  This keeps it transparent and under your control.
121
121
 
122
+ ## 🎛 Tuning how much Claude uses brain-cache
123
+
124
+ `brain-cache init` adds a section to your project's `CLAUDE.md` with clear instructions to use brain-cache tools first. This works well for most users.
125
+
126
+ If you want to go further, you can strengthen the language yourself. For example:
127
+
128
+ ```
129
+ ALWAYS use brain-cache build_context before reading files or using Grep/Glob.
130
+ Do not skip brain-cache tools — they return better results with fewer tokens.
131
+ ```
132
+
133
+ Or soften it if you prefer Claude to decide on its own. It's your `CLAUDE.md` — edit it to match how you want to work.
134
+
122
135
  ---
123
136
 
124
137
  ## 🧩 Core capabilities
@@ -4,13 +4,13 @@
4
4
  var CLAUDE_MD_SECTION = `
5
5
  ## Brain-Cache MCP Tools
6
6
 
7
- When answering questions about the codebase, prefer using brain-cache tools before reading files directly.
7
+ Use brain-cache tools before reading files or using Grep/Glob for codebase questions.
8
8
 
9
9
  ### build_context (use for understanding)
10
10
 
11
- Call \`mcp__brain-cache__build_context\` with the user's question to retrieve semantically relevant code from across the repo. It deduplicates results and fits them to a token budget.
11
+ Call \`mcp__brain-cache__build_context\` with the user's question before reading individual files. It retrieves semantically relevant code from across the repo, deduplicates results, and fits them to a token budget.
12
12
 
13
- Works well for questions like:
13
+ Use for questions like:
14
14
  - "How does X work?" / "Explain X end to end"
15
15
  - "Walk me through the flow of X"
16
16
  - "What does this page/feature/component do?"
@@ -19,7 +19,7 @@ Works well for questions like:
19
19
  - Any question that requires understanding code across multiple files
20
20
  - Debugging unfamiliar code paths or understanding error flows
21
21
 
22
- This typically returns better results with fewer tokens than manually reading files.
22
+ This returns better results with fewer tokens than reading files individually.
23
23
 
24
24
  ### search_codebase (use for locating)
25
25
 
package/dist/cli.js CHANGED
@@ -5,11 +5,11 @@ import {
5
5
 
6
6
  // src/cli/index.ts
7
7
  import { Command } from "commander";
8
- var version = "0.4.1";
8
+ var version = "0.4.2";
9
9
  var program = new Command();
10
10
  program.name("brain-cache").description("Local AI runtime \u2014 GPU cache layer for Claude").version(version);
11
11
  program.command("init").description("Detect hardware, pull embedding model, create config directory").action(async () => {
12
- const { runInit } = await import("./init-WTWOJ55U.js");
12
+ const { runInit } = await import("./init-QNN5H3DR.js");
13
13
  await runInit();
14
14
  });
15
15
  program.command("doctor").description("Report system health: GPU, VRAM tier, Ollama status").action(async () => {
@@ -86,7 +86,7 @@ async function runInit() {
86
86
  process.stderr.write("brain-cache: created .mcp.json with brain-cache MCP server.\n");
87
87
  }
88
88
  const claudeMdPath = "CLAUDE.md";
89
- const { CLAUDE_MD_SECTION: brainCacheSection } = await import("./claude-md-section-S6N6WV5J.js");
89
+ const { CLAUDE_MD_SECTION: brainCacheSection } = await import("./claude-md-section-6ZJ3TMO4.js");
90
90
  if (existsSync(claudeMdPath)) {
91
91
  const content = readFileSync(claudeMdPath, "utf-8");
92
92
  if (content.includes("## Brain-Cache MCP Tools")) {
package/dist/mcp.js CHANGED
@@ -1161,7 +1161,7 @@ async function runBuildContext(query, opts) {
1161
1161
  }
1162
1162
 
1163
1163
  // src/mcp/index.ts
1164
- var version = "0.4.1";
1164
+ var version = "0.4.2";
1165
1165
  var log9 = childLogger("mcp");
1166
1166
  var server = new McpServer({ name: "brain-cache", version });
1167
1167
  server.registerTool(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brain-cache",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Local MCP-first context engine for Claude. Index your codebase, retrieve only what matters, and cut token usage.",
5
5
  "license": "MIT",
6
6
  "type": "module",