{"_id":"@al-bashkir/opencode-caveman","name":"@al-bashkir/opencode-caveman","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@al-bashkir/opencode-caveman","version":"0.1.0","description":"Caveman mode plugin and commands for OpenCode","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"npm run typecheck && npm run build"},"keywords":["opencode","plugin","caveman","ai"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/al-bashkir/opencode-caveman.git"},"homepage":"https://github.com/al-bashkir/opencode-caveman#readme","bugs":{"url":"https://github.com/al-bashkir/opencode-caveman/issues"},"publishConfig":{"access":"public"},"dependencies":{"@opencode-ai/plugin":"^1.4.3"},"devDependencies":{"@types/node":"^22.15.3","typescript":"^5.8.2"},"gitHead":"0de7159ecce0c1398b94d8b946987e1d00d7f60c","_id":"@al-bashkir/opencode-caveman@0.1.0","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-IRWT00N01eqMxnqT0yyTFtP6H7HvAm7PKfgOwDe5n6BEGrZoifvrJ/EBApoPek++aP5B4wxxghzRiTnE/Manjg==","shasum":"8d2ef201da743a428e9e8dfc672d9ffdc0f71e40","tarball":"https://registry.npmjs.org/@al-bashkir/opencode-caveman/-/opencode-caveman-0.1.0.tgz","fileCount":6,"unpackedSize":31720,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA8xWyYuBtJ663AXH7LtOpMUKBY5WVuCQFem1BNYMq1AAiEAqvzY2XPvuRpO7Gu4TbkXk22s2oDcJH639Wj3jb5GkMI="}]},"_npmUser":{"name":"al-bashkir","email":"npm.9deb2@passmail.com"},"directories":{},"maintainers":[{"name":"al-bashkir","email":"npm.9deb2@passmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/opencode-caveman_0.1.0_1775990784416_0.412766997371804"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-12T10:46:24.263Z","0.1.0":"2026-04-12T10:46:24.553Z","modified":"2026-04-12T10:46:24.884Z"},"maintainers":[{"name":"al-bashkir","email":"npm.9deb2@passmail.com"}],"description":"Caveman mode plugin and commands for OpenCode","homepage":"https://github.com/al-bashkir/opencode-caveman#readme","keywords":["opencode","plugin","caveman","ai"],"repository":{"type":"git","url":"git+https://github.com/al-bashkir/opencode-caveman.git"},"bugs":{"url":"https://github.com/al-bashkir/opencode-caveman/issues"},"license":"MIT","readme":"# opencode-caveman\n\n`caveman` rewritten for `opencode` as an installable plugin that self-registers slash commands.\n\nOriginal repo: <https://github.com/JuliusBrussee/caveman>\n\n## What it includes\n\n- `src/index.ts`: persistent caveman mode plugin for `opencode`\n- Dynamic `/caveman`, `/caveman-commit`, `/caveman-review`, and `/caveman:compress` command registration via plugin `config()` hook\n\n## Features\n\n- Persistent per-session response mode\n- Natural language triggers like `talk like caveman` and `normal mode`\n- Intensity levels: `lite`, `full`, `ultra`, `wenyan-lite`, `wenyan`, `wenyan-ultra`\n- Compaction context hook so active mode survives session compaction better\n- Dedicated commit and review slash commands for `opencode`\n- Memory-file compression command with upstream-style backup, validation, and repair flow\n- No separate markdown command files required\n\n## Develop\n\n```bash\nnpm install\nnpm run typecheck\nnpm run build\n```\n\n## Install into opencode\n\nCreate the global plugin directory if it does not exist:\n\n```bash\nmkdir -p ~/.config/opencode/plugins\n```\n\nSymlink this repo into your `opencode` config:\n\n```bash\nln -sf \"/Users/bashkir/Projects/caveman-opencode/src/index.ts\" ~/.config/opencode/plugins/caveman.ts\n```\n\nRestart `opencode` after linking.\n\nThe plugin injects its own slash commands at startup, similar to DCP.\n\n## Publish to npm\n\nLog in to npm and publish the package:\n\n```bash\nnpm login\nnpm publish\n```\n\n`prepublishOnly` runs `npm run typecheck && npm run build` automatically before publish.\n\n## Install from npm\n\nOnce published, add package name to `~/.config/opencode/opencode.json`:\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\"@al-bashkir/opencode-caveman\"]\n}\n```\n\nRestart `opencode`. The plugin registers `/caveman`, `/caveman-commit`, `/caveman-review`, and `/caveman:compress` automatically.\n\n## Usage\n\n- `/caveman`\n- `/caveman ultra`\n- `/caveman wenyan`\n- `/caveman normal`\n- `/caveman-commit`\n- `/caveman-review`\n- `/caveman:compress CLAUDE.md`\n- `/caveman-compress CLAUDE.md`\n\nNatural language also works:\n\n- `talk like caveman`\n- `caveman mode`\n- `stop caveman`\n- `normal mode`\n\n## Caveman Compress\n\nUse `/caveman:compress <filepath>` to shrink natural-language memory files such as `CLAUDE.md`,\npreferences docs, or todo notes.\n\nExamples:\n\n- `/caveman:compress CLAUDE.md`\n- `/caveman:compress docs/preferences.md`\n- `/caveman-compress todos.md`\n\nBehavior:\n\n- Accepts `.md`, `.txt`, `.rst`, and extensionless natural-language files\n- Rejects code/config files such as `.ts`, `.js`, `.json`, `.yaml`, `.toml`, `.sh`\n- Rejects backup files like `CLAUDE.original.md`\n- Creates backup on first run: `CLAUDE.md` -> `CLAUDE.original.md`\n- Aborts if backup already exists, matching the current upstream implementation\n- Preserves code blocks, inline code, URLs, file paths, commands, headings, numbers, and technical terms\n- Runs local validation after compression\n- If validation fails, asks model for targeted fixes up to two times\n- Restores original file and removes backup if validation still fails\n\n## Implementation note\n\nThis plugin now follows the DCP pattern:\n\n- injects commands into `opencode` config via `config()`\n- intercepts them in `command.execute.before`\n- rewrites `/caveman-commit` and `/caveman-review` command input into prompt text for the model\n- handles `/caveman:compress` directly in plugin code using a temporary session, local validation, targeted repair retries, and restore-on-failure logic\n","readmeFilename":"README.md","_rev":"1-9f6e1fb8853fd4d4ae439a01666cf3f9"}