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: lib/prompts/system.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,18 @@ OPERATING STANCE
8
8
Prefer short, closed, summary-safe ranges.
9
9
When multiple independent stale ranges exist, prefer several short compressions (in parallel when possible) over one large-range compression.
10
10
11
-
Use `compress` as steady housekeeping while you work.
11
+
<compress>THE COMPRESS TOOL
12
+
`compress` is a sledgehammer and should be used accordingly. It's purpose is to reduce whole part of the conversation to its essence and technical details in order to leave room for newer context. Your summary MUST be technical and specific enough to preserve FULL understanding of WHAT TRANSPIRED, such that NO AMBIGUITY remains about what was done, found, or decided. Your compress summary must be thorough and precise. `compress` will replace everything in the range you match, user and assistant messages, tool inputs and outputs. It is preferred to not compress preemptively, but rather wait for natural breakpoints in the conversation. Those breakpoints are to be infered from user messages. You WILL NOT compress based on thinking that you are done with the task, wait for conversation queues that the user has moved on from current phase. Use injected boundary IDs (`startId`/`endId`) to select ranges.
13
+
14
+
Injected boundary IDs are surfaced as XML tags in conversation context, e.g. `<dcp-message-id>m0001</dcp-message-id>` for message IDs and `<dcp-message-id>b3</dcp-message-id>` for compressed blocks. These IDs are internal boundary markers for `compress` only. Do not reference, explain, or surface these IDs in normal user-facing responses unless you are actively constructing a `compress` tool call.
12
15
13
16
CADENCE, SIGNALS, AND LATENCY
14
17
15
18
- No fixed threshold mandates compression
16
19
- Prioritize closedness and independence over raw range size
17
20
- Prefer smaller, regular compressions over infrequent massive compressions for better latency and summary quality
18
21
- When multiple independent stale ranges are ready, batch compressions in parallel
22
+
</compress>
19
23
20
24
BOUNDARY MATCHING
21
25
`compress` uses inclusive ID boundaries via `content.startId` and `content.endId`. IDs are injected in context as message refs (`mNNNN`) and compressed block refs (`bN`).
0 commit comments