Skip to content

Commit 6bdd419

Browse files
committed
Improve README with pruning strategies documentation
- Add Pruning Strategies section explaining deduplication vs AI analysis - Simplify installation section with cleaner example - Add info about version update notifications - Improve config precedence documentation - Remove redundant Version Pinning section
1 parent 12e6b96 commit 6bdd419

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,27 @@ Automatically reduces token usage in OpenCode by removing obsolete tool outputs
66

77
![DCP in action](dcp-demo.png)
88

9+
## Pruning Strategies
10+
11+
DCP implements two complementary strategies:
12+
13+
**Deduplication** — Fast, zero-cost pruning that identifies repeated tool calls (e.g., reading the same file multiple times) and keeps only the most recent output. Runs instantly with no LLM calls.
14+
15+
**AI Analysis** — Uses a language model to semantically analyze conversation context and identify tool outputs that are no longer relevant to the current task. More thorough but incurs LLM cost.
16+
917
## Installation
1018

11-
Add to your OpenCode config (`~/.config/opencode/opencode.json` or `.opencode/opencode.json`):
19+
Add to your OpenCode config:
1220

13-
```json
21+
```jsonc
22+
// opencode.jsonc
1423
{
15-
"plugin": ["@tarquinen/opencode-dcp"]
24+
"plugins": ["@tarquinen/opencode-dcp@0.3.16"]
1625
}
1726
```
1827

28+
When a new version is available, DCP will show a toast notification. Update by changing the version number in your config.
29+
1930
Restart OpenCode. The plugin will automatically start optimizing your sessions.
2031

2132
> **Note:** Project `plugin` arrays override global completely—include all desired plugins in project config if using both.
@@ -55,13 +66,11 @@ DCP uses its own config file (`~/.config/opencode/dcp.jsonc` or `.opencode/dcp.j
5566
}
5667
```
5768

58-
Settings merge: **Defaults****Global****Project**. Restart OpenCode after changes.
69+
### Config Precedence
5970

60-
### Version Pinning
71+
Settings are merged in order: **Defaults****Global** (`~/.config/opencode/dcp.jsonc`) → **Project** (`.opencode/dcp.jsonc`). Each level overrides the previous, so project settings take priority over global, which takes priority over defaults.
6172

62-
```json
63-
{ "plugin": ["@tarquinen/[email protected]"] }
64-
```
73+
Restart OpenCode after making config changes.
6574

6675
## License
6776

0 commit comments

Comments
 (0)