@lornatang/dsh-caveman 0.1.11 → 0.1.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.12 - 2026-11-25
4
+
5
+ - Sync the upstream Caveman source, CLI and tested runtime binaries to 4.2.0 while retaining DSH session analysis.
6
+ - Add opt-in Code-Mode to DSH through the official Caveman MCP gateway.
7
+ - Honor the upstream reinforcement setting while supplying the initial and changed mode rules.
8
+
3
9
  ## 0.1.11 - 2026-11-23
4
10
 
5
11
  - Keep native events local to DSH on Windows and enforce resource limits on crew operations.
package/README.md CHANGED
@@ -84,6 +84,7 @@ The bundle supplies a `caveman` row. Override only the fields you want to change
84
84
  | `browseBinary` | auto-detected | Override the absolute path to `caveman-browse`; requires the DSH MCP manager. |
85
85
  | `mcpBinary` | auto-detected | Override the absolute path to `caveman-mcp`; requires the DSH MCP manager. |
86
86
  | `memoryBinary` | auto-detected | Override the absolute path to `cavemem`; enables its local memory tools. |
87
+ | `codeMode` | `false` | Enable the Caveman 4.2.0 Code-Mode MCP gateway with an explicit configuration file and workspace. |
87
88
 
88
89
  ### Voice and usage
89
90
 
@@ -91,6 +92,8 @@ Use `/caveman`, `/ultracave`, `/megacave`, `/caveman ultra`, `/caveman wenyan`,
91
92
 
92
93
  `defaultMode` accepts `caveman`, `ultracave`, `megacave`, `manual`, or `off`. An explicit profile value wins; otherwise the resolver checks `CAVEMAN_DEFAULT_MODE`, project configuration, and user configuration before falling back to `caveman`.
93
94
 
95
+ Set `CAVEMAN_REINFORCE=0` or `"reinforce": false` in Caveman configuration to skip per-turn voice reminders. The initial rules and mode switches still reach the model.
96
+
94
97
  The native coding policy is included in the system prompt when the output module and Core are active. When the local runtime is running, it also supplies task-specific rules, maintains state across compaction, and can suggest reusing a verified unchanged file observation. Recovery references are shown only when the recovery MCP tool is available. `CAVEMAN_CORE=off`, record mode, or the `record-only` native profile disables the active rules; restart DSH after changing these settings. The `core-lean-build` profile adds the lean-build policy.
95
98
 
96
99
  On Windows, DSH disables the native event hooks until the local runtime can prove its pipe identity. Dynamic task rules, native compaction state, and file observation reuse require these hooks. On this platform, use the static coding policy and HTTP middleware.
