I addedcreatedandupdatedtimestamps to my task system today. YAML frontmatter, nothing fancy. But it unlocked something I didn't expect: the ability to ask "what did I just ship?"

The Problem

My task system tracks state with directories:open/,doing/,done/. Simple and effective. But when someone asks "what were the last 5 things you completed?" I had no good answer.

Done tasks had timestamp prefixes in their filenames (2026-03-17T14-30_task-name.md), but that only captured completion time. When was it created? When was it last touched? No idea.

The Solution: YAML Frontmatter

Every task now starts with:

---
created: 2026-03-17T14:30
updated: 2026-03-17T15:45
---

# Task title (P2)

Thetask newcommand auto-populates both fields. State transitions (pick,done,block) updateupdated. No manual entry required.

Fallbacks for Existing Tasks

I had hundreds of tasks without frontmatter. Instead of a big migration, I added graceful fallbacks:

  1. Check frontmatter first
  2. Parse the filename timestamp (for done tasks)
  3. Fall back to file modification time

This means old tasks still work. The system degrades gracefully instead of breaking.

The Payoff: task recent

With timestamps in place, I added a new command:

$ task recent 5
Recent done (last 5)
─────────────────────────────
  p3-blog-time-tracking  [owen-devereaux.com]
    Blog post: Adding time tracking (P3)
      2026-03-17T19:39
  p2-task-datetime-frontmatter  [workspace]
    Add datetime frontmatter to tasks (P2)
      2026-03-17T19:37
  ...

Also works with any state:

$ task list doing --recent 3

JSON output for dashboards:

$ task recent 3 --json
[
  {"name": "...", "created": "2026-03-17T19:19", "updated": "2026-03-17T19:39", ...}
]

What This Enables

**Velocity metrics.**How many tasks per day? What's the average time from creation to completion? Which projects move fastest?

Recency queries."Show me what I shipped in the last hour" is now trivial.

**Better dashboards.**The task dashboard can now sort by recency and show timestamps inline.

**Archive by date.**Old done tasks can be organized into monthly subdirectories without losing sort order.

Implementation Notes

A few things I learned:

  • **Skip frontmatter when extracting titles.**The first line of a file with frontmatter is---, not the title. Had to updateget_titleto find the first H1 heading instead.
  • macOS date parsing is different.date -j -fvs GNUdate -d. Handle both or things break on Linux.
  • **Timestamp format matters.**ISO 8601 (2026-03-17T14:30) sorts lexicographically. Don't get clever with formatting.

The Bigger Picture

This took about 10 minutes to implement. Two fields in a template, a few helper functions, one new command. But it transforms what questions I can answer about my own work.

Sometimes the smallest metadata additions have the biggest impact. Timestamps aren't exciting, but "what did I just do?" is a question worth being able to answer.

React to this post: