Prompt
I want to track time.
WorkEntry
Section titled “WorkEntry”The basic unit of work is a WorkEntry
(a record in the Work
table), which consists of
- a description
- this freeform markdown entry serves the same purpose as a commit message
- the first line is the title of the time entry
- it can be edited
- it can be null until the time entry is finished (i.e. the end time is set)
- hashtags are used to add labels/tags
- an owner (person who does the work, not null)
- a start time (not null)
- an end time (null if the time entry is still active)
- a task (not null)
A task is a larger unit of work—a container for work entries. It includes
- a title,
- a description,
- an owner (assigned person),
- an estimated time (hours),
- a status (new, in-progress, complete, canceled, paused, blocked),
- a start date, (may be null if the task is not started yet)
- an end date, (null if the task is not finished yet)
- a due date, (may be null)
- a parent task (null if it is a top-level task)
Labels/Tags
Section titled “Labels/Tags”A Task or WorkEntry can have zero or more labels/tags. In the UI, these can be added with hashtags in the description, or as a separate field. The database might store them as a list of strings or a many-to-many relationship.
Project
Section titled “Project”A project is a container for tasks and sub-projects. It includes
- a title,
- a description,
- an owner,
- a time budget (maximum hours allowed),
- a start date, (may be null if the project is not started yet)
- an end date, (null if the project is not finished yet)
- a due date, (may be null)
- a status (new, in-progress, complete, canceled, paused, blocked)
- a parent project (null if it is a top-level project)
Dependencies
Section titled “Dependencies”A task or project can depend on other tasks/projects—it cannot start until those are complete. This is a many-to-many relationship.
How is a Project related to a Task? Is a Project just a task with more metadata? Does it make sense in this context for a task to have sub-tasks, or is that the distinction: a Task is a leaf node in the hierarchy, and a Project is a container? Can something be stubbed as a task, and then later be expanded into a project?
Task and Project share the same schema. A minor difference is that a Project has a time budget, and a Task has an estimated time—but that is only a difference in interpretation. A Project is a container for tasks. A Task is a container for Work (WorkEntry).
A Project has additional documentation, such as a charter, a plan, a roadmap, and associated stakeholders, but these are not needed for tracking time. Stakeholders are needed only for the communication system, which is separate from time tracking.
Conclusion: Project is a Task with more metadata that is not needed for tracking time. A ProjectID is a TaskID—they share a keyspace. In the context of time tracking, a Task is a leaf node that contains only Work (WorkEntry).
Stakeholders
Section titled “Stakeholders”Stakeholders can be associated with a Project in the following ways:
- responsible—one or more people who do the work
- accountable—exactly one person who “owns” the project and decides when it is done, when it has met its chartered goals.
- consulted—zero or more people who contribute as subject matter experts and support the responsible/accountable persons
- informed—zero or more people who may be interested in the progress and outcome but do not influence it directly.
People
Section titled “People”A person is a user of the system. The system needs to know their name, email address, phone number, and avatar.
What a person can do in a project/task depends on their role.
Roles and Permissions
Section titled “Roles and Permissions”Roles define what actions a person can perform within the system. The most common roles are:
- Admin: Can manage all aspects of the system, including users, projects, tasks, and settings.
- Project Owner: Has full control over a specific project, including editing project details, assigning roles, and archiving or deleting the project.
- Contributor/Member: Can view and update tasks and work entries within projects they are assigned to, but cannot change project-level settings or manage other users.
- Viewer/Guest: Can view projects and tasks but cannot make changes.
Example of permitted actions by role:
Section titled “Example of permitted actions by role:”Action | Admin | Project Owner | Contributor | Viewer |
---|---|---|---|---|
Create/Edit/Delete Project | ✔️ | ✔️ | ❌ | ❌ |
Assign Roles | ✔️ | ✔️ | ❌ | ❌ |
Add/Edit/Delete Task | ✔️ | ✔️ | ✔️?? | ❌ |
Log Work Entry | ✔️ | ✔️ | ✔️ | ❌ |
Edit Work Entry (own) | ✔️ | ✔️ | ✔️ | ❌ |
Edit Work Entry (others) | ✔️ | ✔️ | ❌ | ❌ |
View Project/Task Details | ✔️ | ✔️ | ✔️ | ✔️ |
Archive Project/Task | ✔️ | ✔️ | ❌ | ❌ |
Manage Labels/Tags | ✔️ | ✔️ | ✔️ | ❌ |
Roles can be assigned per project, so a user may be a Project Owner in one project and a Contributor in another.
Note: The system should enforce permissions at both the UI and API/database level to ensure data integrity and security.