@@ -136,6 +139,18 @@ For Anthropic API traffic, merge [examples/caveman-anthropic.patch.yml](examples
136
139
 
137
140
  ### MCP, Blocks and Browse
138
141
 
142
+ To enable Code-Mode, install the Caveman 4.2.0 or newer runtime and add this to the DSH profile patch:
143
+
144
+ ```yaml
145
+ - id: caveman
146
+ config:
147
+ codeMode:
148
+ config: /absolute/path/to/servers.json
149
+ workspace: /absolute/path/to/workspace
150
+ ```
151
+
152
+ The JSON file uses the upstream `mcpServers` format. Use `{"mcpServers":{}}` for the gateway's built-in tools only. DSH exposes the gateway as `mcp__caveman_codemode__*`. The gateway loads the explicitly configured MCP servers and keeps execution and mutation tools separate.
153
+
139
154
  When `caveman-mcp` is installed, the DSH MCP manager exposes the `mcp__caveman__*` tools `caveman_compress`, `caveman_retrieve`, `caveman_stats`, `caveman_toon_encode`, and `caveman_toon_decode`. The server uses the local Caveman recovery store for its handles. Set `CAVEMAN_MCP=off` to disable automatic registration.
140
155
 
141
156
  When `cavemem` is installed, the MCP manager exposes `mcp__cavemem__*` tools for remembering, recalling, revising, inspecting, and forgetting local facts. `cavemem_recover` returns the exact original behind a recall handle and requires the DSH subprocess and working-directory services. Memories persist in the local Caveman home.
package/README.zh.md CHANGED
@@ -84,6 +84,7 @@ bundle 自带 `caveman` 行。在 profile 的 `cordis.patch.yml` 中添加覆盖
84
84
  | `browseBinary` | 自动查找 | 覆盖 `caveman-browse` 的绝对路径;需要 DSH MCP manager。 |
85
85
  | `mcpBinary` | 自动查找 | 覆盖 `caveman-mcp` 的绝对路径;需要 DSH MCP manager。 |
86
86
  | `memoryBinary` | 自动发现 | 覆盖 `cavemem` 的绝对路径;启用本地记忆工具。 |
87
+ | `codeMode` | `false` | 使用指定的配置文件和工作区启用 Caveman 4.2.0 的 Code-Mode MCP 网关。 |
87
88
 
88
89
  ### 回答模式与用量
89
90
 
@@ -91,6 +92,8 @@ bundle 自带 `caveman` 行。在 profile 的 `cordis.patch.yml` 中添加覆盖
91
92
 
92
93
  `defaultMode` 可设为 `caveman`、`ultracave`、`megacave`、`manual` 或 `off`。profile 的显式配置优先;否则依次检查 `CAVEMAN_DEFAULT_MODE`、项目配置和用户配置,均未设置时使用 `caveman`。
93
94
 
95
+ 设置 `CAVEMAN_REINFORCE=0`,或在 Caveman 配置中设置 `"reinforce": false`,可关闭每轮风格提醒。首次规则和切换模式时的规则仍会传给模型。
96
+
94
97
  output 模块和 Core 启用时,原生编码规则会加入系统提示词。本地运行时启动后,还会提供任务规则、衔接压缩前后的状态,并在文件确定未变化时提示复用已有观察;只有恢复 MCP 工具可用时才会展示恢复引用。设置 `CAVEMAN_CORE=off`、使用 record 模式或 `record-only` 原生 profile 可关闭活动规则;更改后重启 DSH。`core-lean-build` profile 会额外加入 lean-build 规则。
95
98
 
96
99
  Windows 上,DSH 会暂停原生事件钩子,直到本地运行时能够证明其管道身份。动态任务规则、原生压缩状态和文件观察复用依赖这些钩子。Windows 上可通过 HTTP middleware 使用压缩,也可使用静态编码规则。
@@ -136,6 +139,18 @@ Anthropic API 请求可将 [examples/caveman-anthropic.patch.yml](examples/cavem
136
139
 
137
140
  ### MCP、Blocks 和 Browse
138
141
 
142
+ 安装 Caveman 4.2.0 或更新的运行组件后,可在 DSH profile patch 中启用 Code-Mode:
143
+
144
+ ```yaml
145
+ - id: caveman
146
+ config:
147
+ codeMode:
148
+ config: /absolute/path/to/servers.json
149
+ workspace: /absolute/path/to/workspace
150
+ ```
151
+
152
+ 配置文件使用上游 `mcpServers` JSON 格式。填写 `{"mcpServers":{}}` 时只使用网关内置工具。DSH 以 `mcp__caveman_codemode__*` 注册网关,网关加载显式配置的 MCP 服务,并将只读执行与修改操作分配给不同工具。
153
+
139
154
  安装 `caveman-mcp` 后,DSH MCP manager 会提供 `mcp__caveman__*` 工具:`caveman_compress`、`caveman_retrieve`、`caveman_stats`、`caveman_toon_encode` 和 `caveman_toon_decode`。服务使用本地 Caveman 恢复存储保存句柄。设置 `CAVEMAN_MCP=off` 可关闭自动注册。
140
155
 
141
156
  安装 `cavemem` 后,MCP manager 会提供 `mcp__cavemem__*` 工具,用于记住、检索、修订、查看和删除本地事实。`cavemem_recover` 可取回检索句柄对应的完整原文,需要 DSH subprocess 和 working-directory 服务。记忆保存在本地 Caveman 目录。
@@ -36,7 +36,7 @@ function textBlocks(event) {
36
36
  return event.data.message.content.flatMap((block, index) => block.type === 'text' ? [{ index, text: block.text }] : []);
37
37
  }
38
38
  export function isManagedTool(name) {
39
- return name === 'caveman_retrieve' || name === 'cavemem_recover' || name.startsWith('mcp__caveman__') || name.startsWith('mcp__caveman_browse__') || name.startsWith('mcp__cavemem__') ||
39
+ return name === 'caveman_retrieve' || name === 'cavemem_recover' || name.startsWith('mcp__caveman__') || name.startsWith('mcp__caveman_browse__') || name.startsWith('mcp__caveman_codemode__') || name.startsWith('mcp__cavemem__') ||
40
40
  /^mcp__.+__(?:caveman_retrieve|browser_recover)$/u.test(name);
41
41
  }
42
42
  const MAX_ORIGINAL_ENTRIES = 64;
package/lib/index.js CHANGED
@@ -1,9 +1,10 @@
1
- import { readFileSync } from 'node:fs';
1
+ import { readFileSync, statSync } from 'node:fs';
2
+ import { isAbsolute } from 'node:path';
2
3
  import { fileURLToPath } from 'node:url';
3
4
  import z from '@deepseek-ai/schemastery';
4
5
  import { createUserMessage } from '@deepseek-ai/dsh-llm';
5
6
  import { createSkillProvider } from './skills.js';
6
- import { defaultModeFor, SessionModeTracker } from './mode.js';
7
+ import { defaultModeFor, getReinforce, SessionModeTracker } from './mode.js';
7
8
  import { registerCompression } from './compression.js';
8
9
  import { registerBlocks } from './blocks.js';
9
10
  import { statsReport } from './stats.js';
@@ -23,6 +24,7 @@ export const Config = z.object({
23
24
  browseBinary: z.string().min(1),
24
25
  mcpBinary: z.string().min(1),
25
26
  memoryBinary: z.string().min(1),
27
+ codeMode: z.union([z.const(false), z.object({ config: z.string().required(), workspace: z.string().required() })]).default(false),
26
28
  });
27
29
  /** Register skills and reinforce the selected mode per session. */
28
30
  export function apply(ctx, config = {}) {
@@ -64,6 +66,18 @@ export function apply(ctx, config = {}) {
64
66
  ctx.inject(['subprocess', 'workingDirectory'], scoped => registerMemoryRecovery(scoped, memory));
65
67
  const servers = [{ name: 'caveman', binary: mcp, args: [] }, { name: 'caveman_browse', binary: browse, args: [] }, { name: 'cavemem', binary: memory, args: ['mcp'] }]
66
68
  .filter((server) => server.binary !== undefined);
69
+ if (settings.mcp && config.codeMode) {
70
+ if (!mcp)
71
+ throw new Error('dsh-caveman: Code-Mode requires the Caveman 4.2.0 or newer MCP binary');
72
+ const { config: serversFile, workspace } = config.codeMode;
73
+ if (!isAbsolute(serversFile) || !statSync(serversFile, { throwIfNoEntry: false })?.isFile()) {
74
+ throw new Error('dsh-caveman: codeMode.config must be an absolute path to an MCP configuration file');
75
+ }
76
+ if (!isAbsolute(workspace) || !statSync(workspace, { throwIfNoEntry: false })?.isDirectory()) {
77
+ throw new Error('dsh-caveman: codeMode.workspace must be an absolute path to a directory');
78
+ }
79
+ servers.push({ name: 'caveman_codemode', binary: mcp, args: ['codemode', '--config', serversFile, '--workspace', workspace] });
80
+ }
67
81
  if (servers.length) {
68
82
  ctx.inject(['mcpManager'], scoped => {
69
83
  for (const server of servers) {
@@ -101,6 +115,8 @@ export function apply(ctx, config = {}) {
101
115
  const selected = modes.resolve(defaultModeFor(config.defaultMode, cwd), agent.session, directMessages);
102
116
  if (selected.action === 'one-shot' || (selected.mode === 'off' && selected.action === 'none'))
103
117
  return decision;
118
+ if (selected.action === 'none' && selected.hasRules && !getReinforce(cwd))
119
+ return decision;
104
120
  let text;
105
121
  if (selected.action === 'status') {
106
122
  text = `Report this status without changing it: Caveman mode: ${selected.mode}`;
package/lib/mode.js CHANGED
@@ -2,6 +2,7 @@ import { createRequire } from 'node:module';
2
2
  const require = createRequire(import.meta.url);
3
3
  const parser = require('../vendor/caveman/src/hooks/caveman-parse.js');
4
4
  const modeConfig = require('../vendor/caveman/src/hooks/caveman-config.js');
5
+ export const getReinforce = modeConfig.getReinforce;
5
6
  /** A profile override wins; otherwise follow environment and file resolution. */
6
7
  export function defaultModeFor(configured, cwd) {
7
8
  if (configured !== undefined)
@@ -65,7 +66,9 @@ export class SessionModeTracker {
65
66
  const initial = reusable ? previous.mode : configured === 'manual' ? 'off' : configured;
66
67
  const events = session.snapshotEvents(reusable ? previous.seq : undefined, end);
67
68
  const mode = replay(initial, configured, events);
68
- this.states.set(session, { seq: end, configured, mode });
69
- return resolvePending(mode, configured, pending);
69
+ const hasRules = (reusable && previous.hasRules) || events.some(event => event.type === 'user/message' && event.data.source.kind === 'dsh-caveman-mode' &&
70
+ event.data.content.some(block => block.type === 'text' && /^Caveman mode: (?:caveman|ultracave|megacave)\n\n/u.test(block.text)));
71
+ this.states.set(session, { seq: end, configured, mode, hasRules });
72
+ return { ...resolvePending(mode, configured, pending), hasRules };
70
73
  }
71
74
  }
@@ -24,6 +24,10 @@ export interface Config {
24
24
  browseBinary?: string;
25
25
  mcpBinary?: string;
26
26
  memoryBinary?: string;
27
+ codeMode?: false | {
28
+ config: string;
29
+ workspace: string;
30
+ };
27
31
  }
28
32
  export declare const Config: z<Config>;
29
33
  /** Register skills and reinforce the selected mode per session. */
@@ -15,6 +15,7 @@ interface InputEvent {
15
15
  readonly type: string;
16
16
  readonly data: unknown;
17
17
  }
18
+ export declare const getReinforce: (startDir?: string) => boolean;
18
19
  /** A profile override wins; otherwise follow environment and file resolution. */
19
20
  export declare function defaultModeFor(configured: DefaultMode | undefined, cwd?: string): DefaultMode;
20
21
  /** Replay only user-authored messages, then evaluate the incoming batch. */
@@ -28,6 +29,7 @@ export declare class SessionModeTracker {
28
29
  resolve(configured: DefaultMode, session: Session, pending: readonly InputMessage[]): {
29
30
  mode: VoiceMode;
30
31
  action: ModeAction;
32
+ hasRules: boolean;
31
33
  };
32
34
  }
33
35
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lornatang/dsh-caveman",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Caveman integration for DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -75,7 +75,7 @@
75
75
  }
76
76
  },
77
77
  "dependencies": {
78
- "@caveman-ai/cli": "4.1.0",
78
+ "@caveman-ai/cli": "4.2.0",
79
79
  "@caveman-ai/sdk": "1.2.0",
80
80
  "@deepseek-ai/schemastery": "~3.19.0",
81
81
  "undici": "^8.12.4",
@@ -1,29 +1,29 @@
1
1
  {
2
- "version": "0.1.11",
2
+ "version": "0.1.12",
3
3
  "binaries": {
4
4
  "linux-x64": {
5
5
  "name": "dsh-caveman-learn_linux_amd64",
6
- "sha256": "44ba840775952ee1e8f568a25f43fac236926b0d1ea2aebfdf5d0ce8e8c497af"
6
+ "sha256": "4f73e771ac59e218ac7ec5f3648e79e472d565e5f3621755b5a1cf28b18bb0e1"
7
7
  },
8
8
  "linux-arm64": {
9
9
  "name": "dsh-caveman-learn_linux_arm64",
10
- "sha256": "74efd959b4a684abfd70a56b65b5d515e42d961d49d8cd6420e829ad8aea2f3d"
10
+ "sha256": "c29a8cc49fff51b23352e687bb3974398ee6d2835b84fd31e290c9e3f0852f22"
11
11
  },
12
12
  "darwin-x64": {
13
13
  "name": "dsh-caveman-learn_darwin_amd64",
14
- "sha256": "12b351a47a3b0eaec6ce874315bb27feb7a01db2215c81c0f8fcd3358f6cbd8f"
14
+ "sha256": "e460f3fe253eb76b85064e857f748dcb718d96ec59ea93a31d90d540e7326175"
15
15
  },
16
16
  "darwin-arm64": {
17
17
  "name": "dsh-caveman-learn_darwin_arm64",
18
- "sha256": "b3e4566e3d04170cd777c9793a71995edfe91cabccf6a87897109cebaa39a105"
18
+ "sha256": "c8f21233f3f4a66322ee961a4f75aa03315e65b17ba3f9b4ae44fffe19805131"
19
19
  },
20
20
  "win32-x64": {
21
21
  "name": "dsh-caveman-learn_win32_amd64",
22
- "sha256": "bf305bfaff6e4ad2f1a6e399d2191e0a179f7096de05283d027d99f2a9b3f2af"
22
+ "sha256": "e5ea9938bedbdf3fd4dbae9717da2d643a4acb3802cdfcb116b878ea47e885b1"
23
23
  },
24
24
  "win32-arm64": {
25
25
  "name": "dsh-caveman-learn_win32_arm64",
26
- "sha256": "a03b3c3cc71264a8d5777cd807a69e7ea28a02e0d502b228578b30c9161c1593"
26
+ "sha256": "c5d43c0dcf011490a1fe6aaf1239a9d90f959949ce34be9f971933c073b3c64d"
27
27
  }
28
28
  }
29
29
  }
@@ -2,17 +2,16 @@
2
2
 
3
3
  ## New: Caveman Code. Free.
4
4
 
5
- **The most efficient coding agent.** Same model, same work, smaller bill.
5
+ **21% less than Codex per solved task on Terminal-Bench 4.** Same model on both sides.
6
6
 
7
7
  <table>
8
8
  <tr>
9
- <td align="center"><h3>21% cheaper</h3>than Codex<br><sub>Terminal-Bench 4, per solved task</sub></td>
10
- <td align="center"><h3>14% cheaper</h3>than Claude Code<br><sub>Terminal-Bench 4, 97 vs 83 solved</sub></td>
11
- <td align="center"><h3>76% cheaper</h3>than Claude Code<br><sub>full workday, 4 connected apps</sub></td>
9
+ <td align="center"><h3>21% cheaper</h3>than Codex<br><sub>Terminal-Bench 4, per solved task, GPT-6.1 Sol: $1.21 vs $1.52, 90 of 192 runs solved both</sub></td>
10
+ <td align="center"><h3>Level</h3>with Claude Code within noise<br><sub>Terminal-Bench 4, Opus 5.5: 97 of 180 runs solved vs 83 of 177; $5.19 vs $6.04 per solved task, 95% interval 0.70x to 1.02x</sub></td>
12
11
  </tr>
13
12
  </table>
14
13
 
15
- <sub>Same model on both sides: GPT-6.1 Sol against Codex, Opus 5.5 against Claude Code. Our own runs, November 2026, at list prices. <a href="https://caveman.so/code">How we measured</a></sub>
14
+ <sub>Measured build, benchmark settings on, not the shipped app: the app ships the same harness with three benchmark-only settings turned off. Same model on both sides: GPT-6.1 Sol against Codex, Opus 5.5 against Claude Code. Our own runs, November 2026, at list prices. <a href="https://caveman.so/code#benchmarks">How we measured</a></sub>
16
15
 
17
16
  Every coding agent in one window. Free on the subscriptions and keys you already have.
18
17
 
@@ -33,8 +32,8 @@ Every coding agent in one window. Free on the subscriptions and keys you already
33
32
 
34
33
  <table>
35
34
  <tr>
36
- <td align="center" width="25%"><h3>33.2% fewer</h3>input tokens, whole sessions<br><sub><a href="#read-less-332-fewer-input-tokens">54 Claude Code runs</a>, 18 of 18 answers right</sub></td>
37
- <td align="center" width="25%"><h3>54% cheaper</h3>with Auto, same score<br><sub><a href="#auto-54-cheaper-same-score">85 coding tasks</a> vs Opus 5.5 at xhigh, interim</sub></td>
35
+ <td align="center" width="25%"><h3>33.2% fewer</h3>input tokens, whole sessions<br><sub><a href="#read-less-332-fewer-input-tokens">6 synthetic large-tool-output tasks, 18 pairs</a>, Aug 2026 engine, 18 of 18 answers right</sub></td>
36
+ <td align="center" width="25%"><h3>0.46×</h3>the cost of Opus at xhigh, with Auto<br><sub><a href="#auto-046x-the-cost-of-opus-at-xhigh-interim">85 coding tasks</a>, interim, score gap ±7 points, unresolved</sub></td>
38
37
  <td align="center" width="25%"><h3>397 → 76</h3>tokens for one test run<br><sub><a href="#blocks-code-mode-script-written-once">Blocks</a> vs <code>| tail -20</code></sub></td>
39
38
  <td align="center" width="25%"><h3>1.4 to 2.4× cheaper</h3>with caveman-style output<br><sub><a href="https://arxiv.org/abs/2606.24083">Adobe Research</a>, eight models</sub></td>
40
39
  </tr>
@@ -43,7 +42,7 @@ Every coding agent in one window. Free on the subscriptions and keys you already
43
42
  Cited by **[Adobe Research](https://arxiv.org/abs/2606.24083)** · A/B tested by **[JetBrains](https://blog.jetbrains.com/ai/2026/07/speak-to-ai-agents-like-cavemen-tosave-tokens/)** · Remade for Elasticsearch on **[Elasticsearch Labs](https://www.elastic.co/search-labs/blog/elastic-caveman-ai-token-reduction)**<br>
44
43
  **#1** on [Hacker News](https://news.ycombinator.com/item?id=47647455) · **#1** on GitHub Trending · *"No way this actually works."* [ThePrimeagen](https://www.youtube.com/watch?v=L29q2LRiMRc)
45
44
 
46
- **[Install](#install) · [Six rocks](#six-rocks-one-install) · [Proof](#proof) · [Say less](#say-less-the-caveman-voice) · [Read less](#read-less-332-fewer-input-tokens) · [Auto](#auto-54-cheaper-same-score) · [Blocks](#blocks-code-mode-script-written-once) · [Commands](#commands) · [Caveman Cloud](#caveman-cloud)**
45
+ **[Install](#install) · [Six rocks](#six-rocks-one-install) · [Proof](#proof) · [Say less](#say-less-the-caveman-voice) · [Read less](#read-less-332-fewer-input-tokens) · [Auto](#auto-046x-the-cost-of-opus-at-xhigh-interim) · [Blocks](#blocks-code-mode-script-written-once) · [Commands](#commands) · [Caveman Cloud](#caveman-cloud)**
47
46
 
48
47
  </div>
49
48
 
@@ -76,7 +75,7 @@ Pick your club:
76
75
  |---|---|---:|
77
76
  | `/caveman` | New object ref each render, so React re-renders. Wrap the prop in `useMemo`. | 20 |
78
77
  | `/ultracave` | Inline object prop, new ref, re-render. `useMemo`. | 14 |
79
- | `/megacave` | 新參照致重繪。`useMemo`。 | **13** |
78
+ | `/megacave` | 新參照致重繪。`useMemo`。 | 13 |
80
79
 
81
80
  <sub>Token counts: tiktoken o200k.</sub>
82
81
 
@@ -98,12 +97,12 @@ New in 4.0: caveman is six parts. All on after install. Each has its own switch.
98
97
 
99
98
  | Rock | What it does | Measured |
100
99
  |---|---|---|
101
- | **[Say less](#say-less-the-caveman-voice)** | Agent answers short. Code stays exact | 63 → 20 tokens, same fix |
102
- | **[Read less](#read-less-332-fewer-input-tokens)** | Logs, JSON, CSV, test output shrink before the model reads them | **33.2%** fewer input tokens per session |
103
- | **[Auto](#auto-54-cheaper-same-score)** · new | Picks the model and the effort for each ask | **54%** cheaper than Opus at xhigh, same score |
100
+ | **[Say less](#say-less-the-caveman-voice)** | Agent answers short. Code stays exact | 3% shorter than "Answer concisely." (ultracave 35%), n=10 |
101
+ | **[Read less](#read-less-332-fewer-input-tokens)** | Logs, JSON, CSV, test output shrink before the model reads them | **33.2%** fewer input tokens per session (6 synthetic large-tool-output tasks, 18 pairs, Aug 2026 engine) |
102
+ | **[Auto](#auto-046x-the-cost-of-opus-at-xhigh-interim)** · new | Picks the model and the effort for each ask | 0.46× the cost of Opus at xhigh in an interim run (85 tasks); quality gap unresolved |
104
103
  | **[Blocks](#blocks-code-mode-script-written-once)** · new | Code mode: agent keeps the scripts it writes and runs them again | **397 → 76** tokens for one test run |
105
104
  | **[Waste fixes](#smaller-rocks)** | Finds where your tokens go and fixes it. New: keeps the prompt cache warm while you pause | Not measured yet |
106
- | **[Browse](#smaller-rocks)** | Web pages come back compressed | **129.8×** smaller page |
105
+ | **[Browse](#smaller-rocks)** | Web pages come back compressed | 14.9% smaller full page than Playwright; 121 vs 15,704 tokens with a query, on one 200-row table |
107
106
 
108
107
  `caveman status` shows what is on. `caveman off browse` turns one off. Only Auto needs an account, and it is free. [4.0.0 release notes](https://github.com/JuliusBrussee/caveman/releases/tag/v4.0.0)
109
108
 
@@ -133,7 +132,7 @@ Two findings shaped caveman. Adobe: cavemanning *your* prompt makes answers wors
133
132
  | **Knows when to stop** | Security warnings, irreversible actions, and confused users get full sentences. Then grunt resumes |
134
133
  | **Your prompts stay yours** | Never rewritten. [Research say that backfire](#proof) |
135
134
 
136
- Ten dev questions on claude-opus-5-5:
135
+ Example run, n=10, not a claim. Ten dev questions on claude-opus-5-5:
137
136
 
138
137
  | Instruction | Output tokens |
139
138
  |---|---:|
@@ -172,7 +171,7 @@ claude plugin marketplace add JuliusBrussee/caveman && claude plugin install cav
172
171
  gemini extensions install https://github.com/JuliusBrussee/caveman
173
172
 
174
173
  # Every agent on your machine at once, plus the Claude Code statusline badge (Node.js 22.13+)
175
- curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/v4.1.0/install.sh | bash
174
+ curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/v4.2.0/install.sh | bash
176
175
  ```
177
176
 
178
177
  Already inside Claude Code? Same rock, slash form. Type these where you talk to Claude:
@@ -185,23 +184,23 @@ Already inside Claude Code? Same rock, slash form. Type these where you talk to
185
184
  Windows, PowerShell 5.1+:
186
185
 
187
186
  ```powershell
188
- irm https://raw.githubusercontent.com/JuliusBrussee/caveman/v4.1.0/install.ps1 | iex
187
+ irm https://raw.githubusercontent.com/JuliusBrussee/caveman/v4.2.0/install.ps1 | iex
189
188
  ```
190
189
 
191
190
  On npm 12 or newer, new npm block git install. One-liners above handle it themselves from v3.2.0 on. Old one-liner pinned to v3.1.0 or older still fail there: use one above, or this:
192
- `npx --allow-git=root -y github:JuliusBrussee/caveman#v4.1.0`
191
+ `npx --allow-git=root -y github:JuliusBrussee/caveman#v4.2.0`
193
192
 
194
193
  Changed your mind: `npx -y github:JuliusBrussee/caveman -- --uninstall` (on npm 12+, add `--allow-git=root` too)
195
194
 
196
195
  Only grabbed the skill? `npx skills remove JuliusBrussee/caveman -g` take it back out.
197
196
 
198
- Install broke? Open your agent in this repo and say *"Read CLAUDE.md and INSTALL.md, install caveman for me."* Agent fix own brain.
197
+ Install broke? Open your agent in this repo and say *"Read INSTALL.md, install caveman for me."* Agent fix own brain.
199
198
 
200
199
  </details>
201
200
 
202
201
  ## Read less: 33.2% fewer input tokens
203
202
 
204
- **The voice shrinks what the agent says. This shrinks what it reads. Same answers: 18 of 18 right.**
203
+ **The voice shrinks what the agent says. This shrinks what it reads. Same answers: 18 of 18 right.** 6 synthetic large-tool-output tasks, 18 pairs, Aug 2026 engine.
205
204
 
206
205
  | File type | The file, through caveman | File saved | Whole Claude Code session, 3 runs | Session saved |
207
206
  |---|---:|---:|---:|---:|
@@ -213,11 +212,11 @@ Install broke? Open your agent in this repo and say *"Read CLAUDE.md and INSTALL
213
212
  | HTML | 21,670 → 21,670 | none yet | 140,687 → 154,641 | 9.9% worse |
214
213
  | **All six** | 130,611 → 22,994 | 82.4% | **885,793 → 591,673** | **33.2%** |
215
214
 
216
- *The file* is each test file through today's compressor alone. *The session* is the whole agent run, which also carries the system prompt and tools, so it moves less. Honest part: the session run is from August 2026 on an older engine, HTML has no compressor yet so it lost, and each test file hides one record in 61 to 72 KB of noise. Yours will vary. Headroom on the same suite: 15 of 18 right, 6.7% fewer tokens. [Method](./docs/WRAP-BENCHMARK.md#per-file-compression)
215
+ *The file* is each test file through today's compressor alone. *The session* is the whole agent run, which also carries the system prompt and tools, so it moves less. Honest part: the session run is from August 2026 on an older engine, HTML has no compressor yet so it lost, and each test file hides one record in 61 to 72 KB of noise. Yours will vary. Headroom on the same suite: 15 of 18 right, 6.7% fewer tokens (interval crosses zero; harness not public). [Method](./docs/WRAP-BENCHMARK.md#per-file-compression)
217
216
 
218
217
  Every original stays on your disk. The agent can pull it back any time.
219
218
 
220
- ## Auto: 54% cheaper, same score
219
+ ## Auto: 0.46x the cost of Opus at xhigh (interim)
221
220
 
222
221
  **New model in your agent's picker. Pick Auto and caveman chooses the model and the effort for each ask. Hard ask, big brain. Easy ask, save rocks.**
223
222
 
@@ -1,32 +0,0 @@
1
- # skills/caveman-learn — the Caveman Learn editing skill (Apache-2.0, public)
2
-
3
- The consent-gated half of `caveman learn`. The analyzer (the Go proxy) **measures**
4
- where an agent's tokens go and writes a ranked plan; this skill is what an agent
5
- loads to **act** on that plan — proposing each fix and applying it only with the
6
- user's per-edit yes. It is the loop-closer the learn spec §10
7
- describes, plus the new `cavemem_offload` move.
8
-
9
- ## Layout
10
- - `SKILL.md` — the canonical skill body (frontmatter `name: caveman-learn` + a
11
- trigger-phrase `description`; body = the read-plan → per-class consent loop). This
12
- file is the source of truth.
13
- - `tests/skill-file.test.mjs` — asserts the canonical file is well-formed and honest
14
- (frontmatter present; the net-token-negative gate, the never-make-the-agent-dumber
15
- guard, consent-per-edit, and reversibility are all stated; no imperative for
16
- behavioral findings; no placeholders).
17
-
18
- ## Install path
19
- `caveman tools skills install caveman-learn` (in `../../cli/src/index.ts`) writes this file
20
- into a repo's `.claude/skills/caveman-learn/SKILL.md` (Claude Code) or
21
- `~/.codex/skills/caveman-learn/SKILL.md` (Codex). The CLI **embeds a byte-identical copy**
22
- (`CAVEMAN_LEARN_SKILL_MD`) because the published CLI ships no sibling assets;
23
- `../../cli/tests/skills.runtime.mjs` asserts the embedded copy equals this canonical
24
- file (the drift guard). **Change this file and that constant together.**
25
-
26
- ## Boundary (binding)
27
- The skill — using the agent's own file tools — is the ONLY thing that edits a user's
28
- config. `caveman learn apply` stays read-only (it materializes candidates), and
29
- `caveman mem *` are mechanical store ops. The offload move enforces a net-token-negative
30
- gate and the never-make-the-agent-dumber guard before any trim.
31
-
32
- See ../../mem/CLAUDE.md (cavemem) · ../caveman-explore/SKILL.md (the packaging precedent)