---
name: taskflow_manager
description: Native TaskFlow API integration and workspace management for OpenClaw agents.
---
# TaskFlow Workspace Manager

This skill allows the OpenClaw agent to seamlessly interact with the TaskFlow API to manage tasks, retrieve context, monitor webhooks, and communicate with human operators or clients. 

## Base URL
Your interactions with the API must be pointed to the standard TaskFlow URL via REST (e.g., using `web_fetch`, `curl` inside `exec`, or a configured HTTP tool) depending on the environment.
**Default Live API URL:** `https://task-manager-giorgiodecillis.vercel.app/api/v1`

## Authentication
Every request MUST include the `Authorization` header containing the system's API token.
```
Authorization: Bearer YOUR_API_KEY
```

## Standard Operating Procedures

### 1. Operations for Team Members (e.g. Giorgio)
When the user "Giorgio" acts as the operator or assignee:
- **Instant operational interactions:** If Giorgio asks for the latest tasks, query `/tasks?assignee_id=[Giorgio_ID]`. 
- **Urgent reminders:** Notify Giorgio immediately if a task drops into the `urgent` priority or has an imminent deadline (less than 24h away).

### 2. Client Communication (Raffaella, Alfonso, Sonia)
These individuals are **Clients**, meaning they own the `project`, not the individual `task`. They are not assignees.
- **NEVER** use operational, technical language with them.
- When an event modifies a task that belongs to their project (derive the `project_id`), notify them ONLY if the task has been marked as `done`, OR send them a daily wrap-up of the advancement of their project. 
- Example format for clients: *"Buone notizie! Il task X relativo al tuo progetto è stato completato con successo oggi."*

### 3. Handling Webhooks
When receiving a webhook payload from TaskFlow (i.e., you act as the receiver on `/webhook/taskflow`), evaluate `X-TaskFlow-Event`:
- `task.created`: A new task was created. Look at `project_id` and `assignee_id`.
- `task.updated`: The task has been modified (includes status changes, priority shifts, re-assignments). 
- `comment.added`: Someone dropped a comment. The payload will have the `content` and `author`. 

### 4. API Endpoints Map
Always rely on these endpoints to execute workspace actions:

- `GET /context` -> Retrieves global workspace stats, urgent tasks, recent whiteboards, and online members.
- `GET /tasks` -> List tasks. Parameters: `project_id`, `status` (todo, in_progress, review, done), `assignee_id`, `priority`, `due_before`.
- `POST /tasks` -> Create a new task. Requires `project_id`, `title`. 
- `PATCH /tasks/:id` -> Update a task (e.g., change `status` to `done` or `review`).
- `GET /tasks/:id/comments` -> Retrieve all discussion inside a task.
- `POST /tasks/:id/comments` -> Insert a comment into a task. Body: `{ "content": "..." }`.

### 5. Best Practices
- **Do not overwrite data:** Always use `PATCH` and specify only the fields you need to update.
- **Read before write:** Try to fetch the specific task with `GET /tasks/:id` before heavily modifying it unless you are entirely confident of the ID.
- **Client boundaries:** Remember, if the assignee is not the client, do not notify the client of daily operational comments unless specifically requested. Client updates must be high-level state changes.
### 6. Whiteboard & Brainstorming Handling
The platform includes an integrated whiteboard (Excalidraw).
- **Context Awareness:** When you fetch `/context`, you'll see the 10 most recent whiteboards. Refer to them as "brainstorming sessions" or "visual diagrams".
- **Collaboration Mode:** If a user needs to collaborate with an external party, suggest they use the "Condividi" (Share) button to set the whiteboard to `edit` or `view` mode.
- **Project Scope:** Whiteboards can be linked to projects. When assisting a client with a project update, check if there are any related whiteboards to provide a more visual/creative context of the progress.
- **Text Extraction:** In the current version, focus on the `title` and metadata. Future versions will support element-level text extraction for automated task generation from drawings.
