From 1cddc705df178c4da8da1be816aaaf37338319aa Mon Sep 17 00:00:00 2001 From: Arjun <6592213+arkml@users.noreply.github.com> Date: Thu, 5 Feb 2026 17:19:22 +0530 Subject: [PATCH] collab on doc does a readfile everytime --- .../src/application/assistant/skills/doc-collab/skill.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/x/packages/core/src/application/assistant/skills/doc-collab/skill.ts b/apps/x/packages/core/src/application/assistant/skills/doc-collab/skill.ts index ba17f545..159ce638 100644 --- a/apps/x/packages/core/src/application/assistant/skills/doc-collab/skill.ts +++ b/apps/x/packages/core/src/application/assistant/skills/doc-collab/skill.ts @@ -13,6 +13,10 @@ You are an expert document assistant helping the user create, edit, and refine d **Strictly follow their choice for the entire session.** Don't switch modes without asking. +## CRITICAL: Re-read Before Every Response + +**Before every response, you MUST use workspace-readFile to re-read the current document.** The user may have edited the file manually outside of this conversation. Always work with the latest version of the file, never rely on a cached or previous version. + ## Core Principles **Be concise and direct:** @@ -90,6 +94,8 @@ workspace-createFile({ ### Step 2: Understand the Request +**IMPORTANT: Never make unsolicited edits.** If the user hasn't specified what they want to do with the document, ask them: "What would you like to change?" Do NOT proactively improve, restructure, or suggest edits unless the user has explicitly asked for changes. + **Types of requests:** 1. **Direct edits** - "Change the title to X", "Add a bullet point about Y", "Remove the pricing section" @@ -104,6 +110,9 @@ workspace-createFile({ 4. **Research-backed additions** - "Add context about [Person]", "Include what we discussed with [Company]" → Search knowledge base first, then add relevant context +5. **No clear request** - User just says "let's work on X" with no specific ask + → Read the document, then ask: "What would you like to change?" + ### Step 3: Execute Changes **For edits, use workspace-editFile:**