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/compress-message.ts
+3-11Lines changed: 3 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ When a selected message contains user intent, preserve that intent with extra ca
8
8
Directly quote short user instructions when that best preserves exact meaning.
9
9
10
10
Yet be LEAN. Strip away the noise: failed attempts that led nowhere, verbose tool output, and repetition. What remains should be pure signal - golden nuggets of detail that preserve full understanding with zero ambiguity.
11
+
If a message contains no significant technical decisions, code changes, or user requirements, produce a minimal one-line summary rather than a detailed one.
11
12
12
13
MESSAGE IDS
13
14
You specify individual raw messages by ID using the injected IDs visible in the conversation:
@@ -17,27 +18,18 @@ You specify individual raw messages by ID using the injected IDs visible in the
17
18
Each message has an ID inside XML metadata tags like \`<dcp-message-id priority="high">m0007</dcp-message-id>\`.
18
19
The ID tag appears at the end of the message it belongs to — each ID covers all the content above it back to the previous ID.
19
20
Treat these tags as message metadata only, not as content to summarize. Use only the inner \`mNNNN\` value as the \`messageId\`.
20
-
The \`priority\` attribute indicates relative context cost. Prefer higher-priority closed messages before lower-priority ones.
21
+
The \`priority\` attribute indicates relative context cost. When using the compress tool, if there are high-priority messages they MUST be compressed if all of their information is not vital to the task at hand.
22
+
If there are previous messages with compress tool results, these MUST be compressed with a minimal summary.
21
23
Messages marked as \`<dcp-message-id>BLOCKED</dcp-message-id>\` cannot be compressed.
22
24
23
25
Rules:
24
26
25
27
- Pick each \`messageId\` directly from injected IDs visible in context.
26
28
- Only use raw message IDs of the form \`mNNNN\`.
27
29
- Ignore XML attributes such as \`priority\` when copying the ID; use only the inner \`mNNNN\` value.
28
-
- Do NOT use compressed block IDs like \`bN\`.
29
30
- Do not invent IDs. Use only IDs that are present in context.
30
-
- Do not target prior compressed blocks or block summaries.
31
31
32
32
BATCHING
33
33
Select MANY messages in a single tool call when they are independently safe to compress.
34
34
Each entry should summarize exactly one message, and the tool can receive as many entries as needed in one batch.
35
-
When several messages are equally safe to compress, prefer higher-priority messages first.
36
-
37
-
Because each message is compressed independently:
38
-
39
-
- Do not describe ranges
40
-
- Do not use start/end boundaries
41
-
- Do not use compressed block placeholders
42
-
- Do not reference prior compressed blocks with \`(bN)\`
Copy file name to clipboardExpand all lines: lib/prompts/context-limit-nudge.ts
+3-9Lines changed: 3 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -7,18 +7,12 @@ You MUST use the \`compress\` tool now. Do not continue normal exploration until
7
7
8
8
If you are in the middle of a critical atomic operation, finish that atomic step first, then compress immediately.
9
9
10
-
RANGE STRATEGY (MANDATORY)
11
-
Prioritize one large, closed, high-yield compression range first.
12
-
This overrides the normal preference for many small compressions.
13
-
Only split into multiple compressions if one large range would reduce summary quality or make boundary selection unsafe.
14
-
15
-
RANGE SELECTION
10
+
SELECTION PROCESS
16
11
Start from older, resolved history and capture as much stale context as safely possible in one pass.
17
-
Avoid the newest active working slice unless it is clearly closed.
18
-
Use visible injected boundary IDs for compression (\`mNNNN\` for messages, \`bN\` for compressed blocks), and ensure \`startId\` appears before \`endId\`.
12
+
Avoid the newest active working messages unless it is clearly closed.
19
13
20
14
SUMMARY REQUIREMENTS
21
-
Your summary must cover all essential details from the selected range so work can continue without reopening raw messages.
15
+
Your summary MUST cover all essential details from the selected messages so work can continue.
22
16
If the compressed range includes user messages, preserve user intent exactly. Prefer direct quotes for short user messages to avoid semantic drift.
You've been iterating for a while after the last user message.
3
3
4
4
If there is a closed portion that is unlikely to be referenced immediately (for example, finished research before implementation), use the compress tool on it now.
5
-
6
-
Prefer multiple short, closed ranges over one large range when several independent slices are ready.
Copy file name to clipboardExpand all lines: lib/prompts/system.ts
-13Lines changed: 0 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -10,19 +10,6 @@ THE PHILOSOPHY OF COMPRESS
10
10
11
11
Think of compression as phase transitions: raw exploration becomes refined understanding. The original context served its purpose; your summary now carries that understanding forward.
12
12
13
-
OPERATING STANCE
14
-
Prefer short, closed, summary-safe compressions.
15
-
When multiple independent stale sections exist, prefer several focused compressions (in parallel when possible) over one broad compression.
16
-
17
-
Use \`compress\` as steady housekeeping while you work.
18
-
19
-
CADENCE, SIGNALS, AND LATENCY
20
-
21
-
- No fixed threshold mandates compression
22
-
- Prioritize closedness and independence over raw size
23
-
- Prefer smaller, regular compressions over infrequent massive compressions for better latency and summary quality
24
-
- When multiple independent stale sections are ready, batch compressions in parallel
25
-
26
13
COMPRESS WHEN
27
14
28
15
A section is genuinely closed and the raw conversation has served its purpose:
0 commit comments