From 75868fab955ae84f50c668b03329a1b04cd8c1f1 Mon Sep 17 00:00:00 2001 From: itlackey Date: Tue, 9 Jun 2026 01:11:18 -0500 Subject: [PATCH] fix(hook): drop proposal accept/reject approval guard The PreToolUse guard on `akm proposal accept|reject` blocked authorized automated review of the proposal queue, and the regex was start-anchored (trivially bypassed by `bun .../cli.js proposal ...`), so it added friction without being a real stop. Removed the Bash hard-block and the proposal references from the prompt-expansion note; left the memory-promote/reject note and the other risky-command guards intact. Co-Authored-By: Claude Opus 4.8 --- claude/hooks/akm-hook.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/claude/hooks/akm-hook.ts b/claude/hooks/akm-hook.ts index 565e5eb..74460a2 100644 --- a/claude/hooks/akm-hook.ts +++ b/claude/hooks/akm-hook.ts @@ -762,8 +762,8 @@ function userPromptExpansion(): string { refs, outcome: { status: "ok" }, }) - if ((/\/akm-memory-(promote|reject)\b/.test(expanded) || /\/akm-proposal\s+(accept|reject|drain)\b/.test(expanded) || /\bproposal\s+drain\b/.test(expanded)) && !/\b(confirm|approved|approval)\b/i.test(expanded)) { - return emitHookContext("UserPromptExpansion", "AKM note: mutating memory/proposal flows should be explicit. Confirm promotion/rejection or proposal acceptance before changing durable state.") + if (/\/akm-memory-(promote|reject)\b/.test(expanded) && !/\b(confirm|approved|approval)\b/i.test(expanded)) { + return emitHookContext("UserPromptExpansion", "AKM note: mutating memory flows should be explicit. Confirm promotion/rejection before changing durable state.") } if (PROPOSAL_FLOW_RE.test(expanded)) ensureFreshProposalCheckpoint(rawInput) if (/\/akm-/.test(expanded)) {