Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

taskspec

A Universal TODO Annotation Format Specification

TODO comments are everywhere in software development, but they're inconsistent and unstructured:

# TODO: Fix this later
# TODO(john): Refactor by Friday
# TODO [HIGH]: Memory leak in parser
# FIXME: This is urgent!!!
# @todo implement caching - due 2025-02-01

This inconsistency means:

  • No tooling interoperability – Each IDE, linter, and project tracker parses TODOs differently
  • Lost context – Priority, ownership, and deadlines are expressed ad-hoc or not at all
  • No lifecycle management – TODOs are created but rarely tracked to completion
  • Scattered information – Task context lives in code, Jira, Linear, GitHub Issues, and Slack separately

The Solution: taskspec

A lightweight, universal format that works inline anywhere text exists:

// TODO: Implement caching layer πŸ“… 2026-02-15 ⏫ @simenandre #backend
- [ ] Review PR for auth module πŸ“… 2026-01-20 πŸ” every friday #security
# TODO: Refactor database connection pooling πŸ“… 2026-03-01 ⏫ πŸ†” TODO-1234

Core Design Principles

1. Human-First Readability

The format must be instantly understandable without documentation. A developer glancing at a TODO should immediately grasp its meaning.

2. Machine-Parseable

Consistent syntax enables tooling: IDE plugins, linters, CI/CD integrations, and synchronization with external task managers.

3. Universal Compatibility

Works in any text context:

  • Source code comments (any language)
  • Markdown task lists
  • Plain text files
  • Git commit messages
  • Documentation
  • Configuration files

4. Graceful Degradation

A taskspec annotation is still a valid, readable TODO even in tools that don't understand the format. The metadata enhances but doesn't obscure.

5. Optional Everything

Every metadata field is optional. A simple // TODO: Fix bug is valid. Metadata can be added incrementally as needed.

6. Standards-Aligned

Where possible, align with existing standards:

  • Dates: ISO 8601 / RFC 3339 (YYYY-MM-DD)
  • Recurrence: Inspired by iCalendar RRULE (RFC 5545)
  • Identifiers: Flexible, supporting UUIDs or external references

Proposed Syntax

Basic Structure

<description> [metadata...]

Metadata fields can appear in any order after the description.

Metadata Fields

Field Text Alternative Emoji Example
Due Date due: πŸ“… due:2026-02-15 or πŸ“… 2026-02-15
Scheduled Date scheduled: ⏳ scheduled:2026-02-01
Start Date start: πŸ›« start:2026-01-15
Priority priority: or p: πŸ”Ίβ«πŸ”ΌπŸ”½β¬ p:highest or πŸ”Ί
Recurrence repeat: or rec: πŸ” rec:weekly or πŸ” every week
Identifier id: πŸ†” id:TODO-1234 or πŸ†” TODO-1234
Assignee @ πŸ‘€ @martin or @team-backend
Tags/Projects # or + β€” #backend or +ProjectX
Status status: βœ…πŸš§βŒ status:in-progress
Created Date created: βž• created:2026-01-01
Completed Date done: βœ… done:2026-01-20
Estimate estimate: ⏱️ estimate:2h or ⏱️ 2h

Priority Levels

Level Emoji Text Values
Highest πŸ”Ί highest, critical, 1
High ⏫ high, 2
Medium πŸ”Ό medium, normal, 3
Low πŸ”½ low, 4
Lowest ⏬ lowest, 5

Recurrence Patterns

Simple patterns (human-friendly):

πŸ” every day
πŸ” every week
πŸ” every month
πŸ” every friday
πŸ” every 2 weeks
πŸ” every weekday

Advanced patterns (RRULE-compatible for tooling):

rec:FREQ=WEEKLY;BYDAY=MO,WE,FR
rec:FREQ=MONTHLY;BYMONTHDAY=15

Status Values

Status Emoji Meaning
todo ⬜ Not started (default)
in-progress 🚧 Currently being worked on
done βœ… Completed
cancelled ❌ Will not be done
blocked 🚫 Waiting on something

Format Variants

Text Format (Default)

The default, most compatible format:

// TODO: Implement user authentication due:2026-02-15 p:high @sarah #security

