From 36a7e793b65bbb8af70f2e766cf16222f9ee7e20 Mon Sep 17 00:00:00 2001 From: keepitmello Date: Sat, 7 Feb 2026 00:44:22 +0900 Subject: [PATCH] refactor: use factual-content directive instead of persona preservation Replace "Preserve persona, character, and speaking-style cues" with "Focus on factual content: what was discussed, decisions made, and current state" to prevent the summarizer from injecting persona descriptions into the summary (wasting tokens and potentially conflicting with system prompt persona). --- src/agents/pi-extensions/compaction-instructions.test.ts | 4 ++-- src/agents/pi-extensions/compaction-instructions.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/agents/pi-extensions/compaction-instructions.test.ts b/src/agents/pi-extensions/compaction-instructions.test.ts index 7a42ea5d7de..a75112d07cb 100644 --- a/src/agents/pi-extensions/compaction-instructions.test.ts +++ b/src/agents/pi-extensions/compaction-instructions.test.ts @@ -15,8 +15,8 @@ describe("DEFAULT_COMPACTION_INSTRUCTIONS", () => { expect(DEFAULT_COMPACTION_INSTRUCTIONS).toContain("primary language"); }); - it("contains persona preservation directive", () => { - expect(DEFAULT_COMPACTION_INSTRUCTIONS).toContain("persona"); + it("contains factual content directive", () => { + expect(DEFAULT_COMPACTION_INSTRUCTIONS).toContain("factual content"); }); it("does not exceed MAX_INSTRUCTION_LENGTH (800 chars)", () => { diff --git a/src/agents/pi-extensions/compaction-instructions.ts b/src/agents/pi-extensions/compaction-instructions.ts index 0b504834711..104cf6cb90b 100644 --- a/src/agents/pi-extensions/compaction-instructions.ts +++ b/src/agents/pi-extensions/compaction-instructions.ts @@ -12,7 +12,7 @@ */ export const DEFAULT_COMPACTION_INSTRUCTIONS = "Write the summary body in the primary language used in the conversation.\n" + - "Preserve persona, character, and speaking-style cues.\n" + + "Focus on factual content: what was discussed, decisions made, and current state.\n" + "Keep the required summary structure and section headers unchanged.\n" + "Do not translate or alter code, file paths, identifiers, or error messages.";