From 81ba84ccd6a8334e31ef369e26be8a1abe11d62a Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Tue, 6 Jan 2026 15:14:23 +0900 Subject: [PATCH] refactor(hooks): update hook constants and configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update hook constants and configuration across agent-usage-reminder, keyword-detector, and claude-code-hooks. 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) --- src/hooks/agent-usage-reminder/constants.ts | 12 ++++++------ src/hooks/claude-code-hooks/index.ts | 2 +- src/hooks/keyword-detector/constants.ts | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/hooks/agent-usage-reminder/constants.ts b/src/hooks/agent-usage-reminder/constants.ts index 31ccfd99..5f6f2924 100644 --- a/src/hooks/agent-usage-reminder/constants.ts +++ b/src/hooks/agent-usage-reminder/constants.ts @@ -22,7 +22,7 @@ export const TARGET_TOOLS = new Set([ export const AGENT_TOOLS = new Set([ "task", "call_omo_agent", - "background_task", + "sisyphus_task", ]); export const REMINDER_MESSAGE = ` @@ -30,13 +30,13 @@ export const REMINDER_MESSAGE = ` You called a search/fetch tool directly without leveraging specialized agents. -RECOMMENDED: Use background_task with explore/librarian agents for better results: +RECOMMENDED: Use sisyphus_task with explore/librarian agents for better results: \`\`\` // Parallel exploration - fire multiple agents simultaneously -background_task(agent="explore", prompt="Find all files matching pattern X") -background_task(agent="explore", prompt="Search for implementation of Y") -background_task(agent="librarian", prompt="Lookup documentation for Z") +sisyphus_task(agent="explore", prompt="Find all files matching pattern X") +sisyphus_task(agent="explore", prompt="Search for implementation of Y") +sisyphus_task(agent="librarian", prompt="Lookup documentation for Z") // Then continue your work while they run in background // System will notify you when each completes @@ -48,5 +48,5 @@ WHY: - Specialized agents have domain expertise - Reduces context window usage in main session -ALWAYS prefer: Multiple parallel background_task calls > Direct tool calls +ALWAYS prefer: Multiple parallel sisyphus_task calls > Direct tool calls `; diff --git a/src/hooks/claude-code-hooks/index.ts b/src/hooks/claude-code-hooks/index.ts index 63482dcc..d3761130 100644 --- a/src/hooks/claude-code-hooks/index.ts +++ b/src/hooks/claude-code-hooks/index.ts @@ -239,7 +239,7 @@ export function createClaudeCodeHooksHook(ctx: PluginInput, config: PluginConfig const cachedInput = getToolInput(input.sessionID, input.tool, input.callID) || {} // Use metadata if available and non-empty, otherwise wrap output.output in a structured object - // This ensures plugin tools (call_omo_agent, background_task, task) that return strings + // This ensures plugin tools (call_omo_agent, task) that return strings // get their results properly recorded in transcripts instead of empty {} const metadata = output.metadata as Record | undefined const hasMetadata = metadata && typeof metadata === "object" && Object.keys(metadata).length > 0 diff --git a/src/hooks/keyword-detector/constants.ts b/src/hooks/keyword-detector/constants.ts index 1043caa9..eb1cb02b 100644 --- a/src/hooks/keyword-detector/constants.ts +++ b/src/hooks/keyword-detector/constants.ts @@ -101,14 +101,14 @@ TELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST. ## EXECUTION RULES - **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each. -- **PARALLEL**: Fire independent agent calls simultaneously via background_task - NEVER wait sequentially. -- **BACKGROUND FIRST**: Use background_task for exploration/research agents (10+ concurrent if needed). +- **PARALLEL**: Fire independent agent calls simultaneously via sisyphus_task(background=true) - NEVER wait sequentially. +- **BACKGROUND FIRST**: Use sisyphus_task for exploration/research agents (10+ concurrent if needed). - **VERIFY**: Re-read request after completion. Check ALL requirements met before reporting done. - **DELEGATE**: Don't do everything yourself - orchestrate specialized agents for their strengths. ## WORKFLOW 1. Analyze the request and identify required capabilities -2. Spawn exploration/librarian agents via background_task in PARALLEL (10+ if needed) +2. Spawn exploration/librarian agents via sisyphus_task(background=true) in PARALLEL (10+ if needed) 3. Always Use Plan agent with gathered context to create detailed work breakdown 4. Execute with continuous verification against original requirements