From 182fd85caf43cb53d0f35efb18254947de85e4bc Mon Sep 17 00:00:00 2001 From: Grzegorz Nowak Date: Mon, 25 May 2026 12:17:46 +0000 Subject: [PATCH] fix: replace vague ledger-capture guidance with concrete criteria MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /handoff command: 'if needed' → 'that aligns with the direction above' - handoff promptGuidelines: 'if needed' → 'that the next context will need' Both changes replace the ambiguous 'if needed' with phrases that anchor ledger capture to a specific referent the LLM can reason about: the user's explicit direction (command) or the next clean context (autonomous handoff). --- handoff/command.ts | 2 +- handoff/tool.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handoff/command.ts b/handoff/command.ts index f4c03b6..64f8314 100644 --- a/handoff/command.ts +++ b/handoff/command.ts @@ -37,7 +37,7 @@ export function registerHandoffCommand(pi: ExtensionAPI, state: AgenticodingStat } pi.sendUserMessage( - `Handoff direction: ${direction}\n\nPrepare a real handoff in the current session and current context. Before calling the handoff tool, capture any reusable state in the ledger if needed. Then complete the picture in a concise but sufficiently detailed handoff brief and call the handoff tool in this turn. Preserve the important knowledge that is still only present in the current context so the next clean context can start well without re-deriving it. Use any structure that makes the next work unambiguous. Include findings, current state, unresolved questions, failed paths worth avoiding, next steps, refs, constraints, and spawn ideas when useful. Reference ledger entries by name when relevant.`, + `Handoff direction: ${direction}\n\nPrepare a real handoff in the current session and current context. Before calling the handoff tool, capture any reusable state in the ledger that aligns with the direction above. Then complete the picture in a concise but sufficiently detailed handoff brief and call the handoff tool in this turn. Preserve the important knowledge that is still only present in the current context so the next clean context can start well without re-deriving it. Use any structure that makes the next work unambiguous. Include findings, current state, unresolved questions, failed paths worth avoiding, next steps, refs, constraints, and spawn ideas when useful. Reference ledger entries by name when relevant.`, ctx.isIdle() ? undefined : { deliverAs: "followUp" }, ); }, diff --git a/handoff/tool.ts b/handoff/tool.ts index 2a699a2..4eaa2e7 100644 --- a/handoff/tool.ts +++ b/handoff/tool.ts @@ -106,7 +106,7 @@ export function registerHandoffTool( promptSnippet: "Pivot to a new job via deliberate handoff compaction", promptGuidelines: [ "Call handoff when the job changes, or when context is past ~30% and noisy. " + - "Capture reusable state in the ledger if needed, then draft a concise but " + + "Capture reusable state in the ledger that the next context will need, then draft a concise but " + "sufficiently detailed brief that completes the picture for the next clean context.", ],