tasks
Specification

Dependencies and gates

The start gate, the finish gate, cycles, and what cancelling or archiving a task does to its dependents.

Start gate

A task's start gate is satisfied when every reference in depends_on resolves to a live task whose status is DONE. Otherwise the reference is unsatisfied with exactly one reason:

ReasonCondition
not-doneThe task exists, is live and open.
cancelledThe task exists and is CANCELLED.
missingNo task at that path in the target tree, live or archived.
archivedThe path exists only under the target tree's .archive/.
malformedThe task exists but its manifest cannot be parsed (see Structure).
unresolved-projectAn external reference whose path does not resolve to a tree.
not-checked-outAn external reference through a configured alias whose directory is absent.
unsupported-versionAn external reference into a tree whose version this implementation does not support, a v1 tree included.

A reference that fails to parse MUST resolve as unsatisfied and MUST NOT abort the query; reporting it as missing is RECOMMENDED. A task with an empty depends_on satisfies the start gate trivially.

The start gate MUST be checked by claim and by done; an explicit force MAY override it.

Non-normative

Cancelled work never satisfies a dependency: nothing can be built on it. It does satisfy a finish gate: the parent's deliverable was redefined, explicitly.

A dependency on a cancelled task is therefore not blocked but stranded: waiting cannot open the gate. Only a person can, in one of three ways — cancel the dependent too, because its premise died with the dependency; remove the reference, because the dependent can proceed without it; or point the reference at whatever now does that work. A dependency is a monitor, not a link: the tool never cancels dependents on its own, because any of the three may be right and the tool cannot tell which. It makes the stranding visible instead — in the result of the cancel that caused it, in every overview as blocked by A (cancelled), and in validation — and a reopen of the dependency unblocks the dependents by itself, because blocking is computed.

Finish gate

A task's finish gate is satisfied when:

  1. every live child is resolved (DONE or CANCELLED), and
  2. every reference in finishes_after resolves to a live task that is resolved.

An unresolvable finishes_after reference blocks, with the reasons of the table above. The finish gate MUST be checked by done. cancel does not check it: it cascades to the children instead and ignores finishes_after (see Containment).

Consequences an implementation MUST enforce:

  • A task MUST NOT be created, moved or restored under a resolved parent.
  • A child of a resolved parent MUST NOT be reopened while the parent is resolved.
  • A resolved task with a live open descendant is a validation error.

Non-normative

The finish gate is a constraint, not a derivation. The parent's status stays a manual fact; the tool refuses done while children are open, and reports the parent as closable when they are not. Nothing is written on the parent's behalf: finishing an epic forces one explicit decision per child, while cancelling it is one decision for the whole subtree.

Cycles

Gate references form one graph with two kinds of edges: a depends_on reference (the target must be done before this task starts) and a finish edge from each child, and from each finishes_after reference, to the task (the source must be resolved before this task is done). A cycle in that graph means the tasks in it can never all resolve.

  • An implementation MUST detect cycles among local references during validation and report them as errors.
  • An implementation that offers dependency editing MUST refuse a self-reference, a reference to a task that does not exist, a reference from a task to its own ancestor (a guaranteed deadlock with the finish edge), and any reference that would introduce a local cycle; it MUST authorize the edit as it authorizes a transition of the task (Authorization).
  • Cross-tree edges MUST NOT be assumed traversable. An implementation SHOULD include them in cycle detection when the trees are reachable through projects:, and MUST otherwise treat them as non-edges.

Cancellation and deletion interaction

Cancelling a task that other open tasks depend on strands them (see the note under Start gate). cancel MUST NOT refuse for that reason — cancellation is a decision about the cancelled task — but its result MUST list, as dependents, every open task whose depends_on names a task the command cancelled, in the local tree and in the trees reachable through projects:, so that the decision about them is taken while the decider is present. A cascade lists the dependents of every task it reached.

Archiving a task that open tasks reference leaves those tasks permanently blocked. An implementation MUST refuse such an archive by default, MUST name the dependents, and MAY offer an explicit override, reporting which tasks were left blocked. A resolved task's reference to an archived task concerns nobody until that task is reopened; validation reports it then. Because archived paths remain reserved, recreating a task at the same path MUST fail rather than silently reconnect those references; a purge of the entry (see .archive/) is the explicit decision to allow it.

On this page