Conformance
The Reader, Writer, Manager, and Agent roles, what each requires, and what an implementation tests.
Roles are cumulative: a Writer is also a Reader, a Manager is also a Writer. Agent is orthogonal: it describes an actor's behaviour and presumes a Manager to act through.
Reader
A Reader MUST: discover the tree nearest-wins; enumerate tasks as directories containing
task.md at any depth under matching segments, ignoring dot-directories; derive parenthood from
the nearest task ancestor; parse frontmatter without date coercion and tolerate unknown keys;
resolve gates per Dependencies and gates, treating every unsatisfied
or unresolvable state as blocking; compute derived conditions from current state only; report a
malformed manifest rather than skip it, completing the query with that task blocking what
references it; refuse an unsupported version and a v1 tree; read
projects: without following them transitively and qualify foreign ids. A Reader MUST NOT read
index.md to answer any query, treat an archived or cancelled task as satisfying a start gate,
or write anything.
Writer
A Writer MUST additionally: write atomically and canonically, preserving unknown frontmatter
keys; set created once and updated on every mutation; keep claim fields consistent with
status; enforce every transition precondition,
including messages, the state.md rules and the cascades of Containment with
their order and logging; refuse creation under a resolved parent; refuse an actor named for
someone else that the roster lacks (Actors); refuse the
dependency edits listed under Cycles; relocate with reference rewriting in this tree and in the trees it lists; append a log
entry for every transition in the defined heading shape; write only under the tree lock; write
into another tree only when it is listed in projects:. A Writer MUST NOT rewrite the body,
design.md or plan.md; write state.md other than through the explicit state command;
persist derived conditions; or repair drift as a side effect.
Manager
A Manager MUST additionally: implement claiming with authorization, including ancestors'
assignees, the start gate, session recording, the liveness rules and the cascade liveness rule;
implement handoff, session-check, heartbeat and session-end; detect at
least the validation findings at the given severities and confine repair to
index.md; archive subtrees with path reservation, merge and dependent checks, and purge them;
migrate v1 trees. A Manager that exposes a command line MUST satisfy the
CLI contract in full.
Agent
An Agent MUST follow the agent protocol: a session token on every command;
entry through mine and resume with the reading order; claim before work; the freshness rule,
with state.md written through state where offered; --as only on instruction; exit through
pause, handoff or done with a message, the commits made named in the log and the listed
documentation up to date before done; no frontmatter edits and no manual moves; project state
only in the tree.
Self-checking
Beyond v1's round-trip stability, cross-implementation agreement on the ready set and on
situations, fail-safe under damaged references and concurrent-claim exclusivity, a v2
implementation SHOULD test: that done on a parent with an open child is refused and succeeds
once the child is resolved; that cancel on a parent cancels its open children, defer parks
them, schedule brings them back to PAUSED where a state.md exists, a cascade over a live
claim is refused and one over an orphaned claim supersedes it; that a pause without state.md
and a release with one are refused; that a takeover succeeds
only on an orphaned claim and the superseded session's next transition conflicts; that
session-check passes for a claim taken from PAUSED without a new write and fails for one taken
from TODO; that session-end makes a fresh claim orphaned and a takeover of it succeeds at
once; that a parent with an open child and a child of a BACKLOG epic are both absent from
ready; that a child of a claimed or assigned ancestor is absent from ready and its claim is refused;
that claim --next under contention hands every agent a different task; that a state write by a
superseded session is refused; that a heartbeat written in a
listing tree keeps a claim in a listed tree live; that cancel lists the dependents it stranded;
that an unknown frontmatter key survives a round trip; and that a move rewrites
every reference in the local tree and in listed trees and reports the ones in trees it cannot
write.