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
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,14 @@ DCP reduces context size through a compress tool and automatic cleanup. Your ses
28
28
29
29
### Compress
30
30
31
-
Compress is a tool exposed to your model that selects a conversation range and replaces it with a technical summary. You can think of this as a much smarter version of Opencode's compaction process. Instead of triggering statically when your session reaches its maximum context and on the entire coding session, Compress allows the model to pick when to activate based on task completion, and to only compress a subset of messages containing the completed task. This allows the summaries replacing the session content to be much more focused and precise than Opencode's native compaction.
31
+
Compress is a tool exposed to your model that replaces closed, stale conversation content with high-fidelity technical summaries. You can think of this as a much smarter version of Opencode's compaction process. Instead of triggering statically when your session reaches its maximum context and on the entire coding session, Compress allows the model to pick when to activate based on task completion, and to only compress the specific messages that are no longer needed verbatim.
32
32
33
-
When a new compression overlaps an earlier one, the earlier summary is nested inside the new one — so information is preserved through layers of compression rather than diluted away. Additionally, protected tool outputs (such as subagents and skills) and protected file patterns are always kept in compression summaries, ensuring that the most important information is never lost. You can also enable `protectUserMessages` to preserve your messages verbatim during compression, though note that large prompts (e.g. copy-pasting log files in the prompt) will then never be compressed away.
33
+
DCP supports two compression modes:
34
+
35
+
-`range` mode compresses a contiguous span of conversation into one or more reusable block summaries.
36
+
-`message` mode is experimental and compresses individual raw messages independently, letting the model manage context much more surgically around closed work.
37
+
38
+
In `range` mode, when a new compression overlaps an earlier one, the earlier summary is nested inside the new one so information is preserved through layers of compression rather than diluted away. In both modes, protected tool outputs (such as subagents and skills) and protected file patterns are kept in compression summaries, ensuring that the most important information is never lost. You can also enable `protectUserMessages` to preserve your messages verbatim during compression, though note that large prompts (e.g. copy-pasting log files in the prompt) will then never be compressed away.
34
39
35
40
### Deduplication
36
41
@@ -100,7 +105,7 @@ Each level overrides the previous, so project settings take priority over global
100
105
// Unified context compression tool and behavior settings
101
106
"compress": {
102
107
// Compression mode: "range" (compress spans into block summaries)
103
-
// or "message" (compress individual raw messages)
108
+
// or experimental "message" (compress individual raw messages)
104
109
"mode":"range",
105
110
// Permission mode: "allow" (no prompt), "ask" (prompt), "deny" (tool not registered)
106
111
"permission":"allow",
@@ -173,16 +178,17 @@ DCP provides a `/dcp` slash command:
173
178
-`/dcp stats` — Shows cumulative pruning statistics across all sessions.
174
179
-`/dcp sweep` — Prunes all tools since the last user message. Accepts an optional count: `/dcp sweep 10` prunes the last 10 tools. Respects `commands.protectedTools`.
175
180
-`/dcp manual [on|off]` — Toggle manual mode or set explicit state. When on, the AI will not autonomously use context management tools.
176
-
-`/dcp compress [focus]` — Trigger a single compress tool execution. Optional focus text directs what range to compress.
181
+
-`/dcp compress [focus]` — Trigger a single compress tool execution. Optional focus text directs what content to compress, following the active `compress.mode`.
177
182
-`/dcp decompress <n>` — Restore a specific active compression by ID (for example `/dcp decompress 2`). Running without an argument shows available compression IDs, token sizes, and topics.
178
183
-`/dcp recompress <n>` — Re-apply a user-decompressed compression by ID (for example `/dcp recompress 2`). Running without an argument shows recompressible IDs, token sizes, and topics.
179
184
180
185
### Prompt Overrides
181
186
182
-
DCP exposes five editable prompts:
187
+
DCP exposes six editable prompts:
183
188
184
189
-`system`
185
-
-`compress`
190
+
-`compress-range`
191
+
-`compress-message`
186
192
-`context-limit-nudge`
187
193
-`turn-nudge`
188
194
-`iteration-nudge`
@@ -196,7 +202,7 @@ To customize behavior, add a file with the same name under an overrides director
196
202
To reset an override, delete the matching file from your overrides directory.
197
203
198
204
> [!NOTE]
199
-
> `compress` prompt changes apply after plugin restart because tool descriptions are registered at startup.
205
+
> `compress-range` and `compress-message` prompt changes apply after plugin restart because tool descriptions are registered at startup.
0 commit comments