|
1 | | -<instruction how_to="work_in_this_environement"> |
2 | | -Anytime you call a tool, you must distill the signal from the noise of that tool result in your message. Always do this for every tools that has actual signals in its ouptut. |
| 1 | +<instruction name=signal_management> |
| 2 | +After calling a series of tools, YOU ALWAYS HAVE TO distill signals from their results in your next message. This ensures tracability of your reasoning, informs the user of your findings, and is PARAMOUNT to best context window management practices. |
| 3 | + |
| 4 | +THIS IS NON-NEGOTIABLE - YOU ARE EXPECTED TO RESPECT THIS INSTRUCTION THROUGHOUT THE CONVERSATION |
| 5 | +</instruction> |
| 6 | + |
| 7 | +<instruction name=context_window_management> |
| 8 | +A strong constraint we have in this environment is the context window size. To help keep the conversation focused and clear from the noise, you must use the `context_pruning` tool: at opportune moments, and in an effective manner. |
3 | 9 | </instruction> |
4 | 10 |
|
5 | | -<instruction tool="context_pruning"> |
6 | | -To effectively manage this conversation context, you MUST ALWAYS narrate your findings AS YOU DISCOVER THEM. No tool result (be it read, bash, grep...) should be left unexplained. By narrating the evolution of your undersdtanding of the task at hand, you distill the signal from the noise produced by the tools you called. Only then (knowledge lives in your outputs as well as in tool outputs), you can use the context_pruning tool. Using the context_pruning tool will declutter the conversation from tool outputs we no longer need to reason through current task, and is why you need to only use this tool once you have explained your findings in a message. |
| 11 | +<instruction name=context_pruning> |
| 12 | +To effectively manage conversation context, you MUST ALWAYS narrate your findings AS YOU DISCOVER THEM, BEFORE calling any `context_pruning` tool. No tool result (read, bash, grep, webfetch, etc.) should be left unexplained. By narrating the evolution of your understanding, you transform raw tool outputs into distilled knowledge that lives in the persisted context window. |
| 13 | + |
| 14 | +Tools are VOLATILE - Once this distilled knowledge is in your reply, you can safely use the `context_pruning` tool to declutter the conversation. |
7 | 15 |
|
8 | | -EXAMPLE: |
9 | | -AFTER you've read a bunch of files, and found that for reason X, Y is happening, and is supported by tool outputs in the conversation, AND you've distilled this knowledge from the noise in your message intended for the user, YOU WILL USE THE CONTEXT_PRUNING TOOL to clear the clutter solving this step has caused. |
| 16 | +WHEN TO USE `context_pruning`: |
| 17 | +- After you complete a discrete unit of work (e.g. confirming a hypothesis, or closing out one branch of investigation). |
| 18 | +- After exploratory bursts of tool calls that led you to a clear conclusion. (or to noise) |
| 19 | +- Before starting a new phase of work where old tool outputs are no longer needed to inform your next actions. |
| 20 | + |
| 21 | +CRITICAL: |
| 22 | +You must ALWAYS narrate your findings in a message BEFORE using the `context_pruning` tool. Skipping this step risks deleting raw evidence before it has been converted into stable, distilled knowledge. This harms your performances, wastes user time, and undermines effective use of the context window. |
| 23 | + |
| 24 | +EXAMPLE WORKFLOW: |
| 25 | +1. You call several tools (read, bash, grep...) to investigate a bug. |
| 26 | +2. You identify that “for reason X, behavior Y occurs”, supported by those tool outputs. |
| 27 | +3. In your next message, you EXPLICITLY narrate: |
| 28 | + - What you did (which tools, what you were looking for). |
| 29 | + - What you found (the key facts / signals). |
| 30 | + - What you concluded (how this affects the task or next step). |
| 31 | +>YOU MUST ALWAYS THINK HIGH SIGNAL LOW NOISE FOR THIS NARRATION |
| 32 | +4. ONLY AFTER the narration, you call the `context_pruning` tool with a brief reason (e.g. "exploration for bug X complete; moving on to next bug"). |
10 | 33 | </instruction> |
| 34 | + |
| 35 | + |
0 commit comments