Skip to content

Commit 9c8aa18

Browse files
committed
document experimental message mode
1 parent 7116280 commit 9c8aa18

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ DCP reduces context size through a compress tool and automatic cleanup. Your ses
2828

2929
### Compress
3030

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.
3232

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.
3439

3540
### Deduplication
3641

@@ -100,7 +105,7 @@ Each level overrides the previous, so project settings take priority over global
100105
// Unified context compression tool and behavior settings
101106
"compress": {
102107
// Compression mode: "range" (compress spans into block summaries)
103-
// or "message" (compress individual raw messages)
108+
// or experimental "message" (compress individual raw messages)
104109
"mode": "range",
105110
// Permission mode: "allow" (no prompt), "ask" (prompt), "deny" (tool not registered)
106111
"permission": "allow",
@@ -173,16 +178,17 @@ DCP provides a `/dcp` slash command:
173178
- `/dcp stats` — Shows cumulative pruning statistics across all sessions.
174179
- `/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`.
175180
- `/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`.
177182
- `/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.
178183
- `/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.
179184

180185
### Prompt Overrides
181186

182-
DCP exposes five editable prompts:
187+
DCP exposes six editable prompts:
183188

184189
- `system`
185-
- `compress`
190+
- `compress-range`
191+
- `compress-message`
186192
- `context-limit-nudge`
187193
- `turn-nudge`
188194
- `iteration-nudge`
@@ -196,7 +202,7 @@ To customize behavior, add a file with the same name under an overrides director
196202
To reset an override, delete the matching file from your overrides directory.
197203

198204
> [!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.
200206
201207
### Protected Tools
202208

0 commit comments

Comments
 (0)