Task file
The task.md manifest — frontmatter fields, body, canonical serialization, and validation.
A task manifest, task.md, is a UTF-8 markdown file with a YAML frontmatter block followed by a
freeform body.
---
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
- [ ]
## NotesStructure
The file MUST begin with a line containing exactly ---, a YAML mapping, and a line containing
exactly ---. Everything after that is the body. A file with no frontmatter, or whose frontmatter
is not a mapping, or whose mapping fails the constraints below (other than the consistency of the
claim fields with the status, which validation reports as claim-fields on a task that otherwise
reads), MUST be reported as malformed and MUST NOT be silently skipped. A malformed manifest MUST NOT abort a query that spans it either: the
command completes, lists the task under malformed in its collection object
instead of among its tasks, and resolves every gate reference to it as unsatisfied with reason
malformed — fail safe: it blocks whatever depends on it and is never ready. validate reports
it as an error. YAML MUST be parsed with a schema that does not coerce timestamp-shaped scalars
into date objects.
Fields
| Field | Type | Required | Meaning |
|---|---|---|---|
status | one of the six statuses | yes | Current lifecycle state. |
priority | urgent | high | normal | low | default normal | How the task ranks in ready against others; see Priority. |
depends_on | reference[] | default [] | Start-gate references. |
finishes_after | reference[] | default [] | Finish-gate references beyond the task's own children: the task is done only after they are resolved; cancel does not wait for them. |
assignee | string | null | default null | The actor the task waits on: must act next, alone may transition it while unclaimed. Independent of status. |
claimed_by | string | null | default null | The actor working on the task right now. |
claimed_at | timestamp | null | default null | When that claim was taken. |
claimed_session | string | null | default null | The session token of the claimant, when known. |
created | timestamp | yes | Creation time; never modified. |
updated | timestamp | yes | Time of the last mutation of the frontmatter by an implementation. |
Constraints:
claimed_byandclaimed_atMUST both be non-null whenstatusisIN_PROGRESSand MUST both be null otherwise.claimed_sessionMAY be null while claimed (a claimant without a session); it MUST be null when the task is not claimed. All three MUST be set and cleared together by the transitions that enter and leaveIN_PROGRESS.assigneeMAY be set in any status and is not cleared by transitions.- Timestamps are ISO 8601 UTC, second precision,
Z-suffixed, serialized as quoted scalars. claimed_by,assigneeandclaimed_sessionare opaque strings matching the pattern under Actors; implementations MUST NOT interpret them.
Non-normative
Claimed and assigned are different facts. A deploy that only the maintainer
can perform is assigned to her and sits in TODO until she does it; nobody is claiming it.
An agent that took a task is its claimant; the assignee may be nobody. Conflating the two, as
a single "holder" would, makes either the inbox or the work record lie.
Body
Everything after the closing --- is the body: freeform markdown owned by the author. An
implementation MUST NOT rewrite, reformat or reorder it, except to normalize leading and trailing
whitespace when writing the file, and to append a note under ## Notes when asked to
(note).
An implementation that scaffolds a body SHOULD provide ## Description, ## Acceptance criteria
and ## Notes. The intended split, RECOMMENDED for authors and for agent skills:
- Description / Acceptance criteria — the definition of the task. A clarification received later changes these in place; it is not filed beside them as a contradicting note.
- Notes — inputs received after the start: findings, links, external facts, the provenance of
decisions ("2026-09-21, alice: keep the legacy route"). Progress never goes into Notes; it goes
into
state.mdand the log. An implementation SHOULD offer a command that appends a note, dated and attributed (- 2026-09-21, alice: keep the legacy route), as the one edit of the body the tooling makes: an input for whoever works next is then one command away, like a log message, and lands where the next reader looks rather than in the log.
Serialization
When an implementation writes a manifest, the frontmatter MUST be emitted in canonical form:
- The ten fields above, in that order, followed by any keys present on read but not defined here, in the order read (an implementation MAY place a key YAML reads as an integer first, quoted) and with their values re-emitted unchanged. An implementation MUST NOT interpret such keys and MUST NOT add any of its own.
- Lists as flow sequences:
[a, b], or[]when empty. - Timestamps always double-quoted;
nullfor absent nullable values. - Other scalars unquoted when they are unambiguous plain YAML, quoted otherwise.
- Comments are not preserved; the frontmatter block is machine-owned.
The file is then ---, newline, the frontmatter, newline, ---, blank line, the body, one
trailing newline. Repeated writes of unchanged state MUST produce identical bytes.
Validation
An implementation offering validation MUST detect at least:
| Condition | Severity |
|---|---|
task.md cannot be parsed as a manifest | error |
status is not one of the six statuses | error |
priority is not one of the four levels | error |
Claim fields inconsistent with status (see Fields) | error |
| A reference does not parse | error |
| A local cycle exists in the combined gate graph | error |
| A task depends on its own ancestor | error |
| A resolved task has a live open descendant | error |
An open descendant of a BACKLOG task is not BACKLOG | error |
| A live task's path is also an archived task's path | error |
| The same id is present twice (interrupted cross-filesystem move) | error |
log.md contains version-control conflict markers | error |
PAUSED without state.md | warning |
TODO with state.md | warning |
| A gate reference can never be satisfied (missing, archived, cancelled, unresolvable, not checked out, unsupported version) | warning |
An IN_PROGRESS claim that is orphaned, or whose non-null session has no heartbeat file | warning |
| A frontmatter key this specification does not define | warning |
| A configured project is not checked out, leads to no tree, or is a v1 or unsupported-version tree | warning |
| Two configured aliases lead to the same tree | warning |
| A configured documentation location does not exist on this machine | warning |
An open task's assignee or claimed_by that the tree's actors does not list, when it lists any | warning |
Resolved subtrees older than archive_resolved_after_days that an archive would take, when it is set | warning |
index.md is out of date | warning |
Repair MUST be opt-in and MUST be confined to regenerating index.md; every other finding
requires knowing intent.