tasks

Quick start

From an empty repository to a claimed, paused, resumed and finished task.

Install

npm install -g @speekl/tasks

Either way, the command it installs is tasks. Node 20 or newer is required.

Not installing globally?

Everywhere the docs say tasks, npx @speekl/tasks works identically. Agents should fall back to it automatically when tasks is not on PATH.

Set up a project

Scaffold .tasks/

Run this at the root of the repository whose work you want to track.

tasks init
✓ Initialized .tasks/ at /Users/you/acme-api/.tasks
  actor: alice (heads every log entry you write; git config tasks.actor, TASKS_ACTOR or --as changes it)
  actors: none listed; uncomment actors: in config.yml to keep a roster
  .tasks/config.yml
  .tasks/README.md
  .tasks/.gitignore
  .tasks/.locks/
  .claude/skills/tasks/reference/convention.md
  .claude/skills/tasks/SKILL.md

• Installed the tasks skill so agents in this repo find the CLI.
• Create your first task: tasks new <path> <title…>

config.yml declares version: 2; the .gitignore keeps the transient .locks/ directory out of git. The actor is the name that will head every log entry you write — here the repository's git config user.name. A name with spaces cannot head a log entry and is skipped: name yourself once with git config --global tasks.actor alice. An agent gets its own name through TASKS_ACTOR, so the log tells the two apart; see configuration.

init also installs the agent skill into .claude/skills/tasks/, so agents in this repository reach for the CLI instead of inventing their own convention. Skip it with --no-skill. Running init on an existing tree is refused with exit 4; --force adds the scaffold files it lacks and never overwrites one.

Create tasks

A task's id is its path under .tasks/. Create an epic, then the parts of its deliverable beneath it:

tasks new auth-rework "Rework authentication"
tasks new auth-rework/token-schema "Design the token schema"
tasks new auth-rework/wire-refresh "Wire the refresh endpoint"
✓ new auth-rework/token-schema
  TODO · .tasks/auth-rework/token-schema

Each one is a directory holding a task.md. A task inside another task is its child, so auth-rework cannot be done until both children are resolved. Directories on the way are created on demand; one without a task.md is just a group.

Declare what waits on what

tasks dep add wire-refresh token-schema
✓ dep add auth-rework/wire-refresh: auth-rework/token-schema
  depends on: auth-rework/token-schema

Any unambiguous suffix of an id works on the command line; the full path is what gets stored. dep add refuses a task that does not exist, a task's own ancestor, and a reference that would close a cycle. A cancelled target is accepted and shows at once as blocked by … (cancelled): a dependency a person has to redirect or drop.

Fill in the body

tasks new scaffolds ## Description, ## Acceptance criteria and ## Notes. Open the file and write them, with any editor.

$EDITOR .tasks/auth-rework/token-schema/task.md

A task whose body is empty is not a task, it is a reminder. Put enough in it that a different agent arriving cold in a later session can do the work without asking.

Work the loop

See what is ready

tasks ready
 ID                         SITUATION   PRIORITY   LABELS   TITLE
 auth-rework/token-schema   ready                           Design the token schema

1 task

Overviews speak in situations, one word per task, rather than stored statuses. wire-refresh is absent because it is blocked by the schema, and the epic is absent because its work is its children's until they close. tasks list shows every open task with its situation:

 ID                         SITUATION                             PRIORITY   LABELS   TITLE
 auth-rework                open 0/2                                                  Rework authentication
 auth-rework/token-schema   ready                                                     Design the token schema
 auth-rework/wire-refresh   blocked by auth-rework/token-schema                       Wire the refresh endpoint

Once the tree has grown, tasks tree --top shows the top level alone — the epics with their open 0/2 progress and the tasks that stand on their own — and --depth 2 adds their children.

Claim before working

tasks claim --next --session s1
✓ claim auth-rework/token-schema: TODO → IN_PROGRESS

--next takes the first task of your ready set and claims it in one step, under the tree's lock, so two agents running it at once get different tasks. The session token names this run of work; the claim belongs to it, and state, pause and done on the task must carry the same token. Export it once instead of repeating the flag:

export TASKS_SESSION=s1

An agent's harness does this for it — see harness hooks.

Save the resume point

Before you stop, write state.md: where the work stands, for whoever continues it. A pause without one is refused:

✗ auth-rework/token-schema is IN_PROGRESS and has no state.md; write it before pausing (`tasks state auth-rework/token-schema` reads it from stdin).

tasks state replaces the file with standard input (or opens your editor with --edit):

tasks state token-schema < state.md
state.md
## Done

- Drafted the claims table in design.md.

## Verified

- Nothing yet.

## Open

- design.md is uncommitted.

## Next

- Decide the refresh-token lifetime.

Pause with a message

tasks pause token-schema -m "Claims table drafted; the token lifetime is still open."
✓ pause auth-rework/token-schema: IN_PROGRESS → PAUSED

The message is the history line: it lands in log.md, and the next reader sees it as the task's last entry without opening the log; the resume point itself is state.md. A paused task comes first in ready — finishing beats starting.

Resume in a later session

export TASKS_SESSION=s2
tasks resume token-schema
Design the token schema  auth-rework/token-schema
  status         PAUSED
  situation      ready · started
  priority       normal
  referenced by  auth-rework/wire-refresh
  path           /Users/you/acme-api/.tasks/auth-rework/token-schema

Ancestors
  auth-rework  TODO  Rework authentication  log.md

Workspace
  state.md, log.md

state.md
## Done

- Drafted the claims table in design.md.
…

Last entry
  2026-10-26T02:47:40Z alice s:s1
  pause: IN_PROGRESS → PAUSED
  Claims table drafted; the token lifetime is still open.

resume prints everything the next session needs: the task, its ancestors and their workspace files, its children, state.md in full and the last log entry.

Finish it

tasks claim token-schema
tasks done token-schema -m "Schema agreed; design.md committed."
tasks ready
✓ claim auth-rework/token-schema: PAUSED → IN_PROGRESS
✓ done auth-rework/token-schema: IN_PROGRESS → DONE
 ID                         SITUATION   PRIORITY   LABELS   TITLE
 auth-rework/wire-refresh   ready                           Wire the refresh endpoint

wire-refresh was waiting on the schema, so it is ready now.

Check the tree

tasks validate
✓ no findings · 3 tasks checked

Errors exit 4, so CI can gate on them; warnings alone exit 0. See validation for every finding.

Commit it

.tasks/ is meant to be committed. Task state branches, merges and reviews like the rest of the repository — mutate it on the integration branch, from one checkout.

git add .tasks .claude/skills/tasks
git commit -m "Track the auth rework in .tasks/"

The one thing not to commit is .tasks/.locks/, and the scaffolded .gitignore already handles that.

An index for reviewers

tasks reindex writes .tasks/index.md, a generated overview of the tree. Once it exists, every command that changes the tree regenerates it, so the committed copy follows the tasks. No command ever reads it.

Next

On this page