tasks
Specification

Overview

What the .tasks convention is, how to read this specification, its terms, versioning, and design constraints.

The .tasks convention is an open format for persistent task state in a source repository. Tasks are directories with a markdown manifest under .tasks/, versioned by git. Nothing about the format requires a particular tool, language, or runtime — it is files on disk, and any program that can read a directory can implement it.

v2 is designed for a mode of work that v1 only touched: one or more humans plus coding agents, with no external tracker. It answers two questions rather than one — what to do next, and what the next agent must read to continue — and it makes saving state for the next session part of the contract instead of a favour the human has to ask for.

Reading this document

The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL are to be interpreted as described in RFC 2119 and RFC 8174 when, and only when, they appear in capitals.

Paragraphs marked Non-normative are explanation, not requirement.

SectionDefines
OverviewTerms, versioning, design constraints.
Directory layoutDiscovery, groups and tasks, reserved directories, writes, locking, working copies.
Identity and referencesPaths as ids, the reference grammar, relocation.
Task fileThe manifest: frontmatter fields, body, canonical serialization, validation.
Statuses and transitionsThe fixed lifecycle, derived conditions, situations, priority, the transition table, authorization, force.
ContainmentWhat a parent's decisions do to its subtree: the BACKLOG invariant, the cascades of defer, schedule and cancel, liveness and authority over descendants.
Dependencies and gatesStart gate, finish gate, resolution, cycles.
ProjectsMulti-repository trees: aliases, aggregation, writes across trees.
Workspace filesThe reserved file vocabulary: state.md, design.md, plan.md, log.md.
Sessions and livenessActors, session tokens, heartbeats, session end, orphaned claims, takeover.
Configurationconfig.yml.
CLI contractExit codes, streams, JSON shapes, command semantics.
Agent protocolWhat a conforming agent does on entry, during work, and on exit.
Harness integrationNon-normative: hooks that make the protocol automatic.
ConformanceReader, Writer, Manager, Agent.
Migration from v1The one-time upgrade.
Changes from v1Summary table for readers of the v1 specification.

Terms

  • Tree — one .tasks/ directory and everything under it. Project root — the directory containing it. Project — a tree reachable from another tree through configuration.
  • Task — a directory under .tasks/ that contains task.md. Its workspace is everything else in that directory. Its id is its path relative to .tasks/.
  • Group — a directory under .tasks/ that does not contain task.md. Organizational only.
  • Parent / children — the nearest ancestor task of a task, and the tasks whose parent it is. Descendants — every task beneath a task, at any depth; together they are its subtree. A task with children is informally an epic.
  • Open statuses: BACKLOG, TODO, IN_PROGRESS, PAUSED. Resolved statuses: DONE, CANCELLED; to close a task is to move it to either. Live — not archived.
  • Actor — an identity string, opaque to implementations: a person, an agent, a tool. Session — a token identifying one run of an agent, opaque likewise; both follow the pattern under Actors. Claimant — the actor working on a task right now. Assignee — the actor a task waits on: who must act on it next, and who alone may transition it while it is not claimed.
  • Start gate — the conditions under which a task may be claimed. Finish gate — the conditions under which a task may be done. Situation — the one word an overview says about a task, computed from its status and its surroundings (see Situation).

Version

This document defines .tasks convention v2. A v2 tree MUST declare it:

# .tasks/config.yml
version: 2

A tree without config.yml, or without version, is a v1 tree. v2 is not backward compatible with v1 (the layout, the identity model and the lifecycle changed); a v1 tree is upgraded once, see Migration from v1. On a v1 tree a v2 implementation MUST refuse every command that reads or writes the tree except migrate, as a usage error that names the upgrade; a command that only installs tooling beside the tree (skill install, hooks install) MAY proceed without touching it. An implementation that encounters a version it does not support MUST refuse to operate on the tree.

Within v2: fields and configuration keys MAY be added by a later revision. An implementation MUST tolerate frontmatter keys and JSON fields it does not recognize on read and MUST preserve unknown frontmatter keys on write (see Serialization), so that a tree touched by two revisions loses nothing; validation reports such a key as a warning. A configuration key an implementation does not know is a usage error (see Configuration), so an older implementation refuses a newer tree rather than misreading it. Field meanings MUST NOT change, fields MUST NOT be removed, constraints MAY be relaxed but MUST NOT be tightened.

Design constraints

These are the properties the rest of the specification exists to preserve.

  1. Facts are stored, conditions are computed. A status records facts about the task itself: scheduled, started, being worked, resolved and how. A decision taken on a parent — to defer, schedule or cancel it — is a fact about every task in its subtree and is written into each of them (see Containment), so every file tells the truth about its own task. Conditions that follow from the state of other tasks — blocked, ready, closable, active — are computed on every query and never stored. A task's own redundant facts are kept consistent at write time and checked by validation.
  2. State and history are separate. Every file in a task directory except the log describes the present and is edited in place. The log describes the past and is only appended.
  3. Fail safe, never fail useful. Any state an implementation cannot resolve confidently counts as blocking. A gate is satisfied only on positive evidence.
  4. The filesystem is authoritative. No cache, index, or daemon holds truth. The only state outside the committed tree is the transient .locks/ directory, which holds no truth either.
  5. Human-editable, diff-stable. A person with a text editor can do anything the tooling can; canonical serialization and atomic writes keep a file's diff equal to its change of meaning.
  6. The exit protocol is part of the contract. A task that is being worked has a resume point on disk; leaving work without one is refused by the tooling, not merely discouraged.

Non-normative

v1 made statuses configurable and bound commands to "roles" because it had no hierarchy: every workflow stage had to be a status. v2 has children for stages that are work, PAUSED + assignee for stages that are waiting on a person, and state.md for narrative sub-state, so the lifecycle can be fixed. A fixed vocabulary reads the same in every project, greps without configuration, needs no foreign configuration to judge a cross-repository dependency, and lets an agent skill skip reading configuration altogether.

On this page