clone

a lazygit-style terminal viewer for openspec repos: watch changes, tasks and spec deltas land as agents work

main
lazyopenspec / testdata / fixture / openspec / specs / task-management / spec.md
spec.md 3.0K rendered
1# Task Management Specification23## Purpose45Defines how Tally members create, update, assign, and list tasks within a project. Tasks are the core unit of work in Tally; every other capability (notifications, export, search) builds on the task model described here.6## Requirements7### Requirement: Task creation8The system SHALL allow an authenticated project member to create a task with a title of 1-200 characters and an optional Markdown description of up to 10,000 characters.910#### Scenario: Create task with title only11- **WHEN** a member submits a new task with title "Write release notes" and no description12- **THEN** the system creates the task with status `todo`13- **AND** returns the task with a generated id and `created_at` timestamp1415#### Scenario: Reject empty title16- **WHEN** a member submits a new task with an empty or whitespace-only title17- **THEN** the system rejects the request with a 422 validation error18- **AND** no task is created1920### Requirement: Task status transitions21Tasks SHALL move through the statuses `todo`, `in_progress`, and `done`, and the system MUST reject any transition to a status outside that set.2223#### Scenario: Complete a task24- **WHEN** a member sets the status of an `in_progress` task to `done`25- **THEN** the task status becomes `done`26- **AND** `completed_at` is set to the current time2728#### Scenario: Reopen a completed task29- **WHEN** a member sets the status of a `done` task to `todo`30- **THEN** the task status becomes `todo`31- **AND** `completed_at` is cleared3233#### Scenario: Unknown status34- **WHEN** a member sets a task status to `blocked`35- **THEN** the system rejects the request with a 422 validation error3637### Requirement: Task assignment38A task SHALL have at most one assignee, and the assignee MUST be a member of the task's project. Changing the assignee SHALL emit an assignment event consumed by the notifications capability.3940#### Scenario: Assign to project member41- **WHEN** a member assigns a task to another member of the same project42- **THEN** the task's assignee is updated43- **AND** an assignment event is recorded for the new assignee4445#### Scenario: Assign to non-member46- **WHEN** a member assigns a task to a user who is not in the project47- **THEN** the system rejects the request with a 403 error48- **AND** the existing assignee is unchanged4950#### Scenario: Unassign a task51- **WHEN** a member clears the assignee of a task52- **THEN** the task has no assignee53- **AND** no assignment event is recorded5455### Requirement: Task listing56The system SHALL list a project's tasks ordered by most recently updated first, paginated at 50 tasks per page.5758#### Scenario: First page of tasks59- **WHEN** a member requests the task list for a project with 120 tasks60- **THEN** the system returns the 50 most recently updated tasks61- **AND** includes a `next_cursor` for the following page6263#### Scenario: Empty project64- **WHEN** a member requests the task list for a project with no tasks65- **THEN** the system returns an empty list and no `next_cursor`66