Skip to content

Commit 7a48c26

Browse files
prompts
1 parent 7741734 commit 7a48c26

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

lib/prompts/compress.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ WHERE TO PICK STRINGS FROM (important for reliable matching):
6363
- Previous compress summaries
6464
- Tool input string values (individual values, not whole serialized objects)
6565

66+
NEVER USE GENERIC OR REPEATING STRINGS:
67+
68+
Tool status messages repeat identically across every invocation. These are ALWAYS ambiguous:
69+
70+
- "Edit applied successfully." (appears in EVERY successful edit)
71+
- "File written successfully" or any tool success/error boilerplate
72+
- Common tool output patterns that are identical across calls
73+
74+
Instead, combine the generic output with surrounding unique context (a file path, a specific code snippet, or your own unique assistant text).
75+
76+
Each boundary string you choose MUST be unique to ONE specific message. Before using a string, ask: "Could this exact text appear in any other place in this conversation?" If yes, extend it or pick a different string.
77+
6678
WHERE TO NEVER PICK STRINGS FROM:
6779

6880
- `<system-reminder>` tags or any XML wrapper/meta-commentary around messages

lib/prompts/nudge.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ When multiple independent stale ranges are ready, batch MICRO/MESO compressions
3333

3434
If you are performing a critical atomic operation, do not interrupt it, but make sure to perform context management rapidly
3535

36-
Be mindful of the startString and endString you use for compression and prefer using `muid` and `uid` strings for reliable boundary matching. Ensure your summaries are inclusive of all parts of the range.
36+
BE VERY MINDFUL of the startString and endString you use for compression for RELIABLE boundary matching. NEVER use generic tool outputs like "Edit applied successfully." or generic status message as boundaries. Use unique assistant text or distinctive content instead with enough surrounding context to ensure uniqueness.
3737

38+
Ensure your summaries are inclusive of all parts of the range.
3839
If the compressed range includes user messages, preserve user intent exactly. Prefer direct quotes for short user messages to avoid semantic drift.
3940
</instruction>

lib/prompts/system.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Treat token counts and context growth as soft signals, not hard triggers.
2626
BOUNDARY MATCHING
2727
`compress` uses inclusive string boundaries, matching a string at the start of a message or tool output will consume the entire item. Be conservative and precise: choose unique strings with enough surrounding context to avoid ambiguous matches or accidental range capture
2828

29+
NEVER use generic tool status messages as boundaries (e.g. "Edit applied successfully.", "File written successfully"). These repeat across every tool call and will always fail with multiple matches.
30+
2931
THE SUMMARY STANDARD
3032
Your summary MUST be technical and specific enough to preserve FULL understanding of what transpired, such that NO ambiguity remains about what asked, found, planned, done, or decided - yet noise free
3133

0 commit comments

Comments
 (0)