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.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,15 +34,21 @@ Directly quote user messages when they are short enough to include safely. Direc
34
34
COMPRESSED BLOCK PLACEHOLDERS
35
35
When the selected range includes previously compressed blocks, use this exact placeholder format when referencing one:
36
36
37
-
-`{block_N}`
37
+
-`(bN)`
38
+
39
+
Compressed block sections in context are clearly marked with a header:
40
+
41
+
-`[Compressed conversation section]`
42
+
43
+
Compressed block IDs always use the `bN` form (never `mNNNN`) and are represented in the same XML metadata tag format.
38
44
39
45
Rules:
40
46
41
47
- Include every required block placeholder exactly once.
42
48
- Do not invent placeholders for blocks outside the selected range.
43
-
- Treat `{block_N}` placeholders as RESERVED TOKENS. Do not emit `{block_N}` text anywhere except intentional placeholders.
44
-
- If you need to mention a block in prose, use plain text like `compressed bN` (without curly braces).
45
-
- Preflight check before finalizing: the set of `{block_N}` placeholders in your summary must exactly match the required set, with no duplicates.
49
+
- Treat `(bN)` placeholders as RESERVED TOKENS. Do not emit `(bN)` text anywhere except intentional placeholders.
50
+
- If you need to mention a block in prose, use plain text like `compressed bN` (not as a placeholder).
51
+
- Preflight check before finalizing: the set of `(bN)` placeholders in your summary must exactly match the required set, with no duplicates.
46
52
47
53
These placeholders are semantic references. They will be replaced with the full stored compressed block content when the tool processes your output.
48
54
@@ -51,7 +57,7 @@ When you use compressed block placeholders, write the surrounding summary text s
51
57
52
58
- Treat each placeholder as a stand-in for a full conversation segment, not as a short label.
53
59
- Ensure transitions before and after each placeholder preserve chronology and causality.
54
-
- Do not write text that depends on the placeholder staying literal (for example, "as noted in {block_2}").
60
+
- Do not write text that depends on the placeholder staying literal (for example, "as noted in (b2)").
55
61
- Your final meaning must be coherent once each placeholder is replaced with its full compressed block content.
56
62
57
63
Yet be LEAN. Strip away the noise: failed attempts that led nowhere, verbose tool outputs, back-and-forth exploration. What remains should be pure signal - golden nuggets of detail that preserve full understanding with zero ambiguity.
@@ -92,9 +98,7 @@ Rules:
92
98
93
99
ID SOURCES
94
100
95
-
- User messages include a text marker with their `mNNNN` ID.
96
-
- Assistant messages usually include an XML metadata tag in the last tool output: `<dcp-message-id>mNNNN</dcp-message-id>`.
97
-
- Assistant messages without tool outputs use a synthetic `context_info` marker instead.
101
+
- There is always an ID available for each message in XML tags like `<dcp-message-id>...</dcp-message-id>`.
98
102
- Compressed blocks are addressable by `bN` IDs.
99
103
100
104
Treat `<dcp-message-id>...</dcp-message-id>` as metadata only. It is not part of the tool result semantics.
Copy file name to clipboardExpand all lines: lib/prompts/system.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Treat token counts and context growth as soft signals, not hard triggers.
23
23
BOUNDARY MATCHING
24
24
`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`).
25
25
26
-
Assistant tool outputs may include metadata tags like `<dcp-message-id>mNNNN</dcp-message-id>`.
26
+
Each message has an ID inside XML metadata tags like `<dcp-message-id>...</dcp-message-id>`.
27
27
Treat these tags as boundary metadata only, not as tool result content.
28
28
29
29
Only choose IDs currently visible in context. Do not invent IDs.
0 commit comments