tasks
Specification

Migration from v1

The one-time upgrade of a v1 tree, and a summary of what changed from v1.

An implementation that offers migrate MUST perform, once, under the lock of the tree being migrated — the current tree, or a listed project named by alias:

  1. Check every phase name against the v2 segment pattern: v1 allowed . and _, v2 does not. A phase that does not match MUST be renamed through an explicit --map-phase OLD=NEW argument; without one, the migration MUST refuse and name the phases.
  2. Move each <phase>/<id>.md to <phase>/<id>/task.md; each .archive/<id>.md to .archive/<phase>/<id>/task.md using its frontmatter phase.
  3. Drop id and phase; add priority: normal, finishes_after: [], assignee: null, claimed_session: null. A claimed_by that does not match the actor pattern under Actors MUST be named, and the migration MUST refuse until it is corrected in the v1 file.
  4. Map statuses through the v1 tree's roles: the ready role's status to TODO, the claimed role's to IN_PROGRESS, the done role's to DONE. Any other v1 status MUST be mapped by an explicit --map OLD=NEW argument; without one, the migration MUST refuse and name the statuses.
  5. Rewrite every depends_on reference from a bare id to its path (<phase>/<id>): local references whose id names a task of the tree (one that names none is kept as it is and listed); external references only when the target tree is reachable and holds the id, otherwise the reference is kept as it is and listed.
  6. Rewrite config.yml: version: 2, active_phase → scope, and remove statuses, roles, transitions.
  7. Remove v1's _index.md and generate index.md.

References into the migrated tree from other trees still carry bare ids. The migration MUST rewrite them in the tree the command runs in and in every tree that tree lists under projects:, one tree at a time under each tree's lock, and MUST list the ones it finds in trees it can read but not write; those resolve as missing until edited.

Two consequences the migration SHOULD print: a task migrated to IN_PROGRESS carries claimed_session: null, so its liveness is unknown and a claimant that runs with a session token recovers it only by force; a task mapped to PAUSED has no state.md and is reported by validation until one is written.

Changes from v1

Areav1v2
Unitone markdown file per task, flat under a phaseone directory per task, nested at any depth, with a workspace
Identityglobal unique id, mirrored in the filename, phase fieldthe path; no id, no phase
Groupingphases, one levelgroups at any depth; a v1 phase is a top-level group
Hierarchynonecontainment by directory: done waits for children, defer / schedule / cancel cascade to them, a BACKLOG subtree stays BACKLOG
Statusesconfigurable list, commands bound to rolesfixed six: BACKLOG, TODO, IN_PROGRESS, PAUSED, DONE, CANCELLED
Transitionsadjacent steps or a configured lista fixed table with preconditions, messages and authorization
Blockedderivedderived (unchanged), plus waiting for, started, parked, held, closable, active, liveness, and one computed situation per task in overviews
Prioritynonefour fixed levels, inherited downwards as effective priority, first key of the ready order
Responsibilityclaimed_by onlyassignee (responsible, with authority over the subtree) and claimed_by + claimed_session (working now)
Finish gatesnonechildren and finishes_after gate done; cancelled satisfies finish but never start
Workspacebody onlystate.md, design.md, plan.md, log.md vocabulary
Journalfree ## Notestool-stamped log.md; transitions logged with messages
Resume pointnonestate.md, required to pause or hand off
Sessionsnonesession tokens, heartbeats, explicit session end, orphaned-claim takeover
Lockingper taskone lock per tree
Cross-repositoryrelative-path references, read-only, cycles undetectableprojects: aliases, aggregation, writes into listed trees, cycles detectable when checked out
Relocationwrite-then-remove of a file; phase drift repairedatomic directory rename with reference rewriting in this tree and in listed trees
Configurationstatuses, roles, transitions, active phaseversion, scope, session_timeout_minutes, archive_resolved_after_days, actors, docs, projects
Unknown frontmatter keystolerated on read, dropped on writetolerated on read, preserved on write, reported by validation
Overview file_index.mdindex.md, a plain reserved root name like config.yml
Removalarchive only, ids reserved foreverarchive with merge, purge releases a path, delete for never-worked tasks; archive --resolved-before <when> archives every resolved subtree older than a threshold in one call, and archive_resolved_after_days makes validate report the ones due
Working copiesunaddressedone checkout on the integration branch mutates task state; .tasks/ on a feature branch is a declared merge hazard
Agent contracta skill's advicea normative Agent role with entry, freshness and exit rules

On this page