๐Ÿ“‹ Task

The fundamental unit of work. Every feature, bug fix, research, and idea flows through the Task entity.

Schema

D1 tasks table

Source of truth for all portal work items.
idTEXT PK โ€” e.g. A66, A82. Draft IDs use d-prefix.
nameTEXT โ€” Human-readable task title
descriptionTEXT โ€” Detailed description (markdown)
statusTEXT โ€” draft | idea | ready | backlog | active | done | archived
workspaceTEXT โ€” agentic | dev | work | life
projectTEXT โ€” Groups related tasks (e.g. system-redesign)
priorityTEXT โ€” urgent | high | normal | low
depsTEXT โ€” Dependency task IDs (comma-separated)
parent_idTEXT โ€” Parent task ID for sub-tasks
created_atTEXT โ€” ISO timestamp
updated_atTEXT โ€” ISO timestamp

Lifecycle

draft โ†’ idea โ†’ ready โ†’ active โ†’ done โ†’ archived
Status Meaning Who Sets It
draft Half-baked idea. d-prefix IDs. Own editor in Inbox โ†’ Drafts tab. Human (portal)
idea Formed idea, not yet sized or prioritized. Clara (from inbox)
ready Scoped, sized, ready to pick up. In backlog. Human / Clara
backlog Legacy alias for ready. Both treated the same. โ€”
active Currently being worked on. /task start sets this. Agent (workflow)
done Work complete. /task done sets this. Agent (workflow)
archived Soft-deleted. Hidden from active views but preserved in D1. Clara (archive mode)

API

Method Endpoint Description
GET /api/tasks List tasks. Filter: ?status=active, ?workspace=agentic, ?id=A82, ?project=system-redesign
POST /api/tasks Create task. Body: { id, name, status, workspace, ... }
PATCH /api/tasks?id=A82 Update fields. Body: { status: "done" }
DELETE /api/tasks?id=A82 Hard delete (use PATCH to archive instead)
โš ๏ธ Prefer PATCH over DELETE: The no-delete-d1 rule mandates soft-delete via status PATCH. Hard DELETE exists in the API but should never be used except to fix migration errors.

Design Decisions

ID format: Sequential auto-incrementing IDs like A66, A82. Drafts use d-prefix (d-1741234567890). The "A" prefix is Agentic workspace โ€” other workspaces use W (Work), L (Life), D (Dev).
Project is a label, not an entity: Projects group tasks via a text field, not a foreign key. This keeps the schema flat and avoids project CRUD overhead. May be promoted to a first-class entity in the future.
Sub-tasks via parent_id: Tasks can nest one level deep using parent_id. The portal renders sub-tasks inline within their parent in the tech tree.