Skip to content

Commit 80c8fd0

Browse files
prompt: removing macro scale, try and force the model to compress shorter ranges
1 parent 6ce2fb4 commit 80c8fd0

File tree

3 files changed

+17
-22
lines changed

3 files changed

+17
-22
lines changed

lib/prompts/compress.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@ THE PHILOSOPHY OF COMPRESS
55

66
Think of compression as phase transitions: raw exploration becomes refined understanding. The original context served its purpose; your summary now carries that understanding forward.
77

8-
One method, many scales:
8+
One method, many safe ranges:
99

10-
- micro-range compression for disposable noise
11-
- focused compression for closed investigative slices
12-
- chapter compression for completed implementation phases
10+
- short, closed ranges for disposable noise
11+
- short, closed ranges for resolved investigative slices
12+
- short, closed ranges for completed implementation chunks
1313

14-
Default to micro and focused/meso ranges. Use chapter-scale compression occasionally when a larger phase is fully closed and bounded.
14+
Default to multiple short, bounded compressions. Prefer several safe range compressions over one large sweep whenever independent ranges are available.
1515

1616
CADENCE, SIGNALS, AND LATENCY
1717
Use `compress` during work whenever a slice is summary-safe; do not wait for the user to send another message.
1818

1919
Treat token counts and context growth as soft signals, not hard triggers:
2020

2121
- no fixed threshold forces compression
22-
- a closed slice around ~20k tokens can be totally reasonable to compress
22+
- prioritize closedness and independence over raw range size
2323
- qualitative signals still matter most (stale exploration, noisy tool bursts, resolved branches)
2424

25-
Prefer smaller, regular compressions over infrequent massive compressions for better latency and better summary fidelity.
25+
PREFER smaller, regular compressions OVER infrequent large compressions for better latency and better summary fidelity.
2626

2727
THE SUMMARY
2828
Your summary must be EXHAUSTIVE. Capture file paths, function signatures, decisions made, constraints discovered, key findings... EVERYTHING that maintains context integrity. This is not a brief note - it is an authoritative record so faithful that the original conversation adds no value.
@@ -88,7 +88,7 @@ CRITICAL: AVOID USING TOOL INPUT VALUES
8888
NEVER use tool input schema keys or field names as boundary strings (e.g., "startString", "endString", "filePath", "content"). These may be transformed by the AI SDK and are not reliable. The ONLY acceptable use of tool input strings is a SINGLE concrete field VALUE (not the key), and even then, prefer using assistant text, user messages, or tool result outputs instead. When in doubt, choose boundaries from your own assistant responses or distinctive user message content.
8989

9090
PARALLEL COMPRESS EXECUTION
91-
When multiple independent ranges are ready and their boundaries do not overlap, launch MULTIPLE `compress` calls in parallel in a single response. Run compression sequentially only when ranges overlap or when a later range depends on the result of an earlier compression.
91+
When multiple independent ranges are ready and their boundaries do not overlap, launch MULTIPLE `compress` calls in parallel in a single response. This is the PREFERRED pattern over a single large-range compression when the work can be safely split. Run compression sequentially only when ranges overlap or when a later range depends on the result of an earlier compression.
9292

9393
THE FORMAT OF COMPRESS
9494

lib/prompts/nudge.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@ DOOOOO IT!!!
2424

2525
Avoid unnecessary context build-up with targeted uses of the `compress` tool. Start with low hanging fruits and clearly identified ranges that can be compressed with minimal risk of losing critical information. Look BACK on the conversation history and avoid compressing the newest ranges until you have exhausted older ones
2626

27-
SCALE PRIORITY (MANDATORY)
28-
Use MICRO first.
29-
Escalate to MESO when MICRO is insufficient.
30-
Use MACRO only as a last resort when a larger chapter is truly closed and bounded.
31-
Do not jump directly to MACRO when independent MICRO/MESO ranges are available.
32-
When multiple independent stale ranges are ready, batch MICRO/MESO compressions in parallel.
27+
RANGE STRATEGY (MANDATORY)
28+
Prefer multiple short, closed range compressions.
29+
When multiple independent stale ranges are ready, batch those short compressions in parallel.
30+
Do not jump to a single broad range when the same cleanup can be done safely with several bounded ranges.
3331

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

lib/prompts/system.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,18 @@ You operate in a context-constrained environment. Manage context continuously to
55
The ONLY tool you have for context management is `compress`. It replaces a contiguous portion of the conversation (inclusive) with a technical summary you produce.
66

77
OPERATING STANCE
8-
Compression can operate at various scales. The method is the same regardless of range size, but strategic use case differs.
8+
Prefer short, closed, summary-safe ranges.
9+
When multiple independent stale ranges exist, prefer several short compressions (in parallel when possible) over one large-range compression.
910

10-
You will default to micro and meso compressions
11-
12-
MICRO: ideal for low-latency operations, should aim to compress a range of AT LEAST 5000 tokens to justify the tool call.
13-
MESO: good to filter signal from noise of heavy tool outputs or decluttering the session from closed/resolved investigation paths, aim for AT LEAST 10000 tokens
14-
MACRO: more occasional, for truly closed chapters when smaller ranges are not sufficient, aim for 20000+ tokens
11+
NEVER COMPRESS MORE THAN 20000 TOKENS IN A SINGLE COMPRESS CALL - if you identify a larger stale range, split it into multiple compressions with non-overlapping boundaries.
1512

1613
Use `compress` as steady housekeeping while you work.
1714

1815
CADENCE, SIGNALS, AND LATENCY
1916
Treat token counts and context growth as soft signals, not hard triggers.
2017

2118
- No fixed threshold mandates compression
22-
- A closed context slice around ~20k tokens can be reasonable to compress
19+
- Prioritize closedness and independence over raw range size
2320
- Prefer smaller, regular compressions over infrequent massive compressions for better latency and summary quality
2421
- When multiple independent stale ranges are ready, batch compressions in parallel
2522

@@ -46,7 +43,7 @@ DO NOT COMPRESS IF
4643
- the task in the target range is still actively in progress
4744
- you cannot identify reliable boundaries yet
4845

49-
Evaluate conversation signal-to-noise regularly. Use `compress` deliberately, with a default micro/meso cadence and quality-first summaries. Priorotize ranges intelligently to maintain a high-signal context window that supports your agency
46+
Evaluate conversation signal-to-noise REGULARLY. Use `compress` deliberately with quality-first summaries. Prefer multiple short, independent range compressions before considering broader ranges, and prioritize ranges intelligently to maintain a high-signal context window that supports your agency
5047

5148
It is of your responsibility to keep a sharp, high-quality context window for optimal performance
5249
</instruction>

0 commit comments

Comments
 (0)