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.
| Section | Defines |
|---|---|
| Overview | Terms, versioning, design constraints. |
| Directory layout | Discovery, groups and tasks, reserved directories, writes, locking, working copies. |
| Identity and references | Paths as ids, the reference grammar, relocation. |
| Task file | The manifest: frontmatter fields, body, canonical serialization, validation. |
| Statuses and transitions | The fixed lifecycle, derived conditions, situations, priority, the transition table, authorization, force. |
| Containment | What 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 gates | Start gate, finish gate, resolution, cycles. |
| Projects | Multi-repository trees: aliases, aggregation, writes across trees. |
| Workspace files | The reserved file vocabulary: state.md, design.md, plan.md, log.md. |
| Sessions and liveness | Actors, session tokens, heartbeats, session end, orphaned claims, takeover. |
| Configuration | config.yml. |
| CLI contract | Exit codes, streams, JSON shapes, command semantics. |
| Agent protocol | What a conforming agent does on entry, during work, and on exit. |
| Harness integration | Non-normative: hooks that make the protocol automatic. |
| Conformance | Reader, Writer, Manager, Agent. |
| Migration from v1 | The one-time upgrade. |
| Changes from v1 | Summary 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 containstask.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 containtask.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: 2A 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.
- 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.
- 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.
- Fail safe, never fail useful. Any state an implementation cannot resolve confidently counts as blocking. A gate is satisfied only on positive evidence.
- 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. - 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.
- 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.