diff --git a/src/hooks/tasks-todowrite-disabler/constants.ts b/src/hooks/tasks-todowrite-disabler/constants.ts index a63ecc31..d67fb20a 100644 --- a/src/hooks/tasks-todowrite-disabler/constants.ts +++ b/src/hooks/tasks-todowrite-disabler/constants.ts @@ -1,10 +1,21 @@ export const HOOK_NAME = "tasks-todowrite-disabler" export const BLOCKED_TOOLS = ["TodoWrite", "TodoRead"] -export const REPLACEMENT_MESSAGE = `TodoRead/TodoWrite are disabled because experimental.task_system is enabled. -Use the new task tools instead: -- TaskCreate: Create new tasks with auto-generated IDs -- TaskUpdate: Update task status, add dependencies +export const REPLACEMENT_MESSAGE = `TodoRead/TodoWrite are DISABLED because experimental.task_system is enabled. + +**ACTION REQUIRED**: RE-REGISTER what you were about to write as Todo using Task tools NOW. Then ASSIGN yourself and START WORKING immediately. + +**Use these tools instead:** +- TaskCreate: Create new task with auto-generated ID +- TaskUpdate: Update status, assign owner, add dependencies - TaskList: List active tasks with dependency info - TaskGet: Get full task details -IMPORTANT: 1 task = 1 delegate_task. Maximize parallel execution by running independent tasks concurrently.` +**Workflow:** +1. TaskCreate({ subject: "your task description" }) +2. TaskUpdate({ id: "T-xxx", status: "in_progress", owner: "your-thread-id" }) +3. DO THE WORK +4. TaskUpdate({ id: "T-xxx", status: "completed" }) + +CRITICAL: 1 task = 1 delegate_task. Fire independent tasks concurrently. + +DO NOT retry TodoWrite. Convert to TaskCreate NOW.` diff --git a/src/hooks/tasks-todowrite-disabler/index.test.ts b/src/hooks/tasks-todowrite-disabler/index.test.ts index 928e3c25..d6cd44ad 100644 --- a/src/hooks/tasks-todowrite-disabler/index.test.ts +++ b/src/hooks/tasks-todowrite-disabler/index.test.ts @@ -19,7 +19,7 @@ describe("tasks-todowrite-disabler", () => { // when / then await expect( hook["tool.execute.before"](input, output) - ).rejects.toThrow("TodoRead/TodoWrite are disabled") + ).rejects.toThrow("TodoRead/TodoWrite are DISABLED") }) test("should block TodoRead tool", async () => { @@ -37,7 +37,7 @@ describe("tasks-todowrite-disabler", () => { // when / then await expect( hook["tool.execute.before"](input, output) - ).rejects.toThrow("TodoRead/TodoWrite are disabled") + ).rejects.toThrow("TodoRead/TodoWrite are DISABLED") }) test("should not block other tools", async () => {