Task Flow
Hitler uses a human-in-the-loop task creation flow:Task Drafts
When a task is created (via bot or API), it starts as a draft:POST /api/tasks/drafts- Create a draftPOST /api/tasks/drafts/:id/confirm- Confirm → becomes real taskDELETE /api/tasks/drafts/:id- Reject → discarded
Task Lifecycle
Task Properties
| Property | Type | Description |
|---|---|---|
id | UUID | Unique identifier |
title | string | Task title (max 200 chars) |
description | string | Detailed description (optional, max 2000 chars) |
priority | integer | 1 (highest) to 5 (lowest), default 3 |
status | enum | open, in_progress, completed, cancelled |
dueDate | datetime | Optional deadline |
rawInput | string | Original natural language (for AI learning) |
userId | UUID | Task owner |
organizationId | UUID | Organization |
createdAt | datetime | Creation timestamp |
updatedAt | datetime | Last update timestamp |
Task Logs
Every task change is recorded:Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /tasks/drafts | Create task draft |
| GET | /tasks/drafts | List my pending drafts |
| GET | /tasks/drafts/:id | Get draft by ID |
| POST | /tasks/drafts/:id/confirm | Confirm draft → create task |
| DELETE | /tasks/drafts/:id | Reject draft |
| GET | /tasks | List my tasks |
| GET | /tasks/organization | List org tasks (managers) |
| GET | /tasks/stats | Get my statistics |
| GET | /tasks/:id | Get task by ID |
| PATCH | /tasks/:id | Update task |
| GET | /tasks/:id/logs | Get task event logs |