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
refactor: consolidate and clarify tool prompts for standalone use
- Remove cross-references between discard/extract tools so each works independently
- Add decision hierarchy in both-mode: discard as default, extract for preservation
- Consolidate redundant 'WHEN TO X' scenarios with trigger lists
- Change trigger lists to focus on timing ('evaluate when') vs prescriptive action
- Remove confusing 'minimal distillation for cleanup' concept from extract prompts
- Standardize structure across all system prompts and nudges
Copy file name to clipboardExpand all lines: lib/prompts/extract-tool-spec.txt
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,6 @@ You MUST provide distilled findings in the `distillation` parameter. This is not
24
24
25
25
## When NOT to Use This Tool
26
26
27
-
- **If you don't need to preserve information:** Use the `discard` tool instead for completed tasks or noise removal.
28
27
- **If you need precise syntax:** If you'll need to edit a file, grep for exact strings, or reference precise syntax, keep the raw output. Distillation works for understanding; implementation often requires the original.
29
28
- **If uncertain:** Prefer keeping over re-fetching. The cost of retaining context is lower than the cost of redundant tool calls.
Copy file name to clipboardExpand all lines: lib/prompts/nudge/nudge-both.txt
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
**CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.
3
3
4
4
**Immediate Actions Required:**
5
-
1. **Task Completion:** If a sub-task is complete, discard the tools used.
6
-
2. **Noise Removal:** If you read files or ran commands that yielded no value, discard them NOW.
7
-
3. **Extraction:** If you are holding valuable raw data, you *must* use the `extract` tool to distill the insights and remove the raw entry.
5
+
1. **Task Completion:** If a sub-task is complete, decide: use `discard` if no valuable context to preserve (default), or use `extract` if insights are worth keeping.
6
+
2. **Noise Removal:** If you read files or ran commands that yielded no value, use `discard` to remove them.
7
+
3. **Knowledge Preservation:** If you are holding valuable raw data you'll need to reference later, use `extract` to distill the insights and remove the raw entry.
8
8
9
9
**Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must perform context management.
Copy file name to clipboardExpand all lines: lib/prompts/nudge/nudge-discard.txt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
**CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.
3
3
4
4
**Immediate Actions Required:**
5
-
1. **Task Completion:** If a sub-task is complete, discard the tools used.
6
-
2. **Noise Removal:** If you read files or ran commands that yielded no value, discard them NOW.
5
+
1. **Task Completion:** If a sub-task is complete, use the `discard` tool to remove the tools used.
6
+
2. **Noise Removal:** If you read files or ran commands that yielded no value, use the `discard` tool to remove them.
7
7
8
8
**Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must discard unneeded tool outputs.
Copy file name to clipboardExpand all lines: lib/prompts/nudge/nudge-extract.txt
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,8 @@
2
2
**CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.
3
3
4
4
**Immediate Actions Required:**
5
-
1. **Task Completion:** If a sub-task is complete, extract findings and remove the raw tool outputs.
6
-
2. **Noise Removal:** If you read files or ran commands that yielded no value, extract them with minimal distillation NOW.
7
-
3. **Extraction:** If you are holding valuable raw data, you *must* use the `extract` tool to distill the insights and remove the raw entry.
5
+
1. **Task Completion:** If you have completed work, extract key findings from the tools used. Scale distillation depth to the value of the content.
6
+
2. **Knowledge Preservation:** If you are holding valuable raw data you'll need to reference later, use the `extract` tool with high-fidelity distillation to preserve the insights and remove the raw entry.
8
7
9
-
**Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must extract and remove unneeded tool outputs.
8
+
**Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must extract unneeded tool outputs.
- Noise, irrelevant, or superseded outputs → `discard`
21
+
- Valuable context needed later but raw output too large → `extract`
22
+
11
23
PRUNE METHODICALLY - BATCH YOUR ACTIONS
12
24
Every tool call adds to your context debt. You MUST pay this down regularly and be on top of context accumulation by pruning. Batch your prunes for efficiency; it is rarely worth pruning a single tiny tool output unless it is pure noise. Evaluate what SHOULD be pruned before jumping the gun.
13
25
14
-
WHEN TO PRUNE? THE SCENARIOS TO CONSIDER
15
-
1. TASK COMPLETION: When work is done, quietly discard the tools that aren't needed anymore.
16
-
2. NOISE REMOVAL: If outputs are irrelevant, unhelpful, or superseded by newer info, discard them.
17
-
3. CONTEXT EXTRACTION: When you have valuable context you want to preserve but need to reduce size, use `extract` with high-fidelity distillation. Your distillation must be comprehensive, capturing technical details (signatures, logic, constraints) such that the raw output is no longer needed. THINK: high signal, complete technical substitute.
18
-
19
-
You WILL use `discard` or `extract` when ANY of these are true:
26
+
You WILL evaluate pruning when ANY of these are true:
20
27
- Task or sub-task is complete
21
28
- You are about to start a new phase of work
22
-
- You have gathered enough information to extract from related tools and preserve their value via distillation
23
-
- Context contains tool outputs that are unhelpful, noise, or made obsolete by newer outputs
24
29
- Write or edit operations are complete (pruning removes the large input content)
Copy file name to clipboardExpand all lines: lib/prompts/system/system-prompt-discard.txt
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -10,14 +10,13 @@ CONTEXT MANAGEMENT TOOL
10
10
DISCARD METHODICALLY - BATCH YOUR ACTIONS
11
11
Every tool call adds to your context debt. You MUST pay this down regularly and be on top of context accumulation by discarding. Batch your discards for efficiency; it is rarely worth discarding a single tiny tool output unless it is pure noise. Evaluate what SHOULD be discarded before jumping the gun.
12
12
13
-
WHEN TO DISCARD? THE SCENARIOS TO CONSIDER
14
-
1. TASK COMPLETION: When work is done, quietly discard the tools that aren't needed anymore.
15
-
2. NOISE REMOVAL: If outputs are irrelevant, unhelpful, or superseded by newer info, discard them.
13
+
WHEN TO DISCARD
14
+
- **Task Completion:** When work is done, discard the tools that aren't needed anymore.
15
+
- **Noise Removal:** If outputs are irrelevant, unhelpful, or superseded by newer info, discard them.
16
16
17
-
You WILL use `discard` when ANY of these are true:
17
+
You WILL evaluate discarding when ANY of these are true:
18
18
- Task or sub-task is complete
19
19
- You are about to start a new phase of work
20
-
- Context contains tool outputs that are unhelpful, noise, or made obsolete by newer outputs
21
20
- Write or edit operations are complete (discarding removes the large input content)
Copy file name to clipboardExpand all lines: lib/prompts/system/system-prompt-extract.txt
+6-9Lines changed: 6 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -5,21 +5,18 @@ ENVIRONMENT
5
5
You are operating in a context-constrained environment and thus must proactively manage your context window using the `extract` tool. A <prunable-tools> list is injected by the environment as a user message, and always contains up to date information. Use this information when deciding what to extract.
6
6
7
7
CONTEXT MANAGEMENT TOOL
8
-
- `extract`: Extract key findings into distilled knowledge before removing raw outputs. Use this to preserve important information while reducing context size.
8
+
- `extract`: Extract key findings from tools into distilled knowledge before removing the raw content from context. Use this to preserve important information while reducing context size.
9
9
10
10
EXTRACT METHODICALLY - BATCH YOUR ACTIONS
11
-
Every tool call adds to your context debt. You MUST pay this down regularly and be on top of context accumulation by extracting. Batch your extractions for efficiency; it is rarely worth extracting a single tiny tool output unless it is pure noise. Evaluate what SHOULD be extracted before jumping the gun.
11
+
Every tool call adds to your context debt. You MUST pay this down regularly and be on top of context accumulation by extracting. Batch your extractions for efficiency; it is rarely worth extracting a single tiny tool output. Evaluate what SHOULD be extracted before jumping the gun.
12
12
13
-
WHEN TO EXTRACT? THE SCENARIOS TO CONSIDER
14
-
1. TASK COMPLETION: When work is done, extract any valuable findings and remove the raw outputs.
15
-
2. NOISE REMOVAL: If outputs are irrelevant, unhelpful, or superseded by newer info, extract them with minimal distillation.
16
-
3. CONTEXT PRESERVATION: When you have valuable context you want to preserve but need to reduce size, use `extract` with high-fidelity distillation. Your distillation must be comprehensive, capturing technical details (signatures, logic, constraints) such that the raw output is no longer needed. THINK: high signal, complete technical substitute.
13
+
WHEN TO EXTRACT
14
+
- **Task Completion:** When work is done, extract key findings from the tools used. Scale distillation depth to the value of the content.
15
+
- **Knowledge Preservation:** When you have valuable context you want to preserve but need to reduce size, use high-fidelity distillation. Your distillation must be comprehensive, capturing technical details (signatures, logic, constraints) such that the raw output is no longer needed. THINK: high signal, complete technical substitute.
17
16
18
-
You WILL use `extract` when ANY of these are true:
17
+
You WILL evaluate extracting when ANY of these are true:
19
18
- Task or sub-task is complete
20
19
- You are about to start a new phase of work
21
-
- You have gathered enough information to extract from related tools and preserve their value via distillation
22
-
- Context contains tool outputs that are unhelpful, noise, or made obsolete by newer outputs
23
20
- Write or edit operations are complete (extracting removes the large input content)
0 commit comments