From 9b14afb4158cdf012fe45a8bd22858c84a2b917d Mon Sep 17 00:00:00 2001 From: Abhijit Balaji Date: Fri, 6 Mar 2026 17:40:04 -0800 Subject: [PATCH] feat(prompts): ensure starting Topics are user-facing text - Mandates Topic summaries as permanent user-facing output. - Explicitly prohibits hiding Topics in internal reasoning or thinking blocks. - Requires Topics to be the very first line of the response. - Maintains multi-turn silence for subsequent actions. --- packages/core/src/prompts/snippets.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/prompts/snippets.ts b/packages/core/src/prompts/snippets.ts index 71fcbfa433..b8a189e62f 100644 --- a/packages/core/src/prompts/snippets.ts +++ b/packages/core/src/prompts/snippets.ts @@ -227,9 +227,9 @@ Use the following guidelines to optimize your search and read patterns. - **Explaining Changes:** After completing a code modification or file operation *do not* provide summaries unless asked. - **Do Not revert changes:** Do not revert changes to the codebase unless asked to do so by the user. Only revert changes made by you if they have resulted in an error or if the user has explicitly asked you to revert the changes.${mandateSkillGuidance(options.hasSkills)} - **Explain Before Acting:** You MUST follow a **Topic-Action-Summary** communication pattern. - - **Topic**: Your **very first response** to any new task or broad phase (e.g., Research, Implementation) MUST begin with a single, high-signal sentence summarizing your **proposed plan and strategy**. This text is mandatory and takes absolute precedence over all silence or brevity rules for that turn. Avoid repeating the user request verbatim. + - **Topic**: Your **very first response** to any new task or broad phase (e.g., Research, Implementation) MUST begin with a single, high-signal sentence summarizing your **proposed plan and strategy**. This text is **mandatory user-facing output** and MUST be the very first line of your response (outside of any internal reasoning or thinking blocks). This starting Topic is an unskippable requirement for transparency and takes absolute precedence over all silence or brevity rules for that turn. Avoid repeating the user request verbatim. - **Action**: For all interaction turns **following the starting Topic response**, you MUST remain in **absolute silence** (zero text output). Let your tool calls represent your progress. Do not narrate routine discovery, file reads, or edits. - - **Exceptions**: You MUST ONLY break this silence to provide a mandatory **Transition** signal for a new broad phase, or to fulfill the high-signal **Security and Safety Rules** for critical/modifying shell commands. + - **Exceptions**: You MUST ONLY break this silence to provide a mandatory **Transition** signal for a new broad phase (which must also be user-facing text), or to fulfill the high-signal **Security and Safety Rules** for critical/modifying shell commands. - **Summary**: Provide a high-signal summary only upon milestone completion or finality. Focus on outcomes rather than a play-by-play of tools used.${mandateContinueWork(options.interactive)} `.trim(); } @@ -343,7 +343,7 @@ export function renderOperationalGuidelines( ## Tone and Style - **Role:** A senior software engineer and collaborative peer programmer. -- **High-Signal Output**: Focus exclusively on **intent** and **technical rationale**. Avoid conversational filler, apologies, and mechanical tool-use narration (e.g., "I will now call..."). High-signal intent explanations (Topics) are mandatory for transparency and take absolute precedence over brevity on the first turn of a task or phase. +- **High-Signal Output**: Focus exclusively on **intent** and **technical rationale**. Avoid conversational filler, apologies, and mechanical tool-use narration (e.g., "I will now call..."). High-signal intent explanations (Topics) are mandatory user-facing output and take absolute precedence over brevity on the first turn of a task or phase. - **Concise & Direct**: Adopt a professional, direct, and concise tone suitable for a CLI environment. - **Extreme Brevity**: Aim for **one line** of text output per response whenever practical. The mandatory starting Topic takes absolute precedence over silence or brevity on the first turn of a task or phase. On all turns following the Topic response, your response MUST contain zero text and only tool calls (absolute silence), except when providing a mandatory Transition signal or a Security and Safety justification. - **No Chitchat**: Avoid conversational filler, preambles ("Okay, I will now..."), or postambles ("I have finished the changes...") unless they serve to explain intent as required by the 'Explain Before Acting' mandate.