From bb27e11aacc02226748881d0ecbb4b2764e271ef Mon Sep 17 00:00:00 2001 From: Eve Date: Thu, 23 Apr 2026 07:20:51 +0800 Subject: [PATCH] Add hard-gate guidance to hook preflight --- hooks/force-recall/handler.ts | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/hooks/force-recall/handler.ts b/hooks/force-recall/handler.ts index 2e96d3c..b64de8a 100644 --- a/hooks/force-recall/handler.ts +++ b/hooks/force-recall/handler.ts @@ -64,6 +64,33 @@ async function runLongTaskWrapper(workspaceDir: string, ctx: any): Promise { wrapperResult.recommendedFallback ? `recommendedFallback=${wrapperResult.recommendedFallback}` : null, wrapperResult.requiredNextAction ? `requiredNextAction=${wrapperResult.requiredNextAction}` : null, wrapperResult.handoff?.mode ? `handoff.mode=${wrapperResult.handoff.mode}` : null, - "- Treat this as preflight guidance from the wrapper MVP, not final truth.", - "- If classification=long_task, prefer task state + checkpoint discipline.", - "- If silentCandidate=true and silentLaunchOk=false, do not launch silent mode as-is.", + ...buildWrapperEnforcement(wrapperResult), "[/LONG_TASK_GOVERNOR_PREFLIGHT]", "", ]