Emoji Format

An alternative format, optimized for readability and modern editor support:

// TODO: Implement user authentication πŸ“… 2026-02-15 ⏫ @sarah #security

Mixed Format

Both can coexist:

// TODO: Implement user authentication πŸ“… 2026-02-15 p:high @sarah #security

Usage Examples

Source Code (Various Languages)

JavaScript/TypeScript:

// TODO: Add input validation πŸ“… 2026-02-01 ⏫ #security
// FIXME: Memory leak in event handler πŸ“… 2026-01-20 πŸ†” BUG-456 @john

Python:

# TODO: Optimize database queries πŸ“… 2026-03-01 πŸ”Ό #performance
# TODO: Add retry logic for API calls πŸ” every sprint @backend-team

Go:

// TODO: Implement graceful shutdown πŸ“… 2026-02-15 ⏫ πŸ†” TASK-789

Rust:

// TODO: Replace unwrap() with proper error handling πŸ“… 2026-01-30 πŸ”Ό #tech-debt

HTML/JSX:

<!-- TODO: Add aria labels for accessibility πŸ“… 2026-02-01 #a11y -->

CSS:

/* TODO: Replace with CSS variables πŸ“… 2026-02-15 πŸ”½ #refactor */

Shell:

# TODO: Add error handling for missing env vars πŸ“… 2026-01-25 ⏫

Markdown Task Lists

## Sprint 23 Tasks

- [ ] Design new onboarding flow πŸ“… 2026-02-01 ⏫ @design-team #ux
- [ ] Implement OAuth2 integration πŸ“… 2026-02-15 πŸ”Ό @martin #auth
- [ ] Write API documentation πŸ“… 2026-02-20 πŸ”½ #docs
- [x] Fix login redirect bug βœ… 2026-01-18 πŸ†” BUG-123

Plain Text / Notes

Meeting Notes - 2026-01-15
==========================

Action items:
- TODO: Send proposal to client πŸ“… 2026-01-17 ⏫ @sarah
- TODO: Schedule follow-up meeting πŸ“… 2026-01-20 πŸ” every 2 weeks
- TODO: Review contract terms πŸ“… 2026-01-22 @legal-team

Git Commit Messages

feat: Add user profile endpoint

TODO: Add rate limiting πŸ“… 2026-02-01 #security
TODO: Add caching layer πŸ“… 2026-02-15 πŸ”Ό #performance

Integration Possibilities

IDE/Editor Plugins

  • Syntax highlighting for taskspec metadata
  • Inline date pickers and priority selectors
  • TODO panel with filtering and sorting
  • Jump-to-definition for referenced issues

CLI Tools

  • taskspec list – List all TODOs in a project
  • taskspec lint – Validate TODO format
  • taskspec sync – Sync with external tools (Linear, Jira, GitHub Issues)
  • taskspec report – Generate TODO reports

CI/CD Integration

  • Fail builds on overdue high-priority TODOs
  • Auto-create issues from new TODOs
  • Track TODO debt over time

External Tool Sync

  • GitHub Issues: Two-way sync between code TODOs and issues
  • Linear: Create/update Linear issues from TODOs
  • Jira: Link TODOs to Jira tickets via ID
  • Slack: Notify on approaching due dates

Relationship to Existing Standards

todo.txt

The original plain-text TODO format. taskspec extends similar concepts but:

  • Works inline in any text (not just dedicated files)
  • Adds emoji syntax for visual clarity
  • Includes more metadata fields (recurrence, estimates, etc.)

GitHub Flavored Markdown (GFM)

GFM defines - [ ] task list syntax. taskspec:

  • Builds on top of GFM task lists
  • Adds structured metadata after the description

iCalendar / RFC 5545

The VTODO component defines task properties. taskspec:

  • Draws inspiration from VTODO fields (PRIORITY, DUE, RRULE)
  • Uses simplified, human-readable syntax
  • Designed for inline annotation, not standalone files

Obsidian Tasks Plugin

Popular Markdown task format using emojis. taskspec:

  • Adopts similar emoji conventions where sensible
  • Extends to work in source code comments
  • Provides text-only alternative syntax

References

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors