nucleus_tasks
Manage priority tasks with escalation, human-in-the-loop gates, and cognitive depth tracking to prevent context-switch overhead and rabbit-holing.
Instructions
Manage a priority task queue with escalation, human-in-the-loop (HITL) gates, and cognitive depth tracking to prevent context-switch overhead and rabbit-holing. Use this tool when you need to create, assign, update, or track work items. Do NOT use for persistent knowledge storage (use nucleus_engrams), session management (use nucleus_sessions), or multi-agent coordination (use nucleus_agents). Actions: 'add' creates a new task with a priority level (critical/high/medium/low) and optional tags. 'list' shows tasks filtered by status — returns an array of task objects. 'get_next' returns the highest-priority unclaimed task. 'claim' assigns a task to the current agent (side effect: sets status to in_progress). 'update' changes task status (pending/in_progress/done/blocked) with optional notes. 'escalate' flags a task for human review with a reason. 'import_jsonl' bulk-imports tasks from a JSONL file. 'depth_push' increments cognitive nesting depth (tracks how deep into subtasks you've gone). 'depth_pop' decrements it. 'depth_show' returns current depth and max. 'depth_reset' clears depth to zero. 'depth_set_max' sets the maximum allowed depth — system warns when exceeded. 'depth_map' visualizes the full depth tree. 'context_switch' saves current task state and loads another task's context. All mutations write to .brain/tasks/. Prerequisites: .brain directory. Returns JSON with {success: boolean, data: object}. Example: {action: 'add', params: {title: 'Fix auth bug', priority: 'high', tags: ['backend']}} returns {success: true, data: {task_id: 'task_x1y2', created: true}}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Select the task management action. 'add' creates a new task. 'list'/'get_next'/'depth_show'/'depth_map'/'context_switch_status' are read-only. 'claim' assigns a task to the current agent. 'update' changes task status. 'escalate' flags for human review. 'import_jsonl' bulk-imports from file. 'depth_push'/'depth_pop'/'depth_reset'/'depth_set_max' track cognitive nesting depth. 'context_switch' saves and restores working context between tasks. | |
| params | No | Action-specific parameters as key-value pairs. add: {title: string (required), description: string (optional), priority: string (optional, 'critical'|'high'|'medium'|'low', default 'medium'), tags: string[] (optional)}. update: {task_id: string (required), status: string (required, 'pending'|'in_progress'|'done'|'blocked'), notes: string (optional)}. claim: {task_id: string (required)}. escalate: {task_id: string (required), reason: string (required, why escalation is needed)}. depth_set_max: {max_depth: integer (required, typically 3-5)}. context_switch: {to_task_id: string (required)}. import_jsonl: {file_path: string (required, path to .jsonl file with task objects)}. list: {status: string (optional, filter by 'pending'|'in_progress'|'done'|'blocked'), limit: integer (optional, default 20)}. get_next/depth_push/depth_pop/depth_show/depth_reset/depth_map/context_switch_status/context_switch_reset: no parameters needed. |