Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion agents/cavecrew-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ description: >
scope. Returns caveman diff receipt. Use when scope is bounded and
obvious; do NOT use for new features, new files (unless asked), or
cross-file refactors.
tools: [Read, Edit, Write, Grep, Glob]
tools:
Read: true
Edit: true
Write: true
Grep: true
Glob: true
---

Caveman-ultra. Drop articles/filler. Code/paths exact, backticked. No narration.
Expand Down
6 changes: 5 additions & 1 deletion agents/cavecrew-investigator.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ description: >
"what calls Y", "list all uses of Z", "map this directory". Output is
caveman-compressed so the main thread eats ~60% fewer tokens than
vanilla Explore. Refuses to suggest fixes.
tools: [Read, Grep, Glob, Bash]
tools:
Read: true
Grep: true
Glob: true
Bash: true
model: haiku
---

Expand Down
5 changes: 4 additions & 1 deletion agents/cavecrew-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ description: >
no scope creep. Output format `path:line: <emoji> <severity>: <problem>. <fix>.`
Use for "review this PR", "review my diff", "audit this file". Skips
formatting nits unless they change meaning.
tools: [Read, Grep, Bash]
tools:
Read: true
Grep: true
Bash: true
model: haiku
---

Expand Down
22 changes: 5 additions & 17 deletions bin/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ const OPENCODE_AGENTS_MD_END = '<!-- caveman-end -->';

function opencodeConfigDir() {
if (process.env.XDG_CONFIG_HOME) return path.join(process.env.XDG_CONFIG_HOME, 'opencode');
if (IS_WIN) return path.join(process.env.APPDATA || path.join(os.homedir(), 'AppData', 'Roaming'), 'opencode');
return path.join(os.homedir(), '.config', 'opencode');
}

Expand Down Expand Up @@ -633,15 +632,8 @@ function installOpencode(ctx) {
cfg.plugin.push(OPENCODE_PLUGIN_REL);
}
if (opts.withMcpShrink) {
if (!cfg.mcp || typeof cfg.mcp !== 'object') cfg.mcp = {};
if (!cfg.mcp['caveman-shrink']) {
cfg.mcp['caveman-shrink'] = {
type: 'local',
command: ['npx', '-y', MCP_SHRINK_PKG],
enabled: true,
};
process.stdout.write(' registered caveman-shrink MCP server\n');
}
process.stdout.write(' installed caveman-shrink package (needs manual MCP wrapping)\n');
process.stdout.write(` see: https://github.com/${REPO}/tree/main/src/mcp-servers/caveman-shrink\n`);
}
SETTINGS.writeSettings(opencodeJson, cfg);
process.stdout.write(` patched: ${opencodeJson}\n`);
Expand Down Expand Up @@ -801,13 +793,9 @@ function installMcpShrink(ctx) {
note(' src/hooks/README.md to your Claude Code MCP config manually.');
return { kind: 'skip', why: 'manual config required' };
}
const r = runSpawn('claude', ['mcp', 'add', 'caveman-shrink', '--', 'npx', '-y', MCP_SHRINK_PKG], null, opts.dryRun);
if ((r.status || 0) === 0) {
note(' registered. Wrap an upstream by editing the mcpServers entry — see:');
note(` https://github.com/${REPO}/tree/main/src/mcp-servers/caveman-shrink`);
return { kind: 'ok' };
}
return { kind: 'fail', why: 'claude mcp add failed' };
note(' installed caveman-shrink package (needs manual MCP wrapping).');
note(` see: https://github.com/${REPO}/tree/main/src/mcp-servers/caveman-shrink`);
return { kind: 'ok' };
}

// ── Init writers (per-repo rule files) ────────────────────────────────────
Expand Down
7 changes: 7 additions & 0 deletions src/plugins/opencode/commands/caveman-compress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
description: Compress natural language memory files into caveman format
---
Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens.
Preserves all technical substance, code, URLs, and structure.

Use the `caveman-compress` skill.
6 changes: 0 additions & 6 deletions src/plugins/opencode/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ function opencodeConfigDir() {
if (process.env.XDG_CONFIG_HOME) {
return path.join(process.env.XDG_CONFIG_HOME, 'opencode');
}
if (process.platform === 'win32') {
return path.join(
process.env.APPDATA || path.join(os.homedir(), 'AppData', 'Roaming'),
'opencode'
);
}
return path.join(os.homedir(), '.config', 'opencode');
}

Expand Down