You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Add to your OpenCode config:
13
13
```jsonc
14
14
// opencode.jsonc
15
15
{
16
-
"plugin": ["@tarquinen/opencode-dcp@0.4.2"],
16
+
"plugin": ["@tarquinen/opencode-dcp"],
17
17
"experimental": {
18
18
"primary_tools": ["prune"]
19
19
}
@@ -22,7 +22,7 @@ Add to your OpenCode config:
22
22
23
23
The `experimental.primary_tools` setting ensures the `prune` tool is only available to the primary agent (not subagents).
24
24
25
-
When a new version is available, DCP will show a toast notification. Update by changing the version number in your config.
25
+
DCP automatically updates itself in the background when new versions are available. You'll see a toast notification when an update is downloaded—just restart OpenCode to apply it. To disable auto-updates, set `"autoUpdate": false` in your DCP config.
26
26
27
27
Restart OpenCode. The plugin will automatically start optimizing your sessions.
28
28
@@ -63,6 +63,7 @@ DCP uses its own config file (`~/.config/opencode/dcp.jsonc` or `.opencode/dcp.j
63
63
|`model`| (session) | Model for analysis (e.g., `"anthropic/claude-haiku-4-5"`) |
64
64
|`showModelErrorToasts`|`true`| Show notifications on model fallback |
65
65
|`showUpdateToasts`|`true`| Show notifications when a new version is available |
66
+
|`autoUpdate`|`true`| Automatically download new versions (restart to apply) |
66
67
|`strictModelSelection`|`false`| Only run AI analysis with session or configured model (disables fallback models) |
67
68
|`pruning_summary`|`"detailed"`|`"off"`, `"minimal"`, or `"detailed"`|
68
69
|`nudge_freq`|`10`| How often to remind AI to prune (lower = more frequent) |
The <prunable-tools> list and any pruning nudges are injected by the environment as assistant messages, use this information when deciding what to prune.
3
-
</system-reminder>
4
-
5
-
<instruction name=context_management_protocol>
6
-
You are operating in a context-constrained environment. You must actively manage your context window using the `prune` tool.
Every tool call adds to your context debt. You MUST pay this down regularly by pruning. Do not wait until context is "full" - by then it's too late. Evaluate what can be pruned after every few tool calls.
4
+
ENVIRONMENT
5
+
You are operating in a context-constrained environment and thus must proactively manage your context window using the `prune` tool. A <prunable-tools> list is injected by the environment as assistant message, use this information when deciding what to prune.
10
6
11
-
## When to Prune (Triggers)
12
-
You SHOULD use the prune tool when ANY of these are true:
13
-
- You just completed a task or sub-task
14
-
- You read files that turned out to be unhelpful or only partially useful
15
-
- You have gathered enough information to answer a question or make a decision
16
-
- You ran commands whose output you have already processed
17
-
- Newer tool outputs have made older ones obsolete
18
-
- You are about to start a new phase of work
7
+
PRUNE EARLY, PRUNE OFTEN - BUT PRUNE METHODICALLY
8
+
Every tool call adds to your context debt. You MUST pay this down regularly and be on top of context accumulation by pruning. Evaluate what SHOULD be pruned before jumping the gun.
19
9
20
-
When in doubt, prune. It is better to prune aggressively than to run out of context.
10
+
WHEN TO PRUNE? THE THREE SCENARIOS TO CONSIDER
11
+
1. TASK COMPLETION: When work is done, quietly prune the tools that aren't needed anymore
12
+
2. NOISE REMOVAL: If outputs are irrelevant, unhelpful, or superseded by newer info, prune IMMEDIATELY. No distillation - gun it down
13
+
3. CONTEXT CONSOLIDATION: When pruning valuable context to the task at hand, you MUST ALWAYS distill key findings into your narrative BEFORE pruning. Be surgical and strategic in what you extract. THINK: high signal, low noise
21
14
22
-
## Three Pruning Modes
23
-
Apply the correct mode for each situation:
15
+
You WILL use the `prune` tool when ANY of these are true:
16
+
- Task or sub-task is complete
17
+
- You are about to start a new phase of work
18
+
- You have distilled enough information in your messages to prune related tools
19
+
- Context contains tools output that are unhelpful, noise, or made obsolete by newer outputs
24
20
25
-
1. TASK COMPLETION: When work is done, prune the tools used. No distillation needed - just state the task is complete.
26
-
2. NOISE REMOVAL: If outputs are irrelevant, unhelpful, or outdated (superseded by newer info), prune IMMEDIATELY. No distillation - just cut it out.
27
-
3. CONTEXT CONSOLIDATION: When pruning useful research, you MUST distill key findings into your narrative *before* pruning. Extract only what matters (e.g., a specific function signature from a large file).
21
+
NOTES
22
+
When in doubt, prune out. Prune often yet remain strategic about it.
23
+
FAILURE TO PRUNE will result in context leakage and DEGRADED PERFORMANCES.
28
24
29
-
FAILURE TO PRUNE will result in context overflow and degraded performance.
0 commit comments