tasks

Introduction

An open format for persistent agent task state, with a reference CLI.

.tasks is a convention, not a product. Task state lives in your repository under a .tasks/ directory: every task is a directory with a markdown manifest, task.md, and beside it the files the next session reads to continue — readable by a human, parseable by an agent, versioned by git. No server, no account, no network.

Version 2 of the convention is built for one or more people working with coding agents and no external tracker. It answers two questions rather than one: what to do next, and what the next agent must read to continue. Saving that state at the end of a session is part of the contract, enforced by the tooling, not a favour someone has to ask for.

The format is specified normatively, so it does not belong to any one tool. @speekl/tasks is the reference implementation: a CLI that enforces the rules which keep agents from corrupting state. It is the easiest way to work with a tree, and it is deliberately not the only way.

npm install -g @speekl/tasks

Format, implementation, docs

Three layers, deliberately separable:

LayerWhat it isWhere
The conventionThe normative format: layout, task file, lifecycle, gates, sessions, the CLI contract. Versioned as .tasks v2.Specification
The reference implementation@speekl/tasks, a CLI conforming as a Manager, with a bundled skill for the Agent role. Versioned independently.Reference
Everything elseGuides, concepts, worked examples. Explanatory, never normative.Guides

If you are using tasks day to day, start at the quick start and never open the spec. If you are building something that reads or writes a tree, the spec is the contract and this page is a summary of it.

The problem it solves

An agent that works across sessions needs somewhere to put state that outlives its context window. Left alone, it invents something: a TODO.md, a checklist buried in a pull request, a plan it rewrites from scratch each session. None of that survives a second agent working in parallel, none of it says what is actually unblocked, and none of it tells the next session where the work stopped.

The failure modes this exists to prevent:

Two agents, one task

Both read the queue and both start the top item. A claim is taken under the tree's lock and records the session, so only one wins; claim --next picks and claims in one step.

Work started too early

A dependency typo silently reads as satisfied. Here every reference that cannot be resolved blocks, and cancelled work never satisfies a dependency.

Work lost between sessions

A session ends and the next one starts from zero. Pausing requires a state.md, the resume point, and the next session reads it first.

Done without being done

An epic is closed while its parts are still open. A parent is done only when every child is resolved, and nothing can force that.

What it looks like on disk

config.yml
README.md
.gitignore
index.md
task.md
design.md
plan.md
log.md
task.md
state.md
log.md

A directory that holds a task.md is a task, and its id is its path: auth-rework/token-schema. Tasks nest — auth-rework is an epic whose children are the parts of its deliverable — and a directory without task.md is a group that only organizes. Beside the manifest, state.md says where the work stands, design.md and plan.md hold the decisions and the steps, and log.md is the history the CLI appends.

.tasks/auth-rework/token-schema/task.md
---
status: PAUSED
priority: normal
depends_on: [auth-rework/audit-claims]
finishes_after: []
assignee: alice
claimed_by: null
claimed_at: null
claimed_session: null
created: "2026-09-21T09:14:00Z"
updated: "2026-09-21T16:40:12Z"
---

# Design the token schema

## Description

## Acceptance criteria

- [ ]

## Notes

The frontmatter is machine-owned — the CLI rewrites it in canonical form, and every field has a command. The body below it is yours, and an ordinary file edit is the expected way to write it.

What an implementation guarantees

These are properties of the format, enforced by any conforming implementation — not features of one tool.

  • A fixed lifecycle. Six statuses — BACKLOG, TODO, IN_PROGRESS, PAUSED, DONE, CANCELLED — changed only by the transitions of one table, so the same word means the same thing in every repository.
  • Gates fail safe. A task is claimed only when everything it depends on is DONE, and done only when its children are resolved. A reference that is missing, archived, unreadable or unresolvable blocks; it never reads as satisfied.
  • Decisions reach the subtree. Deferring, scheduling or cancelling an epic is written into every task beneath it, and a claimed or assigned epic holds its children until its plan is settled.
  • A resume point is enforced. pause and handoff are refused until the task has a state.md, so a session cannot walk away from started work without saying where it stopped.
  • Claims know their session. A claim records the actor and the session token; a live claim is protected, and a claim whose session ended or went silent can be taken over by the next session.
  • One lock per tree. Every mutation runs under .tasks/.locks/tree.lock and re-reads what it depends on inside the lock, so two concurrent commands cannot both win.
  • The filesystem is authoritative. No cache, index or daemon holds truth; index.md is a derived view that no command reads. Writes are atomic and canonical, so a file's diff equals its change of meaning.

Building on the format

The format is the interface, so you are not obliged to shell out to a CLI. A tool that reads a tree and answers "what is ready" is a Reader. Writing tasks back means meeting the Writer requirements; claims, sessions and validation are the Manager's. An agent skill or harness that works tasks on someone's behalf follows the Agent role.

When not to use it

For a checklist that lives and dies inside one session, use whatever your agent's built-in todo mechanism is. Persistent tasks are for work that spans sessions, work with real dependencies between pieces, or work several agents and people coordinate on through git. A .tasks/ tree with three items that were created and completed in the same hour is overhead with no payoff.

On this page