Task File Format¶
Tasks in TaskRepo are stored as markdown files with YAML frontmatter.
File Structure¶
Tasks are stored in the tasks/ subdirectory of each repository:
tasks-work/
├── tasks/
│ ├── task-a3f2e1d9-4b7c-4e3f-9a1b-2c3d4e5f6a7b.md
│ ├── task-b4e8f3a1-5c6d-4e2f-8a9b-1c2d3e4f5a6b.md
│ └── task-c5f9e4b2-6d7e-4f3a-9b1c-2d3e4f5a6b7c.md
└── archive/
└── task-d6a1f5c3-7e8f-4a4b-1c2d-3e4f5a6b7c8d.md
Filename Convention¶
- Prefix: Always
task- - UUID: Globally unique identifier (UUID v4)
- Extension:
.md(markdown)
Example: task-a3f2e1d9-4b7c-4e3f-9a1b-2c3d4e5f6a7b.md
File Format¶
Complete Example¶
---
uuid: 'a3f2e1d9-4b7c-4e3f-9a1b-2c3d4e5f6a7b'
title: Fix authentication bug
status: pending
priority: H
project: backend
assignees:
- '@alice'
- '@bob'
tags:
- bug
- security
links:
- https://github.com/org/repo/issues/123
- https://mail.google.com/mail/u/0/#inbox/abc123
due: '2025-11-15T00:00:00'
created: '2025-10-20T10:30:00'
modified: '2025-10-20T14:22:00'
depends:
- 'b4e8f3a1-5c6d-4e2f-8a9b-1c2d3e4f5a6b'
---
## Description
The login endpoint is not properly validating JWT tokens.
## Steps to reproduce
1. Attempt to login with expired token
2. Observe that access is granted
## Solution
Update JWT validation middleware to check expiration.
Structure¶
- YAML frontmatter (between
---delimiters) - Task metadata
-
Structured data in YAML format
-
Markdown body (after second
---) - Task description
- Free-form markdown content
- Optional sections
YAML Frontmatter Fields¶
Required Fields¶
uuid¶
Type: String (UUID v4) Format: 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' Required: Yes Generated: Automatically on task creation
Globally unique identifier for the task. Never changes after creation.
title¶
Type: String Required: Yes Constraints: Non-empty
Short description of the task (typically one line).
status¶
Type: String Required: Yes Values: pending, in-progress, completed, cancelled
Current state of the task.
Status meanings: - pending - Not started - in-progress - Currently being worked on - completed - Finished successfully - cancelled - Abandoned or no longer relevant
created¶
Type: String (ISO 8601 timestamp) Required: Yes Generated: Automatically on task creation
Timestamp when task was created.
modified¶
Type: String (ISO 8601 timestamp) Required: Yes Updated: Automatically on any task modification
Timestamp of last modification.
Optional Fields¶
priority¶
Type: String Values: H (High), M (Medium), L (Low) Default: From config (default_priority)
Task priority level.
project¶
Type: String Optional: Yes
Project or category the task belongs to.
Display: Color-coded in task lists for visual grouping
assignees¶
Type: List of strings Format: GitHub handles with @ prefix Optional: Yes
People assigned to the task.
Validation: Must start with @ Default: Uses default_assignee from config if set and no assignees provided
tags¶
Type: List of strings Optional: Yes
Tags for categorization and filtering.
Usage: Supports filtering via --tag option
links¶
Type: List of strings (URLs) Optional: Yes Validation: Must be valid HTTP/HTTPS URLs
Associated URLs (GitHub issues, PRs, emails, documentation, etc.).
links:
- https://github.com/org/repo/issues/123
- https://github.com/org/repo/pull/456
- https://mail.google.com/mail/u/0/#inbox/abc123
- https://docs.example.com/api/auth
Display: Shown with 🔗 indicator in task lists
due¶
Type: String (ISO 8601 timestamp) Optional: Yes
Due date/time for the task.
Display: Shown as countdown ("3 days", "1 week", etc.) in task lists Overdue: Displayed in red if past current date
depends¶
Type: List of strings (UUIDs) Optional: Yes
UUIDs of tasks that must be completed before this task can start.
Note: Dependency resolution is planned for future versions
Markdown Body¶
The content after the YAML frontmatter is free-form markdown.
Common Sections¶
While not enforced, these sections are commonly used:
## Description
High-level overview of the task.
## Context
Why this task is needed, background information.
## Steps to reproduce
(For bugs) How to reproduce the issue.
## Acceptance criteria
What needs to be done for the task to be considered complete.
## Solution
Proposed or implemented solution.
## Notes
Additional information, links, references.
Markdown Features¶
Full markdown is supported:
- Headings:
##,###, etc. - Lists: Bullet and numbered
- Code blocks: With syntax highlighting
- Links:
[text](url) - Images:
 - Tables: For structured data
- Blockquotes: For emphasis
- Bold/italic: Standard markdown formatting
File Encoding¶
- Encoding: UTF-8
- Line endings: Unix (LF) or Windows (CRLF) - both supported
- BOM: Not required, but accepted if present
Task Lifecycle¶
Creation¶
- Task created with
tsk add - UUID generated via
uuid.uuid4() - File created as
tasks/task-{uuid}.md - Initial commit to git
Modification¶
- Task edited via
tsk editor direct file edit modifiedtimestamp updated automatically (if using CLI)- Changes committed to git (manual or via
tsk sync)
Completion¶
- Task marked complete with
tsk done - Status changed to
completed - Task remains in
tasks/directory
Archiving¶
- Task archived with
tsk archive - File moved to
archive/subdirectory - No longer appears in default task listings
- Can be unarchived with
tsk unarchive
Deletion¶
- Task deleted with
tsk del - File permanently removed
- Git commit records deletion
Display IDs vs UUIDs¶
UUIDs¶
- In file: Tasks use UUIDs internally
- Globally unique: Safe across all repositories
- Permanent: Never changes
Display IDs¶
- For users: Simple numbers (1, 2, 3...)
- Cached: Stored in
~/.TaskRepo/id_cache.json - Temporary: Mapping may change as tasks are added/removed
Example:
Display ID → UUID
--------- ------------------------------------
1 → a3f2e1d9-4b7c-4e3f-9a1b-2c3d4e5f6a7b
2 → b4e8f3a1-5c6d-4e2f-8a9b-1c2d3e4f5a6b
3 → c5f9e4b2-6d7e-4f3a-9b1c-2d3e4f5a6b7c
In CLI: Use display IDs (e.g., tsk edit 1) In files: Always use UUIDs (e.g., in depends field)
Validation¶
TaskRepo validates task files when reading:
Required Field Validation¶
- UUID must be present and valid UUID format
- Title must be non-empty
- Status must be valid value
- Created and modified must be valid timestamps
Optional Field Validation¶
- Priority must be H/M/L if present
- Assignees must start with
@if present - Links must be valid HTTP/HTTPS URLs if present
- Due date must be valid timestamp if present
- Depends must be valid UUIDs if present
Invalid Tasks¶
Tasks failing validation: - Show warning in CLI output - Are skipped in task listings - Can be fixed by editing the file directly
Direct File Editing¶
You can edit task files directly with any text editor:
# Find task file by display ID
tsk list # See display ID
# Edit with your editor
vim ~/tasks/tasks-work/tasks/task-{uuid}.md
After editing: - Ensure YAML syntax is valid - Update modified timestamp (or let CLI do it next time) - Commit changes with git
Advantages of direct editing: - Full control over content - Batch editing with scripts - Integration with other tools
Git Integration¶
Task files are version-controlled with git:
# View task history
cd ~/tasks/tasks-work
git log tasks/task-{uuid}.md
# See changes
git diff tasks/task-{uuid}.md
# Revert changes
git checkout tasks/task-{uuid}.md
Next Steps¶
- CLI Commands - Commands that create/modify tasks
- Configuration File - Default values for new tasks
- Task Management - Task workflow guide